Freeside:1.9:Documentation:Developer/FS/rate prefix
From Freeside
< Freeside:1.9:Documentation:Developer | FS
Revision as of 17:16, 6 February 2009 by Ivan (talk | contribs) (Edit via perl MediaWiki framework (1.13))
NAME
FS::rate_prefix - Object methods for rate_prefix records
SYNOPSIS
use FS::rate_prefix; $record = new FS::rate_prefix \%hash; $record = new FS::rate_prefix { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::rate_prefix object represents an call rating prefix. FS::rate_prefix inherits from FS::Record. The following fields are currently supported:
- prefixnum - primary key; regionnum - call ration region (see FS::rate_region); countrycode; npa; nxx
METHODS
- new HASHREF
- Creates a new prefix. To add the prefix 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.
- 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 prefix. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
- rate_region
- Returns the rate region (see FS::rate_region) for this prefix.
CLASS METHODS
- all_countrycodes
- Returns a list of all countrycodes listed in rate_prefix
BUGS
SEE ALSO
FS::rate_region, FS::Record, schema.html from the base documentation.