snaptrade 2.0.45 → 2.0.46
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/snaptrade/models/account.rb +67 -32
- data/lib/snaptrade/version.rb +1 -1
- data/spec/models/account_spec.rb +9 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad410e9797ab8548703fad8a08b7e34920cc9974c00cb44ee54d8681b4e6ff2c
|
4
|
+
data.tar.gz: 0e64452afe9ae886bb7c7b3fa2c8a7ac1944a9ac04a732287c8482469d00ad2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06b623297535ae862a8263d04cbfff9fe75f460a795232514e9b7b0c45135100eea4587049acd077b314cfb35a6366eb5acbc6531240975bd237b835933ea3ea
|
7
|
+
data.tar.gz: 2d49ab16055c6ef88705a6a03c596924b3d86d2507ca22fb88de8e3c65ad0c221402a476a3307adc452d38670af6176da12393f1e1f7019b263ad7abd64cd6de
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
8
8
|
|
9
|
-
[![npm](https://img.shields.io/badge/gem-v2.0.
|
9
|
+
[![npm](https://img.shields.io/badge/gem-v2.0.46-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.46)
|
10
10
|
[![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
|
11
11
|
|
12
12
|
</div>
|
@@ -70,7 +70,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
70
70
|
Add to Gemfile:
|
71
71
|
|
72
72
|
```ruby
|
73
|
-
gem 'snaptrade', '~> 2.0.
|
73
|
+
gem 'snaptrade', '~> 2.0.46'
|
74
74
|
```
|
75
75
|
|
76
76
|
## Getting Started<a id="getting-started"></a>
|
@@ -19,9 +19,6 @@ module SnapTrade
|
|
19
19
|
# Unique identifier for the connection. This is the UUID used to reference the connection in SnapTrade.
|
20
20
|
attr_accessor :brokerage_authorization
|
21
21
|
|
22
|
-
# Portfolio Group ID. Portfolio Groups have been deprecated. Please contact support if you have a usecase for it.
|
23
|
-
attr_accessor :portfolio_group
|
24
|
-
|
25
22
|
# A display name for the account. Either assigned by the user or by the brokerage itself. For certain brokerages, SnapTrade appends the brokerage name to the account name for clarity.
|
26
23
|
attr_accessor :name
|
27
24
|
|
@@ -34,30 +31,33 @@ module SnapTrade
|
|
34
31
|
# Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the account was created in SnapTrade. This is _not_ the account opening date at the brokerage.
|
35
32
|
attr_accessor :created_date
|
36
33
|
|
34
|
+
attr_accessor :sync_status
|
35
|
+
|
36
|
+
attr_accessor :balance
|
37
|
+
|
37
38
|
# Additional information about the account, such as account type, status, etc. This information is specific to the brokerage and there's no standard format for this data. This field is deprecated and subject to removal in a future version.
|
38
39
|
attr_accessor :meta
|
39
40
|
|
41
|
+
# Portfolio Group ID. Portfolio Groups have been deprecated. Please contact support if you have a usecase for it.
|
42
|
+
attr_accessor :portfolio_group
|
43
|
+
|
40
44
|
# This field is deprecated.
|
41
45
|
attr_accessor :cash_restrictions
|
42
46
|
|
43
|
-
attr_accessor :sync_status
|
44
|
-
|
45
|
-
attr_accessor :balance
|
46
|
-
|
47
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
48
48
|
def self.attribute_map
|
49
49
|
{
|
50
50
|
:'id' => :'id',
|
51
51
|
:'brokerage_authorization' => :'brokerage_authorization',
|
52
|
-
:'portfolio_group' => :'portfolio_group',
|
53
52
|
:'name' => :'name',
|
54
53
|
:'number' => :'number',
|
55
54
|
:'institution_name' => :'institution_name',
|
56
55
|
:'created_date' => :'created_date',
|
57
|
-
:'meta' => :'meta',
|
58
|
-
:'cash_restrictions' => :'cash_restrictions',
|
59
56
|
:'sync_status' => :'sync_status',
|
60
|
-
:'balance' => :'balance'
|
57
|
+
:'balance' => :'balance',
|
58
|
+
:'meta' => :'meta',
|
59
|
+
:'portfolio_group' => :'portfolio_group',
|
60
|
+
:'cash_restrictions' => :'cash_restrictions'
|
61
61
|
}
|
62
62
|
end
|
63
63
|
|
@@ -71,15 +71,15 @@ module SnapTrade
|
|
71
71
|
{
|
72
72
|
:'id' => :'String',
|
73
73
|
:'brokerage_authorization' => :'String',
|
74
|
-
:'portfolio_group' => :'String',
|
75
74
|
:'name' => :'String',
|
76
75
|
:'number' => :'String',
|
77
76
|
:'institution_name' => :'String',
|
78
77
|
:'created_date' => :'Time',
|
79
|
-
:'meta' => :'Hash<String, Object>',
|
80
|
-
:'cash_restrictions' => :'Array<String>',
|
81
78
|
:'sync_status' => :'AccountSyncStatus',
|
82
|
-
:'balance' => :'AccountBalance'
|
79
|
+
:'balance' => :'AccountBalance',
|
80
|
+
:'meta' => :'Hash<String, Object>',
|
81
|
+
:'portfolio_group' => :'String',
|
82
|
+
:'cash_restrictions' => :'Array<String>'
|
83
83
|
}
|
84
84
|
end
|
85
85
|
|
@@ -113,10 +113,6 @@ module SnapTrade
|
|
113
113
|
self.brokerage_authorization = attributes[:'brokerage_authorization']
|
114
114
|
end
|
115
115
|
|
116
|
-
if attributes.key?(:'portfolio_group')
|
117
|
-
self.portfolio_group = attributes[:'portfolio_group']
|
118
|
-
end
|
119
|
-
|
120
116
|
if attributes.key?(:'name')
|
121
117
|
self.name = attributes[:'name']
|
122
118
|
end
|
@@ -133,37 +129,76 @@ module SnapTrade
|
|
133
129
|
self.created_date = attributes[:'created_date']
|
134
130
|
end
|
135
131
|
|
132
|
+
if attributes.key?(:'sync_status')
|
133
|
+
self.sync_status = attributes[:'sync_status']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'balance')
|
137
|
+
self.balance = attributes[:'balance']
|
138
|
+
end
|
139
|
+
|
136
140
|
if attributes.key?(:'meta')
|
137
141
|
if (value = attributes[:'meta']).is_a?(Hash)
|
138
142
|
self.meta = value
|
139
143
|
end
|
140
144
|
end
|
141
145
|
|
146
|
+
if attributes.key?(:'portfolio_group')
|
147
|
+
self.portfolio_group = attributes[:'portfolio_group']
|
148
|
+
end
|
149
|
+
|
142
150
|
if attributes.key?(:'cash_restrictions')
|
143
151
|
if (value = attributes[:'cash_restrictions']).is_a?(Array)
|
144
152
|
self.cash_restrictions = value
|
145
153
|
end
|
146
154
|
end
|
147
|
-
|
148
|
-
if attributes.key?(:'sync_status')
|
149
|
-
self.sync_status = attributes[:'sync_status']
|
150
|
-
end
|
151
|
-
|
152
|
-
if attributes.key?(:'balance')
|
153
|
-
self.balance = attributes[:'balance']
|
154
|
-
end
|
155
155
|
end
|
156
156
|
|
157
157
|
# Show invalid properties with the reasons. Usually used together with valid?
|
158
158
|
# @return Array for valid properties with the reasons
|
159
159
|
def list_invalid_properties
|
160
160
|
invalid_properties = Array.new
|
161
|
+
if @id.nil?
|
162
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
163
|
+
end
|
164
|
+
|
165
|
+
if @brokerage_authorization.nil?
|
166
|
+
invalid_properties.push('invalid value for "brokerage_authorization", brokerage_authorization cannot be nil.')
|
167
|
+
end
|
168
|
+
|
169
|
+
if @number.nil?
|
170
|
+
invalid_properties.push('invalid value for "number", number cannot be nil.')
|
171
|
+
end
|
172
|
+
|
173
|
+
if @institution_name.nil?
|
174
|
+
invalid_properties.push('invalid value for "institution_name", institution_name cannot be nil.')
|
175
|
+
end
|
176
|
+
|
177
|
+
if @created_date.nil?
|
178
|
+
invalid_properties.push('invalid value for "created_date", created_date cannot be nil.')
|
179
|
+
end
|
180
|
+
|
181
|
+
if @sync_status.nil?
|
182
|
+
invalid_properties.push('invalid value for "sync_status", sync_status cannot be nil.')
|
183
|
+
end
|
184
|
+
|
185
|
+
if @balance.nil?
|
186
|
+
invalid_properties.push('invalid value for "balance", balance cannot be nil.')
|
187
|
+
end
|
188
|
+
|
161
189
|
invalid_properties
|
162
190
|
end
|
163
191
|
|
164
192
|
# Check to see if the all the properties in the model are valid
|
165
193
|
# @return true if the model is valid
|
166
194
|
def valid?
|
195
|
+
return false if @id.nil?
|
196
|
+
return false if @brokerage_authorization.nil?
|
197
|
+
return false if @number.nil?
|
198
|
+
return false if @institution_name.nil?
|
199
|
+
return false if @created_date.nil?
|
200
|
+
return false if @sync_status.nil?
|
201
|
+
return false if @balance.nil?
|
167
202
|
true
|
168
203
|
end
|
169
204
|
|
@@ -174,15 +209,15 @@ module SnapTrade
|
|
174
209
|
self.class == o.class &&
|
175
210
|
id == o.id &&
|
176
211
|
brokerage_authorization == o.brokerage_authorization &&
|
177
|
-
portfolio_group == o.portfolio_group &&
|
178
212
|
name == o.name &&
|
179
213
|
number == o.number &&
|
180
214
|
institution_name == o.institution_name &&
|
181
215
|
created_date == o.created_date &&
|
182
|
-
meta == o.meta &&
|
183
|
-
cash_restrictions == o.cash_restrictions &&
|
184
216
|
sync_status == o.sync_status &&
|
185
|
-
balance == o.balance
|
217
|
+
balance == o.balance &&
|
218
|
+
meta == o.meta &&
|
219
|
+
portfolio_group == o.portfolio_group &&
|
220
|
+
cash_restrictions == o.cash_restrictions
|
186
221
|
end
|
187
222
|
|
188
223
|
# @see the `==` method
|
@@ -194,7 +229,7 @@ module SnapTrade
|
|
194
229
|
# Calculates hash code according to all attributes.
|
195
230
|
# @return [Integer] Hash code
|
196
231
|
def hash
|
197
|
-
[id, brokerage_authorization,
|
232
|
+
[id, brokerage_authorization, name, number, institution_name, created_date, sync_status, balance, meta, portfolio_group, cash_restrictions].hash
|
198
233
|
end
|
199
234
|
|
200
235
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
data/spec/models/account_spec.rb
CHANGED
@@ -32,55 +32,55 @@ describe SnapTrade::Account do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
describe 'test attribute "
|
35
|
+
describe 'test attribute "name"' do
|
36
36
|
it 'should work' do
|
37
37
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
describe 'test attribute "
|
41
|
+
describe 'test attribute "number"' do
|
42
42
|
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
describe 'test attribute "
|
47
|
+
describe 'test attribute "institution_name"' do
|
48
48
|
it 'should work' do
|
49
49
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
describe 'test attribute "
|
53
|
+
describe 'test attribute "created_date"' do
|
54
54
|
it 'should work' do
|
55
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
describe 'test attribute "
|
59
|
+
describe 'test attribute "sync_status"' do
|
60
60
|
it 'should work' do
|
61
61
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
describe 'test attribute "
|
65
|
+
describe 'test attribute "balance"' do
|
66
66
|
it 'should work' do
|
67
67
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
describe 'test attribute "
|
71
|
+
describe 'test attribute "meta"' do
|
72
72
|
it 'should work' do
|
73
73
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
-
describe 'test attribute "
|
77
|
+
describe 'test attribute "portfolio_group"' do
|
78
78
|
it 'should work' do
|
79
79
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
-
describe 'test attribute "
|
83
|
+
describe 'test attribute "cash_restrictions"' do
|
84
84
|
it 'should work' do
|
85
85
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
86
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snaptrade
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.46
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|