Westpac/PaymentsPlus/Australian/Payment/Import/Payment/Osko.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 50.0% 1 / 2 totaltotal 96.4% 27 / 28 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Westpac/PaymentsPlus/Australian/Payment/Import/Payment/EFT.pm ↑ Summary Westpac/PaymentsPlus/Australian/Payment/Import/Payment/OTT.pm »
1 package Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment::Osko;
2  
3 =head1 NAME
4  
5 Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment::Osko
6  
7 =head1 SYNOPSIS
8  
9 use Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment::Osko;
10 my $Osko = Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment::Osko->new(
11 debtor_information => 'Debtor Information 01',
12 payment_amount => '100.00',
13 end_to_end_id => 'EndToEndID01',
14 account_identifier => '062000000002',
15 account_scheme_name => 'BBAN',
16 payee_account_name => 'Payee 02',
17 funding_bsb_number => '032-000',
18 funding_account_number => '000007',
19 remittance_information_1 => 'Remittance Information 1',
20 remittance_information_2 => 'Remittance Information 2',
21 );
22  
23 my @csv = $Header->to_csv;
24  
25 =head1 DESCRIPTION
26  
27 Class for modeling Osko payments in the context of Westpac CSV files.
28  
29 Extends L<Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment>.
30  
31 =cut
32  
33 2 ▶use feature qw/ signatures /;
Subroutine BEGIN: called CC=1 SCAR=0.0
34  
35 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
36 2 extends 'Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment';
37 2 ▶no warnings qw/ experimental::signatures /;
Subroutine BEGIN: called CC=1 SCAR=0.0
38  
39 2 ▶use Business::Westpac::Types qw/
Subroutine BEGIN: called CC=1 SCAR=0.0
40 add_max_string_attribute
41 2 /;
42  
43 2 ▶sub record_type { 'O' }
Subroutine record_type: called CC=1 SCAR=0.0
Pod undocumented
44  
45 =head1 ATTRIBUTES
46  
47 All attributes are optional, except were stated, and are read only
48  
49 =over
50  
51 =item debtor_information (Str, max 35 chars)
52  
53 =item end_to_end_id (Str, max 35 chars)
54  
55 =item remittance_information_1 (Str, max 140 chars)
56  
57 =item remittance_information_2 (Str, max 140 chars)
58  
59 =item account_identifier (Str, max 19 chars, required)
60  
61 =item account_scheme_name (Str, max 19 chars, required)
62  
63 =item payee_account_name (Str, max 140 chars, required)
64  
65 =back
66  
67 =cut
68  
69 2 foreach my $str_attr (
70 'DebtorInformation[35]',
71 'end_to_end_id[35]',
72 'RemittanceInformation_1[140]',
73 'RemittanceInformation_2[140]',
74 ) {
75 8 __PACKAGE__->add_max_string_attribute(
76 $str_attr,
77 is => 'ro',
78 required => 0,
79 );
80 }
81  
82 2 foreach my $str_attr (
83 'AccountIdentifier[19]',
84 'AccountSchemeName[19]',
85 'PayeeAccountName[140]',
86 ) {
87 6 __PACKAGE__->add_max_string_attribute(
88 $str_attr,
89 is => 'ro',
90 required => 1,
91 );
92 }
93  
94 =head1 METHODS
95  
96 =head2 to_csv
97  
98 Convert the attributes to CSV line(s):
99  
100 my @csv = $Osko->to_csv;
101  
102 =cut
103  
104 2 ▶sub to_csv ( $self ) {
Subroutine to_csv: called CC=1 SCAR=0.0
Pod documented
105  
106 2 return $self->attributes_to_csv(
107 qw/
108 record_type
109 recipient_number
110 debtor_information
111 payment_amount
112 end_to_end_id
113 account_identifier
114 account_scheme_name
115 payee_account_name
116 funding_bsb_number
117 funding_account_number
118 remittance_information_1
119 remittance_information_2
120 /
121 );
122 }
123  
124 =head1 SEE ALSO
125  
126 L<Business::Westpac::PaymentsPlus::Australian::Payment::Import::Payment>
127  
128 L<Business::Westpac::Types>
129  
130 =cut
131  
132 2 __PACKAGE__->meta->make_immutable;
« Westpac/PaymentsPlus/Australian/Payment/Import/Payment/EFT.pm ↑ Summary Westpac/PaymentsPlus/Australian/Payment/Import/Payment/OTT.pm »