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_002';
25              
26             sub _test__init {
27 1     1   11599 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   9 use Mojo::Base-base, -signatures;
  1         2  
  1         8  
40 1     1   193 use Mojo::URL;
  1         1  
  1         8  
41             #
42 1     1   27 use Time::Moment;
  1         3  
  1         89  
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 [
90             'birthCountry', 'businessNature', 'expectedWithdrawals', 'foreignTaxId',
91             'howReferredToBroker', 'initialDepositType', 'primaryBanking', 'valueInitialDeposit',
92             'withdrawalsAllowed'
93             ];
94              
95             =head1 LEGAL
96              
97             This is a simple wrapper around the API used in the official apps. The author
98             provides no investment, legal, or tax advice and is not responsible for any
99             damages incurred while using this software. This software is not affiliated
100             with Robinhood Financial LLC in any way.
101              
102             For Robinhood's terms and disclosures, please see their website at
103             https://robinhood.com/legal/
104              
105             =head1 LICENSE
106              
107             Copyright (C) Sanko Robinson.
108              
109             This library is free software; you can redistribute it and/or modify it under
110             the terms found in the Artistic License 2. Other copyrights, terms, and
111             conditions may apply to data transmitted through this module. Please refer to
112             the L section.
113              
114             =head1 AUTHOR
115              
116             Sanko Robinson Esanko@cpan.orgE
117              
118             =cut
119              
120             1;