| 1 | package Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | use Moose; | ||
| 10 | extends 'Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment'; | ||
| 11 | |||
| 12 | =head1 DESCRIPTION | ||
| 13 | |||
| 14 | Abstract class for modeling payment data in the context of Westpac CSV files. | ||
| 15 | |||
| 16 | =cut | ||
| 17 | |||
| 18 | 8 | ▶ | use feature qw/ signatures /; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 8 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 8 | with 'Business::Westpac::Role::CSV'; | |
| 22 | 8 | ▶ | no warnings qw/ experimental::signatures /; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | |||
| 24 | 8 | ▶ | use Carp qw/ croak /; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | 8 | ▶ | use Business::Westpac::Types qw/ |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | add_max_string_attribute | ||
| 27 | 8 | /; | |
| 28 | |||
| 29 | 0 | ▶ | sub record_type { croak( "You must override record_type" ); } |
|
Subroutine
record_type: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 30 | |||
| 31 | =head1 ATTRIBUTES | ||
| 32 | |||
| 33 | All attributes are optional, except were stated, and are read only | ||
| 34 | |||
| 35 | =over | ||
| 36 | |||
| 37 | =item recipient_number (Str, max 20 chars) | ||
| 38 | |||
| 39 | =item funding_account_number (Str, max 9 chars) | ||
| 40 | |||
| 41 | =item payer_payment_reference (Str, max 15 chars) | ||
| 42 | |||
| 43 | =item recipient_reference (Str, max 18 chars) | ||
| 44 | |||
| 45 | =item funding_bsb_number (BSBNumber) | ||
| 46 | |||
| 47 | =item payment_amount (PositiveNum, required) | ||
| 48 | |||
| 49 | =back | ||
| 50 | |||
| 51 | =cut | ||
| 52 | |||
| 53 | 8 | foreach my $str_attr ( | |
| 54 | 'RecipientNumber[20]', | ||
| 55 | 'FundingAccountNumber[9]', | ||
| 56 | 'PayerPaymentReference[15]', | ||
| 57 | 'RecipientReference[18]', | ||
| 58 | ) { | ||
| 59 | 32 | __PACKAGE__->add_max_string_attribute( | |
| 60 | $str_attr, | ||
| 61 | is => 'ro', | ||
| 62 | required => 0, | ||
| 63 | ); | ||
| 64 | } | ||
| 65 | |||
| 66 | 8 | has [ qw/ | |
| 67 | funding_bsb_number | ||
| 68 | / ] => ( | ||
| 69 | is => 'ro', | ||
| 70 | isa => 'BSBNumber', | ||
| 71 | required => 0, | ||
| 72 | ); | ||
| 73 | |||
| 74 | 8 | has [ qw/ | |
| 75 | payment_amount | ||
| 76 | / ] => ( | ||
| 77 | is => 'ro', | ||
| 78 | isa => 'PositiveNum', | ||
| 79 | required => 1, | ||
| 80 | ); | ||
| 81 | |||
| 82 | =head1 SEE ALSO | ||
| 83 | |||
| 84 | L<Business::Westpac::Types> | ||
| 85 | |||
| 86 | =cut | ||
| 87 | |||
| 88 | 8 | __PACKAGE__->meta->make_immutable; | |