Freeside:4:Documentation:Developer/FS/part svc link

From Freeside
< Freeside:4:Documentation:Developer‎ | FS
Revision as of 07:26, 18 November 2015 by Jeremyd (talk | contribs) (Edit via perl MediaWiki framework (1.13))

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

NAME

FS::part_svc_link - Object methods for part_svc_link records

SYNOPSIS

 use FS::part_svc_link;

 $record = new FS::part_svc_link \%hash;
 $record = new FS::part_svc_link { 'column' => 'value' };

 $error = $record->insert;

 $error = $new_record->replace($old_record);

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::part_svc_link object represents an service definition dependency. FS::part_svc_link inherits from FS::Record. The following fields are currently supported:

svclinknum
primary key
agentnum
Empty for global dependencies, or agentnum (see FS::agent) for agent-specific dependencies
src_svcpart
Source service definition (see FS::part_svc)
dst_svcpart
Destination service definition (see FS::part_svc)
link_type
Link type:
part_pkg_restrict
In package defintions, require the destination service definition when the source service definition is included
part_pkg_restrict_soft
Soft order block: in package definitions, suggest the destination service definition when the source service definition is included
cust_svc_provision_restrict
Require the destination service to be provisioned before the source service
cust_svc_unprovision_restrict
Require the destination service to be unprovisioned before the source service
cust_svc_unprovision_cascade
Automatically unprovision the destination service when the source service is unprovisioned
cust_svc_suspend_cascade
Suspend the destination service after the source service

METHODS

new HASHREF
Creates a new record. 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.
by_agentnum AGENTNUM, KEY => VALUE, ...
Alternate search consructor. Given an agentnum then a list of keys and values, searches for part_svc_link records with the given agentnum (or no agentnum).
Additional keys and values are searched for in the part_pkg_link table (typically src_svcpart and link_type).
insert
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
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.
check
Checks all fields to make sure this is a valid record. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
description
Returns an extended description of this dependency, including. Exact wording depends on link_type.
src_part_svc
Returns the source service definition, as an FS::part_svc object (see FS::part_svc).
src_svc
Returns the source service definition name (part_svc.svc).
dst_part_svc
Returns the destination service definition, as an FS::part_svc object (see FS::part_svc).
dst_svc
Returns the destination service definition name (part_svc.svc).

BUGS

SEE ALSO

FS::part_svc, FS::Record