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

From Freeside
Jump to: navigation, search
m (Edit via perl MediaWiki framework (1.13))
 
m (Edit via perl MediaWiki framework (1.13))
 
Line 52: Line 52:
 
; check
 
; check
 
:Checks all fields to make sure this is a valid port. If there is an error, returns the error, otherwise returns false. Called by the insert and repalce methods.
 
:Checks all fields to make sure this is a valid port. If there is an error, returns the error, otherwise returns false. Called by the insert and repalce methods.
; graph_png
 
:Returns a PNG graph for this port.
 
  
:The following options must be specified:
 
:; start =item end
 
 
==BUGS==
 
==BUGS==
 
==SEE ALSO==
 
==SEE ALSO==
 
[[Freeside:3:Documentation:Developer/FS/svc Common|FS::svc_Common]], [[Freeside:3:Documentation:Developer/FS/Record|FS::Record]], [[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]], schema.html from the base documentation.
 
[[Freeside:3:Documentation:Developer/FS/svc Common|FS::svc_Common]], [[Freeside:3:Documentation:Developer/FS/Record|FS::Record]], [[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]], schema.html from the base documentation.

Latest revision as of 14:39, 27 June 2014

NAME

FS::svc_port - Object methods for svc_port records

SYNOPSIS

 use FS::svc_port;

 $record = new FS::svc_port \%hash;
 $record = new FS::svc_port { '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_port object represents a router port. FS::table_name inherits from FS::svc_Common. The following fields are currently supported:

svcnum -; serviceid - Torrus serviceid (in srvexport and reportfields tables)

METHODS

new HASHREF
Creates a new port. To add the port 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.
search_sql STRING
Class method which returns an SQL fragment to search for the given string.
label
Returns a meaningful identifier for this port
insert
Adds this record 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.
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.
suspend
Called by the suspend method of FS::cust_pkg (see FS::cust_pkg).
unsuspend
Called by the unsuspend method of FS::cust_pkg (see FS::cust_pkg).
cancel
Called by the cancel method of FS::cust_pkg (see FS::cust_pkg).
check
Checks all fields to make sure this is a valid port. If there is an error, returns the error, otherwise returns false. Called by the insert and repalce methods.

BUGS

SEE ALSO

FS::svc_Common, FS::Record, FS::cust_svc, FS::part_svc, FS::cust_pkg, schema.html from the base documentation.