NAME
Finance::AMEX::Transaction::GRRCN - Parse AMEX Global Reconciliation (GRRCN)
VERSION
version 0.003
SYNOPSIS
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";
}
}
DESCRIPTION
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:
- Finance::AMEX::Transaction::GRRCN::Header
-
Header Rows
print $record->type; # HEADER
- Finance::AMEX::Transaction::GRRCN::Summary
-
Summary Rows
print $record->type; # SUMMARY
- Finance::AMEX::Transaction::GRRCN::TaxRecord
-
TaxRecord Rows
print $record->type; # TAXRECORD
- Finance::AMEX::Transaction::GRRCN::Submission
-
Submission or summary of charge (SOC) Rows
print $record->type; # SUBMISSION
- Finance::AMEX::Transaction::GRRCN::Transaction
-
Transaction or summary of charge (SOC) Rows
print $record->type; # TRANSACTION
- Finance::AMEX::Transaction::GRRCN::TxnPricing
-
transaction or ROC pricing Rows
print $record->type; # TXNPRICING
- Finance::AMEX::Transaction::GRRCN::Chargeback
-
Chargeback Rows
print $record->type; # CHARGEBACK
- Finance::AMEX::Transaction::GRRCN::Adjustment
-
Adjustment Rows
print $record->type; # ADJUSTMENT
- Finance::AMEX::Transaction::GRRCN::FeeRevenue
-
Fees and Revenues Record
print $record->type; # FEEREVENUE
- Finance::AMEX::Transaction::GRRCN::Trailer
-
Trailer Rows
print $record->type; # TRAILER
- Finance::AMEX::Transaction::GRRCN::Unknown
-
Unknown lines.
print $record->type; # UNKNOWN
METHODS
new
Returns a Finance::AMEX::Transaction::GRRCN object.
my $grrcn = Finance::AMEX::Transaction::GRRCN->new;
parse_line
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');
NAME
Finance::AMEX::Transaction::GRRCN - Parse AMEX Chargeback Notification Files (GRRCN)
AUTHOR
Tom Heady <theady@ziprecruiter.com>
COPYRIGHT AND LICENSE
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.