File Coverage

lib/Finance/Alpaca/Struct/Trade.pm
Criterion Covered Total %
statement 30 30 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 40 40 100.0


line stmt bran cond sub pod time code
1             package Finance::Alpaca::Struct::Trade 0.9902 {
2 1     1   8 use strictures 2;
  1         6  
  1         39  
3 1     1   178 use feature 'signatures';
  1         2  
  1         83  
4 1     1   6 no warnings 'experimental::signatures';
  1         2  
  1         41  
5             #
6 1     1   5 use Type::Library 0.008 -base, -declare => qw[Trade];
  1         15  
  1         6  
7 1     1   433 use Type::Utils;
  1         2  
  1         5  
8 1     1   1568 use Types::Standard qw[ArrayRef Int Num Ref Str];
  1         3  
  1         8  
9 1     1   1218 use Types::TypeTiny 0.004 StringLike => { -as => "Stringable" };
  1         16  
  1         30  
10             class_type Trade, { class => __PACKAGE__ };
11             coerce( Trade, from Ref() => __PACKAGE__ . q[->new($_)] );
12             #
13 1     1   342 use Moo;
  1         1  
  1         6  
14 1     1   319 use lib './lib';
  1         2  
  1         5  
15 1     1   134 use Finance::Alpaca::Types;
  1         2  
  1         7  
16             has t => ( is => 'ro', isa => Timestamp, required => 1, coerce => 1 );
17             has [qw[x z]] => ( is => 'ro', isa => Str, required => 1 );
18             has p => ( is => 'ro', isa => Num, required => 1 );
19             has [qw[s i]] => ( is => 'ro', isa => Int, required => 1 );
20             has c => ( is => 'ro', isa => ArrayRef [Str], required => 1 );
21             has S => ( is => 'ro', isa => Str, predicate => 1 ); # If from stream
22              
23             }
24             1;
25             __END__