NAME

Business::NAB::AccountInformation::Transaction

SYNOPSIS

use Business::NAB::AccountInformation::Transaction;

my $Transaction = Business::NAB::AccountInformation::Transaction->new(
    transaction_code => $trans_code,
    amount_minor_units => $amount,
    funds_type => $funds_type,
    reference_number => $ref_number,
    text => $text,
);

DESCRIPTION

Class for parsing a NAB "Account Information File (NAI/BAI2)" transaction line (type 16).

ATTRIBUTES

transaction_code (Str, max length 3)
funds_type (Str, max length 1)
bank_reference (Str, max length 4096)
customer_reference (Str, max length 4096)
text (Str, max length 4096)
amount_minor_units (NAB::Type::PositiveIntOrZero)

METHODS

new_from_raw_record

Returns a new instance of the class with attributes populated from the result of parsing the passed line:

my $Transaction = Business::NAB::AccountInformation::Transaction
    ::Payments::DescriptiveRecord->new_from_raw_record( $line );

new_from_record

Returns a new instance of the class with attributes populated from the result of parsing the already parsed line:

my $Transaction = Business::NAB::AccountInformation::Transaction
    ::Payments::DescriptiveRecord->new_from_record( @record );

is_debit

is_credit

Boolean check on the transaction type

if ( $Transaction->is_credit ) {
    ...
}

description

Returns a descriptive string for the transaction type

my $description = $Transaction->description;

SEE ALSO

Business::NAB::Types