NAME
Finance::AMEX::Transaction - Parse AMEX transaction files: EPRAW, EPPRC, EPTRN, CBNOT, GRRCN
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 transaction files and returns object that are appropriate for the line that it was asked to parse.
METHODS
new
Creates a new Finance::AMEX::Transaction object. Required options are file_type).
my $cbnot = Finance::AMEX::Transaction->new(file_type => 'CBNOT');
file_type(required)- 
Sets the type of file that we are parsing. Valid values are:
- EPRAW
 - 
returns Finance::AMEX::Transaction::EPRAW objects.
 - EPPRC
 - 
returns Finance::AMEX::Transaction::EPPRC objects.
 - EPTRN
 - 
returns Finance::AMEX::Transaction::EPTRN objects.
 - CBNOT
 - 
returns Finance::AMEX::Transaction::CBNOT objects.
 - GRRCN
 - 
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 should be auto-detected after the first row is parsed.
Should be one of FIXED, CSV, TSV.
- fixed
 - 
The file is in a fixed width format.
 - csv
 - 
The file has comma separated values.
 - tsv
 - 
The file has tab separated values.
 
 file_version- 
Sets the version of the file we are parsing. Currently only useful for Finance::AMEX::Transaction::GRRCN files. This should be auto-detected after the HEADER row is parsed.
Should be one of 1.01, 2.01, 3.01.
 
file_type
Access method for the file type you set when calling new
file_format
Access method for the file formatted type that was set when calling new or was auto-detected after the first row is parsed.
file_version
Access method for the file version that was set when calling new or was auto-detected after the HEADER row is parsed.
parser
Access method for the parser that is set depending on file_type
getline
When passed a filehandle, takes the next line from the file and returns the appropriate object.
my $record = $cbnot->getline($fh);
parse_line
Parses a single line from a file and returns the appropriate object.
NAME
Finance::AMEX::Transaction - Parse AMEX transaction files: EPRAW, EPPRC, EPA, CBNOT, GRRCN
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.