| 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 | 1 | our $VERSION = '0.92_003'; | |||||||||
| 25 | |||||||||||
| 26 | 1 | ▶ | sub _test__init { | ||||||||
|
Subroutine
_test__init: called CC=1 SCAR=5.5
| |||||||||||
| 27 | 1 | 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 | 0 | ▶ | 'International data only available to non-US citizens' => sub { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||
| 34 | 0 | isa_ok($ntl_info, __PACKAGE__); | |||||||||
| 35 | 0 | ▶ | t::Utility::stash('USER_INTL_INFO', $intl_info) if $intl_info; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | } | ||||||||||
| 37 | 0 | ); | |||||||||
| 38 | } | ||||||||||
| 39 | 1 | ▶ | use Mojo::Base-base, -signatures; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 40 | 1 | ▶ | use Mojo::URL; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 41 | # | ||||||||||
| 42 | 1 | ▶ | use Time::Moment; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 43 | # | ||||||||||
| 44 | 1 | has _rh => undef => weak => 1; | |||||||||
| 45 | |||||||||||
| 46 | =head1 METHODS | ||||||||||
| 47 | |||||||||||
| 48 | =head2 C<birthCountry( )> | ||||||||||
| 49 | |||||||||||
| 50 | User's nation of origin. | ||||||||||
| 51 | |||||||||||
| 52 | =head2 C<businessNature( )> | ||||||||||
| 53 | |||||||||||
| 54 | User's line of work and reason for being in the US on a Visa. | ||||||||||
| 55 | |||||||||||
| 56 | =head2 C<expectedWithdrawals( )> | ||||||||||
| 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<frequent>, C<occasional>, and C<rare>. | ||||||||||
| 62 | |||||||||||
| 63 | =head2 C<foreignTaxId( )> | ||||||||||
| 64 | |||||||||||
| 65 | User's tax id in their home country. | ||||||||||
| 66 | |||||||||||
| 67 | =head2 C<howReferredToBroker( )> | ||||||||||
| 68 | |||||||||||
| 69 | How was the user referred to Robinhood. | ||||||||||
| 70 | |||||||||||
| 71 | =head2 C<initialDepositType( )> | ||||||||||
| 72 | |||||||||||
| 73 | This would typically be ACH but wire transfers are also possible. | ||||||||||
| 74 | |||||||||||
| 75 | =head2 C<primaryBanking( )> | ||||||||||
| 76 | |||||||||||
| 77 | User's primary bank in the US. | ||||||||||
| 78 | |||||||||||
| 79 | =head2 C<valueInitialDeposit( )> | ||||||||||
| 80 | |||||||||||
| 81 | How large was the user's initial deposit. | ||||||||||
| 82 | |||||||||||
| 83 | =head2 C<withdrawalsAllowed> | ||||||||||
| 84 | |||||||||||
| 85 | Returns a true value if the user is allowed to withdrawal funds via ACH. | ||||||||||
| 86 | |||||||||||
| 87 | =cut | ||||||||||
| 88 | |||||||||||
| 89 | 1 | 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<LEGAL> section. | ||||||||||
| 114 | |||||||||||
| 115 | =head1 AUTHOR | ||||||||||
| 116 | |||||||||||
| 117 | Sanko Robinson E<lt>sanko@cpan.orgE<gt> | ||||||||||
| 118 | |||||||||||
| 119 | =cut | ||||||||||
| 120 | |||||||||||
| 121 | 1 | 1; | |||||||||