NAME
Finance::AMEX::Transaction::CBNOT - Parse AMEX Chargeback Notification Files (CBNOT)
VERSION
version 0.005
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');
file_format
This is included for compatibility, it will always return the string 'N/A'.
file_version
This is included for compatibility, it will always return the string 'N/A'.
NAME
Finance::AMEX::Transaction::CBNOT - Parse AMEX Chargeback Notification Files (CBNOT)
AUTHOR
Tom Heady <cpan@punch.net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2022 by ZipRecruiter/Tom Heady.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.