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