line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::AMEX::Transaction::CBNOT::Base; |
2
|
|
|
|
|
|
|
$Finance::AMEX::Transaction::CBNOT::Base::VERSION = '0.003'; |
3
|
7
|
|
|
7
|
|
50
|
use strict; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
188
|
|
4
|
7
|
|
|
7
|
|
33
|
use warnings; |
|
7
|
|
|
|
|
18
|
|
|
7
|
|
|
|
|
1528
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Parse AMEX Chargeback Notification Files (CBNOT) Base methods |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
6
|
|
|
6
|
1
|
25
|
my ($class, %props) = @_; |
10
|
|
|
|
|
|
|
my $self = bless { |
11
|
|
|
|
|
|
|
_line => $props{line}, |
12
|
6
|
|
|
|
|
27
|
}, $class; |
13
|
|
|
|
|
|
|
|
14
|
6
|
|
|
|
|
29
|
return $self; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub line { |
18
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
19
|
0
|
|
|
|
|
0
|
return $self->{_line}; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub _get_column { |
23
|
294
|
|
|
294
|
|
779
|
my ($self, $field) = @_; |
24
|
294
|
|
|
|
|
763
|
my $map = $self->field_map->{$field}; |
25
|
|
|
|
|
|
|
|
26
|
294
|
|
|
|
|
4603
|
my $ret = substr($self->{_line}, $map->[0] - 1, $map->[1]); |
27
|
294
|
|
|
|
|
1606
|
$ret =~ s{\s+\z}{}; |
28
|
294
|
|
|
|
|
1716
|
return $ret; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub REC_TYPE { |
32
|
4
|
|
|
4
|
1
|
1735
|
my ($self) = @_; |
33
|
4
|
|
|
|
|
17
|
return $self->_get_column('REC_TYPE'); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |