Finance::AMEX::Transaction::CBNOT - Parse AMEX Chargeback Notification Files (CBNOT)
version 0.002
use Finance::AMEX::Transaction; my $cbnot = Finance::AMEX::Transaction->new(file_type => 'CBNOT'); open my $fh, '<', '/path to CBNOT file' or die "cannot open CBNOT file: $!"; while (my $record = $cbnot->getline($fh)) { if ($record->type eq 'TRAILER') { print $record->FILE_CREATION_DATE . "\n"; } }
This module parses AMEX Chargeback Notification Files (CBNOT) and returns an object which is appropriate for the line that it was asked to parse.
You would not normally be calling this module directly, it is merely a router to the correct object type that is returned to Finance::AMEX::Transaction's getline method.
Object returned are one of:
Header Rows
print $record->type; # HEADER
Detail Rows
print $record->type; # DETAIL
Trailer Rows
print $record->type; # TRAILER
Unknown lines.
print $record->type; # UNKNOWN
Returns a Finance::AMEX::Transaction::CBNOT object.
my $cbnot = Finance::AMEX::Transaction::CBNOT->new;
Returns one of the Finance::AMEX::Transaction::CBNOT::Header, Finance::AMEX::Transaction::CBNOT::Detail, Finance::AMEX::Transaction::CBNOT::Trailer, or Finance::AMEX::Transaction::CBNOT::Unknown records depending on the contents of the line.
my $record = $cbnot->parse_line('line from a cbnot file');
Tom Heady <theady@ziprecruiter.com>
This software is copyright (c) 2018 by ZipRecruiter.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Finance::AMEX::Transaction, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::AMEX::Transaction
CPAN shell
perl -MCPAN -e shell install Finance::AMEX::Transaction
For more information on module installation, please visit the detailed CPAN module installation guide.