File Coverage

lib/Finance/Alpaca/Struct/TradeActivity.pm
Criterion Covered Total %
statement 33 33 100.0
branch n/a
condition n/a
subroutine 11 11 100.0
pod n/a
total 44 44 100.0


line stmt bran cond sub pod time code
1             package Finance::Alpaca::Struct::TradeActivity 0.9904 {
2 17     17   135 use strictures 2;
  17         139  
  17         735  
3 17     17   3469 use feature 'signatures';
  17         37  
  17         1216  
4 17     17   99 no warnings 'experimental::signatures';
  17         38  
  17         750  
5             #
6 17     17   106 use Type::Library 0.008 -base, -declare => qw[TradeActivity];
  17         307  
  17         112  
7 17     17   7258 use Type::Utils;
  17         42  
  17         114  
8 17     17   26839 use Types::Standard qw[Enum Num Ref Str];
  17         47  
  17         183  
9 17     17   19516 use Types::TypeTiny 0.004 StringLike => { -as => "Stringable" };
  17         324  
  17         114  
10             class_type TradeActivity, { class => __PACKAGE__ };
11             coerce( TradeActivity, from Ref() => __PACKAGE__ . q[->new($_)] );
12             #
13 17     17   6168 use Moo;
  17         43  
  17         122  
14 17     17   5856 use Types::UUID;
  17         44  
  17         118  
15 17     17   5853 use lib './lib';
  17         48  
  17         114  
16 17     17   2587 use Finance::Alpaca::Types;
  17         56  
  17         131  
17             has activity_type => ( is => 'ro', isa => Str, required => 1 ); # FILL
18              
19             has order_id => ( is => 'ro', isa => Uuid, required => 1 );
20             has side => ( is => 'ro', isa => Enum [qw[buy sell sell_short]], required => 1 );
21             has transaction_time => ( is => 'ro', isa => Timestamp, required => 1, coerce => 1 );
22              
23             has [qw[symbol id]] => ( is => 'ro', isa => Str, required => 1 );
24             has [qw[qty cum_qty leaves_qty price ]] => ( is => 'ro', isa => Num, required => 1 );
25             has type => ( is => 'ro', isa => Enum [qw[fill partial_fill]], required => 1 );
26             }
27             1;
28             __END__