snaptrade 2.0.12 → 2.0.13
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cc2507038827738383521f845dbd09159a69d60f2766b5484dc154d382e8b3b6
|
|
4
|
+
data.tar.gz: 7368b3b57fc67a3324201f3a93631bc01066ea05df3bb93ef32e041f82a12275
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9931aa4eeac1dd06189db61d6e0b386c793da02e15eab73f93741b0c9b840cde5da3eaceb816ab196c715edf62e5757c07ac08047238bd0046e8122e59f6be39
|
|
7
|
+
data.tar.gz: b5a236327938c1201c0d3bf56c5d96b84ae3549f729e9faa62b16570bde1d849d2abb8893deef7c8b6b7c0f0c561fbb7a78079d6ce852e0fbeb7bd45b7804169
|
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.13)
|
|
10
10
|
[](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.13'
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -19,7 +19,7 @@ module SnapTrade
|
|
|
19
19
|
|
|
20
20
|
attr_accessor :positions
|
|
21
21
|
|
|
22
|
-
attr_accessor :
|
|
22
|
+
attr_accessor :option_positions
|
|
23
23
|
|
|
24
24
|
attr_accessor :orders
|
|
25
25
|
|
|
@@ -31,7 +31,7 @@ module SnapTrade
|
|
|
31
31
|
:'account' => :'account',
|
|
32
32
|
:'balances' => :'balances',
|
|
33
33
|
:'positions' => :'positions',
|
|
34
|
-
:'
|
|
34
|
+
:'option_positions' => :'option_positions',
|
|
35
35
|
:'orders' => :'orders',
|
|
36
36
|
:'total_value' => :'total_value'
|
|
37
37
|
}
|
|
@@ -48,7 +48,7 @@ module SnapTrade
|
|
|
48
48
|
:'account' => :'SnapTradeHoldingsAccountAccountId',
|
|
49
49
|
:'balances' => :'Array<Balance>',
|
|
50
50
|
:'positions' => :'Array<Position>',
|
|
51
|
-
:'
|
|
51
|
+
:'option_positions' => :'Array<OptionsPosition>',
|
|
52
52
|
:'orders' => :'Array<AccountOrderRecord>',
|
|
53
53
|
:'total_value' => :'SnapTradeHoldingsTotalValue'
|
|
54
54
|
}
|
|
@@ -59,7 +59,7 @@ module SnapTrade
|
|
|
59
59
|
Set.new([
|
|
60
60
|
:'balances',
|
|
61
61
|
:'positions',
|
|
62
|
-
:'
|
|
62
|
+
:'option_positions',
|
|
63
63
|
:'orders',
|
|
64
64
|
])
|
|
65
65
|
end
|
|
@@ -95,9 +95,9 @@ module SnapTrade
|
|
|
95
95
|
end
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
-
if attributes.key?(:'
|
|
99
|
-
if (value = attributes[:'
|
|
100
|
-
self.
|
|
98
|
+
if attributes.key?(:'option_positions')
|
|
99
|
+
if (value = attributes[:'option_positions']).is_a?(Array)
|
|
100
|
+
self.option_positions = value
|
|
101
101
|
end
|
|
102
102
|
end
|
|
103
103
|
|
|
@@ -133,7 +133,7 @@ module SnapTrade
|
|
|
133
133
|
account == o.account &&
|
|
134
134
|
balances == o.balances &&
|
|
135
135
|
positions == o.positions &&
|
|
136
|
-
|
|
136
|
+
option_positions == o.option_positions &&
|
|
137
137
|
orders == o.orders &&
|
|
138
138
|
total_value == o.total_value
|
|
139
139
|
end
|
|
@@ -147,7 +147,7 @@ module SnapTrade
|
|
|
147
147
|
# Calculates hash code according to all attributes.
|
|
148
148
|
# @return [Integer] Hash code
|
|
149
149
|
def hash
|
|
150
|
-
[account, balances, positions,
|
|
150
|
+
[account, balances, positions, option_positions, orders, total_value].hash
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
# Builds the object from hash
|
|
@@ -56,7 +56,6 @@ module SnapTrade
|
|
|
56
56
|
# Time
|
|
57
57
|
attr_accessor :time_placed
|
|
58
58
|
|
|
59
|
-
# Time
|
|
60
59
|
attr_accessor :time_updated
|
|
61
60
|
|
|
62
61
|
# Time
|
|
@@ -125,6 +124,7 @@ module SnapTrade
|
|
|
125
124
|
:'execution_price',
|
|
126
125
|
:'limit_price',
|
|
127
126
|
:'stop_price',
|
|
127
|
+
:'time_updated',
|
|
128
128
|
])
|
|
129
129
|
end
|
|
130
130
|
|
data/lib/snaptrade/version.rb
CHANGED
|
@@ -38,7 +38,7 @@ describe SnapTrade::AccountHoldingsAccount do
|
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
describe 'test attribute "
|
|
41
|
+
describe 'test attribute "option_positions"' 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
|
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.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SnapTrade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-04-
|
|
11
|
+
date: 2024-04-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|