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

From Freeside
Jump to: navigation, search
(Edit via perl MediaWiki framework (1.13))
 
(No difference)

Latest revision as of 05:41, 10 February 2015

NAME

FS::svc_circuit - Object methods for svc_circuit records

SYNOPSIS

 use FS::svc_circuit;

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

 $error = $record->insert;

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

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::svc_circuit object represents a telecom circuit service (other than an analog phone line, which is svc_phone, or a DSL Internet connection, which is svc_dsl). FS::svc_circuit inherits from FS::svc_IP_Mixin, FS::MAC_Mixin, and FS::svc_Common. The following fields are currently supported:

svcnum - primary key; see also FS::cust_svc; typenum - circuit type (such as DS1, DS1-PRI, DS3, OC3, etc.); foreign key to FS::circuit_type.; providernum - circuit provider (telco); foreign key to FS::circuit_provider.; termnum - circuit termination type; foreign key to FS::circuit_termination; circuit_id - circuit ID string defined by the provider; desired_due_date - the requested date for completion of the circuit order; due_date - the provider's committed date for completion of the circuit order; vendor_order_id - the provider's order number; vendor_qual_id - the qualification number, if a qualification was performed; vendor_order_type -; vendor_order_status - the order status: ACCEPTED, PENDING, COMPLETED, etc.; endpoint_ip_addr - the IP address of the endpoint equipment, if any. This will be validated as an IP address but not assigned from managed address space or checked for uniqueness.; endpoint_mac_addr - the MAC address of the endpoint.

METHODS

new HASHREF
Creates a new circuit service. To add the record to the database, see "insert".
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 service. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
label
Returns the circuit ID.

SEE ALSO

FS::Record