GoCardless/CreditorBankAccount.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 5 / 5 Podpod 50.0% 1 / 2 totaltotal 95.8% 23 / 24 CC 2 SCAR 2.9
CC
2
Cov
100%
creditor_id
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« GoCardless/Webhook/Event.pm ↑ Summary GoCardless/Refund.pm »
1 package Business::GoCardless::CreditorBankAccount;
2  
3 =head1 NAME
4  
5 Business::GoCardless::CreditorBankAccount
6  
7 =head1 DESCRIPTION
8  
9 A class for a gocardless creditor bank account, extends L<Business::GoCardless::Resource>
10  
11 =cut
12  
13 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 5 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 5 extends 'Business::GoCardless::Resource';
18  
19 =head1 ATTRIBUTES
20  
21 account_holder_name
22 account_number_ending
23 account_type
24 bank_name
25 country_code
26 created_at
27 currency
28 enabled
29 id
30 links
31 metadata
32 verification_status
33  
34 =cut
35  
36 5 has [ qw/
37 account_holder_name
38 account_number_ending
39 account_type
40 bank_name
41 country_code
42 created_at
43 currency
44 enabled
45 id
46 links
47 metadata
48 verification_status
49 / ] => (
50 is => 'rw',
51 );
52  
53 =head1 Operations on a creditor bank account
54  
55 =head2 disable
56  
57 Disable the bank account, no money can be paid out to a disabled account:
58  
59 $BankAccount->disable;
60  
61 =cut
62  
63 2 ▶sub disable { shift->_action( 'disable',@_ ); }
Subroutine disable: called CC=1 SCAR=0.0
Pod documented
64  
65 =head1 Links
66  
67 Shortcut methods to get the IDs of the linked resources
68  
69 creditor_id
70  
71 =cut
72  
73 2 ▶sub creditor_id { return ( shift->links // {} )->{creditor} }
Subroutine creditor_id: called CC=2 SCAR=6.9
Pod undocumented
Condition100%2/2
(shift())->links // {}
l!l
11
MC/DC100%1/1
(shift())->links // {}
(shift())->links
Truth table100%2/2
A
A= (shift())->links
Aresult
11
00
74  
75 =head1 AUTHOR
76  
77 Lee Johnson - C<lee@payprop.com>
78  
79 This library is free software; you can redistribute it and/or modify it under
80 the same terms as Perl itself. If you would like to contribute documentation,
81 features, bug fixes, or anything else then please raise an issue / pull request:
82  
83 https://github.com/payprop/business-gocardless
84  
85 =cut
86  
87 5 1;
88  
89 # vim: ts=4:sw=4:et
« GoCardless/Webhook/Event.pm ↑ Summary GoCardless/Refund.pm »