NAME

Finance::AMEX::Transaction::CBNOT - Parse AMEX Chargeback Notification Files (CBNOT)

VERSION

version 0.001

SYNOPSIS

use Finance::AMEX::Transaction;

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

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

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

DESCRIPTION

This module parses AMEX Chargeback Notification Files (CBNOT) returns object that are 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::CBNOT::Header

Header lines.

Finance::AMEX::Transaction::CBNOT::Detail

Detail lines.

Finance::AMEX::Transaction::CBNOT::Trailer

Trailer lines.

Finance::AMEX::Transaction::CBNOT::Unknown

Unknown lines.

METHODS

new

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

my $cbnot = Finance::AMEX::Transaction::CBNOT->new;

parse_line

Returns one of the Header, Detail, Trailer, or Unknown records depending on the contents of the line.

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

NAME

Finance::AMEX::Transaction::CBNOT - Parse AMEX Chargeback Notification Files (CBNOT)

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.