% 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::reason - Object methods for reason records
use FS::reason;
$record = new FS::reason \%hash;
$record = new FS::reason { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::reason object represents a reason message. FS::reason inherits from FS::Record. The following fields are currently supported:
Creates a new reason. 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.
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
Delete this record from the database.
Replaces the 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 reason. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns the reason_type (see FS::reason_type) associated with this reason.
Accepts an arrayref of reason objects, to be merged into this reason. Reasons must all have the same reason_type class as this one. Matching reasonnums will be replaced in the following tables:
cust_credit cust_credit_void cust_pkg_reason
Fetches the reason matching these parameters if there is one. If not, inserts one. Will also insert the reason type if necessary. CLASS must be one of 'C' (cancel reasons), 'R' (credit reasons), 'S' (suspend reasons), or 'F' (refund reasons).
This will die if anything fails.
FS::Record, schema.html from the base documentation.
Hey! The above document had some coding errors, which are explained below:
You forgot a '=back' before '=head1'