change configuration file layout to support multiple distinct databases (with
[freeside.git] / htdocs / docs / man / svc_domain.txt
1 NAME
2     FS::svc_domain - Object methods for svc_domain records
3
4 SYNOPSIS
5       use FS::svc_domain;
6
7       $record = create FS::svc_domain \%hash;
8       $record = create FS::svc_domain { 'column' => 'value' };
9
10       $error = $record->insert;
11
12       $error = $new_record->replace($old_record);
13
14       $error = $record->delete;
15
16       $error = $record->check;
17
18       $error = $record->suspend;
19
20       $error = $record->unsuspend;
21
22       $error = $record->cancel;
23
24 DESCRIPTION
25     An FS::svc_domain object represents a domain. FS::svc_domain
26     inherits from FS::Record. The following fields are currently
27     supported:
28
29     svcnum - primary key (assigned automatically for new accounts)
30     domain
31 METHODS
32     create HASHREF
33         Creates a new domain. To add the domain to the database, see
34         the section on "insert".
35
36     insert
37         Adds this domain to the database. If there is an error,
38         returns the error, otherwise returns false.
39
40         The additional fields *pkgnum* and *svcpart* (see the
41         FS::cust_svc manpage) should be defined. An FS::cust_svc
42         record will be created and inserted.
43
44         The additional field *action* should be set to *N* for new
45         domains or *M* for transfers.
46
47         A registration or transfer email will be submitted unless
48         $FS::svc_domain::whois_hack is true.
49
50         The additional field *email* can be used to manually set the
51         admin contact email address on this email. Otherwise, the
52         svc_acct records for this package (see the FS::cust_pkg
53         manpage) are searched. If there is exactly one svc_acct
54         record in the same package, it is automatically used.
55         Otherwise an error is returned.
56
57     delete
58         Deletes this domain from the database. If there is an error,
59         returns the error, otherwise returns false.
60
61         The corresponding FS::cust_svc record will be deleted as
62         well.
63
64     replace OLD_RECORD
65         Replaces OLD_RECORD with this one in the database. If there
66         is an error, returns the error, otherwise returns false.
67
68     suspend
69         Just returns false (no error) for now.
70
71         Called by the suspend method of FS::cust_pkg (see the
72         FS::cust_pkg manpage).
73
74     unsuspend
75         Just returns false (no error) for now.
76
77         Called by the unsuspend method of FS::cust_pkg (see the
78         FS::cust_pkg manpage).
79
80     cancel
81         Just returns false (no error) for now.
82
83         Called by the cancel method of FS::cust_pkg (see the
84         FS::cust_pkg manpage).
85
86     check
87         Checks all fields to make sure this is a valid domain. If
88         there is an error, returns the error, otherwise returns
89         false. Called by the insert and replace methods.
90
91         Sets any fixed values; see the FS::part_svc manpage.
92
93     _whois
94         Executes the command:
95
96           whois do $domain
97
98         and returns the output.
99
100         (Always returns *No match for domian "$domain".* if
101         $FS::svc_domain::whois_hack is set true.)
102
103     submit_internic
104         Submits a registration email for this domain.
105
106 BUGS
107     It doesn't properly override FS::Record yet.
108
109     All BIND/DNS fields should be included (and exported).
110
111     All registries should be supported.
112
113     Not all configuration access is through FS::Conf!
114
115     Should change action to a real field.
116
117 SEE ALSO
118     the FS::Record manpage, the FS::Conf manpage, the FS::cust_svc
119     manpage, the FS::part_svc manpage, the FS::cust_pkg manpage, the
120     FS::SSH manpage, the ssh manpage, the dot-qmail manpage,
121     schema.html from the base documentation, config.html from the
122     base documentation.
123
124 VERSION
125     $Id: svc_domain.txt,v 1.2 1998-11-13 09:56:45 ivan Exp $
126
127 HISTORY
128     ivan@voicenet.com 97-jul-21
129
130     rewrite ivan@sisd.com 98-mar-10
131
132     add internic bits ivan@sisd.com 98-mar-14
133
134     Changed 'day' to 'daytime' because Pg6.3 reserves the day word
135     bmccane@maxbaud.net 98-apr-3
136
137     /var/spool/freeside/conf/registries/internic/, Mail::Internet,
138     etc. ivan@sisd.com 98-jul-17-19
139
140     pod, some FS::Conf (not complete) ivan@sisd.com 98-sep-23
141
142     $Log: svc_domain.txt,v $
143     Revision 1.2  1998-11-13 09:56:45  ivan
144     change configuration file layout to support multiple distinct databases (with
145     own set of config files, export, etc.)
146  Revision 1.2 1998/10/14 08:18:21 ivan
147     More informative error messages and better doc for admin contact
148     email stuff
149