NAME
Finance::AMEX::Transaction::GRRCN::Header - Parse AMEX Global Reconciliation (GRRCN) Header Rows
VERSION
version 0.005
SYNOPSIS
use Finance::AMEX::Transaction;
my $epraw = Finance::AMEX::Transaction->new(file_type => 'GRRCN');
open my $fh, '<', '/path to GRRCN file' or die "cannot open GRRCN file: $!";
while (my $record = $epraw->getline($fh)) {
if ($record->type eq 'HEADER') {
print $record->FILE_CREATION_DATE . "\n";
}
}
# to parse a single line
my $record = $epraw->parse_line('line from an GRRCN file');
if ($record->type eq 'HEADER') {
...
}
DESCRIPTION
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.
METHODS
new
Returns a new Finance::AMEX::Transaction::GRRCN::Header object.
my $record = Finance::AMEX::Transaction::GRRCN::Header->new(line => $line);
type
This will always return the string HEADER.
print $record->type; # HEADER
line
Returns the full line that is represented by this object.
print $record->line;
field_map
Returns an arrayref of hashrefs 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 FILE_CREATION_DATE field
print $record->field_map->[4]->{FILE_CREATION_DATE}->[0]; # 11
RECORD_TYPE
This field contains the Record identifier, which will always be “HEADER” for the Header Record.
FILE_CREATION_DATE
This field contains the File Creation Date.
The format is: YYYYMMDD
FILE_CREATION_TIME
This field contains the File Creation Time (24-hour format), when the file was created.
The format is: HHMMSS
SEQUENTIAL_NUMBER
This field contains a Sequential Number, where each time a file is sent it will be incrementally higher than that in the previous file. It is intended to identify whether the file is a duplicate and ensure there has been no missing file.
A sequential number with a prefix of “A” indicates an Ad-hoc file.
FILE_ID
This field contains an American Express File ID, which will always be “GRRCN” for the Global Raw Data Reconciliation File.
FILE_NAME
This field contains the raw data profile name chosen by the consumer of this service. It is established during the file setup process and is intended to assist in recognizing the file.
FILE_VERSION_NUMBER
This field contains the version of the raw data format being consumed by the customer.
NAME
Finance::AMEX::Transaction::GRRCN::Header - Object methods for Global Reconciliation records.
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.