3 <TITLE>FS::svc_domain - Object methods for svc_domain records</TITLE>
4 <LINK REV="made" HREF="mailto:ivan@rootwood.sisd.com">
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>
25 <H1><A NAME="NAME">NAME</A></H1>
27 FS::svc_domain - Object methods for svc_domain records
31 <H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
33 <PRE> use FS::svc_domain;
36 <PRE> $record = new FS::svc_domain \%hash;
37 $record = new FS::svc_domain { 'column' => 'value' };
40 <PRE> $error = $record->insert;
43 <PRE> $error = $new_record->replace($old_record);
46 <PRE> $error = $record->delete;
49 <PRE> $error = $record->check;
52 <PRE> $error = $record->suspend;
55 <PRE> $error = $record->unsuspend;
58 <PRE> $error = $record->cancel;
62 <H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
64 An FS::svc_domain object represents a domain. FS::svc_domain inherits from
65 FS::svc_Common. The following fields are currently supported:
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>
73 <H1><A NAME="METHODS">METHODS</A></H1>
75 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><DD>
77 Creates a new domain. To add the domain to the database, see <A HREF="#insert">insert</A>.
79 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><DD>
81 Adds this domain to the database. If there is an error, returns the error,
82 otherwise returns false.
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.
88 The additional field <EM>action</EM> should be set to <EM>N</EM> for new domains or <EM>M</EM>
92 A registration or transfer email will be submitted unless
93 $FS::svc_domain::whois_hack is true.
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.
100 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><DD>
102 Deletes this domain from the database. If there is an error, returns the
103 error, otherwise returns false.
106 The corresponding FS::cust_svc record will be deleted as well.
108 <DT><STRONG><A NAME="item_replace">replace OLD_RECORD</A></STRONG><DD>
110 Replaces OLD_RECORD with this one in the database. If there is an error,
111 returns the error, otherwise returns false.
113 <DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><DD>
115 Just returns false (no error) for now.
118 Called by the suspend method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
120 <DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><DD>
122 Just returns false (no error) for now.
125 Called by the unsuspend method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
127 <DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><DD>
129 Just returns false (no error) for now.
132 Called by the cancel method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
134 <DT><STRONG><A NAME="item_check">check</A></STRONG><DD>
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
141 Sets any fixed values; see <A HREF="../FS/part_svc.html">FS::part_svc</A>.
143 <DT><STRONG><A NAME="item_whois">whois</A></STRONG><DD>
145 Returns the Net::Whois object corresponding to this domain, or undef if the
146 domain is not found in whois.
149 (If $FS::svc_domain::whois_hack is true, returns that in all cases
152 <DT><STRONG><A NAME="item__whois">_whois</A></STRONG><DD>
156 <DT><STRONG><A NAME="item_submit_internic">submit_internic</A></STRONG><DD>
158 Submits a registration email for this domain.
163 <H1><A NAME="VERSION">VERSION</A></H1>
165 $Id: svc_domain.html,v 1.1 1999-08-04 12:13:27 ivan Exp $
169 <H1><A NAME="BUGS">BUGS</A></H1>
171 All BIND/DNS fields should be included (and exported).
174 Delete doesn't send a registration template.
177 All registries should be supported.
180 Should change action to a real field.
183 The <CODE>$recref</CODE> stuff in sub check should be cleaned up.
187 <H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
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