Freeside:4:Documentation:Developer/FS/pkg category

From Freeside
Jump to: navigation, search

NAME

FS::pkg_category - Object methods for pkg_category records

SYNOPSIS

 use FS::pkg_category;

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

 $error = $record->insert;

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

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::pkg_category object represents an package category. Every package class (see FS::pkg_class) has, optionally, a package category. FS::pkg_category inherits from FS::Record. The following fields are currently supported:

categorynum
primary key (assigned automatically for new package categoryes)
categoryname
Text name of this package category
weight
Weight
ticketing_queueid
Ticketing Queue
condense
Condense flag for invoice display, empty or 'Y'
disabled
Disabled flag, empty or 'Y'

METHODS

new HASHREF
Creates a new package category. To add the package category to the database, see "insert".
insert
Adds this package category to the database. If there is an error, returns the error, otherwise returns false.
delete
Deletes this package category from the database. Only package categoryes with no associated package definitions can be deleted. If there is an error, returns the error, otherwise returns false.
replace [ OLD_RECORD ]
Replaces 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 package category. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
ticketing_queue
Returns the queue name corresponding with the id from the ticketing_queueid field, or the empty string.

BUGS

SEE ALSO

FS::category_Common, FS::Record