Finance::AMEX::Transaction::GRRCN::Submission - Parse AMEX Global Reconciliation (GRRCN) Submission or summary of charge (SOC) Rows
version 0.002
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 'SUBMISSION') { print $record->PAYMENT_DATE . "\n"; } } # to parse a single line my $record = $epraw->parse_line('line from an GRRCN file'); if ($record->type eq 'SUBMISSION') { ... }
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.
Returns a new Finance::AMEX::Transaction::GRRCN::Submission object.
my $record = Finance::AMEX::Transaction::GRRCN::Submission->new(line => $line);
This will always return the string SUBMISSION.
print $record->type; # SUBMISSION
Returns the full line that is represented by this object.
print $record->line;
This field contains the Record identifier, which will always be “SUBMISSION” for the Submission Record.
This field contains the American Express-assigned Service Establishment (SE) Number of the Merchant receiving the payment/settlement.
This field contains the Settlement Account Type.
Valid values include the following:
If unused, this field will be space filled (fixed format) or blank (delimited formats).
This field contains the American Express-assigned Payment/Settlement Number. This reference number may be used by the American Express Payee for reconciliation purposes.
This field contains the Payment Date scheduled in American Express systems. The date that funds are actually available to the payee's depository institution may differ from the date reported in this field.
The format is: YYYYMMDD
This field contains the Alphanumeric ISO Code for the Payment (Settlement) currency.
This field contains the Service Establishment (SE) Number of the Merchant being reconciled.
The field contains the date assigned by the Merchant or Partner to this submission.
This field contains the American Express Transaction Processing Date, which is used to determine the payment date scheduled in the American Express Systems.
This field contains the Submission Invoice number.
This field may not always be populated if no Submission Invoice Number is assigned.
This field contains the Submission Currency Code in Alpha ISO format. Refer to the Global Codes & Information Guide.
This field is reserved for future use and will be set to spaces (fixed format) or blank (delimited formats).
In the future this field will include the exchange rate used to convert the submission currency into the settlement currency for payment.
Where the payment currency and submission currency are the same, this field will be space filled (fixed format) or blank (delimited formats). Right justified, leading zeros.
This field contains the Gross Amount of American Express charges submitted in the original submission, expressed in the submission currency.
For formats of amount values, see description in Summary Record, PAYMENT_NET_AMOUNT.
This field contains the Gross Amount of American Express charges submitted in the original submission, expressed in the Payment (Settlement) currency.
This field contains the total Discount Amount, expressed in the Payment (Settlement) currency.
This field will contain the positive for a typical debit submission which results in American Express making a credit to the Merchant's account, negative if a credit submission.
For U.S. and Canada Merchants using Gross Pay, this field is for information purposes only. Aggregated Discount and Service Fees to be debited will be recorded in the Fees & Revenues Record on the date of debit from the Merchant's account.
This field contains the total Service Fee Amount for the whole Submission, expressed in the Payment (Settlement) currency.
This field is signed positive for a typical debit submission which results in American Express making a credit to the Merchant's account, negative if a credit submission.
This field contains the total Tax Amount for the submission, expressed in the Payment (Settlement) currency, which is only applicable to the following specific markets
LAC Mexico / Bahamas / Panama / Argentina JAPA Australia / India / Japan EMEA Germany / Austria Multi-Currency Mexico / Australia
This field contains the Net SOC (Summary of Charge) amount for payment, expressed in the Payment (Settlement) currency, which is the sum total of Submission Gross Amount less Submission Discount Amount, Submission Service Fee and Submission Tax Amount.
This field contains the following:
Note: where used, the submission discount rate is always signed positive.
Formatting of rate fields is as follows:
A (1) N (6)
The format is a signed, numeric field with five decimal places implied. Detailed layout is below.
SWDDDDD
For example:
Rate Decimal Value Displayed in File +99.999% +0.99999 ~099999 +03.300% +0.03300 ~003300 +00.001% +0.00001 ~000001 -00.001% -0.00001 -000001 -03.300% -0.03300 -003300 -99.999% -0.99999 -099999
~ = space
For amount of any tax applied, SUBMISSION_TAX_AMOUNT.
This field contains a count of the number of accepted transactions / ROCS (Record of Charge) in the submission / SOC (Summary of Charge).
This field contains a Tracking ID, which holds an American Express-generated SOC processing ID.
This field is only applicable to U.S. and Canada. For other markets this will be set to spaces (fixed format) or blank (delimited formats).
This field contains the number of monthly payments.
This field is only relevant for deposits made under the Monthly Installments Plan without interest.
This field is only applicable to certain local market Merchants from Mexico / Argentina.
This field contains the Acceleration Number for this SOC Deposit.
This field may be zero (0) if acceleration is consolidated at transaction level.
This field contains the Original Settlement Date.
This field contains the Deposit Acceleration Date.
This field may be zero (0) if there is no acceleration date / acceleration is consolidated at transaction level.
This field contains the Number of Days the payment is accelerated.
This field contains the Acceleration Amount.
This field can be calculated using, ACCELERATION_AMOUNT in the Transaction Record (i.e., If you sum up Transaction Record Field #ACCELERATION_AMOUNT for all ROC's within a SOC, you will have the Submission Acceleration Fee Amount).
This field contains the Acceleration Net Amount. This field may be zero (0) if acceleration is consolidated at transaction level.
This field can be calculated by; SUBMISSION_NET_AMOUNT (Submission Record) + SUBMISSION_ACCELERATION_FEE_AMOUNT (Submission Record).
The last two digits are decimals. For formats of amount values, see description in Summary Record, PAYMENT_NET_AMOUNT.
This field contains the proportion of the Submission Gross Amount which is a debit amount, expressed in the Payment (Settlement) currency.
This field is always signed positive.
This field contains the proportion of the Submission Gross Amount which is a credit amount, expressed in the Payment (Settlement) currency.
Finance::AMEX::Transaction::GRRCN::Submission - Object methods for AMEX Global Reconciliation (GRRCN) Submission or summary of charge records.
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.