Freeside:1.7:Documentation:Developer/FS/pkg class
From Freeside
Contents
NAME
FS::pkg_class - Object methods for pkg_class records
SYNOPSIS
use FS::pkg_class; $record = new FS::pkg_class \%hash; $record = new FS::pkg_class { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::pkg_class object represents an package class. Every package definition (see FS::part_pkg) has, optionally, a package class. FS::pkg_class inherits from FS::Record. The following fields are currently supported:
- classnum - primary key (assigned automatically for new package classes); classname - Text name of this package class; disabled - Disabled flag, empty or 'Y'
METHODS
- new HASHREF
- Creates a new package class. To add the package class to the database, see "insert".
- insert
- Adds this package class to the database. If there is an error, returns the error, otherwise returns false.
- delete
- Deletes this package class from the database. Only package classes 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 class. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
BUGS
SEE ALSO
FS::Record, FS::part_pkg, schema.html from the base documentation.