Difference between revisions of "Freeside:4:Documentation:Developer/FS/cust pkg usage"
From Freeside
(Edit via perl MediaWiki framework (1.13)) |
(No difference)
|
Latest revision as of 07:21, 18 November 2015
Contents
NAME
FS::cust_pkg_usage - Object methods for cust_pkg_usage records
SYNOPSIS
use FS::cust_pkg_usage; $record = new FS::cust_pkg_usage \%hash; $record = new FS::cust_pkg_usage { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::cust_pkg_usage object represents a counter of remaining included minutes on a voice-call package. FS::cust_pkg_usage inherits from FS::Record. The following fields are currently supported:
- pkgusagenum - primary key; pkgnum - the package (FS::cust_pkg) containing the usage; pkgusagepart - the usage stock definition (FS::part_pkg_usage). This record in turn links to the call usage classes that are eligible to use these minutes.; minutes - the remaining minutes
METHODS
- new HASHREF
- the new method can be inherited from FS::Record, if a table method is defined
- 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.
- reset
- Remove all allocations of this usage to CDRs.
- 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 example. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
- cust_pkg
- Return the FS::cust_pkg linked to this record.
- part_pkg_usage
- Return the FS::part_pkg_usage linked to this record.
SEE ALSO
FS::Record, schema.html from the base documentation.