NAME
Finance::AMEX::Transaction::EPRAW - Parse AMEX Reconciliation Files (EPRAW)
VERSION
version 0.003
SYNOPSIS
use Finance::AMEX::Transaction;
my $epraw = Finance::AMEX::Transaction->new(file_type => 'EPRAW');
open my $fh, '<', '/path to EPRAW file' or die "cannot open EPRAW file: $!";
while (my $record = $epraw->getline($fh)) {
if ($record->type eq 'TRAILER') {
print $record->FILE_CREATION_DATE . "\n";
}
}
DESCRIPTION
This module parses AMEX Reconciliation Files (EPRAW) 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::EPRAW::Header
-
Header Rows
print $record->type; # HEADER
- Finance::AMEX::Transaction::EPRAW::Summary
-
Summary Rows
print $record->type; # SUMMARY
- Finance::AMEX::Transaction::EPRAW::Detail::ChargeSummary
-
Summary of Charge (SOC) Detail Rows
print $record->type; # SOC_DETAIL
- Finance::AMEX::Transaction::EPRAW::Detail::Chargeback
-
Chargeback Detail Rows
print $record->type; # CHARGEBACK_DETAIL
- Finance::AMEX::Transaction::EPRAW::Detail::Adjustment
-
Adjustment Detail Rows
print $record->type; # ADJUSTMENT_DETAIL
- Finance::AMEX::Transaction::EPRAW::Detail::Other
-
Other Detail Rows
print $record->type; # OTHER_DETAIL
- Finance::AMEX::Transaction::EPRAW::Trailer
-
Trailer Rows
print $record->type; # TRAILER
- Finance::AMEX::Transaction::EPRAW::Unknown
-
Unknown Rows
print $record->type; # UNKNOWN
METHODS
new
Returns a Finance::AMEX::Transaction::EPRAW object.
my $epraw = Finance::AMEX::Transaction::EPRAW->new;
parse_line
Returns one of the Finance::AMEX::Transaction::EPRAW::Header, Finance::AMEX::Transaction::EPRAW::Summary, Finance::AMEX::Transaction::EPRAW::Detail::ChargeSummary, Finance::AMEX::Transaction::EPRAW::Detail::Chargeback, Finance::AMEX::Transaction::EPRAW::Detail::Adjustment, Finance::AMEX::Transaction::EPRAW::Detail::Other, Finance::AMEX::Transaction::EPRAW::Trailer, or Finance::AMEX::Transaction::EPRAW::Unknown records depending on the contents of the line.
my $record = $epraw->parse_line('line from a epraw file');
NAME
Finance::AMEX::Transaction::EPRAW - Parse AMEX Reconciliation Files (EPRAW)
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.