blib/lib/Finance/GDAX/API/TypeConstraints.pm untested

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