File Coverage

lib/Finance/Alpaca/Struct/Asset.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::Asset 0.9902 {
2 17     17   117 use strictures 2;
  17         137  
  17         681  
3 17     17   3579 use feature 'signatures';
  17         33  
  17         1300  
4 17     17   91 no warnings 'experimental::signatures';
  17         31  
  17         705  
5             #
6 17     17   87 use Type::Library 0.008 -base, -declare => qw[Asset];
  17         321  
  17         94  
7 17     17   6729 use Type::Utils;
  17         32  
  17         109  
8 17     17   21925 use Types::Standard qw[Bool Enum Int Num Ref Str];
  17         37  
  17         144  
9 17     17   20485 use Types::TypeTiny 0.004 StringLike => { -as => "Stringable" };
  17         384  
  17         110  
10             class_type Asset, { class => __PACKAGE__ };
11             coerce( Asset, from Ref() => __PACKAGE__ . q[->new($_)] );
12             #
13 17     17   5217 use Moo;
  17         35  
  17         130  
14 17     17   5732 use Types::UUID;
  17         35  
  17         119  
15 17     17   4952 use lib './lib';
  17         32  
  17         117  
16 17     17   2537 use Finance::Alpaca::Types;
  17         29  
  17         117  
17             has id => ( is => 'ro', isa => Uuid, required => 1 );
18             has [qw[class symbol]] => ( is => 'ro', isa => Str, required => 1 );
19             has exchange =>
20             ( is => 'ro', isa => Enum [qw[AMEX ARCA BATS NYSE NASDAQ NYSEARCA OTC]], required => 1 );
21             has status => ( is => 'ro', isa => Enum [qw[active inactive]], required => 1 );
22             has [qw[easy_to_borrow fractionable marginable shortable tradable]] =>
23             ( is => 'ro', isa => Bool, required => 1, coerce => 1 );
24             }
25             1;
26             __END__