1 package FS::cust_pkg_usageprice;
2 use base qw( FS::Record );
5 #use FS::Record qw( qsearch qsearchs );
9 FS::cust_pkg_usageprice - Object methods for cust_pkg_usageprice records
13 use FS::cust_pkg_usageprice;
15 $record = new FS::cust_pkg_usageprice \%hash;
16 $record = new FS::cust_pkg_usageprice { 'column' => 'value' };
18 $error = $record->insert;
20 $error = $new_record->replace($old_record);
22 $error = $record->delete;
24 $error = $record->check;
28 An FS::cust_pkg_usageprice object represents an specific customer package usage
29 pricing add-on. FS::cust_pkg_usageprice inherits from FS::Record. The
30 following fields are currently supported:
59 Creates a new record. To add the record to the database, see L<"insert">.
61 Note that this stores the hash reference, not a distinct copy of the hash it
62 points to. You can ask the object for a copy with the I<hash> method.
66 # the new method can be inherited from FS::Record, if a table method is defined
68 sub table { 'cust_pkg_usageprice'; }
72 Adds this record to the database. If there is an error, returns the error,
73 otherwise returns false.
77 Delete this record from the database.
79 =item replace OLD_RECORD
81 Replaces the OLD_RECORD with this one in the database. If there is an error,
82 returns the error, otherwise returns false.
86 Checks all fields to make sure this is a valid record. If there is
87 an error, returns the error, otherwise returns false. Called by the insert
96 $self->ut_numbern('usagepricenum')
97 || $self->ut_number('pkgnum')
98 || $self->ut_number('usagepricepart')
99 || $self->ut_number('quantity')
101 return $error if $error;