# Copyright (c) 2002 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: ECCreditCardPayment.pm,v 2.1 2006/10/16 21:08:04 moeller Exp $ package Bivio::Biz::Model::ECCreditCardPayment; use strict; $Bivio::Biz::Model::ECCreditCardPayment::VERSION = sprintf('%d.%02d', q$Revision: 2.1 $ =~ /\d+/g); $_ = $Bivio::Biz::Model::ECCreditCardPayment::VERSION; =head1 NAME Bivio::Biz::Model::ECCreditCardPayment - credit card payment info =head1 RELEASE SCOPE bOP =head1 SYNOPSIS use Bivio::Biz::Model::ECCreditCardPayment; =cut =head1 EXTENDS L =cut use Bivio::Biz::PropertyModel; @Bivio::Biz::Model::ECCreditCardPayment::ISA = ('Bivio::Biz::PropertyModel'); =head1 DESCRIPTION C =cut #=IMPORTS #=VARIABLES =head1 METHODS =cut =for html =head2 create(hash_ref new_values) : Model.ECCreditCardPayment Creates a new credit card payment record. Defaults the realm_id. =cut sub create { my($self, $new_values) = @_; $new_values->{realm_id} ||= $self->get_request->get('auth_id'); return $self->SUPER::create($new_values); } =for html =head2 internal_initialize() : hash_ref B =cut sub internal_initialize { # none of the related fields are linked here # need to always preserve ECPayments, so deleting them # via cascade_delete() should always fail return { version => 1, table_name => 'ec_credit_card_payment_t', columns => { ec_payment_id => ['ECPayment.ec_payment_id', 'PRIMARY_KEY'], realm_id => ['PrimaryId', 'NOT_NULL'], processed_date_time => ['DateTime', 'NONE'], processor_response => ['Text', 'NONE'], processor_transaction_number => ['Name', 'NONE'], card_number => ['ECCreditCardNumber', 'NOT_NULL'], card_expiration_date => ['Date', 'NOT_NULL'], card_name => ['Line', 'NOT_NULL'], card_zip => ['Name', 'NOT_NULL'], }, auth_id => 'realm_id', other => [['ec_payment_id', 'ECPayment.ec_payment_id']], }; } #=PRIVATE SUBROUTINES =head1 COPYRIGHT Copyright (c) 2002 bivio Software, Inc. All Rights Reserved. Visit http://www.bivio.biz for more info. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; If not, you may get a copy from: http://www.opensource.org/licenses/lgpl-license.html =head1 VERSION $Id: ECCreditCardPayment.pm,v 2.1 2006/10/16 21:08:04 moeller Exp $ =cut 1;