NAME

Finance::AMEX::Transaction::EPTRN::Detail::Adjustment - Parse AMEX Transaction/Invoice Level Reconciliation (EPTRN) Adjustment Detail Rows

VERSION

version 0.005

SYNOPSIS

use Finance::AMEX::Transaction;

my $epraw = Finance::AMEX::Transaction->new(file_type => 'EPTRN');
open my $fh, '<', '/path to EPTRN file' or die "cannot open EPTRN file: $!";

while (my $record = $epraw->getline($fh)) {

 if ($record->type eq 'ADJUSTMENT_DETAIL') {
   print $record->AMEX_PROCESS_DATE . "\n";
 }
}

# to parse a single line

my $record = $epraw->parse_line('line from an EPTRN  file');
if ($record->type eq 'ADJUSTMENT_DETAIL') {
  ...
}

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::EPTRN::Detail::Adjustment object.

my $record = Finance::AMEX::Transaction::EPTRN::Detail::Adjustment->new(line => $line);

type

This will always return the string ADJUSTMENT_DETAIL.

print $record->type; # ADJUSTMENT_DETAIL

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 PAYMENT_YEAR field
print $record->field_map->[3]->{PAYMENT_YEAR}->[0]; # 31

AMEX_PAYEE_NUMBER

This field contains the Service Establishment (SE) Number of the merchant that received the payment from American Express.

AMEX_SE_NUMBER

This field contains the Service Establishment (SE) Number of the merchant being reconciled, which may not necessarily be the same SE receiving payment (see AMEX_PAYEE_NUMBER).

This is the SE Number under which the transactions were submitted, which usually corresponds to the physical location.

SE_UNIT_NUMBER

This field contains the merchant-assigned SE Unit Number (usually an internal, store identifier code) that corresponds to a specific store or location.

If no value is assigned, this field is character space filled.

PAYMENT_YEAR

This field contains the Payment Year that corresponds to the entry in the Julian Date subfield of PAYMENT_NUMBER.

PAYMENT_NUMBER

This field contains the Payment Number, a reference number used by the American Express Payee to reconcile the daily settlement to the daily payment.

PAYMENT_NUMBER_DATE

The Julian date of the payment.

PAYMENT_NUMBER_TYPE

An alpha character assigned by the American Express settlement system.

PAYMENT_NUMBER_NUMBER

The Number of the payment.

RECORD_TYPE

This field contains the constant literal “2”, a Record Type code that indicates that this is a Detail Record.

DETAIL_RECORD_TYPE

This field contains the Detail Record Type code that indicates the type of record used in this transaction. For Adjustment Detail Records, this entry is always “30”.

AMEX_PROCESS_DATE

This field contains the American Express Transaction Processing Date, which is used to determine the payment date.

The format is: YYYYDDD

YYYY = Year
DDD = Julian Date

ADJUSTMENT_NUMBER

This field contains the American Express-assigned Adjustment Number that appears on all American Express correspondence related to this adjustment.

ADJUSTMENT_AMOUNT

This field contains the gross Adjustment Amount assessed by American Express.

Note: For US Dollar (USD) and Canadian Dollar (CAD) transactions, two decimal places are implied.

A debit amount (positive) is indicated by an upper-case alpha code used in place of the last digit in the amount.

The debit codes and their numeric equivalents are listed below:

1=A
2=B
3=C
4=D
5=E
6=F
7=G
8=H
9=I
0={

A credit amount (negative) is also indicated by an upper-case alpha code used in place of the last digit in the amount.

The credit codes and their numeric equivalents are listed below:

1=J
2=K
3=L
4=M
5=N
6=O
7=P
8=Q
9=R
0=}

The following are examples of how amounts would appear:

 Amount    Debit         Credit
  $1.11    0000000011A   0000000011J
$345.05    0000003450E   0000003450N
 $22.70    0000000227{   0000000227}

DISCOUNT_AMOUNT

This field contains the total Discount Amount, based on ADJUSTMENT_AMOUNT and DISCOUNT_RATE.

SERVICE_FEE_AMOUNT

This field contains the total Service Fee Amount, based on ADJUSTMENT_AMOUNT, and SERVICE_FEE_RATE.

NET_ADJUSTMENT_AMOUNT

This field contains the Net Adjustment Amount, which is the sum total of ADJUSTMENT_AMOUNT, less DISCOUNT_AMOUNT and SERVICE_FEE_AMOUNT.

DISCOUNT_RATE

This field contains the Discount Rate (decimal place value) used to calculate the amount American Express charges a merchant for services provided per the American Express Card Acceptance Agreement.

SERVICE_FEE_RATE

This field contains the Service Fee Rate (decimal place value) used to calculate the amount American Express charges a merchant as service fees.

Service fees are assessed only in certain situations and may not apply to all SEs.

CARDMEMBER_NUMBER

This field contains the Cardmember (Account) Number that corresponds to ADJUSTMENT_AMOUNT. (Please note that if Card number masking is enabled this field is required to accept alphanumeric characters.)

ADJUSTMENT_REASON

This field contains the Adjustment Reason, which is the reason the Merchant is assessed the amount that appears in ADJUSTMENT_AMOUNT.

A list of reason descriptions can be found below:

603 Debit for processing error Chargeback
604 Debit for multiple charge
605 Credit processed as Charge
610 Debit as no approval gained
613 Debit as Charge on expired/invalid card
631 Miscellaneous
641 Debit authorized by the merchant
642 Debit for insufficient reply
643 Debit for no reply to inquiry
644 Debit for Fraud Full Recourse
645 Incorrect account number
646 Debit as credit not received by Cardmember
651 Debit as Cardmember paid direct
652 Debit for fraudulent transaction
653 Debit as Cardmember cancelled goods/services
661 Reversal of previous debit
689 Not as described or defective merchandise
690 Not as described or defective merchandise
691 Goods not received
692 Debit for unproven rental charge

If unused, this field is character space filled.

NAME

Finance::AMEX::Transaction::EPTRN::Detail::Adjustment - Object methods for AMEX Transaction/Invoice Level Reconciliation (EPTRN) Adjustment Detail Rows

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.