snaptrade 2.0.148 → 2.0.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/snaptrade/models/account.rb +19 -4
- data/lib/snaptrade/version.rb +1 -1
- data/spec/models/account_spec.rb +6 -0
- 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: 4c2eea1a162f4063d976df226e31e41c00bee4a5fa86e75bcbfca5a831a804c1
|
|
4
|
+
data.tar.gz: 45ea7534078adfae02de30ca2ba55bd340ac908ed8bae35e3af2d15b1d665f8e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1db47ebec287540676e4cc783f750c634a397837ecefe5c07f387fa663864ef65de9c6936ab285998ccaba43d7b7716ee1c44dc768a6978458e8afd6031f9da8
|
|
7
|
+
data.tar.gz: d092f5b7c228660a15f8fab4df9164cd93aa529687dbe5904c1f13fc53a1ed09303bec3c04b6128e24bd407ac8933940216c351436d44f534c34da596805b5e6
|
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
|
-
[](https://rubygems.org/gems/snaptrade/versions/2.0.149)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -83,7 +83,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
83
83
|
Add to Gemfile:
|
|
84
84
|
|
|
85
85
|
```ruby
|
|
86
|
-
gem 'snaptrade', '~> 2.0.
|
|
86
|
+
gem 'snaptrade', '~> 2.0.149'
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -50,6 +50,9 @@ module SnapTrade
|
|
|
50
50
|
# This field is deprecated.
|
|
51
51
|
attr_accessor :cash_restrictions
|
|
52
52
|
|
|
53
|
+
# Indicates whether the account is a paper (simulated) trading account.
|
|
54
|
+
attr_accessor :is_paper
|
|
55
|
+
|
|
53
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
57
|
def self.attribute_map
|
|
55
58
|
{
|
|
@@ -65,7 +68,8 @@ module SnapTrade
|
|
|
65
68
|
:'raw_type' => :'raw_type',
|
|
66
69
|
:'meta' => :'meta',
|
|
67
70
|
:'portfolio_group' => :'portfolio_group',
|
|
68
|
-
:'cash_restrictions' => :'cash_restrictions'
|
|
71
|
+
:'cash_restrictions' => :'cash_restrictions',
|
|
72
|
+
:'is_paper' => :'is_paper'
|
|
69
73
|
}
|
|
70
74
|
end
|
|
71
75
|
|
|
@@ -89,7 +93,8 @@ module SnapTrade
|
|
|
89
93
|
:'raw_type' => :'String',
|
|
90
94
|
:'meta' => :'Hash<String, Object>',
|
|
91
95
|
:'portfolio_group' => :'String',
|
|
92
|
-
:'cash_restrictions' => :'Array<String>'
|
|
96
|
+
:'cash_restrictions' => :'Array<String>',
|
|
97
|
+
:'is_paper' => :'Boolean'
|
|
93
98
|
}
|
|
94
99
|
end
|
|
95
100
|
|
|
@@ -172,6 +177,10 @@ module SnapTrade
|
|
|
172
177
|
self.cash_restrictions = value
|
|
173
178
|
end
|
|
174
179
|
end
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'is_paper')
|
|
182
|
+
self.is_paper = attributes[:'is_paper']
|
|
183
|
+
end
|
|
175
184
|
end
|
|
176
185
|
|
|
177
186
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -206,6 +215,10 @@ module SnapTrade
|
|
|
206
215
|
invalid_properties.push('invalid value for "balance", balance cannot be nil.')
|
|
207
216
|
end
|
|
208
217
|
|
|
218
|
+
if @is_paper.nil?
|
|
219
|
+
invalid_properties.push('invalid value for "is_paper", is_paper cannot be nil.')
|
|
220
|
+
end
|
|
221
|
+
|
|
209
222
|
invalid_properties
|
|
210
223
|
end
|
|
211
224
|
|
|
@@ -219,6 +232,7 @@ module SnapTrade
|
|
|
219
232
|
return false if @created_date.nil?
|
|
220
233
|
return false if @sync_status.nil?
|
|
221
234
|
return false if @balance.nil?
|
|
235
|
+
return false if @is_paper.nil?
|
|
222
236
|
true
|
|
223
237
|
end
|
|
224
238
|
|
|
@@ -239,7 +253,8 @@ module SnapTrade
|
|
|
239
253
|
raw_type == o.raw_type &&
|
|
240
254
|
meta == o.meta &&
|
|
241
255
|
portfolio_group == o.portfolio_group &&
|
|
242
|
-
cash_restrictions == o.cash_restrictions
|
|
256
|
+
cash_restrictions == o.cash_restrictions &&
|
|
257
|
+
is_paper == o.is_paper
|
|
243
258
|
end
|
|
244
259
|
|
|
245
260
|
# @see the `==` method
|
|
@@ -251,7 +266,7 @@ module SnapTrade
|
|
|
251
266
|
# Calculates hash code according to all attributes.
|
|
252
267
|
# @return [Integer] Hash code
|
|
253
268
|
def hash
|
|
254
|
-
[id, brokerage_authorization, name, number, institution_name, created_date, sync_status, balance, status, raw_type, meta, portfolio_group, cash_restrictions].hash
|
|
269
|
+
[id, brokerage_authorization, name, number, institution_name, created_date, sync_status, balance, status, raw_type, meta, portfolio_group, cash_restrictions, is_paper].hash
|
|
255
270
|
end
|
|
256
271
|
|
|
257
272
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
data/spec/models/account_spec.rb
CHANGED
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.149
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SnapTrade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|