% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::svc_domain - Object methods for svc_domain records
use FS::svc_domain;
$record = new FS::svc_domain \%hash;
$record = new FS::svc_domain { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
$error = $record->suspend;
$error = $record->unsuspend;
$error = $record->cancel;
An FS::svc_domain object represents a domain. FS::svc_domain inherits from FS::svc_Common. The following fields are currently supported:
primary key (assigned automatically for new accounts)
optional svcnum of an svc_acct record, designating an email catchall account.
Storage limit
Registrar (see FS::registrar)
Registrar key or password for this domain
UNIX timestamp
Number of days before expiration date to start renewal
UNIX timestamp
AU-specific field for domain registrations
AU-specific field for domain registrations
Creates a new domain. To add the domain to the database, see "insert".
Returns the domain.
Adds this domain to the database. If there is an error, returns the error, otherwise returns false.
The additional fields pkgnum and svcpart (see FS::cust_svc) should be defined. An FS::cust_svc record will be created and inserted.
The additional field action should be set to N for new domains, M for transfers, or I for no action (registered elsewhere).
The additional field email can be used to manually set the admin contact email address on this email. Otherwise, the svc_acct records for this package (see FS::cust_pkg) are searched. If there is exactly one svc_acct record in the same package, it is automatically used. Otherwise an error is returned.
If any soamachine configuration file exists, an SOA record is added to the domain_record table (see <FS::domain_record>).
If any records are defined in the defaultrecords configuration file, appropriate records are added to the domain_record table (see FS::domain_record).
Currently available options are: depend_jobnum
If depend_jobnum is set (to a scalar jobnum or an array reference of jobnums), all provisioning jobs will have a dependancy on the supplied jobnum(s) (they will not run until the specific job(s) complete(s)).
Deletes this domain from the database. If there is an error, returns the error, otherwise returns false.
The corresponding FS::cust_svc record will be deleted as well.
Replaces OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
Just returns false (no error) for now.
Called by the suspend method of FS::cust_pkg (see FS::cust_pkg).
Just returns false (no error) for now.
Called by the unsuspend method of FS::cust_pkg (see FS::cust_pkg).
Just returns false (no error) for now.
Called by the cancel method of FS::cust_pkg (see FS::cust_pkg).
Checks all fields to make sure this is a valid domain. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Sets any fixed values; see FS::part_svc.
# Returns the Net::Whois::Domain object (see Net::Whois) for this domain, or # undef if the domain is not found in whois.
(If $FS::svc_domain::whois_hack is true, returns that in all cases instead.)
Delete doesn't send a registration template.
All registries should be supported.
Should change action to a real field.
The $recref stuff in sub check should be cleaned up.
FS::svc_Common, FS::Record, FS::Conf, FS::cust_svc, FS::part_svc, FS::cust_pkg, Net::Whois, schema.html from the base documentation, config.html from the base documentation.