NAME

Finance::AMEX::Transaction::EPPRC - Parse AMEX Transaction/Invoice Level Reconciliation (EPPRC)

VERSION

version 0.005

SYNOPSIS

use Finance::AMEX::Transaction;

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

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

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

DESCRIPTION

This module parses AMEX Transaction/Invoice Level Reconciliation (EPPRC) 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::EPPRC::Header

Header Rows

print $record->type; # HEADER
Finance::AMEX::Transaction::EPPRC::Summary

Summary Rows

print $record->type; # SUMMARY
Finance::AMEX::Transaction::EPPRC::Detail::ChargeSummary

Summary of Charge (SOC) Detail Rows

print $record->type; # SOC_DETAIL
Finance::AMEX::Transaction::EPPRC::Detail::ChargeSummaryPricing

Summary of Charge (SOC) Level Pricing Rows

print $record->type; # SOC_PRICING
Finance::AMEX::Transaction::EPPRC::Detail::RecordSummary

Record of Charge (ROC) Detail Rows

print $record->type; # ROC_DETAIL
Finance::AMEX::Transaction::EPPRC::Detail::RecordSummaryPricing

Record of Charge (ROC) Level Pricing Record Rows

print $record->type; # ROC_PRICING
Finance::AMEX::Transaction::EPPRC::Detail::Chargeback

Chargeback Detail Rows

print $record->type; # CHARGEBACK_DETAIL
Finance::AMEX::Transaction::EPPRC::Detail::Adjustment

Adjustment Detail Rows

print $record->type; # ADJUSTMENT_DETAIL
Finance::AMEX::Transaction::EPPRC::Detail::Other

Other Fees and Revenues Detail Rows

print $record->type; # OTHER_DETAIL
Finance::AMEX::Transaction::EPPRC::Trailer

Trailer Rows

print $record->type; # TRAILER
Finance::AMEX::Transaction::EPPRC::Unknown

Unknown Rows

print $record->type; # UNKNOWN

METHODS

new

Returns a Finance::AMEX::Transaction::EPPRC object.

my $epprc = Finance::AMEX::Transaction::EPPRC->new;

parse_line

Returns one of the Finance::AMEX::Transaction::EPPRC::Header, Finance::AMEX::Transaction::EPPRC::Summary, Finance::AMEX::Transaction::EPPRC::Detail::ChargeSummary, Finance::AMEX::Transaction::EPPRC::Detail::ChargeSummaryPricing, Finance::AMEX::Transaction::EPPRC::Detail::RecordSummary, Finance::AMEX::Transaction::EPPRC::Detail::RecordSummaryPricing, Finance::AMEX::Transaction::EPPRC::Detail::Chargeback, Finance::AMEX::Transaction::EPPRC::Detail::Adjustment, Finance::AMEX::Transaction::EPPRC::Detail::Other, Finance::AMEX::Transaction::EPPRC::Trailer, or Finance::AMEX::Transaction::EPPRC::Unknown records depending on the contents of the row.

my $record = $epprc->parse_line('line from a epprc file');

file_format

This is included for compatibility, it will always return the string 'N/A'.

file_version

This is included for compatibility, it will always return the string 'N/A'.

line_indicator

Returns one of the line types for the EPPRC format. You wouldn't normally need to call this.

my $line_type = $epprc->line_indicator('line from a epprc file');

NAME

Finance::AMEX::Transaction::EPPRC - Parse AMEX Transaction/Invoice Level Reconciliation (EPPRC)

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.