NAME
Finance::AMEX::Transaction::CBNOT::Trailer - Parse AMEX Chargeback Notification Files (CBNOT) Trailer Rows
VERSION
version 0.005
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";
}
}
# to parse a single line
my $record = $cbnot->parse_line('line from a CBNOT file');
if ($record->type eq 'TRAILER') {
...
}
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::CBNOT::Trailer object.
my $record = Finance::AMEX::Transaction::CBNOT::Trailer->new(line => $line);
type
This will always return the string TRAILER.
print $record->type; # TRAILER
line
Returns the full line that is represented by this object.
print $record->line;
field_map
Returns a hashref 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 FILE_CREATION_DATE field
print $record->field_map->{FILE_CREATION_DATE}->[0]; # 6
REC_TYPE
This field contains a code that identifies the record type. The constant literal "H" indicates that this is a CBNOT File Trailer Record.
print $record->REC_TYPE; # T
AMEX_APPL_AREA
This field contains the internal American Express data.
APPLICATION_SYSTEM_CODE
Part of the internal American Express data. Constant '01'.
FILE_TYPE_CODE
Part of the internal American Express data. Constant '01'.
FILE_CREATION_DATE
Part of the internal American Express data. Format: YYYYMMDD.
FILE_SEQUENCE_NUMBER
Part of the internal American Express data. American Express assigned processing control number, currently unused.
JULIAN_DATE
Part of the internal American Express data. Currently unused.
AMEX_TOTAL_RECORDS
Part of the internal American Express data. Total record count.
CONFIRM_RECORD_COUNT
Part of the internal American Express data. Total record count.
AMEX_JOB_NUMBER
Part of the internal American Express data. American Express assigned job number, currently unused.
SAID
This field contains the American Express-assigned, six-character, Service Access ID (SAID).
DATATYPE
This field contains a code that corresponds to the data type. The constant literal "CBNOT" indicates that these are "chargeback notifications" from upstream systems.
CCYYDDD
This field contains the file creation date. The format is: CCYYDDD
CC = Century
YY = Year
DDD = Day (Julian date)
For example, October 21st, 2010 would appear as: 2010294
HHMMSS
This field contains the file creation time. The format is: HHMMSS
HH = Hour (24 hour clock)
MM = Minute
SS = Second
For example, 2:37:00 P . M . would appear as: 143700
Note the this differs slightly from the official AMEX documentation, this module automatically removes a leading zero that is present in the original source data.
STARS_FILESEQ_NB
This field contains the STARS * file sequence number. This constant number is set to "001".
NAME
Finance::AMEX::Transaction::CBNOT::Trailer - Object methods for AMEX chargeback notification file trailer records.
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.