% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::cust_class - Object methods for cust_class records
use FS::cust_class;
$record = new FS::cust_class \%hash;
$record = new FS::cust_class { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::pkg_class object represents an customer class. Every customer (see FS::cust_main) has, optionally, a customer class. FS::cust_class inherits from FS::Record. The following fields are currently supported:
primary key
Text name of this customer class
Number of associated cust_category (see FS::cust_category)
Tax exempt flag, empty or 'Y'. Used when the cust_class-tax_exempt configuration setting is turned on.
Disabled flag, empty or 'Y'
Creates a new customer class. To add the customer class to the database, see "insert".
Adds this customer class to the database. If there is an error, returns the error, otherwise returns false.
Delete this customer class from the database. Only customer classes with no associated customers can be deleted. If there is an error, returns the error, otherwise returns false.
Replaces OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
Checks all fields to make sure this is a valid customer class. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns the cust_category record associated with this class, or false if there is none.
Returns the category name associated with this class, or false if there is none.