line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::Robinhood::Forex::Activation; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf-8 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=for stopwords watchlist watchlists untradable urls |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Finance::Robinhood::Forex::Activation - Represents a Single Forex Account |
10
|
|
|
|
|
|
|
Application |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
use Finance::Robinhood; |
15
|
|
|
|
|
|
|
my $rh = Finance::Robinhood->new; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# TODO |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our $VERSION = '0.92_003'; |
22
|
1
|
|
|
1
|
|
4251
|
use Mojo::Base-base, -signatures; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
12
|
|
23
|
1
|
|
|
1
|
|
328
|
use Mojo::URL; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _test__init { |
26
|
1
|
|
|
1
|
|
8332
|
my $rh = t::Utility::rh_instance(1); |
27
|
0
|
|
|
|
|
0
|
my $act = $rh->forex_activations->current; |
28
|
0
|
|
|
|
|
0
|
isa_ok($act, __PACKAGE__); |
29
|
0
|
|
|
|
|
0
|
t::Utility::stash('ACTIVATION', $act); # Store it for later |
30
|
|
|
|
|
|
|
} |
31
|
1
|
|
|
1
|
|
148
|
use overload '""' => sub ($s, @) { $s->{id} }, fallback => 1; |
|
1
|
|
|
0
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _test_stringify { |
34
|
1
|
|
50
|
1
|
|
1886
|
t::Utility::stash('ACTIVATION') // skip_all(); |
35
|
0
|
|
|
|
|
0
|
like(+t::Utility::stash('ACTIVATION'), |
36
|
|
|
|
|
|
|
qr'^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$'i |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
# |
40
|
|
|
|
|
|
|
has _rh => undef => weak => 1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 METHODS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 C |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Returns a Time::Moment object. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 C |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
The email address used to apply for a forex account. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 C |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Reason why the account may have been (or should be) rejected. Will return one |
55
|
|
|
|
|
|
|
of the following, if applicable: |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=over |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=item C |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item C |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item C |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item C |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=item C |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item C |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item C |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item C |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=back |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 C |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
If given, this is a string with a specific reason why the application to |
80
|
|
|
|
|
|
|
activate an account was rejected. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 C |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Same options as C. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 C |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
The first name of the account holder. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 C |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
UUID of the activation attempt. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 C |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
The last name of the account holder. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head2 C |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Boolean value. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 C |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
One of the following: |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=over |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item C |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item C |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item C |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=back |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head2 C |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
The type of account being applied for. May be one of the following: |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=over |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=item C |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=item C |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=back |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head2 C |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Returns a UUID. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=cut |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
has ['email', 'external_rejection_code', |
135
|
|
|
|
|
|
|
'external_rejection_reason', 'external_status_code', |
136
|
|
|
|
|
|
|
'first_name', 'id', |
137
|
|
|
|
|
|
|
'last_name', 'speculative', |
138
|
|
|
|
|
|
|
'state', 'type', |
139
|
|
|
|
|
|
|
'user_id' |
140
|
|
|
|
|
|
|
]; |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head2 C |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
Returns a Time::Moment object. |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=cut |
147
|
|
|
|
|
|
|
|
148
|
0
|
|
|
0
|
1
|
0
|
sub created_at ($s) { |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
149
|
0
|
|
|
|
|
0
|
Time::Moment->from_string($s->{created_at}); |
150
|
|
|
|
|
|
|
} |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
sub _test_created_at { |
153
|
1
|
|
50
|
1
|
|
2062
|
t::Utility::stash('ACTIVATION') // skip_all(); |
154
|
0
|
|
|
|
|
0
|
isa_ok(t::Utility::stash('ACTIVATION')->created_at, 'Time::Moment'); |
155
|
|
|
|
|
|
|
} |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head2 C |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
Returns a Time::Moment object. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=cut |
162
|
|
|
|
|
|
|
|
163
|
0
|
|
|
0
|
1
|
0
|
sub updated_at ($s) { |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
164
|
0
|
|
|
|
|
0
|
Time::Moment->from_string($s->{updated_at}); |
165
|
|
|
|
|
|
|
} |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
sub _test_updated_at { |
168
|
1
|
|
50
|
1
|
|
1899
|
t::Utility::stash('ACTIVATION') // skip_all(); |
169
|
0
|
|
|
|
|
|
isa_ok(t::Utility::stash('ACTIVATION')->updated_at, 'Time::Moment'); |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=head1 LEGAL |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
This is a simple wrapper around the API used in the official apps. The author |
175
|
|
|
|
|
|
|
provides no investment, legal, or tax advice and is not responsible for any |
176
|
|
|
|
|
|
|
damages incurred while using this software. This software is not affiliated |
177
|
|
|
|
|
|
|
with Robinhood Financial LLC in any way. |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
For Robinhood's terms and disclosures, please see their website at |
180
|
|
|
|
|
|
|
https://robinhood.com/legal/ |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head1 LICENSE |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
Copyright (C) Sanko Robinson. |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it under |
187
|
|
|
|
|
|
|
the terms found in the Artistic License 2. Other copyrights, terms, and |
188
|
|
|
|
|
|
|
conditions may apply to data transmitted through this module. Please refer to |
189
|
|
|
|
|
|
|
the L section. |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=head1 AUTHOR |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
Sanko Robinson Esanko@cpan.orgE |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=cut |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
1; |