snaptrade 1.14.0 → 1.15.0
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 +3 -3
- data/docs/AuthenticationApi.md +2 -2
- data/docs/Brokerage.md +1 -1
- data/docs/ConnectionsApi.md +10 -10
- data/docs/LoginRedirectURI.md +1 -1
- data/docs/ModelPortfolio.md +1 -1
- data/docs/OptionsPosition.md +1 -3
- data/docs/Position.md +1 -3
- data/docs/SnapTradeLoginUserRequestBody.md +1 -1
- data/docs/UniversalActivity.md +1 -1
- data/docs/UserSettings.md +1 -1
- data/lib/snaptrade/api/connections_api.rb +8 -8
- data/lib/snaptrade/models/options_position.rb +5 -16
- data/lib/snaptrade/models/position.rb +5 -16
- data/lib/snaptrade/models/user_settings.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/connections_api_spec.rb +2 -2
- data/spec/models/options_position_spec.rb +0 -6
- data/spec/models/position_spec.rb +0 -6
- 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: ee5bb7dcd483b7d6146c4f38ceecaeca2e91a84f25b963c96377f176a1a1393b
|
|
4
|
+
data.tar.gz: 9f3e145e8c2fff39506177a6fa00c46ebf263e7f7146dfce78be652db7a3a0e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 976c0c9a2d97b4ee2171b8246a475b72f9886dd96faf722ca13d491ef9911deef537169f59462908526306f5918a72bbbafdd2bd85c177bbe7e5188830688421
|
|
7
|
+
data.tar.gz: 9ba4c8a7e0ff1068fa7ef828388c34d7d1f619e901693555732e7f22336acef302ebd01555907859c7c264d0c61d72ad862d61703c7ac13af3a3ab28f8839289
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -9,7 +9,7 @@ For more information, please visit [https://snaptrade.com/](https://snaptrade.co
|
|
|
9
9
|
Add to Gemfile:
|
|
10
10
|
|
|
11
11
|
```ruby
|
|
12
|
-
gem 'snaptrade', '~> 1.
|
|
12
|
+
gem 'snaptrade', '~> 1.15.0'
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Getting Started
|
|
@@ -57,9 +57,9 @@ Class | Method | HTTP request | Description
|
|
|
57
57
|
*SnapTrade::AuthenticationApi* | [**list_snap_trade_users**](docs/AuthenticationApi.md#list_snap_trade_users) | **GET** /snapTrade/listUsers | List SnapTrade users
|
|
58
58
|
*SnapTrade::AuthenticationApi* | [**login_snap_trade_user**](docs/AuthenticationApi.md#login_snap_trade_user) | **POST** /snapTrade/login | Login user & generate connection link
|
|
59
59
|
*SnapTrade::AuthenticationApi* | [**register_snap_trade_user**](docs/AuthenticationApi.md#register_snap_trade_user) | **POST** /snapTrade/registerUser | Create SnapTrade user
|
|
60
|
-
*SnapTrade::ConnectionsApi* | [**detail_brokerage_authorization**](docs/ConnectionsApi.md#detail_brokerage_authorization) | **GET** /authorizations/{authorizationId} | Get
|
|
60
|
+
*SnapTrade::ConnectionsApi* | [**detail_brokerage_authorization**](docs/ConnectionsApi.md#detail_brokerage_authorization) | **GET** /authorizations/{authorizationId} | Get brokerage authorization details
|
|
61
61
|
*SnapTrade::ConnectionsApi* | [**list_brokerage_authorizations**](docs/ConnectionsApi.md#list_brokerage_authorizations) | **GET** /authorizations | List all brokerage authorizations for the user
|
|
62
|
-
*SnapTrade::ConnectionsApi* | [**remove_brokerage_authorization**](docs/ConnectionsApi.md#remove_brokerage_authorization) | **DELETE** /authorizations/{authorizationId} |
|
|
62
|
+
*SnapTrade::ConnectionsApi* | [**remove_brokerage_authorization**](docs/ConnectionsApi.md#remove_brokerage_authorization) | **DELETE** /authorizations/{authorizationId} | Delete brokerage authorization
|
|
63
63
|
*SnapTrade::ConnectionsApi* | [**session_events**](docs/ConnectionsApi.md#session_events) | **GET** /sessionEvents | List all session events for the partner
|
|
64
64
|
*SnapTrade::ErrorLogsApi* | [**list_user_errors**](docs/ErrorLogsApi.md#list_user_errors) | **GET** /snapTrade/listUserErrors | Retrieve error logs on behalf of your SnapTrade users
|
|
65
65
|
*SnapTrade::OptionsApi* | [**get_option_strategy**](docs/OptionsApi.md#get_option_strategy) | **POST** /accounts/{accountId}/optionStrategy | Creates an option strategy object that will be used to place an option strategy order
|
data/docs/AuthenticationApi.md
CHANGED
|
@@ -188,7 +188,7 @@ user_id = "John.doe@snaptrade.com"
|
|
|
188
188
|
user_secret = "USERSECRET123"
|
|
189
189
|
broker = "ALPACA"
|
|
190
190
|
immediate_redirect = True
|
|
191
|
-
custom_redirect = "https://
|
|
191
|
+
custom_redirect = "https://snaptrade.com"
|
|
192
192
|
reconnect = "8b5f262d-4bb9-365d-888a-202bd3b15fa1"
|
|
193
193
|
connection_type = "read"
|
|
194
194
|
|
|
@@ -218,7 +218,7 @@ user_id = "John.doe@snaptrade.com"
|
|
|
218
218
|
user_secret = "USERSECRET123"
|
|
219
219
|
broker = "ALPACA"
|
|
220
220
|
immediate_redirect = True
|
|
221
|
-
custom_redirect = "https://
|
|
221
|
+
custom_redirect = "https://snaptrade.com"
|
|
222
222
|
reconnect = "8b5f262d-4bb9-365d-888a-202bd3b15fa1"
|
|
223
223
|
connection_type = "read"
|
|
224
224
|
|
data/docs/Brokerage.md
CHANGED
|
@@ -33,7 +33,7 @@ instance = SnapTrade::Brokerage.new(
|
|
|
33
33
|
name: Questrade,
|
|
34
34
|
display_name: Questrade,
|
|
35
35
|
description: Questrade is an online brokerage firm and wealth management firm based in Canada. It is Canada's largest discount broker.,
|
|
36
|
-
aws_s3_logo_url: https://www.
|
|
36
|
+
aws_s3_logo_url: https://www.snaptrade.com/questrade.logo,
|
|
37
37
|
slug: QUESTRADE,
|
|
38
38
|
url: https://www.questrade.com/,
|
|
39
39
|
enabled: true,
|
data/docs/ConnectionsApi.md
CHANGED
|
@@ -4,14 +4,14 @@ All URIs are relative to *https://api.snaptrade.com/api/v1*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
-
| [**detail_brokerage_authorization**](ConnectionsApi.md#detail_brokerage_authorization) | **GET** /authorizations/{authorizationId} | Get
|
|
7
|
+
| [**detail_brokerage_authorization**](ConnectionsApi.md#detail_brokerage_authorization) | **GET** /authorizations/{authorizationId} | Get brokerage authorization details |
|
|
8
8
|
| [**list_brokerage_authorizations**](ConnectionsApi.md#list_brokerage_authorizations) | **GET** /authorizations | List all brokerage authorizations for the user |
|
|
9
|
-
| [**remove_brokerage_authorization**](ConnectionsApi.md#remove_brokerage_authorization) | **DELETE** /authorizations/{authorizationId} |
|
|
9
|
+
| [**remove_brokerage_authorization**](ConnectionsApi.md#remove_brokerage_authorization) | **DELETE** /authorizations/{authorizationId} | Delete brokerage authorization |
|
|
10
10
|
| [**session_events**](ConnectionsApi.md#session_events) | **GET** /sessionEvents | List all session events for the partner |
|
|
11
11
|
|
|
12
12
|
## detail_brokerage_authorization
|
|
13
13
|
|
|
14
|
-
Get
|
|
14
|
+
Get brokerage authorization details
|
|
15
15
|
|
|
16
16
|
### Example
|
|
17
17
|
|
|
@@ -26,7 +26,7 @@ user_id = "John.doe@snaptrade.com"
|
|
|
26
26
|
user_secret = "USERSECRET123"
|
|
27
27
|
|
|
28
28
|
begin
|
|
29
|
-
# Get
|
|
29
|
+
# Get brokerage authorization details
|
|
30
30
|
result = SnapTrade::Connections.detail_brokerage_authorization(
|
|
31
31
|
authorization_id: authorization_id,
|
|
32
32
|
user_id: user_id,
|
|
@@ -48,7 +48,7 @@ user_id = "John.doe@snaptrade.com"
|
|
|
48
48
|
user_secret = "USERSECRET123"
|
|
49
49
|
|
|
50
50
|
begin
|
|
51
|
-
# Get
|
|
51
|
+
# Get brokerage authorization details
|
|
52
52
|
data, status_code, headers, response = SnapTrade::Connections.detail_brokerage_authorization_with_http_info(
|
|
53
53
|
authorization_id: authorization_id,
|
|
54
54
|
user_id: user_id,
|
|
@@ -136,7 +136,7 @@ end
|
|
|
136
136
|
|
|
137
137
|
## remove_brokerage_authorization
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
Delete brokerage authorization
|
|
140
140
|
|
|
141
141
|
### Example
|
|
142
142
|
|
|
@@ -151,7 +151,7 @@ user_id = "John.doe@snaptrade.com"
|
|
|
151
151
|
user_secret = "USERSECRET123"
|
|
152
152
|
|
|
153
153
|
begin
|
|
154
|
-
#
|
|
154
|
+
# Delete brokerage authorization
|
|
155
155
|
SnapTrade::Connections.remove_brokerage_authorization(
|
|
156
156
|
authorization_id: authorization_id,
|
|
157
157
|
user_id: user_id,
|
|
@@ -172,7 +172,7 @@ user_id = "John.doe@snaptrade.com"
|
|
|
172
172
|
user_secret = "USERSECRET123"
|
|
173
173
|
|
|
174
174
|
begin
|
|
175
|
-
#
|
|
175
|
+
# Delete brokerage authorization
|
|
176
176
|
data, status_code, headers, response = SnapTrade::Connections.remove_brokerage_authorization_with_http_info(
|
|
177
177
|
authorization_id: authorization_id,
|
|
178
178
|
user_id: user_id,
|
|
@@ -210,7 +210,7 @@ require 'snaptrade'
|
|
|
210
210
|
SnapTrade.client_id = "YOUR_CLIENT_ID"
|
|
211
211
|
SnapTrade.consumer_key = "YOUR_CONSUMER_KEY"
|
|
212
212
|
|
|
213
|
-
partner_client_id = "
|
|
213
|
+
partner_client_id = "SNAPTRADETEST"
|
|
214
214
|
user_id = "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2"
|
|
215
215
|
session_id = "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2"
|
|
216
216
|
|
|
@@ -232,7 +232,7 @@ end
|
|
|
232
232
|
This returns an Array which contains the response data, status code and headers.
|
|
233
233
|
|
|
234
234
|
```ruby
|
|
235
|
-
partner_client_id = "
|
|
235
|
+
partner_client_id = "SNAPTRADETEST"
|
|
236
236
|
user_id = "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2"
|
|
237
237
|
session_id = "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2"
|
|
238
238
|
|
data/docs/LoginRedirectURI.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
require 'snaptrade'
|
|
14
14
|
|
|
15
15
|
instance = SnapTrade::LoginRedirectURI.new(
|
|
16
|
-
redirect_uri: https://app.
|
|
16
|
+
redirect_uri: https://app.snaptrade.com/snapTrade/redeemToken?token=this$token1does2ntactu4allyexist==&clientId=example,
|
|
17
17
|
session_id: null
|
|
18
18
|
)
|
|
19
19
|
```
|
data/docs/ModelPortfolio.md
CHANGED
data/docs/OptionsPosition.md
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
| **average_purchase_price** | **Float** | Average purchase price for this position | [optional] |
|
|
12
12
|
| **open_pnl** | **Float** | | [optional] |
|
|
13
13
|
| **fractional_units** | **Float** | Deprecated, use the units field for both fractional and integer units going forward | [optional] |
|
|
14
|
-
| **book_price** | **Float** | The book price of the asset | [optional] |
|
|
15
14
|
|
|
16
15
|
## Example
|
|
17
16
|
|
|
@@ -25,8 +24,7 @@ instance = SnapTrade::OptionsPosition.new(
|
|
|
25
24
|
currency: null,
|
|
26
25
|
average_purchase_price: 108.3353,
|
|
27
26
|
open_pnl: 0.44,
|
|
28
|
-
fractional_units: 1.44
|
|
29
|
-
book_price: 5
|
|
27
|
+
fractional_units: 1.44
|
|
30
28
|
)
|
|
31
29
|
```
|
|
32
30
|
|
data/docs/Position.md
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
| **open_pnl** | **Float** | | [optional] |
|
|
11
11
|
| **fractional_units** | **Float** | Deprecated, use the units field for both fractional and integer units going forward | [optional] |
|
|
12
12
|
| **average_purchase_price** | **Float** | Average purchase price for this position. Either returned by the underlying broker or calculated using historical transactions. | [optional] |
|
|
13
|
-
| **book_price** | **Float** | The book price of the asset | [optional] |
|
|
14
13
|
|
|
15
14
|
## Example
|
|
16
15
|
|
|
@@ -23,8 +22,7 @@ instance = SnapTrade::Position.new(
|
|
|
23
22
|
price: 113.15,
|
|
24
23
|
open_pnl: 0.44,
|
|
25
24
|
fractional_units: 1.44,
|
|
26
|
-
average_purchase_price: 108.3353
|
|
27
|
-
book_price: 5
|
|
25
|
+
average_purchase_price: 108.3353
|
|
28
26
|
)
|
|
29
27
|
```
|
|
30
28
|
|
|
@@ -18,7 +18,7 @@ require 'snaptrade'
|
|
|
18
18
|
instance = SnapTrade::SnapTradeLoginUserRequestBody.new(
|
|
19
19
|
broker: ALPACA,
|
|
20
20
|
immediate_redirect: true,
|
|
21
|
-
custom_redirect: https://
|
|
21
|
+
custom_redirect: https://snaptrade.com,
|
|
22
22
|
reconnect: 8b5f262d-4bb9-365d-888a-202bd3b15fa1,
|
|
23
23
|
connection_type: null
|
|
24
24
|
)
|
data/docs/UniversalActivity.md
CHANGED
|
@@ -33,7 +33,7 @@ instance = SnapTrade::UniversalActivity.new(
|
|
|
33
33
|
currency: null,
|
|
34
34
|
description: WALT DISNEY UNIT DIST ON 21 SHS REC 12/31/21 PAY 01/06/22,
|
|
35
35
|
fee: 0,
|
|
36
|
-
institution:
|
|
36
|
+
institution: SnapTrade Investr,
|
|
37
37
|
option_type: BUY_TO_OPEN,
|
|
38
38
|
price: 0.4,
|
|
39
39
|
settlement_date: 2022-01-06T05:00:00.000Z,
|
data/docs/UserSettings.md
CHANGED
|
@@ -18,7 +18,7 @@ module SnapTrade
|
|
|
18
18
|
@api_client = api_client
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
# Get
|
|
21
|
+
# Get brokerage authorization details
|
|
22
22
|
# @param authorization_id [String] The ID of a brokerage authorization object.
|
|
23
23
|
# @param user_id [String]
|
|
24
24
|
# @param user_secret [String]
|
|
@@ -29,7 +29,7 @@ module SnapTrade
|
|
|
29
29
|
data
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
# Get
|
|
32
|
+
# Get brokerage authorization details
|
|
33
33
|
# @param authorization_id [String] The ID of a brokerage authorization object.
|
|
34
34
|
# @param user_id [String]
|
|
35
35
|
# @param user_secret [String]
|
|
@@ -39,7 +39,7 @@ module SnapTrade
|
|
|
39
39
|
detail_brokerage_authorization_with_http_info_impl(authorization_id, user_id, user_secret, extra)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
# Get
|
|
42
|
+
# Get brokerage authorization details
|
|
43
43
|
# @param authorization_id [String] The ID of a brokerage authorization object.
|
|
44
44
|
# @param user_id [String]
|
|
45
45
|
# @param user_secret [String]
|
|
@@ -50,7 +50,7 @@ module SnapTrade
|
|
|
50
50
|
data
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
# Get
|
|
53
|
+
# Get brokerage authorization details
|
|
54
54
|
# @param authorization_id [String] The ID of a brokerage authorization object.
|
|
55
55
|
# @param user_id [String]
|
|
56
56
|
# @param user_secret [String]
|
|
@@ -204,7 +204,7 @@ module SnapTrade
|
|
|
204
204
|
end
|
|
205
205
|
|
|
206
206
|
|
|
207
|
-
#
|
|
207
|
+
# Delete brokerage authorization
|
|
208
208
|
# @param authorization_id [String] The ID of the Authorization to delete.
|
|
209
209
|
# @param user_id [String]
|
|
210
210
|
# @param user_secret [String]
|
|
@@ -215,7 +215,7 @@ module SnapTrade
|
|
|
215
215
|
nil
|
|
216
216
|
end
|
|
217
217
|
|
|
218
|
-
#
|
|
218
|
+
# Delete brokerage authorization
|
|
219
219
|
# @param authorization_id [String] The ID of the Authorization to delete.
|
|
220
220
|
# @param user_id [String]
|
|
221
221
|
# @param user_secret [String]
|
|
@@ -225,7 +225,7 @@ module SnapTrade
|
|
|
225
225
|
remove_brokerage_authorization_with_http_info_impl(authorization_id, user_id, user_secret, extra)
|
|
226
226
|
end
|
|
227
227
|
|
|
228
|
-
#
|
|
228
|
+
# Delete brokerage authorization
|
|
229
229
|
# @param authorization_id [String] The ID of the Authorization to delete.
|
|
230
230
|
# @param user_id [String]
|
|
231
231
|
# @param user_secret [String]
|
|
@@ -236,7 +236,7 @@ module SnapTrade
|
|
|
236
236
|
nil
|
|
237
237
|
end
|
|
238
238
|
|
|
239
|
-
#
|
|
239
|
+
# Delete brokerage authorization
|
|
240
240
|
# @param authorization_id [String] The ID of the Authorization to delete.
|
|
241
241
|
# @param user_id [String]
|
|
242
242
|
# @param user_secret [String]
|
|
@@ -31,9 +31,6 @@ module SnapTrade
|
|
|
31
31
|
# Deprecated, use the units field for both fractional and integer units going forward
|
|
32
32
|
attr_accessor :fractional_units
|
|
33
33
|
|
|
34
|
-
# The book price of the asset
|
|
35
|
-
attr_accessor :book_price
|
|
36
|
-
|
|
37
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
35
|
def self.attribute_map
|
|
39
36
|
{
|
|
@@ -43,8 +40,7 @@ module SnapTrade
|
|
|
43
40
|
:'currency' => :'currency',
|
|
44
41
|
:'average_purchase_price' => :'average_purchase_price',
|
|
45
42
|
:'open_pnl' => :'open_pnl',
|
|
46
|
-
:'fractional_units' => :'fractional_units'
|
|
47
|
-
:'book_price' => :'book_price'
|
|
43
|
+
:'fractional_units' => :'fractional_units'
|
|
48
44
|
}
|
|
49
45
|
end
|
|
50
46
|
|
|
@@ -62,8 +58,7 @@ module SnapTrade
|
|
|
62
58
|
:'currency' => :'OptionsPositionCurrency',
|
|
63
59
|
:'average_purchase_price' => :'Float',
|
|
64
60
|
:'open_pnl' => :'Float',
|
|
65
|
-
:'fractional_units' => :'Float'
|
|
66
|
-
:'book_price' => :'Float'
|
|
61
|
+
:'fractional_units' => :'Float'
|
|
67
62
|
}
|
|
68
63
|
end
|
|
69
64
|
|
|
@@ -74,8 +69,7 @@ module SnapTrade
|
|
|
74
69
|
:'currency',
|
|
75
70
|
:'average_purchase_price',
|
|
76
71
|
:'open_pnl',
|
|
77
|
-
:'fractional_units'
|
|
78
|
-
:'book_price'
|
|
72
|
+
:'fractional_units'
|
|
79
73
|
])
|
|
80
74
|
end
|
|
81
75
|
|
|
@@ -121,10 +115,6 @@ module SnapTrade
|
|
|
121
115
|
if attributes.key?(:'fractional_units')
|
|
122
116
|
self.fractional_units = attributes[:'fractional_units']
|
|
123
117
|
end
|
|
124
|
-
|
|
125
|
-
if attributes.key?(:'book_price')
|
|
126
|
-
self.book_price = attributes[:'book_price']
|
|
127
|
-
end
|
|
128
118
|
end
|
|
129
119
|
|
|
130
120
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -151,8 +141,7 @@ module SnapTrade
|
|
|
151
141
|
currency == o.currency &&
|
|
152
142
|
average_purchase_price == o.average_purchase_price &&
|
|
153
143
|
open_pnl == o.open_pnl &&
|
|
154
|
-
fractional_units == o.fractional_units
|
|
155
|
-
book_price == o.book_price
|
|
144
|
+
fractional_units == o.fractional_units
|
|
156
145
|
end
|
|
157
146
|
|
|
158
147
|
# @see the `==` method
|
|
@@ -164,7 +153,7 @@ module SnapTrade
|
|
|
164
153
|
# Calculates hash code according to all attributes.
|
|
165
154
|
# @return [Integer] Hash code
|
|
166
155
|
def hash
|
|
167
|
-
[symbol, price, units, currency, average_purchase_price, open_pnl, fractional_units
|
|
156
|
+
[symbol, price, units, currency, average_purchase_price, open_pnl, fractional_units].hash
|
|
168
157
|
end
|
|
169
158
|
|
|
170
159
|
# Builds the object from hash
|
|
@@ -29,9 +29,6 @@ module SnapTrade
|
|
|
29
29
|
# Average purchase price for this position. Either returned by the underlying broker or calculated using historical transactions.
|
|
30
30
|
attr_accessor :average_purchase_price
|
|
31
31
|
|
|
32
|
-
# The book price of the asset
|
|
33
|
-
attr_accessor :book_price
|
|
34
|
-
|
|
35
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
33
|
def self.attribute_map
|
|
37
34
|
{
|
|
@@ -40,8 +37,7 @@ module SnapTrade
|
|
|
40
37
|
:'price' => :'price',
|
|
41
38
|
:'open_pnl' => :'open_pnl',
|
|
42
39
|
:'fractional_units' => :'fractional_units',
|
|
43
|
-
:'average_purchase_price' => :'average_purchase_price'
|
|
44
|
-
:'book_price' => :'book_price'
|
|
40
|
+
:'average_purchase_price' => :'average_purchase_price'
|
|
45
41
|
}
|
|
46
42
|
end
|
|
47
43
|
|
|
@@ -58,8 +54,7 @@ module SnapTrade
|
|
|
58
54
|
:'price' => :'Float',
|
|
59
55
|
:'open_pnl' => :'Float',
|
|
60
56
|
:'fractional_units' => :'Float',
|
|
61
|
-
:'average_purchase_price' => :'Float'
|
|
62
|
-
:'book_price' => :'Float'
|
|
57
|
+
:'average_purchase_price' => :'Float'
|
|
63
58
|
}
|
|
64
59
|
end
|
|
65
60
|
|
|
@@ -70,8 +65,7 @@ module SnapTrade
|
|
|
70
65
|
:'price',
|
|
71
66
|
:'open_pnl',
|
|
72
67
|
:'fractional_units',
|
|
73
|
-
:'average_purchase_price'
|
|
74
|
-
:'book_price'
|
|
68
|
+
:'average_purchase_price'
|
|
75
69
|
])
|
|
76
70
|
end
|
|
77
71
|
|
|
@@ -113,10 +107,6 @@ module SnapTrade
|
|
|
113
107
|
if attributes.key?(:'average_purchase_price')
|
|
114
108
|
self.average_purchase_price = attributes[:'average_purchase_price']
|
|
115
109
|
end
|
|
116
|
-
|
|
117
|
-
if attributes.key?(:'book_price')
|
|
118
|
-
self.book_price = attributes[:'book_price']
|
|
119
|
-
end
|
|
120
110
|
end
|
|
121
111
|
|
|
122
112
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -142,8 +132,7 @@ module SnapTrade
|
|
|
142
132
|
price == o.price &&
|
|
143
133
|
open_pnl == o.open_pnl &&
|
|
144
134
|
fractional_units == o.fractional_units &&
|
|
145
|
-
average_purchase_price == o.average_purchase_price
|
|
146
|
-
book_price == o.book_price
|
|
135
|
+
average_purchase_price == o.average_purchase_price
|
|
147
136
|
end
|
|
148
137
|
|
|
149
138
|
# @see the `==` method
|
|
@@ -155,7 +144,7 @@ module SnapTrade
|
|
|
155
144
|
# Calculates hash code according to all attributes.
|
|
156
145
|
# @return [Integer] Hash code
|
|
157
146
|
def hash
|
|
158
|
-
[symbol, units, price, open_pnl, fractional_units, average_purchase_price
|
|
147
|
+
[symbol, units, price, open_pnl, fractional_units, average_purchase_price].hash
|
|
159
148
|
end
|
|
160
149
|
|
|
161
150
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
|
@@ -29,7 +29,7 @@ describe 'ConnectionsApi' do
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# unit tests for detail_brokerage_authorization
|
|
32
|
-
# Get
|
|
32
|
+
# Get brokerage authorization details
|
|
33
33
|
# @param authorization_id The ID of a brokerage authorization object.
|
|
34
34
|
# @param user_id
|
|
35
35
|
# @param user_secret
|
|
@@ -54,7 +54,7 @@ describe 'ConnectionsApi' do
|
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
# unit tests for remove_brokerage_authorization
|
|
57
|
-
#
|
|
57
|
+
# Delete brokerage authorization
|
|
58
58
|
# @param authorization_id The ID of the Authorization to delete.
|
|
59
59
|
# @param user_id
|
|
60
60
|
# @param user_secret
|
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.15.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-08-
|
|
11
|
+
date: 2023-08-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|