Difference between revisions of "Freeside:1.9:Documentation:Developer/FS/rate detail"
From Freeside
(import from POD) |
(import from POD) |
||
Line 23: | Line 23: | ||
==METHODS== | ==METHODS== | ||
; new HASHREF | ; new HASHREF | ||
− | :Creates a new call plan rate. To add the call plan rate to the database, see [[ | + | :Creates a new call plan rate. To add the call plan rate 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. |
Revision as of 16:26, 3 October 2007
Contents
NAME
FS::rate_detail - Object methods for rate_detail records
SYNOPSIS
use FS::rate_detail; $record = new FS::rate_detail \%hash; $record = new FS::rate_detail { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::rate_detail object represents an call plan rate. FS::rate_detail inherits from FS::Record. The following fields are currently supported:
- ratedetailnum - primary key; ratenum - rate plan (see FS::rate); orig_regionnum - call origination region; dest_regionnum - call destination region; min_included - included minutes; min_charge - charge per minute; sec_granularity - granularity in seconds, i.e. 6 or 60
METHODS
- new HASHREF
- Creates a new call plan rate. To add the call plan rate 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 call plan rate. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
- orig_region
- Returns the origination region (see FS::rate_region) associated with this call plan rate.
- dest_region
- Returns the destination region (see FS::rate_region) associated with this call plan rate.
BUGS
SEE ALSO
FS::rate, FS::rate_region, FS::Record, schema.html from the base documentation.