File Coverage

blib/lib/Business/Giropay/Request/Bankstatus.pm
Criterion Covered Total %
statement 16 16 100.0
branch 2 2 100.0
condition n/a
subroutine 7 7 100.0
pod 3 3 100.0
total 28 28 100.0


line stmt bran cond sub pod time code
1             package Business::Giropay::Request::Bankstatus;
2              
3             =head1 NAME
4              
5             Business::Giropay::Request::Bankstatus - check whether bank with L is valid.
6              
7             =cut
8              
9 2     2   17806 use Business::Giropay::Types qw/Str/;
  2         4  
  2         12  
10 2     2   869 use Carp;
  2         2  
  2         106  
11 2     2   945 use Moo;
  2         16727  
  2         8  
12             with 'Business::Giropay::Role::Request';
13 2     2   2705 use namespace::clean;
  2         15542  
  2         7  
14              
15             =head1 ATTRIBUTES
16              
17             See L for attributes common to
18             all request classes.
19              
20             =head2 bic
21              
22             Bank BIC code.
23              
24             =cut
25              
26             has bic => (
27             is => 'rwp',
28             isa => Str,
29             required => 1,
30             );
31              
32             =head2 response_class
33              
34             The response class to use. Defaults to
35             L.
36              
37             =cut
38              
39             has response_class => (
40             is => 'ro',
41             isa => Str,
42             default => "Business::Giropay::Response::Bankstatus",
43             );
44              
45             =head1 METHODS
46              
47             See L in addition to the following:
48              
49             =head2 BUILD
50              
51             Die if this request type is not available for
52             L.
53              
54             =cut
55              
56             sub BUILD {
57 3     3 1 7776 my $self = shift;
58 3 100       63 croak "bankstatus request not supported by ideal"
59             if $self->network eq 'ideal';
60             }
61              
62             =head2 parameters
63              
64             Returns additional parameters for the request.
65              
66             =cut
67              
68             sub parameters {
69 2     2 1 7 return ['bic'];
70             }
71              
72             =head2 uri
73              
74             Returns the URI to be appended to L
75             to construct the appropriate URL for the request.
76              
77             =cut
78              
79             sub uri {
80 2     2 1 32 return shift->network . '/bankstatus';
81             }
82              
83             1;