line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::AMEX::Transaction::CBNOT 0.005; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
80
|
use strict; |
|
9
|
|
|
|
|
17
|
|
|
9
|
|
|
|
|
230
|
|
4
|
9
|
|
|
9
|
|
37
|
use warnings; |
|
9
|
|
|
|
|
14
|
|
|
9
|
|
|
|
|
178
|
|
5
|
|
|
|
|
|
|
|
6
|
9
|
|
|
9
|
|
3338
|
use Finance::AMEX::Transaction::CBNOT::Header; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
211
|
|
7
|
9
|
|
|
9
|
|
4651
|
use Finance::AMEX::Transaction::CBNOT::Detail; |
|
9
|
|
|
|
|
23
|
|
|
9
|
|
|
|
|
205
|
|
8
|
9
|
|
|
9
|
|
3286
|
use Finance::AMEX::Transaction::CBNOT::Trailer; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
187
|
|
9
|
9
|
|
|
9
|
|
3302
|
use Finance::AMEX::Transaction::CBNOT::Unknown; |
|
9
|
|
|
|
|
21
|
|
|
9
|
|
|
|
|
1485
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# ABSTRACT: Parse AMEX Chargeback Notification Files (CBNOT) |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
2
|
|
|
2
|
1
|
8
|
my ($class, %props) = @_; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
|
|
8
|
my $type_map = { |
17
|
|
|
|
|
|
|
H => 'Finance::AMEX::Transaction::CBNOT::Header', |
18
|
|
|
|
|
|
|
D => 'Finance::AMEX::Transaction::CBNOT::Detail', |
19
|
|
|
|
|
|
|
T => 'Finance::AMEX::Transaction::CBNOT::Trailer', |
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
|
|
8
|
my $self = bless {_type_map => $type_map}, $class; |
23
|
|
|
|
|
|
|
|
24
|
2
|
|
|
|
|
7
|
return $self; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
6
|
|
|
6
|
1
|
17
|
sub file_format {return 'N/A'} |
28
|
6
|
|
|
6
|
1
|
29
|
sub file_version {return 'N/A'} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub parse_line { |
31
|
8
|
|
|
8
|
1
|
19
|
my ($self, $line) = @_; |
32
|
|
|
|
|
|
|
|
33
|
8
|
100
|
|
|
|
26
|
return if not defined $line; |
34
|
|
|
|
|
|
|
|
35
|
6
|
|
|
|
|
17
|
my $indicator = substr($line, 0, 1); |
36
|
6
|
50
|
|
|
|
24
|
if (exists $self->{_type_map}->{$indicator}) { |
37
|
6
|
|
|
|
|
64
|
return $self->{_type_map}->{$indicator}->new(line => $line); |
38
|
|
|
|
|
|
|
} |
39
|
0
|
|
|
|
|
|
return Finance::AMEX::Transaction::CBNOT::Unknown->new(line => $line); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |