snaptrade 1.17.4 → 1.17.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ee1e44cc2bde366d7731faac581c68b517af3621461ab2a0953c9f2b0a4a6ec
4
- data.tar.gz: dd2db85f3b6c31d935d5ef6411025e7a8c4139bcbf0701603f51ff2a34074706
3
+ metadata.gz: a1819cd355ee52f0df86d45d381e9eb2c4fac4db67e1f387077217b6292a7ce4
4
+ data.tar.gz: 6098b1f89a59f9665eefbbc26cb13f697eb84b918ccdd82d49a11a5efd9270fa
5
5
  SHA512:
6
- metadata.gz: 2379e02876c21f12630d35108960f22b988f2c9d5eb13211f4811d5106eda52132a8bf168e529cbe1dcb0b8f8395b96c4a36a9b8b31a65b5ad8cd5453cc4eead
7
- data.tar.gz: 2eed9e6b4512eb372a4fa1c0d554ba4664b02d069404275393b88f6ee3956de4624a15541749d0f3fc4e76120bcf6953e8b97713cafe9632955db2c7f33f3494
6
+ metadata.gz: 66cca49a69c1157dfa9f6f0578cb1a6900e2f1e0b28e7918756c10fdfc4ec231d0ce637c31acf1d4e35e4cf40ed57444c95f4534cbee8a06250a9b0f731605ee
7
+ data.tar.gz: 77b5bf192f667d6613ecc530a3e06a9422d85a88f14ce728165bd352fc1f456caf3068aa0b5aec772f9d3fe1095b145e881eab0b0564ac7ffd2482b8b9a4488f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (1.17.3)
4
+ snaptrade (1.17.5)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
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.17.4'
12
+ gem 'snaptrade', '~> 1.17.5'
13
13
  ```
14
14
 
15
15
  ## Getting Started
@@ -46,7 +46,7 @@ Class | Method | HTTP request | Description
46
46
  *SnapTrade::AccountInformationApi* | [**get_all_user_holdings**](docs/AccountInformationApi.md#get_all_user_holdings) | **GET** /holdings | List all accounts for the user, plus balances, positions, and orders for each account.
47
47
  *SnapTrade::AccountInformationApi* | [**get_user_account_balance**](docs/AccountInformationApi.md#get_user_account_balance) | **GET** /accounts/{accountId}/balances | List account balances
48
48
  *SnapTrade::AccountInformationApi* | [**get_user_account_details**](docs/AccountInformationApi.md#get_user_account_details) | **GET** /accounts/{accountId} | Return details of a specific investment account
49
- *SnapTrade::AccountInformationApi* | [**get_user_account_orders**](docs/AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | Get history of orders placed in account
49
+ *SnapTrade::AccountInformationApi* | [**get_user_account_orders**](docs/AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | List account orders
50
50
  *SnapTrade::AccountInformationApi* | [**get_user_account_positions**](docs/AccountInformationApi.md#get_user_account_positions) | **GET** /accounts/{accountId}/positions | List account positions
51
51
  *SnapTrade::AccountInformationApi* | [**get_user_holdings**](docs/AccountInformationApi.md#get_user_holdings) | **GET** /accounts/{accountId}/holdings | List balances, positions and orders for the specified account
52
52
  *SnapTrade::AccountInformationApi* | [**list_user_accounts**](docs/AccountInformationApi.md#list_user_accounts) | **GET** /accounts | List accounts
@@ -7,7 +7,7 @@ All URIs are relative to *https://api.snaptrade.com/api/v1*
7
7
  | [**get_all_user_holdings**](AccountInformationApi.md#get_all_user_holdings) | **GET** /holdings | List all accounts for the user, plus balances, positions, and orders for each account. |
8
8
  | [**get_user_account_balance**](AccountInformationApi.md#get_user_account_balance) | **GET** /accounts/{accountId}/balances | List account balances |
9
9
  | [**get_user_account_details**](AccountInformationApi.md#get_user_account_details) | **GET** /accounts/{accountId} | Return details of a specific investment account |
10
- | [**get_user_account_orders**](AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | Get history of orders placed in account |
10
+ | [**get_user_account_orders**](AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | List account orders |
11
11
  | [**get_user_account_positions**](AccountInformationApi.md#get_user_account_positions) | **GET** /accounts/{accountId}/positions | List account positions |
12
12
  | [**get_user_holdings**](AccountInformationApi.md#get_user_holdings) | **GET** /accounts/{accountId}/holdings | List balances, positions and orders for the specified account |
13
13
  | [**list_user_accounts**](AccountInformationApi.md#list_user_accounts) | **GET** /accounts | List accounts |
@@ -212,7 +212,7 @@ end
212
212
 
213
213
  ## get_user_account_orders
214
214
 
215
- Get history of orders placed in account
215
+ List account orders
216
216
 
217
217
  Fetch all recent orders from a user's account.
218
218
 
@@ -228,14 +228,16 @@ user_id = "John.doe@snaptrade.com"
228
228
  user_secret = "USERSECRET123"
229
229
  account_id = "accountId_example"
230
230
  state = "all"
231
+ days = 30
231
232
 
232
233
  begin
233
- # Get history of orders placed in account
234
+ # List account orders
234
235
  result = SnapTrade::AccountInformation.get_user_account_orders(
235
236
  user_id: user_id,
236
237
  user_secret: user_secret,
237
238
  account_id: account_id,
238
239
  state: state,
240
+ days: days,
239
241
  )
240
242
  p result
241
243
  rescue SnapTrade::ApiError => e
@@ -252,14 +254,16 @@ user_id = "John.doe@snaptrade.com"
252
254
  user_secret = "USERSECRET123"
253
255
  account_id = "accountId_example"
254
256
  state = "all"
257
+ days = 30
255
258
 
256
259
  begin
257
- # Get history of orders placed in account
260
+ # List account orders
258
261
  data, status_code, headers, response = SnapTrade::AccountInformation.get_user_account_orders_with_http_info(
259
262
  user_id: user_id,
260
263
  user_secret: user_secret,
261
264
  account_id: account_id,
262
265
  state: state,
266
+ days: days,
263
267
  )
264
268
  p status_code # => 2xx
265
269
  p headers # => { ... }
@@ -277,6 +281,7 @@ end
277
281
  | **user_secret** | **String** | | |
278
282
  | **account_id** | **String** | The ID of the account to get orders. | |
279
283
  | **state** | **String** | defaults value is set to \&quot;all\&quot; | [optional] |
284
+ | **days** | **Integer** | Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in. | [optional] |
280
285
 
281
286
  ### Return type
282
287
 
@@ -306,51 +306,57 @@ module SnapTrade
306
306
  end
307
307
 
308
308
 
309
- # Get history of orders placed in account
309
+ # List account orders
310
310
  # Fetch all recent orders from a user's account.
311
311
  # @param user_id [String]
312
312
  # @param user_secret [String]
313
313
  # @param account_id [String] The ID of the account to get orders.
314
314
  # @param state [String] defaults value is set to \&quot;all\&quot;
315
+ # @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in.
315
316
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
316
- def get_user_account_orders(user_id:, user_secret:, account_id:, state: SENTINEL, extra: {})
317
+ def get_user_account_orders(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
317
318
  extra[:state] = state if state != SENTINEL
319
+ extra[:days] = days if days != SENTINEL
318
320
  data, _status_code, _headers = get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
319
321
  data
320
322
  end
321
323
 
322
- # Get history of orders placed in account
324
+ # List account orders
323
325
  # Fetch all recent orders from a user's account.
324
326
  # @param user_id [String]
325
327
  # @param user_secret [String]
326
328
  # @param account_id [String] The ID of the account to get orders.
327
329
  # @param state [String] defaults value is set to \&quot;all\&quot;
330
+ # @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in.
328
331
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
329
- def get_user_account_orders_with_http_info(user_id:, user_secret:, account_id:, state: SENTINEL, extra: {})
332
+ def get_user_account_orders_with_http_info(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
330
333
  extra[:state] = state if state != SENTINEL
334
+ extra[:days] = days if days != SENTINEL
331
335
  get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
332
336
  end
333
337
 
334
- # Get history of orders placed in account
338
+ # List account orders
335
339
  # Fetch all recent orders from a user's account.
336
340
  # @param user_id [String]
337
341
  # @param user_secret [String]
338
342
  # @param account_id [String] The ID of the account to get orders.
339
343
  # @param [Hash] opts the optional parameters
340
344
  # @option opts [String] :state defaults value is set to \&quot;all\&quot;
345
+ # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in.
341
346
  # @return [Array<AccountOrderRecord>]
342
347
  def get_user_account_orders_impl(user_id, user_secret, account_id, opts = {})
343
348
  data, _status_code, _headers = get_user_account_orders_with_http_info(user_id, user_secret, account_id, opts)
344
349
  data
345
350
  end
346
351
 
347
- # Get history of orders placed in account
352
+ # List account orders
348
353
  # Fetch all recent orders from a user&#39;s account.
349
354
  # @param user_id [String]
350
355
  # @param user_secret [String]
351
356
  # @param account_id [String] The ID of the account to get orders.
352
357
  # @param [Hash] opts the optional parameters
353
358
  # @option opts [String] :state defaults value is set to \&quot;all\&quot;
359
+ # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in.
354
360
  # @return [Array<(Array<AccountOrderRecord>, Integer, Hash)>] Array<AccountOrderRecord> data, response status code and response headers
355
361
  def get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, opts = {})
356
362
  if @api_client.config.debugging
@@ -372,6 +378,10 @@ module SnapTrade
372
378
  if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state'])
373
379
  fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}"
374
380
  end
381
+ if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1
382
+ fail ArgumentError, 'invalid value for "opts[:"days"]" when calling AccountInformationApi.get_user_account_orders, must be greater than or equal to 1.'
383
+ end
384
+
375
385
  # resource path
376
386
  local_var_path = '/accounts/{accountId}/orders'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
377
387
 
@@ -380,6 +390,7 @@ module SnapTrade
380
390
  query_params[:'userId'] = user_id
381
391
  query_params[:'userSecret'] = user_secret
382
392
  query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
393
+ query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil?
383
394
 
384
395
  # header parameters
385
396
  header_params = opts[:header_params] || {}
@@ -9,5 +9,5 @@ Contact: api@snaptrade.com
9
9
  =end
10
10
 
11
11
  module SnapTrade
12
- VERSION = '1.17.4'
12
+ VERSION = '1.17.5'
13
13
  end
@@ -69,13 +69,14 @@ describe 'AccountInformationApi' do
69
69
  end
70
70
 
71
71
  # unit tests for get_user_account_orders
72
- # Get history of orders placed in account
72
+ # List account orders
73
73
  # Fetch all recent orders from a user&#39;s account.
74
74
  # @param user_id
75
75
  # @param user_secret
76
76
  # @param account_id The ID of the account to get orders.
77
77
  # @param [Hash] opts the optional parameters
78
78
  # @option opts [String] :state defaults value is set to \&quot;all\&quot;
79
+ # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in.
79
80
  # @return [Array<AccountOrderRecord>]
80
81
  describe 'get_user_account_orders test' do
81
82
  it 'should work' do
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.17.4
4
+ version: 1.17.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-01 00:00:00.000000000 Z
11
+ date: 2023-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday