9b5e1a53c7ea818568620a5f0999fcfd1c30ed2e
[freeside.git] / htdocs / docs / man / FS / svc_domain.html
1 <HTML>
2 <HEAD>
3 <TITLE>FS::svc_domain - Object methods for svc_domain records</TITLE>
4 <LINK REV="made" HREF="mailto:ivan@rootwood.sisd.com">
5 </HEAD>
6
7 <BODY>
8
9 <!-- INDEX BEGIN -->
10
11 <UL>
12
13         <LI><A HREF="#NAME">NAME</A>
14         <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
15         <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
16         <LI><A HREF="#METHODS">METHODS</A>
17         <LI><A HREF="#VERSION">VERSION</A>
18         <LI><A HREF="#BUGS">BUGS</A>
19         <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
20 </UL>
21 <!-- INDEX END -->
22
23 <HR>
24 <P>
25 <H1><A NAME="NAME">NAME</A></H1>
26 <P>
27 FS::svc_domain - Object methods for svc_domain records
28
29 <P>
30 <HR>
31 <H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
32 <P>
33 <PRE>  use FS::svc_domain;
34 </PRE>
35 <P>
36 <PRE>  $record = new FS::svc_domain \%hash;
37   $record = new FS::svc_domain { 'column' =&gt; 'value' };
38 </PRE>
39 <P>
40 <PRE>  $error = $record-&gt;insert;
41 </PRE>
42 <P>
43 <PRE>  $error = $new_record-&gt;replace($old_record);
44 </PRE>
45 <P>
46 <PRE>  $error = $record-&gt;delete;
47 </PRE>
48 <P>
49 <PRE>  $error = $record-&gt;check;
50 </PRE>
51 <P>
52 <PRE>  $error = $record-&gt;suspend;
53 </PRE>
54 <P>
55 <PRE>  $error = $record-&gt;unsuspend;
56 </PRE>
57 <P>
58 <PRE>  $error = $record-&gt;cancel;
59 </PRE>
60 <P>
61 <HR>
62 <H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
63 <P>
64 An FS::svc_domain object represents a domain. FS::svc_domain inherits from
65 FS::svc_Common. The following fields are currently supported:
66
67 <DL>
68 <DT><STRONG><A NAME="item_svcnum">svcnum - primary key (assigned automatically for new accounts)</A></STRONG><DD>
69 <DT><STRONG><A NAME="item_domain">domain</A></STRONG><DD>
70 </DL>
71 <P>
72 <HR>
73 <H1><A NAME="METHODS">METHODS</A></H1>
74 <DL>
75 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><DD>
76 <P>
77 Creates a new domain. To add the domain to the database, see <A HREF="#insert">insert</A>.
78
79 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><DD>
80 <P>
81 Adds this domain to the database. If there is an error, returns the error,
82 otherwise returns false.
83
84 <P>
85 The additional fields <EM>pkgnum</EM> and <EM>svcpart</EM> (see <A HREF="../FS/cust_svc.html">FS::cust_svc</A>) should be defined. An FS::cust_svc record will be created and inserted.
86
87 <P>
88 The additional field <EM>action</EM> should be set to <EM>N</EM> for new domains or <EM>M</EM>
89 for transfers.
90
91 <P>
92 A registration or transfer email will be submitted unless
93 $FS::svc_domain::whois_hack is true.
94
95 <P>
96 The additional field <EM>email</EM> can be used to manually set the admin contact email address on this email.
97 Otherwise, the svc_acct records for this package (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>) are searched. If there is exactly one svc_acct record in the same
98 package, it is automatically used. Otherwise an error is returned.
99
100 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><DD>
101 <P>
102 Deletes this domain from the database. If there is an error, returns the
103 error, otherwise returns false.
104
105 <P>
106 The corresponding FS::cust_svc record will be deleted as well.
107
108 <DT><STRONG><A NAME="item_replace">replace OLD_RECORD</A></STRONG><DD>
109 <P>
110 Replaces OLD_RECORD with this one in the database. If there is an error,
111 returns the error, otherwise returns false.
112
113 <DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><DD>
114 <P>
115 Just returns false (no error) for now.
116
117 <P>
118 Called by the suspend method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
119
120 <DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><DD>
121 <P>
122 Just returns false (no error) for now.
123
124 <P>
125 Called by the unsuspend method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
126
127 <DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><DD>
128 <P>
129 Just returns false (no error) for now.
130
131 <P>
132 Called by the cancel method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
133
134 <DT><STRONG><A NAME="item_check">check</A></STRONG><DD>
135 <P>
136 Checks all fields to make sure this is a valid domain. If there is an
137 error, returns the error, otherwise returns false. Called by the insert and
138 replace methods.
139
140 <P>
141 Sets any fixed values; see <A HREF="../FS/part_svc.html">FS::part_svc</A>.
142
143 <DT><STRONG><A NAME="item_whois">whois</A></STRONG><DD>
144 <P>
145 Returns the Net::Whois object corresponding to this domain, or undef if the
146 domain is not found in whois.
147
148 <P>
149 (If $FS::svc_domain::whois_hack is true, returns that in all cases
150 instead.)
151
152 <DT><STRONG><A NAME="item__whois">_whois</A></STRONG><DD>
153 <P>
154 Depriciated.
155
156 <DT><STRONG><A NAME="item_submit_internic">submit_internic</A></STRONG><DD>
157 <P>
158 Submits a registration email for this domain.
159
160 </DL>
161 <P>
162 <HR>
163 <H1><A NAME="VERSION">VERSION</A></H1>
164 <P>
165 $Id: svc_domain.html,v 1.1 1999-08-04 12:13:27 ivan Exp $
166
167 <P>
168 <HR>
169 <H1><A NAME="BUGS">BUGS</A></H1>
170 <P>
171 All BIND/DNS fields should be included (and exported).
172
173 <P>
174 Delete doesn't send a registration template.
175
176 <P>
177 All registries should be supported.
178
179 <P>
180 Should change action to a real field.
181
182 <P>
183 The <CODE>$recref</CODE> stuff in sub check should be cleaned up.
184
185 <P>
186 <HR>
187 <H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
188 <P>
189 <A HREF="../FS/svc_Common.html">FS::svc_Common</A>, <A HREF="../FS/Record.html">FS::Record</A>, <A HREF="../FS/Conf.html">FS::Conf</A>, <A HREF="../FS/cust_svc.html">FS::cust_svc</A>,
190 <A HREF="../FS/part_svc.html">FS::part_svc</A>, <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>, <A HREF="../FS/SSH.html">FS::SSH</A>, <A HREF="../Net/Whois.html">Net::Whois</A>, <EM>ssh</EM>,
191 <EM>dot-qmail</EM>, schema.html from the base documentation, config.html from the base
192 documentation.
193
194 </BODY>
195
196 </HTML>