line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Payjp::Subscription; |
2
|
|
|
|
|
|
|
|
3
|
11
|
|
|
11
|
|
98
|
use strict; |
|
11
|
|
|
|
|
28
|
|
|
11
|
|
|
|
|
309
|
|
4
|
11
|
|
|
11
|
|
53
|
use warnings; |
|
11
|
|
|
|
|
21
|
|
|
11
|
|
|
|
|
272
|
|
5
|
|
|
|
|
|
|
|
6
|
11
|
|
|
11
|
|
52
|
use base 'Net::Payjp'; |
|
11
|
|
|
|
|
25
|
|
|
11
|
|
|
|
|
4986
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub create{ |
9
|
1
|
|
|
1
|
1
|
7
|
my $self = shift; |
10
|
1
|
|
|
|
|
5
|
my %p = @_; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
8
|
$self->_request(method => 'POST', url => $self->_class_url, param => \%p); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub retrieve{ |
16
|
2
|
|
|
2
|
1
|
6
|
my $self = shift; |
17
|
2
|
|
|
|
|
3
|
my $id = shift; |
18
|
2
|
50
|
|
|
|
7
|
$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
|
|
|
|
|
3
|
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
|
2
|
my $self = shift; |
32
|
1
|
|
|
|
|
3
|
my %p = @_; |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
5
|
$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
|
|
|
|
|
7
|
$self->_request(method => 'DELETE', url => $self->_instance_url, param => \%p); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub pause{ |
45
|
2
|
|
|
2
|
1
|
6
|
my $self = shift; |
46
|
2
|
|
|
|
|
4
|
my $id = shift; |
47
|
2
|
100
|
|
|
|
8
|
$self->id($id) if $id; |
48
|
|
|
|
|
|
|
|
49
|
2
|
|
|
|
|
8
|
$self->_request(method => 'POST', url => $self->_instance_url.'/pause'); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub resume{ |
53
|
2
|
|
|
2
|
1
|
5
|
my $self = shift; |
54
|
2
|
|
|
|
|
3
|
my $id = shift; |
55
|
2
|
100
|
|
|
|
10
|
$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
|
6
|
my $self = shift; |
62
|
2
|
|
|
|
|
3
|
my $id = shift; |
63
|
2
|
100
|
|
|
|
8
|
$self->id($id) if $id; |
64
|
|
|
|
|
|
|
|
65
|
2
|
|
|
|
|
8
|
$self->_request(method => 'POST', url => $self->_instance_url.'/cancel'); |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |