Freeside:4:Documentation:Developer/FS/part pkg usage
From Freeside
< Freeside:4:Documentation:Developer | FS
Revision as of 07:26, 18 November 2015 by Jeremyd (talk | contribs) (Edit via perl MediaWiki framework (1.13))
Contents
NAME
FS::part_pkg_usage - Object methods for part_pkg_usage records
SYNOPSIS
use FS::part_pkg_usage; $record = new FS::part_pkg_usage \%hash; $record = new FS::part_pkg_usage { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::part_pkg_usage object represents a stock of usage minutes (generally for voice services) included in a package definition. FS::part_pkg_usage inherits from FS::Record. The following fields are currently supported:
- pkgusagepart - primary key; pkgpart - the package definition (FS::part_pkg); minutes - the number of minutes included per billing cycle; priority - the relative order in which to use this stock of minutes.; shared - 'Y' to allow these minutes to be shared with other packages belonging to the same customer. Otherwise, only usage allocated to this package will use this stock of minutes.; rollover - 'Y' to allow unused minutes to carry over between billing cycles. Otherwise, the available minutes will reset to the value of the "minutes" field upon billing.; description - a text description of this stock of minutes
METHODS
- new HASHREF; insert CLASSES; replace CLASSES
- CLASSES can be an array or hash of usage classnums (see FS::usage_class) to link to this record.
- delete; 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.
- classnums
- Returns the usage class numbers that are allowed to use minutes from this pool.
SEE ALSO
FS::Record, schema.html from the base documentation.