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