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.9904 {
2 17     17   113 use strictures 2;
  17         145  
  17         691  
3 17     17   3590 use feature 'signatures';
  17         32  
  17         1584  
4 17     17   117 no warnings 'experimental::signatures';
  17         32  
  17         843  
5             #
6 17     17   96 use Type::Library 0.008 -base, -declare => qw[Trade];
  17         339  
  17         110  
7 17     17   7147 use Type::Utils;
  17         35  
  17         101  
8 17     17   22321 use Types::Standard qw[ArrayRef Int Num Ref Str];
  17         31  
  17         174  
9 17     17   18426 use Types::TypeTiny 0.004 StringLike => { -as => "Stringable" };
  17         332  
  17         106  
10             class_type Trade, { class => __PACKAGE__ };
11             coerce( Trade, from Ref() => __PACKAGE__ . q[->new($_)] );
12             #
13 17     17   5184 use Moo;
  17         32  
  17         128  
14 17     17   5690 use lib './lib';
  17         48  
  17         139  
15 17     17   2472 use Finance::Alpaca::Types;
  17         34  
  17         113  
16             has timestamp => ( is => 'ro', isa => Timestamp, required => 1, coerce => 1, init_arg => 't' );
17             has exchange => ( is => 'ro', isa => Str, required => 1, coerce => 1, init_arg => 'x' );
18             has tape => ( is => 'ro', isa => Str, required => 1, init_arg => 'z' );
19             has price => ( is => 'ro', isa => Num, required => 1, init_arg => 'p' );
20             has id => ( is => 'ro', isa => Int, required => 1, init_arg => 'i' );
21             has size => ( is => 'ro', isa => Int, required => 1, init_arg => 's' );
22             has conditions => ( is => 'ro', isa => ArrayRef [Str], required => 1, init_arg => 'c' );
23             has symbol => ( is => 'ro', isa => Str, predicate => 1, init_arg => 'S' ); # If from stream
24             }
25             1;
26             __END__