File Coverage

blib/lib/Finance/AMEX/Transaction/CBNOT/Header.pm
Criterion Covered Total %
statement 19 19 100.0
branch n/a
condition n/a
subroutine 13 13 100.0
pod 8 10 80.0
total 40 42 95.2


line stmt bran cond sub pod time code
1             package Finance::AMEX::Transaction::CBNOT::Header;
2             $Finance::AMEX::Transaction::CBNOT::Header::VERSION = '0.003';
3 7     7   44 use strict;
  7         15  
  7         188  
4 7     7   34 use warnings;
  7         13  
  7         258  
5              
6             # ABSTRACT: Parse AMEX Chargeback Notification Files (CBNOT) Header Rows
7              
8 7     7   48 use base 'Finance::AMEX::Transaction::CBNOT::Base';
  7         13  
  7         3128  
9              
10             sub field_map {
11             return {
12 20     20 0 203 REC_TYPE => [1, 1],
13             AMEX_APPL_AREA => [2, 100],
14              
15             APPLICATION_SYSTEM_CODE => [2, 2],
16             FILE_TYPE_CODE => [4, 3],
17             FILE_CREATION_DATE => [6, 8],
18              
19             SAID => [102, 6],
20             DATATYPE => [108, 5],
21             CCYYDDD => [113, 7],
22             HHMMSS => [120, 7],
23             };
24             }
25              
26 4     4 1 1142 sub type {return 'HEADER'}
27              
28 2     2 1 550 sub AMEX_APPL_AREA {return $_[0]->_get_column('AMEX_APPL_AREA')}
29 2     2 1 1085 sub APPLICATION_SYSTEM_CODE {return $_[0]->_get_column('APPLICATION_SYSTEM_CODE')}
30 2     2 1 1190 sub FILE_TYPE_CODE {return $_[0]->_get_column('FILE_TYPE_CODE')}
31 2     2 1 1527 sub FILE_CREATION_DATE {return $_[0]->_get_column('FILE_CREATION_DATE')}
32 2     2 1 1473 sub SAID {return $_[0]->_get_column('SAID')}
33 2     2 1 1090 sub DATATYPE {return $_[0]->_get_column('DATATYPE')}
34 2     2 1 1088 sub CCYYDDD {return $_[0]->_get_column('CCYYDDD')}
35              
36             # perl does not allow 0 at the beginning of a sub name,
37             # so we strip of the filler character in both the subname
38             # and the return value
39 2     2 0 1157 sub HHMMSS {return substr($_[0]->_get_column('HHMMSS'), 1, 6)}
40              
41             1;
42              
43             __END__