Difference between revisions of "Freeside:3:Documentation:Developer/FS/export svc"
From Freeside
m (Edit via perl MediaWiki framework (1.13)) |
m (Edit via perl MediaWiki framework (1.13)) |
||
Line 20: | Line 20: | ||
An FS::export_svc object links a service definition (see [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]]) to an export (see [[Freeside:3:Documentation:Developer/FS/part export|FS::part_export]]). FS::export_svc inherits from FS::Record. The following fields are currently supported: | An FS::export_svc object links a service definition (see [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]]) to an export (see [[Freeside:3:Documentation:Developer/FS/part export|FS::part_export]]). FS::export_svc inherits from FS::Record. The following fields are currently supported: | ||
− | ; exportsvcnum - primary key; exportnum - export (see [[Freeside:3:Documentation:Developer/FS/part export|FS::part_export]]); svcpart - service definition (see [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]]) | + | ; exportsvcnum - primary key; exportnum - export (see [[Freeside:3:Documentation:Developer/FS/part export|FS::part_export]]); svcpart - service definition (see [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]]); role - export role (see export parameters) |
==METHODS== | ==METHODS== | ||
; new HASHREF | ; new HASHREF |
Latest revision as of 05:34, 10 February 2015
Contents
NAME
FS::export_svc - Object methods for export_svc records
SYNOPSIS
use FS::export_svc; $record = new FS::export_svc \%hash; $record = new FS::export_svc { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::export_svc object links a service definition (see FS::part_svc) to an export (see FS::part_export). FS::export_svc inherits from FS::Record. The following fields are currently supported:
- exportsvcnum - primary key; exportnum - export (see FS::part_export); svcpart - service definition (see FS::part_svc); role - export role (see export parameters)
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.
- insert [ JOB, OFFSET, MULTIPLIER ]
- Adds this record to the database. If there is an error, returns the error, otherwise returns false.
- TODOC: JOB, OFFSET, MULTIPLIER
- 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.
- part_export
- Returns the FS::part_export object (see FS::part_export).
- part_svc
- Returns the FS::part_svc object (see FS::part_svc).
- svc_export_machine
- Returns all export hostname records (FS::svc_export_machine) for this combination of svcpart and exportnum.
BUGS
SEE ALSO
FS::part_export, FS::part_svc, FS::Record, schema.html from the base documentation.