% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::rate_region - Object methods for rate_region records
use FS::rate_region;
$record = new FS::rate_region \%hash;
$record = new FS::rate_region { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::rate_region object represents an call rating region. FS::rate_region inherits from FS::Record. The following fields are currently supported:
Creates a new region. To add the region 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.
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
Currently available options are: rate_prefix and dest_detail
If rate_prefix is set to an array reference of FS::rate_prefix objects, the objects will have their regionnum field set and will be inserted after this record.
If dest_detail is set to an array reference of FS::rate_detail objects, the objects will have their dest_regionnum field set and will be inserted after this record.
Delete this record from the database.
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
Currently available options are: rate_prefix and dest_detail
If rate_prefix is set to an array reference of FS::rate_prefix objects, the objects will have their regionnum field set and will be inserted after this record. Any existing rate_prefix records associated with this record will be deleted.
If dest_detail is set to an array reference of FS::rate_detail objects, the objects will have their dest_regionnum field set and will be inserted after this record. Any existing rate_detail records associated with this record will be deleted.
Checks all fields to make sure this is a valid region. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns all prefixes (see FS::rate_prefix) for this region.
Returns all rate details (see FS::rate_detail) for this region as a destionation.
Returns a string representing all the prefixes for this region.
FS::Record, schema.html from the base documentation.