http://www.freeside.biz/mediawiki/index.php?title=Freeside:4:Documentation:Developer/FS/svc_port&feed=atom&action=historyFreeside:4:Documentation:Developer/FS/svc port - Revision history2024-03-29T07:02:30ZRevision history for this page on the wikiMediaWiki 1.27.7http://www.freeside.biz/mediawiki/index.php?title=Freeside:4:Documentation:Developer/FS/svc_port&diff=9367&oldid=prevJeremyd: Edit via perl MediaWiki framework (1.13)2015-11-18T15:30:41Z<p>Edit via perl MediaWiki framework (1.13)</p>
<p><b>New page</b></p><div>==NAME==<br />
FS::svc_port - Object methods for svc_port records<br />
<br />
==SYNOPSIS==<br />
<code><br />
use FS::svc_port;<br />
<br />
$record = new FS::svc_port \%hash;<br />
$record = new FS::svc_port { 'column' => 'value' };<br />
<br />
$error = $record->insert;<br />
<br />
$error = $new_record->replace($old_record);<br />
<br />
$error = $record->delete;<br />
<br />
$error = $record->check;<br />
<br />
$error = $record->suspend;<br />
<br />
$error = $record->unsuspend;<br />
<br />
$error = $record->cancel;<br />
</code><br />
==DESCRIPTION==<br />
An FS::svc_port object represents a router port. FS::table_name inherits from FS::svc_Common. The following fields are currently supported:<br />
<br />
; svcnum -; serviceid - Torrus serviceid (in srvexport and reportfields tables)<br />
==METHODS==<br />
; new HASHREF<br />
:Creates a new port. To add the port to the database, see [[#insert|"insert"]].<br />
<br />
: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.<br />
; search_sql STRING<br />
:Class method which returns an SQL fragment to search for the given string.<br />
; label<br />
:Returns a meaningful identifier for this port<br />
; insert<br />
:Adds this record to the database. If there is an error, returns the error, otherwise returns false.<br />
<br />
:The additional fields pkgnum and svcpart (see [[Freeside:4:Documentation:Developer/FS/cust svc|FS::cust_svc]]) should be defined. An FS::cust_svc record will be created and inserted.<br />
; delete<br />
:Delete this record from the database.<br />
; replace OLD_RECORD<br />
:Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.<br />
; suspend<br />
:Called by the suspend method of FS::cust_pkg (see [[Freeside:4:Documentation:Developer/FS/cust pkg|FS::cust_pkg]]).<br />
; unsuspend<br />
:Called by the unsuspend method of FS::cust_pkg (see [[Freeside:4:Documentation:Developer/FS/cust pkg|FS::cust_pkg]]).<br />
; cancel<br />
:Called by the cancel method of FS::cust_pkg (see [[Freeside:4:Documentation:Developer/FS/cust pkg|FS::cust_pkg]]).<br />
; check<br />
: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.<br />
<br />
==BUGS==<br />
==SEE ALSO==<br />
[[Freeside:4:Documentation:Developer/FS/svc Common|FS::svc_Common]], [[Freeside:4:Documentation:Developer/FS/Record|FS::Record]], [[Freeside:4:Documentation:Developer/FS/cust svc|FS::cust_svc]], [[Freeside:4:Documentation:Developer/FS/part svc|FS::part_svc]], [[Freeside:4:Documentation:Developer/FS/cust pkg|FS::cust_pkg]], schema.html from the base documentation.</div>Jeremyd