NAME

Business::NAB::BPAY::Remittance::File::DetailRecord

SYNOPSIS

use Business::NAB::BPAY::Remittance::File::DetailRecord;

# parse
my $Detail = Business::NAB::BPAY::Remittance::File::DetailRecord;
    ->new_from_record( $line );

# create
my $Detail = Business::NAB::BPAY::Remittance::File::DetailRecord->new(
    biller_code => ...
    customer_reference_number => ...
    payment_instruction_type => ...
    transaction_reference_number => ...
    original_reference_number => ...
    error_correction_reason => ...
    amount => ...
    payment_date => ...
    payment_time => ...
    settlement_date => ...
);

my $line = $Detail->to_record;

DESCRIPTION

Class for detail record in the "BPAY Remittance File"

ATTRIBUTES

biller_code (Str, max length 10)
customer_reference_number (Str, max length 20)
payment_instruction_type (Str, max length 2)
transaction_reference_number (Str, max length 21)
original_reference_number (Str, max length 21)
error_correction_reason (Str, max length 3)
amount (NAB::Type::PositiveInt)
payment_date (NAB::Type::StatementDate)
payment_time (Str, max length 6)
settlement_date (NAB::Type::StatementDate)

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::BPAY::Remittance::File::DetailRecord
    ->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 = $Detail->to_record;

is_payment

is_correction

is_reversal

Boolean check on the record's payment_instruction_type:

if ( $Detail->is_payment ) {
    ...
}

SEE ALSO

Business::NAB::Types