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