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

From Freeside
Jump to: navigation, search

NAME

FS::cust_category - Object methods for cust_category records

SYNOPSIS

 use FS::cust_category;

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

 $error = $record->insert;

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

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::cust_category object represents a customer category. Every customer class (see FS::cust_class) has, optionally, a customer category. FS::cust_category inherits from FS::Record. The following fields are currently supported:

categorynum
primary key
categoryname
Text name of this package category
weight
Weight
disabled
Disabled flag, empty or 'Y'

METHODS

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

BUGS

SEE ALSO

FS::cust_class, FS::Record