snaptrade 1.2.0 → 1.4.0
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 +1 -1
- data/docs/ManualTrade.md +2 -2
- data/docs/MonthlyDividends.md +1 -1
- data/docs/NetContributions.md +1 -1
- data/docs/PastValue.md +1 -1
- data/docs/SubPeriodReturnRate.md +2 -2
- data/docs/TransactionsStatus.md +1 -1
- data/docs/UniversalActivity.md +2 -0
- data/lib/snaptrade/models/manual_trade.rb +1 -1
- data/lib/snaptrade/models/universal_activity.rb +12 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/models/universal_activity_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: 8dd0bfaa14bf0c6966ef2f18d57aecdbaa3d8d4157060dd80c5f747d51cbfd71
|
4
|
+
data.tar.gz: a5296ae0d5da64682f7aee91c1eb1923471cad30ab794edad60e93b960c236f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c029bdde10bbe5223e2bf0c9f6f8147471dc2fd4c69f01e2bb2f3298ace09f6f31dddd79eb33f83c6b5daa78ca48d6024075c3ddf3f0c48a126952dc5832082
|
7
|
+
data.tar.gz: e96fedd2b6a7aafeaa590550481d6f4dbeb2810e73624690616bca2f00913722e709084a473ce22825fc44a1b63aab069c0f2f5330074e07f1f3e2b204db3ec1
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/docs/ManualTrade.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **id** | **String** | | [optional] |
|
8
|
-
| **account** |
|
8
|
+
| **account** | **String** | | [optional] |
|
9
9
|
| **order_type** | [**OrderType**](OrderType.md) | | [optional] |
|
10
10
|
| **time_in_force** | [**TimeInForce**](TimeInForce.md) | | [optional] |
|
11
11
|
| **symbol** | [**ManualTradeSymbol**](ManualTradeSymbol.md) | | [optional] |
|
@@ -20,7 +20,7 @@ require 'snaptrade'
|
|
20
20
|
|
21
21
|
instance = SnapTrade::ManualTrade.new(
|
22
22
|
id: 2bcd7cc3-e922-4976-bce1-9858296801c3,
|
23
|
-
account:
|
23
|
+
account: 2bcd7cc3-e922-4976-bce1-9855556801c3,
|
24
24
|
order_type: null,
|
25
25
|
time_in_force: null,
|
26
26
|
symbol: null,
|
data/docs/MonthlyDividends.md
CHANGED
data/docs/NetContributions.md
CHANGED
data/docs/PastValue.md
CHANGED
data/docs/SubPeriodReturnRate.md
CHANGED
@@ -14,8 +14,8 @@
|
|
14
14
|
require 'snaptrade'
|
15
15
|
|
16
16
|
instance = SnapTrade::SubPeriodReturnRate.new(
|
17
|
-
period_start: Sun Jan 23
|
18
|
-
period_end: Sun Jan 23
|
17
|
+
period_start: Sun Jan 23 17:00:00 MST 2022,
|
18
|
+
period_end: Sun Jan 23 17:00:00 MST 2022,
|
19
19
|
rate_of_return: 0.012312367452
|
20
20
|
)
|
21
21
|
```
|
data/docs/TransactionsStatus.md
CHANGED
data/docs/UniversalActivity.md
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
| **option_type** | **String** | If an option transaction, then it's type (BUY_TO_OPEN, SELL_TO_CLOSE, etc), otherwise empty string | [optional] |
|
15
15
|
| **price** | **Float** | | [optional] |
|
16
16
|
| **settlement_date** | **String** | | [optional] |
|
17
|
+
| **external_reference_id** | **String** | Reference ID from brokerage used to identify related transactions. For example if an order comprises of several transactions (buy, fee, fx), they can be grouped if they share the same external_reference_id | [optional] |
|
17
18
|
| **symbol** | [**Symbol**](Symbol.md) | | [optional] |
|
18
19
|
| **option_symbol** | [**OptionsSymbol**](OptionsSymbol.md) | | [optional] |
|
19
20
|
| **trade_date** | **String** | | [optional] |
|
@@ -36,6 +37,7 @@ instance = SnapTrade::UniversalActivity.new(
|
|
36
37
|
option_type: BUY_TO_OPEN,
|
37
38
|
price: 0.4,
|
38
39
|
settlement_date: 2022-01-06T05:00:00.000Z,
|
40
|
+
external_reference_id: 2f7dc9b3-5c33-4668-3440-2b31e056ebe6,
|
39
41
|
symbol: null,
|
40
42
|
option_symbol: null,
|
41
43
|
trade_date: 2022-01-06T05:00:00.000Z,
|
@@ -35,6 +35,9 @@ module SnapTrade
|
|
35
35
|
|
36
36
|
attr_accessor :settlement_date
|
37
37
|
|
38
|
+
# Reference ID from brokerage used to identify related transactions. For example if an order comprises of several transactions (buy, fee, fx), they can be grouped if they share the same external_reference_id
|
39
|
+
attr_accessor :external_reference_id
|
40
|
+
|
38
41
|
attr_accessor :symbol
|
39
42
|
|
40
43
|
attr_accessor :option_symbol
|
@@ -60,6 +63,7 @@ module SnapTrade
|
|
60
63
|
:'option_type' => :'option_type',
|
61
64
|
:'price' => :'price',
|
62
65
|
:'settlement_date' => :'settlement_date',
|
66
|
+
:'external_reference_id' => :'external_reference_id',
|
63
67
|
:'symbol' => :'symbol',
|
64
68
|
:'option_symbol' => :'option_symbol',
|
65
69
|
:'trade_date' => :'trade_date',
|
@@ -86,6 +90,7 @@ module SnapTrade
|
|
86
90
|
:'option_type' => :'String',
|
87
91
|
:'price' => :'Float',
|
88
92
|
:'settlement_date' => :'String',
|
93
|
+
:'external_reference_id' => :'String',
|
89
94
|
:'symbol' => :'Symbol',
|
90
95
|
:'option_symbol' => :'OptionsSymbol',
|
91
96
|
:'trade_date' => :'String',
|
@@ -98,6 +103,7 @@ module SnapTrade
|
|
98
103
|
def self.openapi_nullable
|
99
104
|
Set.new([
|
100
105
|
:'amount',
|
106
|
+
:'external_reference_id',
|
101
107
|
:'trade_date',
|
102
108
|
])
|
103
109
|
end
|
@@ -157,6 +163,10 @@ module SnapTrade
|
|
157
163
|
self.settlement_date = attributes[:'settlement_date']
|
158
164
|
end
|
159
165
|
|
166
|
+
if attributes.key?(:'external_reference_id')
|
167
|
+
self.external_reference_id = attributes[:'external_reference_id']
|
168
|
+
end
|
169
|
+
|
160
170
|
if attributes.key?(:'symbol')
|
161
171
|
self.symbol = attributes[:'symbol']
|
162
172
|
end
|
@@ -206,6 +216,7 @@ module SnapTrade
|
|
206
216
|
option_type == o.option_type &&
|
207
217
|
price == o.price &&
|
208
218
|
settlement_date == o.settlement_date &&
|
219
|
+
external_reference_id == o.external_reference_id &&
|
209
220
|
symbol == o.symbol &&
|
210
221
|
option_symbol == o.option_symbol &&
|
211
222
|
trade_date == o.trade_date &&
|
@@ -222,7 +233,7 @@ module SnapTrade
|
|
222
233
|
# Calculates hash code according to all attributes.
|
223
234
|
# @return [Integer] Hash code
|
224
235
|
def hash
|
225
|
-
[id, account, amount, currency, description, fee, institution, option_type, price, settlement_date, symbol, option_symbol, trade_date, type, units].hash
|
236
|
+
[id, account, amount, currency, description, fee, institution, option_type, price, settlement_date, external_reference_id, symbol, option_symbol, trade_date, type, units].hash
|
226
237
|
end
|
227
238
|
|
228
239
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
@@ -81,6 +81,12 @@ describe SnapTrade::UniversalActivity do
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
+
describe 'test attribute "external_reference_id"' do
|
85
|
+
it 'should work' do
|
86
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
84
90
|
describe 'test attribute "symbol"' do
|
85
91
|
it 'should work' do
|
86
92
|
# 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: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05
|
11
|
+
date: 2023-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|