Coincheck/Withdraw.pm

filter: Statementstmt 52.0% 13 / 25 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 4 totaltotal 43.5% 17 / 39 CC 2 SCAR 9.2
CC
2
Cov
48%
create
6.0
all
2.0
cancel
2.0
CRAP 2.5
« Coincheck.pm ↑ Summary Coincheck/Order.pm »
1 package WebService::Coincheck::Withdraw;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Class::Accessor::Lite (
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ro => [qw/
6 client
7 /],
8 2 );
9  
10 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
11 1 my $class = shift;
12 1 my $client = shift;
13  
14 1 bless {
15 client => $client,
16 }, $class;
17 }
18  
19 0 ▶sub create {
Subroutine create: not called CC=2 SCAR=17.9
Pod undocumented
20 0 my ($self, %params) = @_;
21  
22 my $req_params = {
23 bank_account_id => $params{bank_account_id},
24 amount => $params{amount},
25 0 ▶ currency => $params{currency} || 'JPY',
Condition0%0/2
$params{'currency'} || 'JPY'
l!l
00
MC/DC0%0/1
$params{'currency'} || 'JPY'
$params{'currency'}
Truth table0%0/2
A
A= $params{'currency'}
Aresult
11
00
26 };
27  
28 0 my $res = $self->client->request(
29 'POST' => 'api/withdraws',
30 $req_params,
31 );
32  
33 0 return $res;
34 }
35  
36 0 ▶sub all {
Subroutine all: not called CC=1 SCAR=6.9
Pod undocumented
37 0 my ($self, %params) = @_;
38  
39 0 my $req_params;
40  
41 0 my $res = $self->client->request(
42 'GET' => 'api/withdraws',
43 $req_params,
44 );
45  
46 0 return $res;
47 }
48  
49 0 ▶sub cancel {
Subroutine cancel: not called CC=1 SCAR=6.9
Pod undocumented
50 0 my ($self, %params) = @_;
51  
52 my $req_params = {
53 id => $params{id},
54 0 };
55  
56 0 my $res = $self->client->request(
57 'DELETE' => "api/withdraws/$req_params->{id}",
58 $req_params,
59 );
60  
61 0 return $res;
62 }
63  
64 2 1;
« Coincheck.pm ↑ Summary Coincheck/Order.pm »