File Coverage

blib/lib/Finance/AMEX/Transaction/CBNOT/Trailer.pm
Criterion Covered Total %
statement 25 25 100.0
branch n/a
condition n/a
subroutine 19 19 100.0
pod 15 16 93.7
total 59 60 98.3


line stmt bran cond sub pod time code
1             package Finance::AMEX::Transaction::CBNOT::Trailer;
2             $Finance::AMEX::Transaction::CBNOT::Trailer::VERSION = '0.003';
3 7     7   48 use strict;
  7         14  
  7         214  
4 7     7   34 use warnings;
  7         14  
  7         236  
5              
6             # ABSTRACT: Parse AMEX Chargeback Notification Files (CBNOT) Trailer Rows
7              
8 7     7   37 use base 'Finance::AMEX::Transaction::CBNOT::Base';
  7         15  
  7         3287  
9              
10             sub field_map {
11             return {
12 32     32 0 399 REC_TYPE => [1, 1],
13             AMEX_APPL_AREA => [2, 100],
14              
15             APPLICATION_SYSTEM_CODE => [2, 2],
16             FILE_TYPE_CODE => [4, 2],
17             FILE_CREATION_DATE => [6, 8],
18             FILE_SEQUENCE_NUMBER => [20, 6],
19             JULIAN_DATE => [22, 2],
20             AMEX_TOTAL_RECORDS => [27, 5],
21             CONFIRM_RECORD_COUNT => [36, 9],
22             AMEX_JOB_NUMBER => [45, 9],
23              
24             SAID => [102, 6],
25             DATATYPE => [108, 5],
26             CCYYDDD => [113, 7],
27             HHMMSS => [120, 7],
28             STARS_FILESEQ_NB => [127, 3],
29             };
30             }
31              
32 4     4 1 1170 sub type {return 'TRAILER'}
33              
34 2     2 1 1093 sub AMEX_APPL_AREA {return $_[0]->_get_column('AMEX_APPL_AREA')}
35 2     2 1 1077 sub APPLICATION_SYSTEM_CODE {return $_[0]->_get_column('APPLICATION_SYSTEM_CODE')}
36 2     2 1 1062 sub FILE_TYPE_CODE {return $_[0]->_get_column('FILE_TYPE_CODE')}
37 2     2 1 564 sub FILE_CREATION_DATE {return $_[0]->_get_column('FILE_CREATION_DATE')}
38 2     2 1 1067 sub FILE_SEQUENCE_NUMBER {return $_[0]->_get_column('FILE_SEQUENCE_NUMBER')}
39 2     2 1 1062 sub JULIAN_DATE {return $_[0]->_get_column('JULIAN_DATE')}
40 2     2 1 568 sub AMEX_TOTAL_RECORDS {return $_[0]->_get_column('AMEX_TOTAL_RECORDS')}
41 2     2 1 1170 sub CONFIRM_RECORD_COUNT {return $_[0]->_get_column('CONFIRM_RECORD_COUNT')}
42 2     2 1 1139 sub AMEX_JOB_NUMBER {return $_[0]->_get_column('AMEX_JOB_NUMBER')}
43 2     2 1 1112 sub SAID {return $_[0]->_get_column('SAID')}
44 2     2 1 1092 sub DATATYPE {return $_[0]->_get_column('DATATYPE')}
45 2     2 1 1065 sub CCYYDDD {return $_[0]->_get_column('CCYYDDD')}
46              
47             # perl does not allow 0 at the beginning of a sub name,
48             # so we strip of the filler character in both the subname
49             # and the return value
50 2     2 1 1102 sub HHMMSS {return substr($_[0]->_get_column('HHMMSS'), 1, 6)}
51 2     2 1 1126 sub STARS_FILESEQ_NB {return $_[0]->_get_column('STARS_FILESEQ_NB')}
52              
53             1;
54              
55             __END__