Finance::AMEX::Transaction::CBNOT::Trailer - Parse AMEX Chargeback Notification Files (CBNOT) Trailer Rows
version 0.001
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') { ... }
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::CBNOT::Trailer object.
my $record = Finance::AMEX::Transaction::CBNOT::Trailer->new(line => $line);
This will always return the string TRAILER.
print $record->type; # TRAILER
Returns the full line that is represented by this object.
print $record->line;
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
This field contains the internal American Express data.
Part of the internal American Express data. Constant '01'.
Part of the internal American Express data. Format: YYYYMMDD.
Part of the internal American Express data. American Express assigned processing control number, currently unused.
Part of the internal American Express data. Currently unused.
Part of the internal American Express data. Total record count.
Part of the internal American Express data. American Express assigned job number, currently unused.
This field contains the American Express-assigned, six-character, Service Access ID (SAID).
This field contains a code that corresponds to the data type. The constant literal "CBNOT" indicates that these are "chargeback notifications" from upstream systems.
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
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.
This field contains the STARS * file sequence number. This constant number is set to "001".
Finance::AMEX::Transaction::CBNOT::Trailer - Object methods for AMEX chargeback notification file trailer 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.