GoCardless/CustomerBankAccount.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 6 / 6 Podpod 66.6% 2 / 3 totaltotal 96.3% 26 / 27 CC 2 SCAR 2.5
CC
2
Cov
100%
customer_id
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« GoCardless/Refund.pm ↑ Summary GoCardless/PreAuthorization.pm »
1 package Business::GoCardless::CustomerBankAccount;
2  
3 =head1 NAME
4  
5 Business::GoCardless::CustomerBankAccount
6  
7 =head1 DESCRIPTION
8  
9 A class for a gocardless customer 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_account_token
25 bank_name
26 country_code
27 created_at
28 currency
29 enabled
30 id
31 links
32 metadata
33 payer_name_verification_result
34 trusted_recipient
35  
36 =cut
37  
38 5 has [ qw/
39 account_holder_name
40 account_number_ending
41 account_type
42 bank_account_token
43 bank_name
44 country_code
45 created_at
46 currency
47 enabled
48 id
49 links
50 metadata
51 payer_name_verification_result
52 trusted_recipient
53 / ] => (
54 is => 'rw',
55 );
56  
57 =head1 Operations on a customer bank account
58  
59 =head2 update
60  
61 Update the bank account's metadata:
62  
63 $BankAccount->update( metadata => { ... } );
64  
65 =head2 disable
66  
67 Disable the bank account, B<this immediately cancels all associated mandates
68 and cancellable payments>:
69  
70 $BankAccount->disable;
71  
72 =cut
73  
74 2 ▶sub update { shift->_update( @_ ); }
Subroutine update: called CC=1 SCAR=0.0
Pod documented
75 2 ▶sub disable { shift->_action( 'disable',@_ ); }
Subroutine disable: called CC=1 SCAR=0.0
Pod documented
76  
77 =head1 Links
78  
79 Shortcut methods to get the IDs of the linked resources
80  
81 customer_id
82  
83 =cut
84  
85 2 ▶sub customer_id { return ( shift->links // {} )->{customer} }
Subroutine customer_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
86  
87 =head1 AUTHOR
88  
89 Lee Johnson - C<lee@payprop.com>
90  
91 This library is free software; you can redistribute it and/or modify it under
92 the same terms as Perl itself. If you would like to contribute documentation,
93 features, bug fixes, or anything else then please raise an issue / pull request:
94  
95 https://github.com/payprop/business-gocardless
96  
97 =cut
98  
99 5 1;
100  
101 # vim: ts=4:sw=4:et
« GoCardless/Refund.pm ↑ Summary GoCardless/PreAuthorization.pm »