NAME
Business::NAB::Australian::DirectEntry::Payments::DetailRecord
SYNOPSIS
use Business::NAB::Australian::DirectEntry::Payments::DetailRecord;
# parse
my $Record = Business::NAB::Australian::DirectEntry
::Payments::DetailRecord->new_from_record( $line );
# create
my $Record = Business::NAB::Australian::DirectEntry
::Payments::DetailRecord->new(
bsb_number => '083-047',
account_number => '111111111',
transaction_code => '13',
amount => 1,
title_of_account => ' Beneficiary 1',
lodgement_reference => 'FOR DEMONSTRATION',
bsb_number_trace => '083-047',
account_number_trace => '123456789',
remitter_name => 'NAB SAMPLE TEST',
withholding_tax => '00000000',
);
my $line = $Record->to_record;
DESCRIPTION
Class for detail record in the "Australian Direct Entry Payments and Dishonour report"
ATTRIBUTES
- bsb_number (NAB::Type::BSBNumber)
- bsb_number_trace (NAB::Type::BSBNumber)
- account_number (NAB::Type::AccountNumber)
- account_number_trace (NAB::Type::AccountNumber)
- indicator (NAB::Type::Indicator)
- amount (NAB::Type::PositiveInt)
- withholding_tax (NAB::Type::PositiveIntOrZero)
- transaction_code (Str, max length 2)
- title_of_account (Str, max length 32)
- lodgement_reference (Str, max length 18)
- remitter_name (Str, max length 16)
METHODS
new_from_record
Returns a new instance of the class with attributes populated from the result of parsing the passed line:
my $Record = Business::NAB::Australian::DirectEntry
::Payments::DescriptiveRecord->new_from_record( $line );
to_record
Returns a string constructed from the object's attributes, representing the record for use in a batch file:
my $line = $Record->to_record;
is_debit
is_credit
Boolean check on the transaction type
if ( $Record->is_credit ) {
...
}