File Coverage

blib/lib/Business/NAB/Australian/DirectEntry/Report/FailedRecord.pm
Criterion Covered Total %
statement 30 30 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod n/a
total 39 39 100.0


line stmt bran cond sub pod time code
1             package Business::NAB::Australian::DirectEntry::Report::FailedRecord;
2             $Business::NAB::Australian::DirectEntry::Report::FailedRecord::VERSION = '0.03';
3             =head1 NAME
4              
5             Business::NAB::Australian::DirectEntry::Report::FailedRecord
6              
7             =head1 SYNOPSIS
8              
9             =head1 DESCRIPTION
10              
11             Class for failed record in the Australian Direct Entry Report file.
12              
13             Extends L<Business::NAB::Australian::DirectEntry::Report::PaymentRecord>.
14              
15             =cut;
16              
17 2     2   1237539 use strict;
  2         5  
  2         116  
18 2     2   11 use warnings;
  2         6  
  2         153  
19 2     2   13 use feature qw/ signatures /;
  2         4  
  2         287  
20              
21 2     2   720 use Moose;
  2         489887  
  2         13  
22             extends 'Business::NAB::Australian::DirectEntry::Report::PaymentRecord';
23 2     2   12208 no warnings qw/ experimental::signatures /;
  2         3  
  2         107  
24              
25 2         580 use Business::NAB::Types qw/
26             add_max_string_attribute
27 2     2   551 /;
  2         7  
28              
29             =head1 ATTRIBUTES
30              
31             All are Str types, required, except where stated. Extra attributes are
32             inherited from L<Business::NAB::Australian::DirectEntry::Report::PaymentRecord>.
33              
34             =over
35              
36             =item failed_reason_code
37              
38             =item reason_for_rejection
39              
40             =back
41              
42             =cut
43              
44 7     7   43 sub _record_type ( $self ) { '61' }
  7         18  
  7         12  
  7         25  
45              
46 7     7   18 sub _attributes ( $self ) {
  7         16  
  7         14  
47              
48             return (
49 7         35 qw/ sub_trancode /,
50             $self->SUPER::_attributes,
51             $self->_extra_attributes,
52             );
53             }
54              
55 9     9   20 sub _extra_attributes ( $self ) {
  9         24  
  9         17  
56              
57 9         62 return qw/
58             failed_reason_code
59             reason_for_rejection
60             /;
61             }
62              
63             foreach my $str_attr (
64             'sub_trancode',
65             __PACKAGE__->_extra_attributes,
66             ) {
67             __PACKAGE__->add_max_string_attribute(
68             $str_attr,
69             is => 'ro',
70             required => 1,
71             );
72             }
73              
74             __PACKAGE__->meta->make_immutable;