1 package FS::agent_payment_gateway;
2 use base qw(FS::Record);
8 FS::agent_payment_gateway - Object methods for agent_payment_gateway records
12 use FS::agent_payment_gateway;
14 $record = new FS::agent_payment_gateway \%hash;
15 $record = new FS::agent_payment_gateway { 'column' => 'value' };
17 $error = $record->insert;
19 $error = $new_record->replace($old_record);
21 $error = $record->delete;
23 $error = $record->check;
27 An FS::agent_payment_gateway object represents a payment gateway override for
28 a specific agent. FS::agent_payment_gateway inherits from FS::Record. The
29 following fields are currently supported:
33 =item agentgatewaynum - primary key
51 Creates a new override. To add the override to the database, see L<"insert">.
53 Note that this stores the hash reference, not a distinct copy of the hash it
54 points to. You can ask the object for a copy with the I<hash> method.
58 # the new method can be inherited from FS::Record, if a table method is defined
60 sub table { 'agent_payment_gateway'; }
64 Adds this record to the database. If there is an error, returns the error,
65 otherwise returns false.
69 # the insert method can be inherited from FS::Record
73 Delete this record from the database.
77 # the delete method can be inherited from FS::Record
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 # the replace method can be inherited from FS::Record
90 Checks all fields to make sure this is a valid override. If there is
91 an error, returns the error, otherwise returns false. Called by the insert
96 # the check method should currently be supplied - FS::Record contains some
97 # data checking routines
103 $self->ut_numbern('agentgatewaynum')
104 || $self->ut_foreign_key('agentnum', 'agent', 'agentnum')
105 || $self->ut_foreign_key('gatewaynum', 'payment_gateway', 'gatewaynum' )
106 || $self->ut_textn('cardtype')
107 || $self->ut_textn('taxclass')
109 return $error if $error;
114 =item payment_gateway
122 L<FS::payment_gateway>, L<FS::agent>, L<FS::Record>, schema.html from the