File Coverage

lib/Finance/Alpaca/Struct/Account.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::Account 0.9902 {
2 17     17   113 use strictures 2;
  17         148  
  17         751  
3 17     17   3628 use feature 'signatures';
  17         36  
  17         1360  
4 17     17   89 no warnings 'experimental::signatures';
  17         29  
  17         678  
5             #
6 17     17   81 use Type::Library 0.008 -base, -declare => qw[Account];
  17         341  
  17         152  
7 17     17   8411 use Type::Utils;
  17         31  
  17         105  
8 17     17   22020 use Types::Standard qw[Bool Enum Int Num Ref Str];
  17         37  
  17         131  
9 17     17   20961 use Types::TypeTiny 0.004 StringLike => { -as => "Stringable" };
  17         323  
  17         106  
10             class_type Account, { class => __PACKAGE__ };
11             coerce( Account, from Ref() => __PACKAGE__ . q[->new($_)] );
12             #
13 17     17   5247 use Moo;
  17         36  
  17         243  
14 17     17   5817 use Types::UUID;
  17         32  
  17         109  
15 17     17   5733 use lib './lib';
  17         39  
  17         125  
16 17     17   2794 use Finance::Alpaca::Types;
  17         30  
  17         118  
17             has id => ( is => 'ro', isa => Uuid, required => 1 );
18             has [
19             qw[account_blocked pattern_day_trader shorting_enabled trade_suspended_by_user trading_blocked transfers_blocked]
20             ] => ( is => 'ro', isa => Bool, required => 1, coerce => 1 );
21             has account_number => ( is => 'ro', isa => Str, required => 1 );
22             has [
23             qw[buying_power cash daytrading_buying_power equity initial_margin last_equity last_maintenance_margin long_market_value maintenance_margin portfolio_value regt_buying_power short_market_value]
24             ] => ( is => 'ro', isa => Num, required => 1 );
25             has created_at => ( is => 'ro', isa => Timestamp, required => 1, coerce => 1 );
26             has currency => ( is => 'ro', isa => Str, required => 1 );
27             has [qw[daytrade_count multiplier sma]] => ( is => 'ro', isa => Int, required => 1 );
28             has status => (
29             is => 'ro',
30             isa => Enum [
31             qw[ACTIVE ACCOUNT_UPDATED APPROVAL_PENDING ONBOARDING REJECTED SUBMITTED SUBMISSION_FAILED]
32             ],
33             required => 1
34             );
35             #
36             }
37             1;
38             __END__