line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Payjp::Customer; |
2
|
|
|
|
|
|
|
|
3
|
11
|
|
|
11
|
|
126
|
use strict; |
|
11
|
|
|
|
|
29
|
|
|
11
|
|
|
|
|
346
|
|
4
|
11
|
|
|
11
|
|
55
|
use warnings; |
|
11
|
|
|
|
|
139
|
|
|
11
|
|
|
|
|
293
|
|
5
|
|
|
|
|
|
|
|
6
|
11
|
|
|
11
|
|
55
|
use base 'Net::Payjp'; |
|
11
|
|
|
|
|
24
|
|
|
11
|
|
|
|
|
987
|
|
7
|
|
|
|
|
|
|
|
8
|
11
|
|
|
11
|
|
3944
|
use Net::Payjp::Customer::Card; |
|
11
|
|
|
|
|
33
|
|
|
11
|
|
|
|
|
287
|
|
9
|
11
|
|
|
11
|
|
4245
|
use Net::Payjp::Customer::Subscription; |
|
11
|
|
|
|
|
35
|
|
|
11
|
|
|
|
|
3759
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub create{ |
12
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
13
|
1
|
|
|
|
|
5
|
my %p = @_; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
8
|
$self->_request(method => 'POST', url => $self->_class_url, param => \%p); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub retrieve{ |
19
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
20
|
1
|
|
|
|
|
2
|
my $id = shift; |
21
|
1
|
50
|
|
|
|
4
|
$self->id($id) if $id; |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
7
|
$self->_request(method => 'GET', url => $self->_instance_url); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub save{ |
27
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
28
|
1
|
|
|
|
|
4
|
my %p = @_; |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
5
|
$self->_request(method => 'POST', url => $self->_instance_url, param => \%p); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub all{ |
34
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
35
|
1
|
|
|
|
|
4
|
my %p = @_; |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
4
|
$self->_request(method => 'GET', url => $self->_class_url, param => \%p); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub delete{ |
41
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
4
|
$self->_request(method => 'DELETE', url => $self->_instance_url); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub cus_id{ |
47
|
1
|
|
|
1
|
0
|
3
|
my $self = shift; |
48
|
1
|
50
|
|
|
|
5
|
$self->{cus_id} = shift if @_; |
49
|
1
|
|
|
|
|
5
|
return $self->{cus_id}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub card{ |
53
|
1
|
|
|
1
|
0
|
4
|
my $self = shift; |
54
|
1
|
|
|
|
|
3
|
$self->{cus_id} = shift; |
55
|
1
|
|
|
|
|
4
|
my $card = Net::Payjp::Customer::Card->new(api_key => $self->api_key); |
56
|
1
|
|
|
|
|
6
|
$card->cus_id($self->{cus_id}); |
57
|
1
|
|
|
|
|
2
|
return $card; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub subscription{ |
61
|
1
|
|
|
1
|
0
|
4
|
my $self = shift; |
62
|
1
|
|
|
|
|
3
|
$self->{cus_id} = shift; |
63
|
1
|
|
|
|
|
4
|
my $sub = Net::Payjp::Customer::Subscription->new(api_key => $self->api_key); |
64
|
1
|
|
|
|
|
5
|
$sub->cus_id($self->{cus_id}); |
65
|
1
|
|
|
|
|
5
|
return $sub; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |