NAME
Finance::AMEX::Transaction::CBNOT - Parse AMEX Chargeback Notification Files (CBNOT)
VERSION
version 0.003
SYNOPSIS
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";
}
}
DESCRIPTION
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:
- Finance::AMEX::Transaction::CBNOT::Header
-
Header Rows
print $record->type; # HEADER
- Finance::AMEX::Transaction::CBNOT::Detail
-
Detail Rows
print $record->type; # DETAIL
- Finance::AMEX::Transaction::CBNOT::Trailer
-
Trailer Rows
print $record->type; # TRAILER
- Finance::AMEX::Transaction::CBNOT::Unknown
-
Unknown lines.
print $record->type; # UNKNOWN
METHODS
new
Returns a Finance::AMEX::Transaction::CBNOT object.
my $cbnot = Finance::AMEX::Transaction::CBNOT->new;
parse_line
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');
NAME
Finance::AMEX::Transaction::CBNOT - Parse AMEX Chargeback Notification Files (CBNOT)
AUTHOR
Tom Heady <theady@ziprecruiter.com>
COPYRIGHT AND LICENSE
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.