« Westpac/PaymentsPlus/Australian/Payment/Import/Payment/RemittanceOnly.pm
↑ Summary
Westpac/PaymentsPlus/Australian/Payment/Import/Payment/Cheque.pm »
| 1 | package Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment::BPAY; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment::BPAY | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | use Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment::BPAY; | ||
| 10 | |||
| 11 | my $Bpay = Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment::BPAY->new( | ||
| 12 | payer_payment_reference => 'REF00003', | ||
| 13 | payment_amount => '191.57', | ||
| 14 | recipient_reference => '1234500012', | ||
| 15 | bsb_number => '062-000', | ||
| 16 | bpay_biller_number => '401234', | ||
| 17 | funding_bsb_number => '032-000', | ||
| 18 | funding_account_number => '000007', | ||
| 19 | ); | ||
| 20 | |||
| 21 | =head1 DESCRIPTION | ||
| 22 | |||
| 23 | Class for modeling BPAY payments in the context of Westpac CSV files. | ||
| 24 | |||
| 25 | Extends L<Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment>. | ||
| 26 | |||
| 27 | =cut | ||
| 28 | |||
| 29 | 2 | ▶ | use feature qw/ signatures /; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 30 | |||
| 31 | 2 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 32 | 2 | extends 'Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment'; | |
| 33 | 2 | ▶ | no warnings qw/ experimental::signatures /; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 34 | |||
| 35 | 2 | ▶ | use Business::Westpac::Types qw/ |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 36 | add_max_string_attribute | ||
| 37 | 2 | /; | |
| 38 | |||
| 39 | 3 | ▶ | sub record_type { 'B' } |
|
Subroutine
record_type: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 40 | |||
| 41 | =head1 ATTRIBUTES | ||
| 42 | |||
| 43 | All attributes are required, except were stated, and are read only | ||
| 44 | |||
| 45 | =over | ||
| 46 | |||
| 47 | =item bpay_biller_number (Str, max 10 chars) | ||
| 48 | |||
| 49 | =item recipient_reference (Str, max 20 chars) | ||
| 50 | |||
| 51 | =back | ||
| 52 | |||
| 53 | =cut | ||
| 54 | |||
| 55 | 2 | foreach my $str_attr ( | |
| 56 | 'BpayBillerNumber[10]', | ||
| 57 | 'RecipientReference[20]', | ||
| 58 | ) { | ||
| 59 | 4 | __PACKAGE__->add_max_string_attribute( | |
| 60 | $str_attr, | ||
| 61 | is => 'ro', | ||
| 62 | required => 1, | ||
| 63 | ); | ||
| 64 | } | ||
| 65 | |||
| 66 | =head2 to_csv | ||
| 67 | |||
| 68 | Convert the attributes to CSV line(s): | ||
| 69 | |||
| 70 | my @csv = $Bpay->to_csv; | ||
| 71 | |||
| 72 | =cut | ||
| 73 | |||
| 74 | 3 | ▶ | sub to_csv ( $self ) { |
|
Subroutine
to_csv: called CC=1 SCAR=0.0
Pod
documented
| |||
| 75 | |||
| 76 | 3 | return $self->attributes_to_csv( | |
| 77 | qw/ | ||
| 78 | record_type | ||
| 79 | recipient_number | ||
| 80 | payer_payment_reference | ||
| 81 | payment_amount | ||
| 82 | bpay_biller_number | ||
| 83 | recipient_reference | ||
| 84 | funding_bsb_number | ||
| 85 | funding_account_number | ||
| 86 | / | ||
| 87 | ); | ||
| 88 | } | ||
| 89 | |||
| 90 | =head1 SEE ALSO | ||
| 91 | |||
| 92 | L<Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment> | ||
| 93 | |||
| 94 | L<Business::Westpac::Types> | ||
| 95 | |||
| 96 | =cut | ||
| 97 | |||
| 98 | 2 | __PACKAGE__->meta->make_immutable; | |