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

From Freeside
Jump to: navigation, search

NAME

FS::cust_payby - Object methods for cust_payby records

SYNOPSIS

 use FS::cust_payby;

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

 $error = $record->insert;

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

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::cust_payby object represents customer stored payment information. FS::cust_payby inherits from FS::Record. The following fields are currently supported:

custpaybynum
primary key
custnum
custnum
weight
weight
payby
payby
payinfo
payinfo
paycvv
paycvv
paymask
paymask
paydate
paydate
paystart_month
paystart_month
paystart_year
paystart_year
payissue
payissue
payname
payname
paystate
paystate
paytype
paytype
payip
payip

METHODS

new HASHREF
Creates a new record. To add the record 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.
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 record. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
paydate_mon_year
Returns a two element list consisting of the paydate month and year.
realtime_bop; paytypes
Returns a list of valid values for the paytype field (bank account type for electronic check payment).
cgi_cust_payby_fields
Returns the field names used in the web interface (including some pseudo-fields).
cgi_hash_callback HASHREF
Subroutine (not a class or object method). Processes a hash reference of web interface contet (transfers the data from pseudo-fields to real fields).
search_sql
Class method.
Returns a qsearch hash expression to search for parameters specified in HASHREF. Valid paramters are:
payby
listref
paydate_year
; paydate_month

BUGS

SEE ALSO

FS::Record, schema.html from the base documentation.