line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Coincheck::Order; |
2
|
2
|
|
|
2
|
|
2030548
|
use strict; |
|
2
|
|
|
|
|
20
|
|
|
2
|
|
|
|
|
120
|
|
3
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
166
|
|
4
|
|
|
|
|
|
|
use Class::Accessor::Lite ( |
5
|
2
|
|
|
|
|
29
|
ro => [qw/ |
6
|
|
|
|
|
|
|
client |
7
|
|
|
|
|
|
|
/], |
8
|
2
|
|
|
2
|
|
802
|
); |
|
2
|
|
|
|
|
1719
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
1
|
|
|
1
|
0
|
34
|
my $class = shift; |
12
|
1
|
|
|
|
|
3
|
my $client = shift; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
35
|
bless { |
15
|
|
|
|
|
|
|
client => $client, |
16
|
|
|
|
|
|
|
}, $class; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub create { |
20
|
0
|
|
|
0
|
0
|
|
my ($self, %params) = @_; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $req_params; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my $res = $self->client->request( |
25
|
|
|
|
|
|
|
'POST' => 'api/exchange/orders', |
26
|
|
|
|
|
|
|
$req_params, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
return $res; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub cancel { |
33
|
0
|
|
|
0
|
0
|
|
my ($self, %params) = @_; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $req_params = { |
36
|
|
|
|
|
|
|
id => $params{id}, |
37
|
0
|
|
|
|
|
|
}; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my $res = $self->client->request( |
40
|
|
|
|
|
|
|
'DELETE' => "api/exchange/orders/$req_params->{id}", |
41
|
|
|
|
|
|
|
$req_params, |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
return $res; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub opens { |
48
|
0
|
|
|
0
|
0
|
|
my ($self, %params) = @_; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
my $req_params; |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
my $res = $self->client->request( |
53
|
|
|
|
|
|
|
'GET' => 'api/exchange/orders/opens', |
54
|
|
|
|
|
|
|
$req_params, |
55
|
|
|
|
|
|
|
); |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
return $res; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub transactions { |
61
|
0
|
|
|
0
|
0
|
|
my ($self, %params) = @_; |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
my $req_params; |
64
|
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
my $res = $self->client->request( |
66
|
|
|
|
|
|
|
'GET' => 'api/exchange/orders/transactions', |
67
|
|
|
|
|
|
|
$req_params, |
68
|
|
|
|
|
|
|
); |
69
|
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
|
return $res; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
1; |