snaptrade 2.0.10 → 2.0.11
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_holdings_account.rb +13 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/models/account_holdings_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: 2bfbd727c7a26875a01440c29a79f5bda33a674cd414dbc629e08fe154a05ba4
|
4
|
+
data.tar.gz: e66bdf08d806e98a23771c8bf535284d6a9272aabec2b45efaa5c7b7379b0873
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdfcb22e02ba35317fe08de340b986733de2d386f49589090a3505b3ff218f23dd5bc13b84109f75e27ac8a9abc5971d3eda25b0c27406fd6b8dd6759ef98351
|
7
|
+
data.tar.gz: 87af6400f2d03b7d25a3c0d13dd9b7ef76b88f65205757a0ebe5c83ed4ddfc777d13dd9aab39374d96750bc189ba89a5b00c4f8caf537a12f91b0425eb09c002
|
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.11-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.11)
|
10
10
|
[![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
|
11
11
|
|
12
12
|
</div>
|
@@ -71,7 +71,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
71
71
|
Add to Gemfile:
|
72
72
|
|
73
73
|
```ruby
|
74
|
-
gem 'snaptrade', '~> 2.0.
|
74
|
+
gem 'snaptrade', '~> 2.0.11'
|
75
75
|
```
|
76
76
|
|
77
77
|
## Getting Started<a id="getting-started"></a>
|
@@ -19,6 +19,8 @@ module SnapTrade
|
|
19
19
|
|
20
20
|
attr_accessor :positions
|
21
21
|
|
22
|
+
attr_accessor :option_postions
|
23
|
+
|
22
24
|
attr_accessor :orders
|
23
25
|
|
24
26
|
attr_accessor :total_value
|
@@ -29,6 +31,7 @@ module SnapTrade
|
|
29
31
|
:'account' => :'account',
|
30
32
|
:'balances' => :'balances',
|
31
33
|
:'positions' => :'positions',
|
34
|
+
:'option_postions' => :'option_postions',
|
32
35
|
:'orders' => :'orders',
|
33
36
|
:'total_value' => :'total_value'
|
34
37
|
}
|
@@ -45,6 +48,7 @@ module SnapTrade
|
|
45
48
|
:'account' => :'SnapTradeHoldingsAccountAccountId',
|
46
49
|
:'balances' => :'Array<Balance>',
|
47
50
|
:'positions' => :'Array<Position>',
|
51
|
+
:'option_postions' => :'Array<OptionsPosition>',
|
48
52
|
:'orders' => :'Array<AccountOrderRecord>',
|
49
53
|
:'total_value' => :'SnapTradeHoldingsTotalValue'
|
50
54
|
}
|
@@ -55,6 +59,7 @@ module SnapTrade
|
|
55
59
|
Set.new([
|
56
60
|
:'balances',
|
57
61
|
:'positions',
|
62
|
+
:'option_postions',
|
58
63
|
:'orders',
|
59
64
|
])
|
60
65
|
end
|
@@ -90,6 +95,12 @@ module SnapTrade
|
|
90
95
|
end
|
91
96
|
end
|
92
97
|
|
98
|
+
if attributes.key?(:'option_postions')
|
99
|
+
if (value = attributes[:'option_postions']).is_a?(Array)
|
100
|
+
self.option_postions = value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
93
104
|
if attributes.key?(:'orders')
|
94
105
|
if (value = attributes[:'orders']).is_a?(Array)
|
95
106
|
self.orders = value
|
@@ -122,6 +133,7 @@ module SnapTrade
|
|
122
133
|
account == o.account &&
|
123
134
|
balances == o.balances &&
|
124
135
|
positions == o.positions &&
|
136
|
+
option_postions == o.option_postions &&
|
125
137
|
orders == o.orders &&
|
126
138
|
total_value == o.total_value
|
127
139
|
end
|
@@ -135,7 +147,7 @@ module SnapTrade
|
|
135
147
|
# Calculates hash code according to all attributes.
|
136
148
|
# @return [Integer] Hash code
|
137
149
|
def hash
|
138
|
-
[account, balances, positions, orders, total_value].hash
|
150
|
+
[account, balances, positions, option_postions, orders, total_value].hash
|
139
151
|
end
|
140
152
|
|
141
153
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
@@ -38,6 +38,12 @@ describe SnapTrade::AccountHoldingsAccount do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
describe 'test attribute "option_postions"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
41
47
|
describe 'test attribute "orders"' do
|
42
48
|
it 'should work' do
|
43
49
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
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.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|