Initial revision
[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     delete
51         Deletes this domain from the database. If there is an error,
52         returns the error, otherwise returns false.
53
54         The corresponding FS::cust_svc record will be deleted as
55         well.
56
57     replace OLD_RECORD
58         Replaces OLD_RECORD with this one in the database. If there
59         is an error, returns the error, otherwise returns false.
60
61     suspend
62         Just returns false (no error) for now.
63
64         Called by the suspend method of FS::cust_pkg (see the
65         FS::cust_pkg manpage).
66
67     unsuspend
68         Just returns false (no error) for now.
69
70         Called by the unsuspend method of FS::cust_pkg (see the
71         FS::cust_pkg manpage).
72
73     cancel
74         Just returns false (no error) for now.
75
76         Called by the cancel method of FS::cust_pkg (see the
77         FS::cust_pkg manpage).
78
79     check
80         Checks all fields to make sure this is a valid domain. If
81         there is an error, returns the error, otherwise returns
82         false. Called by the insert and replace methods.
83
84         Sets any fixed values; see the FS::part_svc manpage.
85
86     _whois
87         Executes the command:
88
89           whois do $domain
90
91         and returns the output.
92
93         (Always returns *No match for domian "$domain".* if
94         $FS::svc_domain::whois_hack is set true.)
95
96     submit_internic
97         Submits a registration email for this domain.
98
99 BUGS
100     It doesn't properly override FS::Record yet.
101
102     All BIND/DNS fields should be included (and exported).
103
104     All registries should be supported.
105
106     Not all configuration access is through FS::Conf!
107
108     Should change action to a real field.
109
110 SEE ALSO
111     the FS::Record manpage, the FS::Conf manpage, the FS::cust_svc
112     manpage, the FS::part_svc manpage, the FS::cust_pkg manpage, the
113     FS::SSH manpage, the ssh manpage, the dot-qmail manpage,
114     schema.html from the base documentation, config.html from the
115     base documentation.
116
117 HISTORY
118     ivan@voicenet.com 97-jul-21
119
120     rewrite ivan@sisd.com 98-mar-10
121
122     add internic bits ivan@sisd.com 98-mar-14
123
124     Changed 'day' to 'daytime' because Pg6.3 reserves the day word
125     bmccane@maxbaud.net 98-apr-3
126
127     /var/spool/freeside/conf/registries/internic/, Mail::Internet,
128     etc. ivan@sisd.com 98-jul-17-19
129
130     pod, some FS::Conf (not complete) ivan@sisd.com 98-sep-23
131