File Coverage

blib/lib/Finance/AMEX/Transaction/GRRCN/TxnPricing.pm
Criterion Covered Total %
statement 30 30 100.0
branch 2 2 100.0
condition n/a
subroutine 23 23 100.0
pod 18 20 90.0
total 73 75 97.3


line stmt bran cond sub pod time code
1             package Finance::AMEX::Transaction::GRRCN::TxnPricing;
2             $Finance::AMEX::Transaction::GRRCN::TxnPricing::VERSION = '0.004';
3 8     8   59 use strict;
  8         25  
  8         250  
4 8     8   41 use warnings;
  8         22  
  8         237  
5              
6             # ABSTRACT: Parse AMEX Global Reconciliation (GRRCN) Transaction or ROC pricing Rows
7              
8 8     8   53 use base 'Finance::AMEX::Transaction::GRRCN::Base';
  8         21  
  8         5247  
9              
10             sub field_map {
11 82     82 0 719 my ($self) = @_;
12              
13             return {
14 82 100       570 RECORD_TYPE => [1, 10],
15             PAYEE_MERCHANT_ID => [11, 15],
16             SETTLEMENT_ACCOUNT_TYPE_CODE => [26, 3],
17             AMERICAN_EXPRESS_PAYMENT_NUMBER => [29, 10],
18             PAYMENT_DATE => [39, 8],
19             PAYMENT_CURRENCY => [47, 3],
20             SUBMISSION_MERCHANT_ID => [50, 15],
21              
22             MERCHANT_LOCATION_ID => [65, 15],
23              
24             (
25             $self->version >= 2.01
26             ? ( FILLER => [80, 15] )
27             : ()
28             ),
29              
30             INVOICE_REFERENCE_NUMBER => [95, 30],
31             SELLER_ID => [125, 20],
32             CARDMEMBER_ACCOUNT_NUMBER => [145, 19],
33             TRANSACTION_AMOUNT => [164, 16],
34             TRANSACTION_DATE => [180, 8],
35             FEE_CODE => [188, 2],
36             FEE_AMOUNT => [197, 22],
37             DISCOUNT_RATE => [216, 7],
38             DISCOUNT_AMOUNT => [226, 22],
39             };
40             }
41              
42 82     82 1 26099 sub type {return 'TXNPRICING'}
43              
44 41     41 1 24433 sub RECORD_TYPE {return $_[0]->_get_column('RECORD_TYPE')}
45 41     41 1 24556 sub PAYEE_MERCHANT_ID {return $_[0]->_get_column('PAYEE_MERCHANT_ID')}
46 41     41 1 22419 sub SETTLEMENT_ACCOUNT_TYPE_CODE {return $_[0]->_get_column('SETTLEMENT_ACCOUNT_TYPE_CODE')}
47 41     41 1 20508 sub AMERICAN_EXPRESS_PAYMENT_NUMBER {return $_[0]->_get_column('AMERICAN_EXPRESS_PAYMENT_NUMBER')}
48 41     41 1 20304 sub PAYMENT_DATE {return $_[0]->_get_column('PAYMENT_DATE')}
49 41     41 1 24838 sub PAYMENT_CURRENCY {return $_[0]->_get_column('PAYMENT_CURRENCY')}
50 41     41 1 23497 sub SUBMISSION_MERCHANT_ID {return $_[0]->_get_column('SUBMISSION_MERCHANT_ID')}
51              
52 41     41 1 25073 sub MERCHANT_LOCATION_ID {return $_[0]->_get_column('MERCHANT_LOCATION_ID')}
53 1     1 0 469 sub FILLER {return $_[0]->_get_column('FILLER')}
54 41     41 1 23449 sub INVOICE_REFERENCE_NUMBER {return $_[0]->_get_column('INVOICE_REFERENCE_NUMBER')}
55 41     41 1 22713 sub SELLER_ID {return $_[0]->_get_column('SELLER_ID')}
56 41     41 1 23573 sub CARDMEMBER_ACCOUNT_NUMBER {return $_[0]->_get_column('CARDMEMBER_ACCOUNT_NUMBER')}
57 41     41 1 24435 sub TRANSACTION_AMOUNT {return $_[0]->_get_column('TRANSACTION_AMOUNT')}
58 41     41 1 23808 sub TRANSACTION_DATE {return $_[0]->_get_column('TRANSACTION_DATE')}
59 41     41 1 22985 sub FEE_CODE {return $_[0]->_get_column('FEE_CODE')}
60 41     41 1 24136 sub FEE_AMOUNT {return $_[0]->_get_column('FEE_AMOUNT')}
61 41     41 1 24152 sub DISCOUNT_RATE {return $_[0]->_get_column('DISCOUNT_RATE')}
62 41     41 1 24891 sub DISCOUNT_AMOUNT {return $_[0]->_get_column('DISCOUNT_AMOUNT')}
63              
64             1;
65              
66             __END__