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