Difference between revisions of "Freeside:1.9:Documentation:Developer/FS/cdr upstream rate"
From Freeside
(import from POD) |
(import from POD) |
||
Line 23: | Line 23: | ||
==METHODS== | ==METHODS== | ||
; new HASHREF | ; new HASHREF | ||
− | :Creates a new upstream rate mapping. To add the upstream rate to the database, see [[ | + | :Creates a new upstream rate mapping. To add the upstream 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. |
Latest revision as of 16:23, 3 October 2007
Contents
NAME
FS::cdr_upstream_rate - Object methods for cdr_upstream_rate records
SYNOPSIS
use FS::cdr_upstream_rate; $record = new FS::cdr_upstream_rate \%hash; $record = new FS::cdr_upstream_rate { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::cdr_upstream_rate object represents an upstream rate mapping to internal rate detail (see FS::rate_detail). FS::cdr_upstream_rate inherits from FS::Record. The following fields are currently supported:
- upstreamratenum - primary key; upstream_rateid - CDR upstream Rate ID (cdr.upstream_rateid - see FS::cdr); ratedetailnum - Rate detail - see FS::rate_detail
METHODS
- new HASHREF
- Creates a new upstream rate mapping. To add the upstream 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 upstream rate. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
- rate_detail
- Returns the internal rate detail object for this upstream rate (see FS::rate_detail).
BUGS
SEE ALSO
FS::Record, schema.html from the base documentation.