File Coverage

lib/Finance/Alpaca/Struct/Activity.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::Activity 0.9902 {
2 17     17   182 use strictures 2;
  17         137  
  17         720  
3 17     17   3542 use feature 'signatures';
  17         33  
  17         1299  
4 17     17   92 no warnings 'experimental::signatures';
  17         30  
  17         745  
5             #
6 17     17   90 use Type::Library 0.008 -base, -declare => qw[Activity];
  17         321  
  17         94  
7 17     17   6900 use Type::Utils;
  17         28  
  17         101  
8 17     17   22146 use Types::Standard qw[Enum Num Ref Str];
  17         34  
  17         132  
9 17     17   16530 use Types::TypeTiny 0.004 StringLike => { -as => "Stringable" };
  17         317  
  17         130  
10             class_type Activity, { class => __PACKAGE__ };
11             coerce( Activity, from Ref() => __PACKAGE__ . q[->new($_)] );
12             #
13 17     17   5633 use Moo;
  17         31  
  17         128  
14 17     17   5709 use Types::UUID;
  17         52  
  17         160  
15 17     17   5038 use lib './lib';
  17         33  
  17         120  
16 17     17   2600 use Finance::Alpaca::Types;
  17         34  
  17         119  
17             has activity_type => (
18             is => 'ro',
19             isa => Enum [
20             qw[FILL TRANS MISC ACATC ACATS CSD CSW DIV DIVCGL DIVCGS DIVFEE
21             DIVFT DIVNRA DIVROC DIVTW DIVTXEX INT INTNRA INTTW JNL JNLC JNLS
22             MA NC OPASN OPEXP OPXRC PTC PTR REORG SC SSO SSP]
23             ],
24             required => 1
25             );
26             has date => ( is => 'ro', isa => Timestamp, required => 1, coerce => 1 );
27             has net_amount => ( is => 'ro', isa => Num, required => 1 );
28             has [qw[id symbol]] => ( is => 'ro', isa => Str, required => 1 );
29             has [qw[qty per_share_amount]] => ( is => 'ro', isa => Num, predicate => 1 );
30             }
31             1;
32             __END__