Finance::AMEX::Transaction::GRRCN - Parse AMEX Global Reconciliation (GRRCN)
version 0.005
use Finance::AMEX::Transaction; my $grrcn = Finance::AMEX::Transaction->new(file_type => 'GRRCN'); open my $fh, '<', '/path to GRRCN file' or die "cannot open GRRCN file: $!"; while (my $record = $grrcn->getline($fh)) { if ($record->type eq 'TRAILER') { print $record->FILE_CREATION_DATE . "\n"; } }
This module parses AMEX Global Reconciliation (GRRCN) files 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
TaxRecord Rows
print $record->type; # TAXRECORD
Submission or summary of charge (SOC) Rows
print $record->type; # SUBMISSION
Transaction or summary of charge (SOC) Rows
print $record->type; # TRANSACTION
transaction or ROC pricing Rows
print $record->type; # TXNPRICING
Chargeback Rows
print $record->type; # CHARGEBACK
Adjustment Rows
print $record->type; # ADJUSTMENT
Fees and Revenues Record
print $record->type; # FEEREVENUE
Trailer Rows
print $record->type; # TRAILER
Unknown lines.
print $record->type; # UNKNOWN
Returns a Finance::AMEX::Transaction::GRRCN object.
my $grrcn = Finance::AMEX::Transaction::GRRCN->new;
Returns one of the Finance::AMEX::Transaction::GRRCN::Header, Finance::AMEX::Transaction::GRRCN::Summary, Finance::AMEX::Transaction::GRRCN::TaxRecord, Finance::AMEX::Transaction::GRRCN::Submission, Finance::AMEX::Transaction::GRRCN::Transaction, Finance::AMEX::Transaction::GRRCN::TxnPricing, Finance::AMEX::Transaction::GRRCN::Chargeback, Finance::AMEX::Transaction::GRRCN::Adjustment, Finance::AMEX::Transaction::GRRCN::FeeRevenue, Finance::AMEX::Transaction::GRRCN::Trailer, or Finance::AMEX::Transaction::GRRCN::Unknown records depending on the contents of the line.
my $record = $grrcn->parse_line('line from a grrcn file');
Returns one of CSV, TSV, or FIXED depending on how the line is formatted. You wouldn't normally need to call this.
my $file_format = $grrcn->detect_file_format('line from a grrcn file');
Returns one of the line types for the GRRCN format. You wouldn't normally need to call this.
my $line_type = $grrcn->detect_line_type('line from a grrcn file');
Returns the previously detected file format.
my $file_format = $grrcn->file_format;
Returns the detected file version that is parsed from the header.
my $file_format = $grrcn->file_version;
Finance::AMEX::Transaction::GRRCN - Parse AMEX Chargeback Notification Files (GRRCN)
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.