File Coverage

blib/lib/Finance/AMEX/Transaction/GRRCN/Transaction.pm
Criterion Covered Total %
statement 52 52 100.0
branch 2 2 100.0
condition n/a
subroutine 45 45 100.0
pod 36 42 85.7
total 135 141 95.7


line stmt bran cond sub pod time code
1             package Finance::AMEX::Transaction::GRRCN::Transaction;
2             $Finance::AMEX::Transaction::GRRCN::Transaction::VERSION = '0.004';
3 8     8   61 use strict;
  8         20  
  8         253  
4 8     8   41 use warnings;
  8         20  
  8         322  
5              
6             # ABSTRACT: Parse AMEX Global Reconciliation (GRRCN) Transaction or summary of charge (SOC) Rows
7              
8 8     8   58 use base 'Finance::AMEX::Transaction::GRRCN::Base';
  8         18  
  8         20146  
9              
10             sub field_map {
11 82     82 0 701 my ($self) = @_;
12              
13             return {
14 82 100       1188 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              
21             SUBMISSION_MERCHANT_ID => [50, 15],
22             BUSINESS_SUBMISSION_DATE => [65, 8],
23             AMERICAN_EXPRESS_PROCESSING_DATE => [73, 18],
24             SUBMISSION_INVOICE_NUMBER => [81, 15],
25             SUBMISSION_CURRENCY => [96, 3],
26              
27             MERCHANT_LOCATION_ID => [99, 15],
28             INVOICE_REFERENCE_NUMBER => [114, 30],
29             SELLER_ID => [144, 20],
30             CARDMEMBER_ACCOUNT_NUMBER => [164, 19],
31             INDUSTRY_SPECIFIC_REFERENCE_NUMBER => [183, 30],
32             SUBMISSION_GROSS_AMOUNT => [213, 16],
33             TRANSACTION_AMOUNT => [229, 16],
34             TRANSACTION_DATE => [245, 8],
35             TRANSACTION_TIME => [253, 6],
36             TRANSACTION_ID => [259, 15],
37             APPROVAL_CODE => [274, 6],
38             TERMINAL_ID => [280, 10],
39             MERCHANT_CATEGORY_CODE => [290, 4],
40             CARDMEMBER_REFERENCE_NUMBER => [294, 30],
41             ACQUIRER_REFERENCE_NUMBER => [324, 23],
42             DATA_QUALITY_NON_COMPLIANT_INDICATOR => [347, 1],
43             DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_1 => [348, 4],
44             DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_2 => [352, 4],
45             DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_3 => [356, 4],
46             DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_4 => [360, 4],
47             NON_SWIPED_INDICATOR => [364, 1],
48             TRANSACTION_REJECTED_INDICATOR => [365, 3],
49             FIRST_INSTALLMENT_AMOUNT => [368, 16],
50             SUBSEQUENT_INSTALLMENT_AMOUNT => [384, 16],
51             NUMBER_OF_INSTALLMENTS => [400, 5],
52             INSTALLMENT_NUMBER => [405, 5],
53              
54             (
55             $self->version >= 2.01
56             ? ( FILLER => [410, 15] )
57             : ()
58             ),
59              
60             SERVICE_FEE_AMOUNT => [425, 16],
61             ACCELERATION_AMOUNT => [441, 16],
62             };
63             }
64              
65 82     82 1 26998 sub type {return 'TRANSACTION'}
66              
67 41     41 1 25272 sub RECORD_TYPE {return $_[0]->_get_column('RECORD_TYPE')}
68 41     41 1 25138 sub PAYEE_MERCHANT_ID {return $_[0]->_get_column('PAYEE_MERCHANT_ID')}
69 41     41 1 24741 sub SETTLEMENT_ACCOUNT_TYPE_CODE {return $_[0]->_get_column('SETTLEMENT_ACCOUNT_TYPE_CODE')}
70 41     41 1 24635 sub AMERICAN_EXPRESS_PAYMENT_NUMBER {return $_[0]->_get_column('AMERICAN_EXPRESS_PAYMENT_NUMBER')}
71 41     41 1 25051 sub PAYMENT_DATE {return $_[0]->_get_column('PAYMENT_DATE')}
72 1     1 0 449 sub FILLER {return $_[0]->_get_column('FILLER')}
73              
74 41     41 1 25339 sub PAYMENT_CURRENCY {return $_[0]->_get_column('PAYMENT_CURRENCY')}
75 41     41 1 24403 sub SUBMISSION_MERCHANT_ID {return $_[0]->_get_column('SUBMISSION_MERCHANT_ID')}
76 41     41 1 25602 sub BUSINESS_SUBMISSION_DATE {return $_[0]->_get_column('BUSINESS_SUBMISSION_DATE')}
77 41     41 1 25841 sub AMERICAN_EXPRESS_PROCESSING_DATE {return $_[0]->_get_column('AMERICAN_EXPRESS_PROCESSING_DATE')}
78 41     41 1 25041 sub SUBMISSION_INVOICE_NUMBER {return $_[0]->_get_column('SUBMISSION_INVOICE_NUMBER')}
79 41     41 1 24917 sub SUBMISSION_CURRENCY {return $_[0]->_get_column('SUBMISSION_CURRENCY')}
80              
81 41     41 1 24761 sub MERCHANT_LOCATION_ID {return $_[0]->_get_column('MERCHANT_LOCATION_ID')}
82 41     41 1 24655 sub INVOICE_REFERENCE_NUMBER {return $_[0]->_get_column('INVOICE_REFERENCE_NUMBER')}
83 41     41 1 24395 sub SELLER_ID {return $_[0]->_get_column('SELLER_ID')}
84 41     41 1 24880 sub CARDMEMBER_ACCOUNT_NUMBER {return $_[0]->_get_column('CARDMEMBER_ACCOUNT_NUMBER')}
85 41     41 1 24532 sub INDUSTRY_SPECIFIC_REFERENCE_NUMBER {return $_[0]->_get_column('INDUSTRY_SPECIFIC_REFERENCE_NUMBER')}
86 41     41 1 24379 sub SUBMISSION_GROSS_AMOUNT {return $_[0]->_get_column('SUBMISSION_GROSS_AMOUNT')}
87 41     41 1 23404 sub TRANSACTION_AMOUNT {return $_[0]->_get_column('TRANSACTION_AMOUNT')}
88 41     41 1 24622 sub TRANSACTION_DATE {return $_[0]->_get_column('TRANSACTION_DATE')}
89 41     41 1 19805 sub TRANSACTION_TIME {return $_[0]->_get_column('TRANSACTION_TIME')}
90 41     41 1 30217 sub TRANSACTION_ID {return $_[0]->_get_column('TRANSACTION_ID')}
91 41     41 1 25356 sub APPROVAL_CODE {return $_[0]->_get_column('APPROVAL_CODE')}
92 41     41 1 24644 sub TERMINAL_ID {return $_[0]->_get_column('TERMINAL_ID')}
93 41     41 1 24784 sub MERCHANT_CATEGORY_CODE {return $_[0]->_get_column('MERCHANT_CATEGORY_CODE')}
94 41     41 1 24427 sub CARDMEMBER_REFERENCE_NUMBER {return $_[0]->_get_column('CARDMEMBER_REFERENCE_NUMBER')}
95 41     41 1 23923 sub ACQUIRER_REFERENCE_NUMBER {return $_[0]->_get_column('ACQUIRER_REFERENCE_NUMBER')}
96 41     41 1 25296 sub DATA_QUALITY_NON_COMPLIANT_INDICATOR {return $_[0]->_get_column('DATA_QUALITY_NON_COMPLIANT_INDICATOR')}
97              
98 41     41 0 24642 sub DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_1 {return $_[0]->_get_column('DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_1')}
99 41     41 0 25388 sub DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_2 {return $_[0]->_get_column('DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_2')}
100 41     41 0 23684 sub DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_3 {return $_[0]->_get_column('DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_3')}
101 41     41 0 25856 sub DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_4 {return $_[0]->_get_column('DATA_QUALITY_NON_COMPLIANT_ERROR_CODE_4')}
102 41     41 1 24956 sub NON_SWIPED_INDICATOR {return $_[0]->_get_column('NON_SWIPED_INDICATOR')}
103 41     41 1 24423 sub TRANSACTION_REJECTED_INDICATOR {return $_[0]->_get_column('TRANSACTION_REJECTED_INDICATOR')}
104 41     41 1 25395 sub FIRST_INSTALLMENT_AMOUNT {return $_[0]->_get_column('FIRST_INSTALLMENT_AMOUNT')}
105 41     41 1 24350 sub SUBSEQUENT_INSTALLMENT_AMOUNT {return $_[0]->_get_column('SUBSEQUENT_INSTALLMENT_AMOUNT')}
106 41     41 1 24905 sub NUMBER_OF_INSTALLMENTS {return $_[0]->_get_column('NUMBER_OF_INSTALLMENTS')}
107 41     41 1 23206 sub INSTALLMENT_NUMBER {return $_[0]->_get_column('INSTALLMENT_NUMBER')}
108 41     41 1 24142 sub SERVICE_FEE_AMOUNT {return $_[0]->_get_column('SERVICE_FEE_AMOUNT')}
109 41     41 1 24360 sub ACCELERATION_AMOUNT {return $_[0]->_get_column('ACCELERATION_AMOUNT')}
110              
111              
112             1;
113              
114             __END__