line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Coincheck::BankAccount; |
2
|
2
|
|
|
2
|
|
1557819
|
use strict; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
99
|
|
3
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
147
|
|
4
|
|
|
|
|
|
|
use Class::Accessor::Lite ( |
5
|
2
|
|
|
|
|
13
|
ro => [qw/ |
6
|
|
|
|
|
|
|
client |
7
|
|
|
|
|
|
|
/], |
8
|
2
|
|
|
2
|
|
596
|
); |
|
2
|
|
|
|
|
1242
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
1
|
|
|
1
|
0
|
41
|
my $class = shift; |
12
|
1
|
|
|
|
|
3
|
my $client = shift; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
8
|
bless { |
15
|
|
|
|
|
|
|
client => $client, |
16
|
|
|
|
|
|
|
}, $class; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub create { |
20
|
0
|
|
|
0
|
0
|
|
my ($self, %params) = @_; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my $req_params = { |
23
|
|
|
|
|
|
|
bank_name => $params{bank_name}, |
24
|
|
|
|
|
|
|
branch_name => $params{branch_name}, |
25
|
|
|
|
|
|
|
number => $params{number}, |
26
|
|
|
|
|
|
|
name => $params{name}, |
27
|
0
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
my $res = $self->client->request( |
30
|
|
|
|
|
|
|
'POST' => 'api/bank_accounts', |
31
|
|
|
|
|
|
|
$req_params, |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return $res; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub all { |
38
|
0
|
|
|
0
|
0
|
|
my ($self, %params) = @_; |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
my $req_params; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
my $res = $self->client->request( |
43
|
|
|
|
|
|
|
'GET' => 'api/bank_accounts', |
44
|
|
|
|
|
|
|
$req_params, |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
return $res; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub delete { |
51
|
0
|
|
|
0
|
0
|
|
my ($self, %params) = @_; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $req_params = { |
54
|
|
|
|
|
|
|
id => $params{id}, |
55
|
0
|
|
|
|
|
|
}; |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
my $res = $self->client->request( |
58
|
|
|
|
|
|
|
'DELETE' => "api/bank_accounts/$req_params->{id}", |
59
|
|
|
|
|
|
|
$req_params, |
60
|
|
|
|
|
|
|
); |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
return $res; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |