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   136 use strictures 2;
  17         154  
  17         756  
3 17     17   3882 use feature 'signatures';
  17         35  
  17         1665  
4 17     17   137 no warnings 'experimental::signatures';
  17         33  
  17         985  
5             #
6 17     17   196 use Type::Library 0.008 -base, -declare => qw[Trade];
  17         344  
  17         116  
7 17     17   8007 use Type::Utils;
  17         38  
  17         117  
8 17     17   26898 use Types::Standard qw[ArrayRef Int Num Ref Str];
  17         41  
  17         167  
9 17     17   22058 use Types::TypeTiny 0.004 StringLike => { -as => "Stringable" };
  17         427  
  17         121  
10             class_type Trade, { class => __PACKAGE__ };
11             coerce( Trade, from Ref() => __PACKAGE__ . q[->new($_)] );
12             #
13 17     17   6206 use Moo;
  17         41  
  17         166  
14 17     17   6322 use lib './lib';
  17         42  
  17         172  
15 17     17   2872 use Finance::Alpaca::Types;
  17         36  
  17         128  
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__