line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Coincheck::Transfer; |
2
|
2
|
|
|
2
|
|
2270582
|
use strict; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
117
|
|
3
|
2
|
|
|
2
|
|
17
|
use warnings; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
176
|
|
4
|
|
|
|
|
|
|
use Class::Accessor::Lite ( |
5
|
2
|
|
|
|
|
17
|
ro => [qw/ |
6
|
|
|
|
|
|
|
client |
7
|
|
|
|
|
|
|
/], |
8
|
2
|
|
|
2
|
|
785
|
); |
|
2
|
|
|
|
|
1679
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
1
|
|
|
1
|
0
|
39
|
my $class = shift; |
12
|
1
|
|
|
|
|
2
|
my $client = shift; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
9
|
bless { |
15
|
|
|
|
|
|
|
client => $client, |
16
|
|
|
|
|
|
|
}, $class; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub to_leverage { |
20
|
0
|
|
|
0
|
0
|
|
my ($self, %params) = @_; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my $req_params = { |
23
|
|
|
|
|
|
|
amount => $params{amount}, |
24
|
|
|
|
|
|
|
currency => $params{currency}, |
25
|
0
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
my $res = $self->client->request( |
28
|
|
|
|
|
|
|
'POST' => 'api/exchange/transfers/to_leverage', |
29
|
|
|
|
|
|
|
$req_params, |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
return $res; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub from_leverage { |
36
|
0
|
|
|
0
|
0
|
|
my ($self, %params) = @_; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $req_params = { |
39
|
|
|
|
|
|
|
amount => $params{amount}, |
40
|
|
|
|
|
|
|
currency => $params{currency}, |
41
|
0
|
|
|
|
|
|
}; |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
my $res = $self->client->request( |
44
|
|
|
|
|
|
|
'POST' => 'api/exchange/transfers/from_leverage', |
45
|
|
|
|
|
|
|
$req_params, |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return $res; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |