Difference between revisions of "Freeside:3:Documentation:Developer/FS/svc forward"
From Freeside
m (Edit via perl MediaWiki framework (1.13)) |
m (Edit via perl MediaWiki framework (1.13)) |
||
Line 70: | Line 70: | ||
; dstsvc_acct | ; dstsvc_acct | ||
:Returns the FS::svc_acct object referenced by the srcsvc column, or false for literally specified forwards. | :Returns the FS::svc_acct object referenced by the srcsvc column, or false for literally specified forwards. | ||
+ | ; src_email | ||
+ | :Returns the email address to be forwarded regardless of weither it is local or remote | ||
+ | ; dst_email | ||
+ | :Returns the email address which gets forwarded to regardless of weither it is local or remote | ||
+ | ; srcsvc_acct_domain | ||
+ | :Returns the domain of the srcsvc_acct | ||
==BUGS== | ==BUGS== | ||
==SEE ALSO== | ==SEE ALSO== | ||
[[Freeside:3:Documentation:Developer/FS/Record|FS::Record]], [[Freeside:3:Documentation:Developer/FS/Conf|FS::Conf]], [[Freeside:3:Documentation:Developer/FS/cust svc|FS::cust_svc]], [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]], [[Freeside:3:Documentation:Developer/FS/cust pkg|FS::cust_pkg]], [[Freeside:3:Documentation:Developer/FS/svc acct|FS::svc_acct]], [[Freeside:3:Documentation:Developer/FS/svc domain|FS::svc_domain]], schema.html from the base documentation. | [[Freeside:3:Documentation:Developer/FS/Record|FS::Record]], [[Freeside:3:Documentation:Developer/FS/Conf|FS::Conf]], [[Freeside:3:Documentation:Developer/FS/cust svc|FS::cust_svc]], [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]], [[Freeside:3:Documentation:Developer/FS/cust pkg|FS::cust_pkg]], [[Freeside:3:Documentation:Developer/FS/svc acct|FS::svc_acct]], [[Freeside:3:Documentation:Developer/FS/svc domain|FS::svc_domain]], schema.html from the base documentation. |
Latest revision as of 05:41, 10 February 2015
Contents
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".
- 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.
- src_email
- Returns the email address to be forwarded regardless of weither it is local or remote
- dst_email
- Returns the email address which gets forwarded to regardless of weither it is local or remote
- srcsvc_acct_domain
- Returns the domain of the srcsvc_acct
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.