line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Payjp::Customer::Card; |
2
|
|
|
|
|
|
|
|
3
|
11
|
|
|
11
|
|
71
|
use strict; |
|
11
|
|
|
|
|
24
|
|
|
11
|
|
|
|
|
305
|
|
4
|
11
|
|
|
11
|
|
53
|
use warnings; |
|
11
|
|
|
|
|
95
|
|
|
11
|
|
|
|
|
278
|
|
5
|
|
|
|
|
|
|
|
6
|
11
|
|
|
11
|
|
57
|
use base 'Net::Payjp'; |
|
11
|
|
|
|
|
23
|
|
|
11
|
|
|
|
|
3960
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub create{ |
9
|
1
|
|
|
1
|
1
|
5
|
my $self = shift; |
10
|
1
|
|
|
|
|
2
|
my %p = @_; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
5
|
$self->_request(method => 'POST', url => $self->_instance_url, param => \%p); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub retrieve{ |
16
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
17
|
1
|
|
|
|
|
3
|
my $id = shift; |
18
|
1
|
50
|
|
|
|
5
|
$self->id($id) if $id; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
5
|
$self->_request(method => 'GET', url => $self->_instance_url.'/'.$self->id); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub save{ |
24
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
25
|
1
|
|
|
|
|
4
|
my %p = @_; |
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
|
|
3
|
$self->_request(method => 'POST', url => $self->_instance_url.'/'.$self->id, param => \%p); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub delete{ |
31
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
4
|
$self->_request(method => 'DELETE', url => $self->_instance_url.'/'.$self->id); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub all{ |
37
|
1
|
|
|
1
|
1
|
5
|
my $self = shift; |
38
|
1
|
|
|
|
|
4
|
my %p = @_; |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
|
|
4
|
$self->_request(method => 'GET', url => $self->_instance_url, param => \%p); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub cus_id{ |
44
|
7
|
|
|
7
|
0
|
13
|
my $self = shift; |
45
|
7
|
100
|
|
|
|
19
|
$self->{cus_id} = shift if @_; |
46
|
7
|
|
|
|
|
31
|
return $self->{cus_id}; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub _instance_url{ |
50
|
5
|
|
|
5
|
|
8
|
my $self = shift; |
51
|
5
|
|
|
|
|
18
|
return $self->api_base.'/v1/customers/'.$self->cus_id.'/cards'; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |