Difference between revisions of "Freeside:3:Documentation:Developer/FS/part pkg usage class"

From Freeside
Jump to: navigation, search
(Edit via perl MediaWiki framework (1.13))
 
(No difference)

Latest revision as of 13:37, 27 June 2014

NAME

FS::part_pkg_usage_class - Object methods for part_pkg_usage_class records

SYNOPSIS

 use FS::part_pkg_usage_class;

 $record = new FS::part_pkg_usage_class \%hash;
 $record = new FS::part_pkg_usage_class { 'column' => 'value' };

 $error = $record->insert;

 $error = $new_record->replace($old_record);

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::part_pkg_usage_class object is a link between a package usage stock (FS::part_pkg_usage) and a voice usage class (FS::usage_class). FS::part_pkg_usage_class inherits from FS::Record. The following fields are currently supported:

num - primary key; pkgusagepart - FS::part_pkg_usage key; classnum - FS::usage_class key. Set to null to allow this stock to be used for calls that have no usage class. To avoid confusion, you should only do this if you don't use usage classes on your system.

METHODS

new HASHREF
Creates a new example. To add the example 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 record. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.

BUGS

The author forgot to customize this manpage.

SEE ALSO

FS::Record, schema.html from the base documentation.