snaptrade 2.0.188 → 2.0.190

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: 71fcfdf628fbaf3df2aa5bfebf30c70220ef8100c764c119bdf8b058055ef828
4
- data.tar.gz: ffdb7d67435e1d0a5abc6e17205b5e31c16e8083f1973112966b3bbdc1f4c31d
3
+ metadata.gz: 8e352acd0740f2e8fb6c04619c0e804cbbabc7e4c2207d445e97d656a2e6ac76
4
+ data.tar.gz: 76bfbb478457e60bb028696b34e411f11cbe53334bbb4d091c2165caaccb9c5d
5
5
  SHA512:
6
- metadata.gz: 74016e3e1cbb5015412b54fe7cabdc766accd21bbd62c890956c2d1509034686cff1d3abd9adcac6e00129536afcedcea7d4c0f168245d6df71f60716e2e4dc3
7
- data.tar.gz: d0e84ee4336ec0a1d99bbf5d5e1f9ed897a1a2b3a6ac6b4650468e29df46aeb7fd3c204b4615f07c298edac80bd75bf1ec98fd97ed222f3a7b8b6adebe8f9c58
6
+ metadata.gz: c374e44dde407b58c6cdbd8941111c8758b69315cb6cb88dd9581879b7f8a6813702d7a428c539042c38c463d63dde33745c559f5403dc6ac6df3dd3ba6a6e24
7
+ data.tar.gz: f7aa6f52e779272cf83b8ae84e37657c7e73c209d097aeab688e5251b0527d30c16374bde100b625ed654cf091e476082e63525c243b3ba6926e1bcedbe3f169
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.188)
4
+ snaptrade (2.0.190)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
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.188-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.188)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.190-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.190)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -41,6 +41,7 @@ Connect brokerage accounts to your app for live positions and trading
41
41
  * [`snaptrade.connections.delete_connection`](#snaptradeconnectionsdelete_connection)
42
42
  * [`snaptrade.connections.detail_brokerage_authorization`](#snaptradeconnectionsdetail_brokerage_authorization)
43
43
  * [`snaptrade.connections.disable_brokerage_authorization`](#snaptradeconnectionsdisable_brokerage_authorization)
44
+ * [`snaptrade.connections.list_brokerage_authorization_accounts`](#snaptradeconnectionslist_brokerage_authorization_accounts)
44
45
  * [`snaptrade.connections.list_brokerage_authorizations`](#snaptradeconnectionslist_brokerage_authorizations)
45
46
  * [`snaptrade.connections.refresh_brokerage_authorization`](#snaptradeconnectionsrefresh_brokerage_authorization)
46
47
  * [`snaptrade.connections.remove_brokerage_authorization`](#snaptradeconnectionsremove_brokerage_authorization)
@@ -90,7 +91,7 @@ Connect brokerage accounts to your app for live positions and trading
90
91
  Add to Gemfile:
91
92
 
92
93
  ```ruby
93
- gem 'snaptrade', '~> 2.0.188'
94
+ gem 'snaptrade', '~> 2.0.190'
94
95
  ```
95
96
 
96
97
  ## Getting Started<a id="getting-started"></a>
@@ -453,7 +454,7 @@ defaults value is set to \"all\"
453
454
 
454
455
  ##### days: `Integer`<a id="days-integer"></a>
455
456
  Number of days in the past to fetch the most recent orders. Defaults to the last
456
- 30 days if no value is passed in.
457
+ 30 days if no value is passed in. Values greater than 90 will be capped at 90.
457
458
 
458
459
  #### 🔄 Return<a id="🔄-return"></a>
459
460
 
@@ -631,14 +632,13 @@ p result
631
632
 
632
633
 
633
634
  ### `snaptrade.account_information.list_user_accounts`<a id="snaptradeaccount_informationlist_user_accounts"></a>
635
+ ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
636
+
637
+ **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.**
634
638
 
635
639
  Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
636
640
 
637
- Please note that this data is cached and only refreshed once a day.
638
-
639
- Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
640
- - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails).
641
- - If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
641
+ This data is cached and only refreshed once a day, regardless of the customer's plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
642
642
 
643
643
 
644
644
  #### 🛠️ Usage<a id="🛠️-usage"></a>
@@ -1038,6 +1038,46 @@ p result
1038
1038
  ---
1039
1039
 
1040
1040
 
1041
+ ### `snaptrade.connections.list_brokerage_authorization_accounts`<a id="snaptradeconnectionslist_brokerage_authorization_accounts"></a>
1042
+
1043
+ Returns all brokerage accounts that belong to the specified connection for the authenticated user.
1044
+
1045
+ On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
1046
+
1047
+ On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1048
+
1049
+ Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
1050
+
1051
+
1052
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
1053
+
1054
+ ```ruby
1055
+ result = snaptrade.connections.list_brokerage_authorization_accounts(
1056
+ authorization_id: "87b24961-b51e-4db8-9226-f198f6518a89",
1057
+ user_id: "snaptrade-user-123",
1058
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1059
+ )
1060
+ p result
1061
+ ```
1062
+
1063
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1064
+
1065
+ ##### authorization_id: `String`<a id="authorization_id-string"></a>
1066
+ ##### user_id: `String`<a id="user_id-string"></a>
1067
+ ##### user_secret: `String`<a id="user_secret-string"></a>
1068
+ #### 🔄 Return<a id="🔄-return"></a>
1069
+
1070
+ [Account](./lib/snaptrade/models/account.rb)
1071
+
1072
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1073
+
1074
+ `/authorizations/{authorizationId}/accounts` `GET`
1075
+
1076
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1077
+
1078
+ ---
1079
+
1080
+
1041
1081
  ### `snaptrade.connections.list_brokerage_authorizations`<a id="snaptradeconnectionslist_brokerage_authorizations"></a>
1042
1082
 
1043
1083
  Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency.
@@ -1334,7 +1374,7 @@ defaults value is set to \"all\"
1334
1374
 
1335
1375
  ##### days: `Integer`<a id="days-integer"></a>
1336
1376
  Number of days in the past to fetch the most recent orders. Defaults to the last
1337
- 30 days if no value is passed in.
1377
+ 30 days if no value is passed in. Values greater than 90 will be capped at 90.
1338
1378
 
1339
1379
  #### 🔄 Return<a id="🔄-return"></a>
1340
1380
 
@@ -774,7 +774,7 @@ module SnapTrade
774
774
  # @param user_secret [String]
775
775
  # @param account_id [String]
776
776
  # @param state [String] defaults value is set to \"all\"
777
- # @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
777
+ # @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
778
778
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
779
779
  def get_user_account_orders(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
780
780
  extra[:state] = state if state != SENTINEL
@@ -797,7 +797,7 @@ module SnapTrade
797
797
  # @param user_secret [String]
798
798
  # @param account_id [String]
799
799
  # @param state [String] defaults value is set to \"all\"
800
- # @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
800
+ # @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
801
801
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
802
802
  def get_user_account_orders_with_http_info(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
803
803
  extra[:state] = state if state != SENTINEL
@@ -812,7 +812,7 @@ module SnapTrade
812
812
  # @param account_id [String]
813
813
  # @param [Hash] opts the optional parameters
814
814
  # @option opts [String] :state defaults value is set to \"all\"
815
- # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
815
+ # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
816
816
  # @return [Array<AccountOrderRecord>]
817
817
  private def get_user_account_orders_impl(user_id, user_secret, account_id, opts = {})
818
818
  data, _status_code, _headers = get_user_account_orders_with_http_info(user_id, user_secret, account_id, opts)
@@ -826,7 +826,7 @@ module SnapTrade
826
826
  # @param account_id [String]
827
827
  # @param [Hash] opts the optional parameters
828
828
  # @option opts [String] :state defaults value is set to \"all\"
829
- # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
829
+ # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
830
830
  # @return [Array<(Array<AccountOrderRecord>, Integer, Hash)>] Array<AccountOrderRecord> data, response status code and response headers
831
831
  private def get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, opts = {})
832
832
  if @api_client.config.debugging
@@ -848,6 +848,10 @@ module SnapTrade
848
848
  if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state'])
849
849
  fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}"
850
850
  end
851
+ if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 90
852
+ fail ArgumentError, 'invalid value for "opts[:"days"]" when calling AccountInformationApi.get_user_account_orders, must be smaller than or equal to 90.'
853
+ end
854
+
851
855
  if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1
852
856
  fail ArgumentError, 'invalid value for "opts[:"days"]" when calling AccountInformationApi.get_user_account_orders, must be greater than or equal to 1.'
853
857
  end
@@ -1355,13 +1359,11 @@ module SnapTrade
1355
1359
 
1356
1360
  # List accounts
1357
1361
  #
1358
- # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
1362
+ # **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.**
1359
1363
  #
1360
- # Please note that this data is cached and only refreshed once a day.
1364
+ # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
1361
1365
  #
1362
- # Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
1363
- # - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails).
1364
- # - If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1366
+ # This data is cached and only refreshed once a day, regardless of the customer's plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1365
1367
  #
1366
1368
  # @param user_id [String]
1367
1369
  # @param user_secret [String]
@@ -1373,13 +1375,11 @@ module SnapTrade
1373
1375
 
1374
1376
  # List accounts
1375
1377
  #
1376
- # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
1378
+ # **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.**
1377
1379
  #
1378
- # Please note that this data is cached and only refreshed once a day.
1380
+ # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
1379
1381
  #
1380
- # Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
1381
- # - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails).
1382
- # - If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1382
+ # This data is cached and only refreshed once a day, regardless of the customer's plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1383
1383
  #
1384
1384
  # @param user_id [String]
1385
1385
  # @param user_secret [String]
@@ -1389,7 +1389,7 @@ module SnapTrade
1389
1389
  end
1390
1390
 
1391
1391
  # List accounts
1392
- # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1392
+ # **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This data is cached and only refreshed once a day, regardless of the customer's plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1393
1393
  # @param user_id [String]
1394
1394
  # @param user_secret [String]
1395
1395
  # @param [Hash] opts the optional parameters
@@ -1400,7 +1400,7 @@ module SnapTrade
1400
1400
  end
1401
1401
 
1402
1402
  # List accounts
1403
- # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don&#39;t, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1403
+ # **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This data is cached and only refreshed once a day, regardless of the customer&#39;s plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1404
1404
  # @param user_id [String]
1405
1405
  # @param user_secret [String]
1406
1406
  # @param [Hash] opts the optional parameters
@@ -332,6 +332,121 @@ module SnapTrade
332
332
  end
333
333
 
334
334
 
335
+ # List accounts for a connection
336
+ #
337
+ # Returns all brokerage accounts that belong to the specified connection for the authenticated user.
338
+ #
339
+ # On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
340
+ #
341
+ # On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
342
+ #
343
+ # Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
344
+ #
345
+ # @param authorization_id [String]
346
+ # @param user_id [String]
347
+ # @param user_secret [String]
348
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
349
+ def list_brokerage_authorization_accounts(authorization_id:, user_id:, user_secret:, extra: {})
350
+ data, _status_code, _headers = list_brokerage_authorization_accounts_with_http_info_impl(authorization_id, user_id, user_secret, extra)
351
+ data
352
+ end
353
+
354
+ # List accounts for a connection
355
+ #
356
+ # Returns all brokerage accounts that belong to the specified connection for the authenticated user.
357
+ #
358
+ # On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
359
+ #
360
+ # On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
361
+ #
362
+ # Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
363
+ #
364
+ # @param authorization_id [String]
365
+ # @param user_id [String]
366
+ # @param user_secret [String]
367
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
368
+ def list_brokerage_authorization_accounts_with_http_info(authorization_id:, user_id:, user_secret:, extra: {})
369
+ list_brokerage_authorization_accounts_with_http_info_impl(authorization_id, user_id, user_secret, extra)
370
+ end
371
+
372
+ # List accounts for a connection
373
+ # Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
374
+ # @param authorization_id [String]
375
+ # @param user_id [String]
376
+ # @param user_secret [String]
377
+ # @param [Hash] opts the optional parameters
378
+ # @return [Array<Account>]
379
+ private def list_brokerage_authorization_accounts_impl(authorization_id, user_id, user_secret, opts = {})
380
+ data, _status_code, _headers = list_brokerage_authorization_accounts_with_http_info(authorization_id, user_id, user_secret, opts)
381
+ data
382
+ end
383
+
384
+ # List accounts for a connection
385
+ # Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account&#39;s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
386
+ # @param authorization_id [String]
387
+ # @param user_id [String]
388
+ # @param user_secret [String]
389
+ # @param [Hash] opts the optional parameters
390
+ # @return [Array<(Array<Account>, Integer, Hash)>] Array<Account> data, response status code and response headers
391
+ private def list_brokerage_authorization_accounts_with_http_info_impl(authorization_id, user_id, user_secret, opts = {})
392
+ if @api_client.config.debugging
393
+ @api_client.config.logger.debug 'Calling API: ConnectionsApi.list_brokerage_authorization_accounts ...'
394
+ end
395
+ # verify the required parameter 'authorization_id' is set
396
+ if @api_client.config.client_side_validation && authorization_id.nil?
397
+ fail ArgumentError, "Missing the required parameter 'authorization_id' when calling ConnectionsApi.list_brokerage_authorization_accounts"
398
+ end
399
+ # verify the required parameter 'user_id' is set
400
+ if @api_client.config.client_side_validation && user_id.nil?
401
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling ConnectionsApi.list_brokerage_authorization_accounts"
402
+ end
403
+ # verify the required parameter 'user_secret' is set
404
+ if @api_client.config.client_side_validation && user_secret.nil?
405
+ fail ArgumentError, "Missing the required parameter 'user_secret' when calling ConnectionsApi.list_brokerage_authorization_accounts"
406
+ end
407
+ # resource path
408
+ local_var_path = '/authorizations/{authorizationId}/accounts'.sub('{' + 'authorizationId' + '}', CGI.escape(authorization_id.to_s))
409
+
410
+ # query parameters
411
+ query_params = opts[:query_params] || {}
412
+ query_params[:'userId'] = user_id
413
+ query_params[:'userSecret'] = user_secret
414
+
415
+ # header parameters
416
+ header_params = opts[:header_params] || {}
417
+ # HTTP header 'Accept' (if needed)
418
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
419
+
420
+ # form parameters
421
+ form_params = opts[:form_params] || {}
422
+
423
+ # http body (model)
424
+ post_body = opts[:debug_body]
425
+
426
+ # return_type
427
+ return_type = opts[:debug_return_type] || 'Array<Account>'
428
+
429
+ # auth_names
430
+ auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
431
+
432
+ new_options = opts.merge(
433
+ :operation => :"ConnectionsApi.list_brokerage_authorization_accounts",
434
+ :header_params => header_params,
435
+ :query_params => query_params,
436
+ :form_params => form_params,
437
+ :body => post_body,
438
+ :auth_names => auth_names,
439
+ :return_type => return_type
440
+ )
441
+
442
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
443
+ if @api_client.config.debugging
444
+ @api_client.config.logger.debug "API called: ConnectionsApi#list_brokerage_authorization_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
445
+ end
446
+ return data, status_code, headers, response
447
+ end
448
+
449
+
335
450
  # List all connections
336
451
  #
337
452
  # Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency.
@@ -269,7 +269,7 @@ module SnapTrade
269
269
  # @param user_secret [String]
270
270
  # @param account_id [String]
271
271
  # @param state [String] defaults value is set to \"all\"
272
- # @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
272
+ # @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
273
273
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
274
274
  def get_user_account_orders_v2(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
275
275
  extra[:state] = state if state != SENTINEL
@@ -290,7 +290,7 @@ module SnapTrade
290
290
  # @param user_secret [String]
291
291
  # @param account_id [String]
292
292
  # @param state [String] defaults value is set to \"all\"
293
- # @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
293
+ # @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
294
294
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
295
295
  def get_user_account_orders_v2_with_http_info(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
296
296
  extra[:state] = state if state != SENTINEL
@@ -305,7 +305,7 @@ module SnapTrade
305
305
  # @param account_id [String]
306
306
  # @param [Hash] opts the optional parameters
307
307
  # @option opts [String] :state defaults value is set to \"all\"
308
- # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
308
+ # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
309
309
  # @return [AccountOrdersV2Response]
310
310
  private def get_user_account_orders_v2_impl(user_id, user_secret, account_id, opts = {})
311
311
  data, _status_code, _headers = get_user_account_orders_v2_with_http_info(user_id, user_secret, account_id, opts)
@@ -319,7 +319,7 @@ module SnapTrade
319
319
  # @param account_id [String]
320
320
  # @param [Hash] opts the optional parameters
321
321
  # @option opts [String] :state defaults value is set to \"all\"
322
- # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
322
+ # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
323
323
  # @return [Array<(AccountOrdersV2Response, Integer, Hash)>] AccountOrdersV2Response data, response status code and response headers
324
324
  private def get_user_account_orders_v2_with_http_info_impl(user_id, user_secret, account_id, opts = {})
325
325
  if @api_client.config.debugging
@@ -341,6 +341,10 @@ module SnapTrade
341
341
  if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state'])
342
342
  fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}"
343
343
  end
344
+ if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 90
345
+ fail ArgumentError, 'invalid value for "opts[:"days"]" when calling ExperimentalEndpointsApi.get_user_account_orders_v2, must be smaller than or equal to 90.'
346
+ end
347
+
344
348
  if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1
345
349
  fail ArgumentError, 'invalid value for "opts[:"days"]" when calling ExperimentalEndpointsApi.get_user_account_orders_v2, must be greater than or equal to 1.'
346
350
  end
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.188'
11
+ VERSION = '2.0.190'
12
12
  end
@@ -125,7 +125,7 @@ describe 'AccountInformationApi' do
125
125
  # @param account_id
126
126
  # @param [Hash] opts the optional parameters
127
127
  # @option opts [String] :state defaults value is set to \&quot;all\&quot;
128
- # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
128
+ # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
129
129
  # @return [Array<AccountOrderRecord>]
130
130
  describe 'get_user_account_orders test' do
131
131
  it 'should work' do
@@ -193,7 +193,7 @@ describe 'AccountInformationApi' do
193
193
 
194
194
  # unit tests for list_user_accounts
195
195
  # List accounts
196
- # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don&#39;t, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
196
+ # **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This data is cached and only refreshed once a day, regardless of the customer&#39;s plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
197
197
  # @param user_id
198
198
  # @param user_secret
199
199
  # @param [Hash] opts the optional parameters
@@ -69,6 +69,20 @@ describe 'ConnectionsApi' do
69
69
  end
70
70
  end
71
71
 
72
+ # unit tests for list_brokerage_authorization_accounts
73
+ # List accounts for a connection
74
+ # Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account&#39;s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
75
+ # @param authorization_id
76
+ # @param user_id
77
+ # @param user_secret
78
+ # @param [Hash] opts the optional parameters
79
+ # @return [Array<Account>]
80
+ describe 'list_brokerage_authorization_accounts test' do
81
+ it 'should work' do
82
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
83
+ end
84
+ end
85
+
72
86
  # unit tests for list_brokerage_authorizations
73
87
  # List all connections
74
88
  # Returns a list of all connections for the specified user. Note that &#x60;Connection&#x60; and &#x60;Brokerage Authorization&#x60; are interchangeable, but the term &#x60;Connection&#x60; is preferred and used in the doc for consistency. A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts. SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one.
@@ -64,7 +64,7 @@ describe 'ExperimentalEndpointsApi' do
64
64
  # @param account_id
65
65
  # @param [Hash] opts the optional parameters
66
66
  # @option opts [String] :state defaults value is set to \&quot;all\&quot;
67
- # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
67
+ # @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
68
68
  # @return [AccountOrdersV2Response]
69
69
  describe 'get_user_account_orders_v2 test' do
70
70
  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: 2.0.188
4
+ version: 2.0.190
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-30 00:00:00.000000000 Z
11
+ date: 2026-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday