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.004';
3 8     8   63 use strict;
  8         20  
  8         296  
4 8     8   45 use warnings;
  8         17  
  8         254  
5              
6             # ABSTRACT: Parse AMEX Chargeback Notification Files (CBNOT) Trailer Rows
7              
8 8     8   41 use base 'Finance::AMEX::Transaction::CBNOT::Base';
  8         20  
  8         5059  
9              
10             sub field_map {
11             return {
12 32     32 0 383 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 1125 sub type {return 'TRAILER'}
33              
34 2     2 1 1059 sub AMEX_APPL_AREA {return $_[0]->_get_column('AMEX_APPL_AREA')}
35 2     2 1 1131 sub APPLICATION_SYSTEM_CODE {return $_[0]->_get_column('APPLICATION_SYSTEM_CODE')}
36 2     2 1 1119 sub FILE_TYPE_CODE {return $_[0]->_get_column('FILE_TYPE_CODE')}
37 2     2 1 1065 sub FILE_CREATION_DATE {return $_[0]->_get_column('FILE_CREATION_DATE')}
38 2     2 1 1081 sub FILE_SEQUENCE_NUMBER {return $_[0]->_get_column('FILE_SEQUENCE_NUMBER')}
39 2     2 1 1134 sub JULIAN_DATE {return $_[0]->_get_column('JULIAN_DATE')}
40 2     2 1 1063 sub AMEX_TOTAL_RECORDS {return $_[0]->_get_column('AMEX_TOTAL_RECORDS')}
41 2     2 1 1104 sub CONFIRM_RECORD_COUNT {return $_[0]->_get_column('CONFIRM_RECORD_COUNT')}
42 2     2 1 540 sub AMEX_JOB_NUMBER {return $_[0]->_get_column('AMEX_JOB_NUMBER')}
43 2     2 1 587 sub SAID {return $_[0]->_get_column('SAID')}
44 2     2 1 1063 sub DATATYPE {return $_[0]->_get_column('DATATYPE')}
45 2     2 1 1060 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 1072 sub HHMMSS {return substr($_[0]->_get_column('HHMMSS'), 1, 6)}
51 2     2 1 1070 sub STARS_FILESEQ_NB {return $_[0]->_get_column('STARS_FILESEQ_NB')}
52              
53             1;
54              
55             __END__