NAME
Business::NAB::Australian::DirectEntry::Report
SYNOPSIS
use Business::NAB::Australian::DirectEntry::Report;
# parse;
my $Report = Business::NAB::Australian::DirectEntry::Report
->new_from_file( $file_path );
foreach my $Credit (
grep { $_->is_credit } $Report->payment_record->@*
) {
...
}
# build
my $Report = Business::NAB::Australian::DirectEntry::Report->new;
$Report->add_header_record(
.. # Business::NAB:: ... HeaderRecord object
);
$Report->add_payment_record(
.. # Business::NAB:: ... PaymentRecord object
) for ( @payments );
$Report->to_file(
$file_path,
$separator, # defaults to "\r\n"
);
DESCRIPTION
Class for building/parsing a Australian Direct Entry Reports file
ATTRIBUTES
All attributes are ArrayRef[Obj] where Obj are of the Business::NAB::Australian::DirectEntry::Report::* namespace:
HeaderRecord
PaymentRecord
ValueSummary
FailedRecord
FailedSummary
TrailerRecord
DisclaimerRecord
Convenience methods are available for trivial addition of new elements to the arrays:
$Report->add_header_record( $HeaderRecord );
$Report->add_payment_record( $PaymentRecord );
$Report->add_value_summary( $ValueSummary );
$Report->add_failed_record( $FailedRecord );
$Report->add_failed_summary( $FailedSummary );
$Report->add_trailer_record( $TrailerRecord );
$Report->add_disclaimer_record( $DisclaimerRecord );
- header_record (ArrayRef[Obj])
- payment_record (ArrayRef[Obj])
- value_summary (ArrayRef[Obj])
- failed_record (ArrayRef[Obj])
- failed_summary (ArrayRef[Obj])
- trailer_record (ArrayRef[Obj])
- disclaimer_record (ArrayRef[Obj])
METHODS
new_from_file
Returns a new instance of the class with attributes populated from the result of parsing the passed file
my $Payments = Business::NAB::Australian::DirectEntry::Report
->new_from_file( $file_path );
to_file
Writes the file content to the passed file path:
$Report->to_file(
$file_path,
$separator, # defaults to "\r\n"
);
original_filename
An alias for the header_record import_file_name
status
Hardcoded to "PROCESSED" - as per NAB's documentation that states "This report assists with confirming the processing of your payment file..."
SEE ALSO
Business::NAB::Australian::DirectEntry::Report::PaymentRecord
Business::NAB::Australian::DirectEntry::Report::ValueSummary
Business::NAB::Australian::DirectEntry::Report::FailedRecord
Business::NAB::Australian::DirectEntry::Report::FailedSummary