Difference between revisions of "Freeside:4:Documentation:Developer/FS/svc hardware"
From Freeside
(Edit via perl MediaWiki framework (1.13)) |
(No difference)
|
Latest revision as of 07:30, 18 November 2015
Contents
NAME
FS::svc_hardware - Object methods for svc_hardware records
SYNOPSIS
use FS::svc_hardware; $record = new FS::svc_hardware \%hash; $record = new FS::svc_hardware { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::svc_hardware object represents an equipment installation, such as a wireless broadband receiver, satellite antenna, or DVR. FS::svc_hardware inherits from FS::svc_Common.
The following fields are currently supported:
- svcnum - Primary key; typenum - Device type number (see FS::hardware_type); ip_addr - IP address; hw_addr - Hardware address; serial - Serial number; smartcard - Smartcard number, for devices that use a smartcard; statusnum - Service status (see FS::hardware_status); note - Installation notes: location on property, physical access, etc.
METHODS
- new HASHREF
- Creates a new svc_hardware object.
- 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.
- the replace method can be inherited from FS::Record
- 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.
- hardware_type
- Returns the FS::hardware_type object associated with this installation.
- status_label
- Returns the 'label' field of the FS::hardware_status object associated with this installation.
- display_hw_addr
- Returns the 'hw_addr' field, formatted as a MAC address if the 'svc_hardware-check_mac_addr' option is enabled.
SEE ALSO
FS::Record, FS::svc_Common, schema.html from the base documentation.