GoCardless/Customer.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 50.0% 2 / 4 totaltotal 92.5% 25 / 27 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« GoCardless/Payout.pm ↑ Summary GoCardless/Balance.pm »
1 package Business::GoCardless::Customer;
2  
3 =head1 NAME
4  
5 Business::GoCardless::Customer
6  
7 =head1 DESCRIPTION
8  
9 A class for a gocardless user, extends L<Business::GoCardless::Resource>
10  
11 =cut
12  
13 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 7 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 7 extends 'Business::GoCardless::Resource';
18  
19 =head1 ATTRIBUTES
20  
21 created_at
22 email
23 id
24 given_name
25 family_name
26 company_name
27 address_line1
28 address_line2
29 address_line3
30 city
31 region
32 postal_code
33 country_code
34 language
35 phone_number
36 swedish_identity_number
37 danish_identity_number
38 metadata
39  
40 =cut
41  
42 7 has [ qw/
43 created_at
44 email
45 id
46 given_name
47 family_name
48 company_name
49 address_line1
50 address_line2
51 address_line3
52 city
53 region
54 postal_code
55 country_code
56 language
57 phone_number
58 swedish_identity_number
59 danish_identity_number
60 metadata
61 / ] => (
62 is => 'rw',
63 );
64  
65 =head1 Operations on a customer
66  
67 =head2 update
68  
69 Update the customer, returns the updated Customer object:
70  
71 $Customer->update( email => 'new@example.com',metadata => { ... } );
72  
73 =head2 remove
74  
75 Remove the customer, which removes all of their personal data. B<This cannot
76 be undone>, and the customer must not have any active mandates:
77  
78 $Customer->remove;
79  
80 =cut
81  
82 1 ▶sub update { shift->_update( @_ ); }
Subroutine update: called CC=1 SCAR=0.0
Pod documented
83 1 ▶sub remove { shift->_delete; }
Subroutine remove: called CC=1 SCAR=0.0
Pod documented
84  
85 # BACK COMPATIBILITY METHODS
86 1 ▶sub first_name { shift->given_name; }
Subroutine first_name: called CC=1 SCAR=0.0
Pod undocumented
87 1 ▶sub last_name { shift->family_name; }
Subroutine last_name: called CC=1 SCAR=0.0
Pod undocumented
88  
89 =head1 AUTHOR
90  
91 Lee Johnson - C<lee@payprop.com>
92  
93 This library is free software; you can redistribute it and/or modify it under
94 the same terms as Perl itself. If you would like to contribute documentation,
95 features, bug fixes, or anything else then please raise an issue / pull request:
96  
97 https://github.com/payprop/business-gocardless
98  
99 =cut
100  
101 7 1;
102  
103 # vim: ts=4:sw=4:et
« GoCardless/Payout.pm ↑ Summary GoCardless/Balance.pm »