Finance::AMEX::Transaction::EPPRC::Trailer - Parse AMEX Transaction/Invoice Level Reconciliation (EPPRC) Trailer Rows
version 0.005
use Finance::AMEX::Transaction; my $epraw = Finance::AMEX::Transaction->new(file_type => 'EPPRC'); open my $fh, '<', '/path to EPPRC file' or die "cannot open EPPRC file: $!"; while (my $record = $epraw->getline($fh)) { if ($record->type eq 'FOOTER') { print $record->DF_TRL_DATE . "\n"; } } # to parse a single line my $record = $epraw->parse_line('line from an EPPRC file'); if ($record->type eq 'TRAILER') { ... }
You would not normally be calling this module directly, it is one of the possible return objects from a call to Finance::AMEX::Transaction's getline method.
Returns a new Finance::AMEX::Transaction::EPPRC::Trailer object.
my $record = Finance::AMEX::Transaction::EPPRC::Trailer->new(line => $line);
This will always return the string TRAILER.
print $record->type; # TRAILER
Returns the full line that is represented by this object.
print $record->line;
Returns a hashref where the name is the record name and the value is an arrayref of the start position and length of that field.
# print the start position of the DF_TRL_DATE field print $record->field_map->{DF_TRL_DATE}->[0]; # 6
This field contains the constant literal "DFTRL", a Record Type code that indicates that this is a Data File Trailer Record.
This field contains the File Creation Date.
The format is: MMDDYYYY
This field contains the File Creation Time (24-hour format), when the file was created.
The format is: HHMM
This field contains an American Express, system-generated, File ID number that uniquely identifies this data file.
This field contains the File Name (as entered in the American Express data distribution database) that corresponds to DF_TRL_FILE_ID.
This field contains the Recipient Key, a unique, American Express, system-generated number that identifies this data file.
Note: This number is unique to each individual file.
This field contains the Record Count for all items in this data file, including the header and trailer records.
Finance::AMEX::Transaction::EPPRC::Trailer - Object methods for AMEX Reconciliation file footer records.
Tom Heady <cpan@punch.net>
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.
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.