Difference between revisions of "Freeside:1.9:Documentation:Developer/FS/rate prefix"
From Freeside
(import from POD) |
m (Edit via perl MediaWiki framework (1.13)) |
||
(One intermediate revision by the same user not shown) | |||
Line 23: | Line 23: | ||
==METHODS== | ==METHODS== | ||
; new HASHREF | ; new HASHREF | ||
− | :Creates a new prefix. To add the prefix to the database, see [[ | + | :Creates a new prefix. To add the prefix to the database, see [[#insert|"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. | :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. | ||
Line 36: | Line 36: | ||
; rate_region | ; rate_region | ||
:Returns the rate region (see [[Freeside:1.9:Documentation:Developer/FS/rate region|FS::rate_region]]) for this prefix. | :Returns the rate region (see [[Freeside:1.9:Documentation:Developer/FS/rate region|FS::rate_region]]) for this prefix. | ||
+ | |||
+ | ==CLASS METHODS== | ||
+ | ; all_countrycodes | ||
+ | :Returns a list of all countrycodes listed in rate_prefix | ||
==BUGS== | ==BUGS== | ||
==SEE ALSO== | ==SEE ALSO== | ||
[[Freeside:1.9:Documentation:Developer/FS/rate region|FS::rate_region]], [[Freeside:1.9:Documentation:Developer/FS/Record|FS::Record]], schema.html from the base documentation. | [[Freeside:1.9:Documentation:Developer/FS/rate region|FS::rate_region]], [[Freeside:1.9:Documentation:Developer/FS/Record|FS::Record]], schema.html from the base documentation. |
Latest revision as of 17:16, 6 February 2009
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.