lib/Finance/GDAX/API/TypeConstraints.pm

filter: Statementstmt 94.5% 35 / 37 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 84.6% 11 / 13 Podpod n/a totaltotal 90.3% 47 / 52 CC 2 SCAR 2.2
CC
2
Cov
92%
__ANON__
2.1
__ANON__
2.0
__ANON__
1.1
CRAP 1.2
« lib/Finance/GDAX/API/URL.pm ↑ Summary lib/Finance/GDAX/API/CoinbaseAccount.pm »
1 package Finance::GDAX::API::TypeConstraints;
2 7 our $VERSION = '0.01';
3 7 ▶use 5.20.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 7 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 7 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 subtype 'PositiveInt',
10 as 'Int',
11 1 ▶ where { $_ > 0 },
Subroutine __ANON__: called CC=1 SCAR=0.0
12 1 ▶ message { "$_ is not a positive number" };
Subroutine __ANON__: called CC=1 SCAR=0.0
13  
14 subtype 'PositiveNum',
15 as 'Num',
16 10 ▶ where { $_ > 0 },
Subroutine __ANON__: called CC=1 SCAR=0.0
17 6 ▶ message { "$_ is not a positive number" };
Subroutine __ANON__: called CC=1 SCAR=0.0
18  
19 subtype 'PositiveNumOrZero',
20 as 'Num',
21 0 ▶ where { $_ >= 0 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
22 0 ▶ message { "$_ is not a positive number or zero" };
Subroutine __ANON__: not called CC=1 SCAR=1.2
23  
24 subtype 'ProductLevel',
25 as 'Int',
26 2 ▶ where { $_ >= 1 and $_ <= 3 },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
$_ >= 1 and $_ <= 3 2 0 2
27 1 ▶ message { "Product level must be 1, 2 or 3" };
Subroutine __ANON__: called CC=1 SCAR=0.0
28  
29 7 enum 'FundingStatus', [qw(outstanding settled rejected)];
30 7 enum 'MarginTransferType', [qw(deposit withdraw)];
31 7 enum 'OrderSelfTradePreventionFlag', [qw(dc co cn cb)];
32 7 enum 'OrderSide', [qw(buy sell)];
33 7 enum 'OrderTimeInForce', [qw(GTC GTT IOC FOK)];
34 7 enum 'OrderType', [qw(limit market stop)];
35 7 enum 'ReportFormat', [qw(pdf csv)];
36 7 enum 'ReportType', [qw(fills account)];
37  
38 7 __PACKAGE__->meta->make_immutable;
39 7 1;
40  
« lib/Finance/GDAX/API/URL.pm ↑ Summary lib/Finance/GDAX/API/CoinbaseAccount.pm »