Finance::AMEX::Transaction::EPRAW - Parse AMEX Reconciliation Files (EPRAW)
version 0.002
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"; } }
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:
Header Rows
print $record->type; # HEADER
Summary Rows
print $record->type; # SUMMARY
Summary of Charge (SOC) Detail Rows
print $record->type; # SOC_DETAIL
Chargeback Detail Rows
print $record->type; # CHARGEBACK_DETAIL
Adjustment Detail Rows
print $record->type; # ADJUSTMENT_DETAIL
Other Detail Rows
print $record->type; # OTHER_DETAIL
Trailer Rows
print $record->type; # TRAILER
Unknown Rows
print $record->type; # UNKNOWN
Returns a Finance::AMEX::Transaction::EPRAW object.
my $epraw = Finance::AMEX::Transaction::EPRAW->new;
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');
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.