Freeside:1.9:Documentation:Developer/FS/svc forward

From Freeside
< Freeside:1.9:Documentation:Developer‎ | FS
Revision as of 16:51, 3 October 2007 by Ivan (talk | contribs) (import from POD)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NAME

FS::svc_forward - Object methods for svc_forward records

SYNOPSIS

 use FS::svc_forward;

 $record = new FS::svc_forward \%hash;
 $record = new FS::svc_forward { '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_forward object represents a mail forwarding alias. FS::svc_forward inherits from FS::Record. The following fields are currently supported:

svcnum - primary key (assigned automatcially for new accounts); srcsvc - svcnum of the source of the forward (see FS::svc_acct); src - literal source (username or full email address); dstsvc - svcnum of the destination of the forward (see FS::svc_acct); dst - literal destination (username or full email address)

METHODS

new HASHREF
Creates a new mail forwarding alias. To add the mail forwarding alias to the database, see "insert"|#insert|"insert".
search_sql STRING
Class method which returns an SQL fragment to search for the given string.
label [ END_TIMESTAMP [ START_TIMESTAMP ] ]
Returns a text string representing this forward.
END_TIMESTAMP and START_TIMESTAMP can optionally be passed when dealing with history records.
insert [ , OPTION => VALUE ... ]
Adds this mail forwarding alias 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
Deletes this mail forwarding alias 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.
replace OLD_RECORD
Replaces OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
suspend
Just returns false (no error) for now.
Called by the suspend method of FS::cust_pkg (see FS::cust_pkg).
unsuspend
Just returns false (no error) for now.
Called by the unsuspend method of FS::cust_pkg (see FS::cust_pkg).
cancel
Just returns false (no error) for now.
Called by the cancel method of FS::cust_pkg (see FS::cust_pkg).
check
Checks all fields to make sure this is a valid mail forwarding alias. 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.
srcsvc_acct
Returns the FS::svc_acct object referenced by the srcsvc column, or false for literally specified forwards.
dstsvc_acct
Returns the FS::svc_acct object referenced by the srcsvc column, or false for literally specified forwards.

BUGS

SEE ALSO

FS::Record, FS::Conf, FS::cust_svc, FS::part_svc, FS::cust_pkg, FS::svc_acct, FS::svc_domain, schema.html from the base documentation.