Freeside:1.7:Documentation:Developer/FS/svc www

From Freeside
Jump to: navigation, search

NAME

FS::svc_www - Object methods for svc_www records

SYNOPSIS

 use FS::svc_www;

 $record = new FS::svc_www \%hash;
 $record = new FS::svc_www { '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;

DESCRIPTION

An FS::svc_www object represents an web virtual host. FS::svc_www inherits from FS::svc_Common. The following fields are currently supported:

svcnum - primary key; recnum - DNS `A' record corresponding to this web virtual host. (see FS::domain_record); usersvc - account (see FS::svc_acct) corresponding to this web virtual host.

METHODS

new HASHREF
Creates a new web virtual host. To add the record to the database, see "insert".
Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the hash method.
label [ END_TIMESTAMP [ START_TIMESTAMP ] ]
Returns the zone name for this virtual host.
END_TIMESTAMP and START_TIMESTAMP can optionally be passed when dealing with history records.
insert [ , OPTION => VALUE ... ]
Adds this record 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.
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)).
delete
Delete this record from the database.
replace OLD_RECORD
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
suspend
Called by the suspend method of FS::cust_pkg (see FS::cust_pkg).
unsuspend
Called by the unsuspend method of FS::cust_pkg (see FS::cust_pkg).
cancel
Called by the cancel method of FS::cust_pkg (see FS::cust_pkg).
check
Checks all fields to make sure this is a valid web virtual host. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
domain_record
Returns the FS::domain_record record for this web virtual host's zone (see FS::domain_record).
svc_acct
Returns the FS::svc_acct record for this web virtual host's owner (see FS::svc_acct).

BUGS

SEE ALSO

FS::svc_Common, FS::Record, FS::domain_record, FS::cust_svc, FS::part_svc, FS::cust_pkg, schema.html from the base documentation.