NAME

Business::NAB::BPAY::Payments::HeaderRecord

SYNOPSIS

use Business::NAB::BPAY::Payments::HeaderRecord;

# parse
my $Header = Business::NAB::BPAY::Payments::HeaderRecord
    ->new_from_record( $line );

# create
my $Header = Business::NAB::BPAY::Payments::HeaderRecord->new(
    bpay_batch_user_id => '01',
    customer_short_name => 'NAB',
    processing_date => DateTime->now,
);

my $line = $Header->to_record;

DESCRIPTION

Class for header record in the "BPAY Batch User Guide"

ATTRIBUTES

bpay_batch_user_id (Str, max length 16)
processing_date (NAB::Type::StatementDate, coerced from Str)
customer_short_name (Str, max length 20)

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::Payments::HeaderRecord
    ->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 = $Header->to_record;

SEE ALSO

Business::NAB::Types