File Coverage

blib/lib/Business/Westpac/PaymentsPlus/Australian/Payment/Import/Trailer.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 19 21 90.4


line stmt bran cond sub pod time code
1             package Business::Westpac::PaymentsPlus::Australian::Payment::Import::Trailer;
2              
3             =head1 NAME
4              
5             Business::Westpac::PaymentsPlus::Australian::Payment::Import::Trailer
6              
7             =head1 SYNOPSIS
8              
9             use Business::Westpac::PaymentsPlus::Australian::Payment::Import::Trailer;
10              
11             my $Trailer = Business::Westpac::PaymentsPlus::Australian::Payment::Import::Trailer->new(
12             total_payment_count => 8,
13             total_payment_amount => '2015.42',
14             );
15              
16             =head1 DESCRIPTION
17              
18             Class for Westpac CSV file trailer records.
19              
20             =cut
21              
22 2     2   317642 use feature qw/ signatures /;
  2         4  
  2         274  
23              
24 2     2   478 use Moose;
  2         542994  
  2         15  
25             with 'Business::Westpac::Role::CSV';
26 2     2   15636 no warnings qw/ experimental::signatures /;
  2         5  
  2         401  
27              
28 1     1 0 4 sub record_type { 'T' }
29              
30             =head1 ATTRIBUTES
31              
32             All attributes are required, except were stated, and are read/write
33              
34             =over
35              
36             =item total_payment_count (Num)
37              
38             =item total_payment_amount (Num)
39              
40             =back
41              
42             =cut
43              
44             has [ qw/
45             total_payment_count
46             total_payment_amount
47             / ] => (
48             is => 'ro',
49             isa => 'Num',
50             required => 1,
51             );
52              
53 1     1 0 3 sub to_csv ( $self ) {
  1         3  
  1         2  
54              
55 1         8 return $self->attributes_to_csv(
56             qw/
57             record_type
58             total_payment_count
59             total_payment_amount
60             /
61             );
62             }
63              
64             =head1 SEE ALSO
65              
66             L<Business::Westpac::Types>
67              
68             =cut
69              
70             __PACKAGE__->meta->make_immutable;