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