convert from pod for 1.2.0 release
[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 = new FS::svc_domain \%hash;
8       $record = new 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::svc_Common. The following fields are currently
27     supported:
28
29     svcnum - primary key (assigned automatically for new accounts)
30     domain
31 METHODS
32     new 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 VERSION
107     $Id: svc_domain.txt,v 1.4 1999-04-08 13:39:32 ivan Exp $
108
109 BUGS
110     All BIND/DNS fields should be included (and exported).
111
112     Delete doesn't send a registration template.
113
114     All registries should be supported.
115
116     Should change action to a real field.
117
118     The $recref stuff in sub check should be cleaned up.
119
120 SEE ALSO
121     the FS::svc_Common manpage, the FS::Record manpage, the FS::Conf
122     manpage, the FS::cust_svc manpage, the FS::part_svc manpage, the
123     FS::cust_pkg manpage, the FS::SSH manpage, the ssh manpage, the
124     dot-qmail manpage, schema.html from the base documentation,
125     config.html from the base documentation.
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.4  1999-04-08 13:39:32  ivan
144     convert from pod for 1.2.0 release
145  Revision 1.7 1999/04/07 14:40:15 ivan
146     use all stuff that's qsearch'ed to avoid warnings
147
148     Revision 1.6 1999/01/25 12:26:17 ivan yet more mod_perl stuff
149
150     Revision 1.5 1998/12/30 00:30:47 ivan svc_ stuff is more
151     properly OO - has a common superclass FS::svc_Common
152
153     Revision 1.3 1998/11/13 09:56:57 ivan change configuration file
154     layout to support multiple distinct databases (with own set of
155     config files, export, etc.)
156
157     Revision 1.2 1998/10/14 08:18:21 ivan More informative error
158     messages and better doc for admin contact email stuff
159