File Coverage

lib/Finance/Robinhood/User/InternationalInfo.pm
Criterion Covered Total %
statement 10 17 58.8
branch 0 2 0.0
condition n/a
subroutine 4 5 80.0
pod n/a
total 14 24 58.3


line stmt bran cond sub pod time code
1             package Finance::Robinhood::User::InternationalInfo;
2              
3             =encoding utf-8
4              
5             =for stopwords watchlist watchlists untradable urls
6              
7             =head1 NAME
8              
9             Finance::Robinhood::User::InternationalInfo - Access Account Information
10             Related to a non-US Citizen User
11              
12             =head1 SYNOPSIS
13              
14             use Finance::Robinhood;
15             my $rh = Finance::Robinhood->new;
16            
17             my $user = $rh->user;
18             my $info = $user->international_info;
19              
20             CORE::say 'User was born in : ' . $info->birthCountry;
21              
22             =cut
23              
24             our $VERSION = '0.92_003';
25              
26             sub _test__init {
27 1     1   11423 my $rh = t::Utility::rh_instance(1);
28 0           my $user = $rh->user;
29 0           isa_ok($user, 'Finance::Robinhood::User');
30 0           t::Utility::stash('USER', $user); # Store it for later
31 0           my $intl_info = $user->international_info();
32             todo( # Might fail
33             'International data only available to non-US citizens' => sub {
34 0     0     isa_ok($ntl_info, __PACKAGE__);
35 0 0         t::Utility::stash('USER_INTL_INFO', $intl_info) if $intl_info;
36             }
37 0           );
38             }
39 1     1   8 use Mojo::Base-base, -signatures;
  1         2  
  1         7  
40 1     1   188 use Mojo::URL;
  1         2  
  1         8  
41             #
42 1     1   27 use Time::Moment;
  1         2  
  1         72  
43             #
44             has _rh => undef => weak => 1;
45              
46             =head1 METHODS
47              
48             =head2 C
49              
50             User's nation of origin.
51              
52             =head2 C
53              
54             User's line of work and reason for being in the US on a Visa.
55              
56             =head2 C
57              
58             How often is the user expecting to make withdraws from Robinhood back to their
59             account. This is required for taxation and withholding.
60              
61             Proper values include C, C, and C.
62              
63             =head2 C
64              
65             User's tax id in their home country.
66              
67             =head2 C
68              
69             How was the user referred to Robinhood.
70              
71             =head2 C
72              
73             This would typically be ACH but wire transfers are also possible.
74              
75             =head2 C
76              
77             User's primary bank in the US.
78              
79             =head2 C
80              
81             How large was the user's initial deposit.
82              
83             =head2 C
84              
85             Returns a true value if the user is allowed to withdrawal funds via ACH.
86              
87             =cut
88              
89             has ['birthCountry', 'businessNature',
90             'expectedWithdrawals', 'foreignTaxId',
91             'howReferredToBroker', 'initialDepositType',
92             'primaryBanking', 'valueInitialDeposit',
93             'withdrawalsAllowed'
94             ];
95              
96             =head1 LEGAL
97              
98             This is a simple wrapper around the API used in the official apps. The author
99             provides no investment, legal, or tax advice and is not responsible for any
100             damages incurred while using this software. This software is not affiliated
101             with Robinhood Financial LLC in any way.
102              
103             For Robinhood's terms and disclosures, please see their website at
104             https://robinhood.com/legal/
105              
106             =head1 LICENSE
107              
108             Copyright (C) Sanko Robinson.
109              
110             This library is free software; you can redistribute it and/or modify it under
111             the terms found in the Artistic License 2. Other copyrights, terms, and
112             conditions may apply to data transmitted through this module. Please refer to
113             the L section.
114              
115             =head1 AUTHOR
116              
117             Sanko Robinson Esanko@cpan.orgE
118              
119             =cut
120              
121             1;