GoCardless/Institution.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond 66.6% 4 / 6 MC/DCmcdc 33.3% 1 / 3 Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 3 totaltotal 78.7% 26 / 33 CC 4 SCAR 5.5
CC
4
Cov
90%
disabled
2.1
temporarily_disabled
2.1
enabled
2.0
CRAP 1.7
« GoCardless/MandateImportEntry.pm ↑ Summary GoCardless/PayoutItem.pm »
1 package Business::GoCardless::Institution;
2  
3 =head1 NAME
4  
5 Business::GoCardless::Institution
6  
7 =head1 DESCRIPTION
8  
9 A class for a gocardless institution, extends L<Business::GoCardless::Resource>
10  
11 An institution (bank) for use with Pay by Bank billing requests
12  
13 =cut
14  
15 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 8 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 8 extends 'Business::GoCardless::Resource';
20  
21 =head1 ATTRIBUTES
22  
23 autocompletes_collect_bank_account
24 country_code
25 icon_url
26 id
27 limits
28 logo_url
29 name
30 roles
31 status
32  
33 =cut
34  
35 8 has [ qw/
36 autocompletes_collect_bank_account
37 country_code
38 icon_url
39 id
40 limits
41 logo_url
42 name
43 roles
44 status
45 / ] => (
46 is => 'rw',
47 );
48  
49 =head1 Status checks on an institution
50  
51 enabled
52 disabled
53 temporarily_disabled
54  
55 if ( $Institution->enabled ) {
56 ...
57 }
58  
59 =cut
60  
61 5 ▶sub enabled { return ( shift->status // '' ) eq 'enabled' }
Subroutine enabled: called CC=2 SCAR=6.9
Pod undocumented
Condition100%2/2
(shift())->status // ""
l!l
41
MC/DC100%1/1
(shift())->status // ""
(shift())->status
Truth table100%2/2
A
A= (shift())->status
Aresult
11
00
62 3 ▶sub disabled { return ( shift->status // '' ) eq 'disabled' }
Subroutine disabled: called CC=2 SCAR=7.6
Pod undocumented
Condition50%1/2
(shift())->status // ""
l!l
30
MC/DC0%0/1
(shift())->status // ""
(shift())->status
Truth table50%1/2
A
A= (shift())->status
Aresult
11
00
63 3 ▶sub temporarily_disabled { return ( shift->status // '' ) eq 'temporarily_disabled' }
Subroutine temporarily_disabled: called CC=2 SCAR=7.6
Pod undocumented
Condition50%1/2
(shift())->status // ""
l!l
30
MC/DC0%0/1
(shift())->status // ""
(shift())->status
Truth table50%1/2
A
A= (shift())->status
Aresult
11
00
64  
65 =head1 AUTHOR
66  
67 Lee Johnson - C<lee@payprop.com>
68  
69 This library is free software; you can redistribute it and/or modify it under
70 the same terms as Perl itself. If you would like to contribute documentation,
71 features, bug fixes, or anything else then please raise an issue / pull request:
72  
73 https://github.com/payprop/business-gocardless
74  
75 =cut
76  
77 8 1;
78  
79 # vim: ts=4:sw=4:et
« GoCardless/MandateImportEntry.pm ↑ Summary GoCardless/PayoutItem.pm »