Difference between revisions of "Freeside:3:Documentation:Developer/FS/export svc"

From Freeside
Jump to: navigation, search
m (Edit via perl MediaWiki framework (1.13))
 
m (Edit via perl MediaWiki framework (1.13))
Line 40: Line 40:
 
; part_svc
 
; part_svc
 
:Returns the FS::part_svc object (see [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]]).
 
:Returns the FS::part_svc object (see [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]]).
 +
; svc_export_machine
 +
:Returns all export hostname records ([[Freeside:3:Documentation:Developer/FS/svc export machine|FS::svc_export_machine]]) for this combination of svcpart and exportnum.
  
 
==BUGS==
 
==BUGS==
 
==SEE ALSO==
 
==SEE ALSO==
 
[[Freeside:3:Documentation:Developer/FS/part export|FS::part_export]], [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]], [[Freeside:3:Documentation:Developer/FS/Record|FS::Record]], schema.html from the base documentation.
 
[[Freeside:3:Documentation:Developer/FS/part export|FS::part_export]], [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]], [[Freeside:3:Documentation:Developer/FS/Record|FS::Record]], schema.html from the base documentation.

Revision as of 13:34, 27 June 2014

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)

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.