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