Finance::AMEX::Transaction - Parse AMEX transaction files: EPRAW, EPPRC, EPTRN, CBNOT, GRRCN
version 0.002
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"; } }
This module parses AMEX transaction files and returns object that are appropriate for the line that it was asked to parse.
Creates a new Finance::AMEX::Transaction object. Required options are file_type).
file_type
my $cbnot = Finance::AMEX::Transaction->new(file_type => 'CBNOT');
Sets the type of file that we are parsing. Valid values are:
returns Finance::AMEX::Transaction::EPRAW objects.
returns Finance::AMEX::Transaction::EPPRC objects.
returns Finance::AMEX::Transaction::EPTRN objects.
returns Finance::AMEX::Transaction::CBNOT objects.
returns Finance::AMEX::Transaction::GRRCN objects.
file_format
Sets the format of the file that we are parsing. Currently only useful for Finance::AMEX::Transaction::GRRCN files. This can usually be auto-detected.
Should be one of FIXED, CSV, TSV.
The file is in a fixed width format.
The file has comma seperated values.
The file has tab seperated values.
Access method for the file type you set when calling new
new
Access method for the file formated type that was set when calling new or was auto-detected.
Access method for the parser that is set depending on file_type
When passed a filehandle, takes the next line from the file and returns the appropriate object.
my $record = $cbnot->getline($fh);
Parses a single line from a file and returns the appropriate object.
Finance::AMEX::Transaction - Parse AMEX transaction files: EPRAW, EPPRC, EPA, CBNOT, GRRCN
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.