snaptrade 2.0.34 → 2.0.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +57 -35
  4. data/lib/snaptrade/api/account_information_api.rb +4 -4
  5. data/lib/snaptrade/api/authentication_api.rb +44 -46
  6. data/lib/snaptrade/api/connections_api.rb +8 -8
  7. data/lib/snaptrade/api/transactions_and_reporting_api.rb +36 -28
  8. data/lib/snaptrade/models/account.rb +7 -7
  9. data/lib/snaptrade/models/account_order_record.rb +1 -1
  10. data/lib/snaptrade/models/account_order_record_universal_symbol.rb +2 -2
  11. data/lib/snaptrade/models/account_simple.rb +4 -1
  12. data/lib/snaptrade/models/delete_user_response.rb +12 -3
  13. data/lib/snaptrade/models/login_redirect_uri.rb +3 -2
  14. data/lib/snaptrade/models/snap_trade_login_user_request_body.rb +10 -6
  15. data/lib/snaptrade/models/symbol.rb +16 -10
  16. data/lib/snaptrade/models/{universal_symbol_currency.rb → symbol_currency.rb} +3 -3
  17. data/lib/snaptrade/models/{universal_symbol_exchange.rb → symbol_exchange.rb} +3 -3
  18. data/lib/snaptrade/models/underlying_symbol.rb +1 -1
  19. data/lib/snaptrade/models/universal_activity.rb +91 -81
  20. data/lib/snaptrade/models/universal_activity_currency.rb +245 -0
  21. data/lib/snaptrade/models/universal_activity_option_symbol.rb +314 -0
  22. data/lib/snaptrade/models/universal_activity_symbol.rb +304 -0
  23. data/lib/snaptrade/models/universal_symbol.rb +2 -2
  24. data/lib/snaptrade/models/user_i_dand_secret.rb +1 -1
  25. data/lib/snaptrade/version.rb +1 -1
  26. data/lib/snaptrade.rb +5 -2
  27. data/spec/api/account_information_api_spec.rb +1 -1
  28. data/spec/api/authentication_api_spec.rb +7 -7
  29. data/spec/api/connections_api_spec.rb +2 -2
  30. data/spec/api/transactions_and_reporting_api_spec.rb +7 -7
  31. data/spec/models/delete_user_response_spec.rb +6 -0
  32. data/spec/models/{universal_symbol_currency_spec.rb → symbol_currency_spec.rb} +6 -6
  33. data/spec/models/{universal_symbol_exchange_spec.rb → symbol_exchange_spec.rb} +6 -6
  34. data/spec/models/symbol_spec.rb +1 -1
  35. data/spec/models/universal_activity_currency_spec.rb +41 -0
  36. data/spec/models/universal_activity_option_symbol_spec.rb +65 -0
  37. data/spec/models/universal_activity_spec.rb +15 -15
  38. data/spec/models/universal_activity_symbol_spec.rb +77 -0
  39. metadata +17 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 970b9a64740174d662e372bcda27e6a8abf2d4c19f70abca63b55ecd4a5e6df5
4
- data.tar.gz: b7b0f1b0b0510932f1e9d1e02db3fb52678e03057b02065dce9f26507cf3496c
3
+ metadata.gz: 7e8a3e30ce711edef7835ce59691c2709524f4d40add0b1913146ac04a56efaf
4
+ data.tar.gz: 1ceed48b23a0c73555e2f13804dbeb51b819d2c39dca6edef6314674aae99ca2
5
5
  SHA512:
6
- metadata.gz: 4f59d7b0412ac4116df910ac089f2dce01214a072922c5e00c66b8f904a34ba88e4e4335f490547c71cd4f5d94e2154a28ff82931eed5ccbd0d86e28b6947708
7
- data.tar.gz: fe2e89d41ba0f9ce682c1e3813162ca60440ec80100e75f05a7e29c2c9a756ad7ea51fb673b3b679b78ce6cd5aaa177d0bb1ad5ae1b736e5887360aeca8f44f8
6
+ metadata.gz: 35df36a5be0fd0f2885229ee237b7938073703d7eb9878a4b77092a9dc6964afbeed9da5454434e02a3e45af466bff57ad9f8e25fe11c254cb6c2cc9ac17c8f7
7
+ data.tar.gz: c3e1f881f4509c8a8617e32c7cd25d583cba44c0e11b4633464867af8fed1ac592183645d6faf6594c671d6c1d5618afee35deb8ab92ba8e728b4a3c4af43f8b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.34)
4
+ snaptrade (2.0.36)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -68,7 +68,7 @@ GEM
68
68
  rubocop-ast (>= 1.2.0, < 2.0)
69
69
  ruby-progressbar (~> 1.7)
70
70
  unicode-display_width (>= 1.4.0, < 3.0)
71
- rubocop-ast (1.32.0)
71
+ rubocop-ast (1.32.1)
72
72
  parser (>= 3.3.1.0)
73
73
  ruby-progressbar (1.13.0)
74
74
  ruby2_keywords (0.0.5)
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.34-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.34)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.36-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.36)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](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.34'
73
+ gem 'snaptrade', '~> 2.0.36'
74
74
  ```
75
75
 
76
76
  ## Getting Started<a id="getting-started"></a>
@@ -134,7 +134,7 @@ p result
134
134
  ##### user_id: `String`<a id="user_id-string"></a>
135
135
  ##### user_secret: `String`<a id="user_secret-string"></a>
136
136
  ##### brokerage_authorizations: `String`<a id="brokerage_authorizations-string"></a>
137
- Optional. Comma seperated list of authorization IDs (only use if filtering is
137
+ Optional. Comma separated list of authorization IDs (only use if filtering is
138
138
  needed on one or more authorizations).
139
139
 
140
140
  #### 🔄 Return<a id="🔄-return"></a>
@@ -434,7 +434,7 @@ p result
434
434
 
435
435
  ### `snaptrade.authentication.delete_snap_trade_user`<a id="snaptradeauthenticationdelete_snap_trade_user"></a>
436
436
 
437
- Deletes a user you've registered over the SnapTrade API, and any data associated with them or their investment accounts.
437
+ Deletes a registered user and all associated data. This action is irreversible. This API is asynchronous and will return a 200 status code if the request is accepted. The user and all associated data will be queued for deletion. Once deleted, a `USER_DELETED` webhook will be sent.
438
438
 
439
439
  #### 🛠️ Usage<a id="🛠️-usage"></a>
440
440
 
@@ -463,7 +463,7 @@ p result
463
463
 
464
464
  ### `snaptrade.authentication.list_snap_trade_users`<a id="snaptradeauthenticationlist_snap_trade_users"></a>
465
465
 
466
- Returns a list of users you've registered over the SnapTrade API.
466
+ Returns a list of all registered user IDs.
467
467
 
468
468
  #### 🛠️ Usage<a id="🛠️-usage"></a>
469
469
 
@@ -496,7 +496,7 @@ result = snaptrade.authentication.login_snap_trade_user(
496
496
  custom_redirect: "https://snaptrade.com",
497
497
  reconnect: "8b5f262d-4bb9-365d-888a-202bd3b15fa1",
498
498
  connection_type: "read",
499
- connection_portal_version: "v2",
499
+ connection_portal_version: "v3",
500
500
  )
501
501
  p result
502
502
  ```
@@ -506,27 +506,36 @@ p result
506
506
  ##### user_id: `String`<a id="user_id-string"></a>
507
507
  ##### user_secret: `String`<a id="user_secret-string"></a>
508
508
  ##### broker: `String`<a id="broker-string"></a>
509
- Slug of the brokerage to connect the user to. See [this
510
- document](https://snaptrade.notion.site/SnapTrade-Brokerage-Integrations-f83946a714a84c3caf599f6a945f0ead)
509
+ Slug of the brokerage to connect the user to. See [the integrations
510
+ page](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=3cfea70ef4254afc89704e47275a7a9a&pvs=4)
511
511
  for a list of supported brokerages and their slugs.
512
512
 
513
513
  ##### immediateRedirect: `Boolean`<a id="immediateredirect-boolean"></a>
514
- When set to True, user will be redirected back to the partner's site instead of
515
- the connection portal
514
+ When set to `true`, user will be redirected back to the partner's site instead
515
+ of the connection portal. This parameter is ignored if the connection portal is
516
+ loaded inside an iframe. See the [guide on ways to integrate the connection
517
+ portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more
518
+ information.
516
519
 
517
520
  ##### customRedirect: `String`<a id="customredirect-string"></a>
518
- URL to redirect the user to after the user connects their brokerage account
521
+ URL to redirect the user to after the user connects their brokerage account.
522
+ This parameter is ignored if the connection portal is loaded inside an iframe.
523
+ See the [guide on ways to integrate the connection
524
+ portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more
525
+ information.
519
526
 
520
527
  ##### reconnect: `String`<a id="reconnect-string"></a>
521
528
  The UUID of the brokerage connection to be reconnected. This parameter should be
522
- left empty unless you are reconnecting a disabled connection. See ‘Reconnecting
523
- Accounts’ for more information.
529
+ left empty unless you are reconnecting a disabled connection. See the [guide on
530
+ fixing broken
531
+ connections](https://docs.snaptrade.com/docs/fix-broken-connections) for more
532
+ information.
524
533
 
525
534
  ##### connectionType: [`ConnectionType`](./lib/snaptrade/models/connection_type.rb)<a id="connectiontype-connectiontypelibsnaptrademodelsconnection_typerb"></a>
526
- Sets whether the connection should be read or trade
535
+ Sets whether the connection should be read-only or trade-enabled.
527
536
 
528
537
  ##### connectionPortalVersion: [`ConnectionPortalVersion`](./lib/snaptrade/models/connection_portal_version.rb)<a id="connectionportalversion-connectionportalversionlibsnaptrademodelsconnection_portal_versionrb"></a>
529
- Sets the version of the connection portal to render, with a default to 'v3'
538
+ Sets the version of the connection portal to render.
530
539
 
531
540
  #### 🔄 Return<a id="🔄-return"></a>
532
541
 
@@ -579,8 +588,7 @@ immutable.
579
588
 
580
589
  ### `snaptrade.authentication.reset_snap_trade_user_secret`<a id="snaptradeauthenticationreset_snap_trade_user_secret"></a>
581
590
 
582
- This API is used to rotate the secret for a SnapTrade user. You might use this if a userSecret
583
- is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
591
+ Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
584
592
 
585
593
 
586
594
  #### 🛠️ Usage<a id="🛠️-usage"></a>
@@ -603,7 +611,8 @@ immutable.
603
611
 
604
612
  ##### userSecret: `String`<a id="usersecret-string"></a>
605
613
  SnapTrade User Secret randomly generated by SnapTrade. This is privileged
606
- information and if compromised, should be rotated via the SnapTrade API.
614
+ information and if compromised, should be rotated via the [rotate user secret
615
+ endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret)
607
616
 
608
617
  #### 🔄 Return<a id="🔄-return"></a>
609
618
 
@@ -803,11 +812,11 @@ p result
803
812
 
804
813
  ##### partner_client_id: `String`<a id="partner_client_id-string"></a>
805
814
  ##### user_id: `String`<a id="user_id-string"></a>
806
- Optional comma seperated list of user IDs used to filter the request on specific
815
+ Optional comma separated list of user IDs used to filter the request on specific
807
816
  users
808
817
 
809
818
  ##### session_id: `String`<a id="session_id-string"></a>
810
- Optional comma seperated list of session IDs used to filter the request on
819
+ Optional comma separated list of session IDs used to filter the request on
811
820
  specific users
812
821
 
813
822
  #### 🔄 Return<a id="🔄-return"></a>
@@ -1595,7 +1604,12 @@ responding to the request
1595
1604
 
1596
1605
  ### `snaptrade.transactions_and_reporting.get_activities`<a id="snaptradetransactions_and_reportingget_activities"></a>
1597
1606
 
1598
- Returns activities (transactions) for a user. Specifying start and end date is highly recommended for better performance
1607
+ Returns all historical transactions for the specified user and filtering criteria. It's recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There's a max number of 10000 transactions returned per request.
1608
+
1609
+ There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order.
1610
+
1611
+ The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
1612
+
1599
1613
 
1600
1614
  #### 🛠️ Usage<a id="🛠️-usage"></a>
1601
1615
 
@@ -1607,7 +1621,7 @@ result = snaptrade.transactions_and_reporting.get_activities(
1607
1621
  end_date: "2022-01-24",
1608
1622
  accounts: "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
1609
1623
  brokerage_authorizations: "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
1610
- type: "DIVIDEND",
1624
+ type: "BUY,SELL,DIVIDEND",
1611
1625
  )
1612
1626
  p result
1613
1627
  ```
@@ -1617,24 +1631,32 @@ p result
1617
1631
  ##### user_id: `String`<a id="user_id-string"></a>
1618
1632
  ##### user_secret: `String`<a id="user_secret-string"></a>
1619
1633
  ##### start_date: `Date`<a id="start_date-date"></a>
1634
+ The start date (inclusive) of the transaction history to retrieve. If not
1635
+ provided, the default is the first transaction known to SnapTrade based on
1636
+ `trade_date`.
1637
+
1620
1638
  ##### end_date: `Date`<a id="end_date-date"></a>
1639
+ The end date (inclusive) of the transaction history to retrieve. If not
1640
+ provided, the default is the last transaction known to SnapTrade based on
1641
+ `trade_date`.
1642
+
1621
1643
  ##### accounts: `String`<a id="accounts-string"></a>
1622
- Optional comma seperated list of account IDs used to filter the request on
1623
- specific accounts
1644
+ Optional comma separated list of SnapTrade Account IDs used to filter the
1645
+ request to specific accounts. If not provided, the default is all known
1646
+ brokerage accounts for the user. The `brokerageAuthorizations` parameter takes
1647
+ precedence over this parameter.
1624
1648
 
1625
1649
  ##### brokerage_authorizations: `String`<a id="brokerage_authorizations-string"></a>
1626
- Optional comma seperated list of brokerage authorization IDs used to filter the
1627
- request on only accounts that belong to those authorizations
1650
+ Optional comma separated list of SnapTrade Connection (Brokerage Authorization)
1651
+ IDs used to filter the request to only accounts that belong to those
1652
+ connections. If not provided, the default is all connections for the user. This
1653
+ parameter takes precedence over the `accounts` parameter.
1628
1654
 
1629
1655
  ##### type: `String`<a id="type-string"></a>
1630
- Optional comma seperated list of types to filter activities by. This is not an
1631
- exhaustive list, if we fail to match to these types, we will return the raw
1632
- description from the brokerage. Potential values include - DIVIDEND - BUY - SELL
1633
- - CONTRIBUTION - WITHDRAWAL - EXTERNAL_ASSET_TRANSFER_IN -
1634
- EXTERNAL_ASSET_TRANSFER_OUT - INTERNAL_CASH_TRANSFER_IN -
1635
- INTERNAL_CASH_TRANSFER_OUT - INTERNAL_ASSET_TRANSFER_IN -
1636
- INTERNAL_ASSET_TRANSFER_OUT - INTEREST - REBATE - GOV_GRANT - TAX - FEE - REI -
1637
- FXT
1656
+ Optional comma separated list of transaction types to filter by. SnapTrade does
1657
+ a best effort to categorize brokerage transaction types into a common set of
1658
+ values. Here are some of the most popular values: - BUY - SELL - DIVIDEND -
1659
+ CONTRIBUTION - WITHDRAWAL - REI - INTEREST - FEE
1638
1660
 
1639
1661
  #### 🔄 Return<a id="🔄-return"></a>
1640
1662
 
@@ -1676,7 +1698,7 @@ p result
1676
1698
  ##### user_id: `String`<a id="user_id-string"></a>
1677
1699
  ##### user_secret: `String`<a id="user_secret-string"></a>
1678
1700
  ##### accounts: `String`<a id="accounts-string"></a>
1679
- Optional comma seperated list of account IDs used to filter the request on
1701
+ Optional comma separated list of account IDs used to filter the request on
1680
1702
  specific accounts
1681
1703
 
1682
1704
  ##### detailed: `Boolean`<a id="detailed-boolean"></a>
@@ -26,7 +26,7 @@ module SnapTrade
26
26
  #
27
27
  # @param user_id [String]
28
28
  # @param user_secret [String]
29
- # @param brokerage_authorizations [String] Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
29
+ # @param brokerage_authorizations [String] Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
30
30
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
31
31
  def get_all_user_holdings(user_id:, user_secret:, brokerage_authorizations: SENTINEL, extra: {})
32
32
  extra[:brokerage_authorizations] = brokerage_authorizations if brokerage_authorizations != SENTINEL
@@ -43,7 +43,7 @@ module SnapTrade
43
43
  #
44
44
  # @param user_id [String]
45
45
  # @param user_secret [String]
46
- # @param brokerage_authorizations [String] Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
46
+ # @param brokerage_authorizations [String] Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
47
47
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
48
48
  def get_all_user_holdings_with_http_info(user_id:, user_secret:, brokerage_authorizations: SENTINEL, extra: {})
49
49
  extra[:brokerage_authorizations] = brokerage_authorizations if brokerage_authorizations != SENTINEL
@@ -55,7 +55,7 @@ module SnapTrade
55
55
  # @param user_id [String]
56
56
  # @param user_secret [String]
57
57
  # @param [Hash] opts the optional parameters
58
- # @option opts [String] :brokerage_authorizations Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
58
+ # @option opts [String] :brokerage_authorizations Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
59
59
  # @return [Array<AccountHoldings>]
60
60
  private def get_all_user_holdings_impl(user_id, user_secret, opts = {})
61
61
  data, _status_code, _headers = get_all_user_holdings_with_http_info(user_id, user_secret, opts)
@@ -67,7 +67,7 @@ module SnapTrade
67
67
  # @param user_id [String]
68
68
  # @param user_secret [String]
69
69
  # @param [Hash] opts the optional parameters
70
- # @option opts [String] :brokerage_authorizations Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
70
+ # @option opts [String] :brokerage_authorizations Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
71
71
  # @return [Array<(Array<AccountHoldings>, Integer, Hash)>] Array<AccountHoldings> data, response status code and response headers
72
72
  private def get_all_user_holdings_with_http_info_impl(user_id, user_secret, opts = {})
73
73
  if @api_client.config.debugging
@@ -17,9 +17,9 @@ module SnapTrade
17
17
  @api_client = api_client
18
18
  end
19
19
 
20
- # Delete SnapTrade user
20
+ # Delete user
21
21
  #
22
- # Deletes a user you've registered over the SnapTrade API, and any data associated with them or their investment accounts.
22
+ # Deletes a registered user and all associated data. This action is irreversible. This API is asynchronous and will return a 200 status code if the request is accepted. The user and all associated data will be queued for deletion. Once deleted, a `USER_DELETED` webhook will be sent.
23
23
  #
24
24
  # @param user_id [String]
25
25
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
@@ -28,9 +28,9 @@ module SnapTrade
28
28
  data
29
29
  end
30
30
 
31
- # Delete SnapTrade user
31
+ # Delete user
32
32
  #
33
- # Deletes a user you've registered over the SnapTrade API, and any data associated with them or their investment accounts.
33
+ # Deletes a registered user and all associated data. This action is irreversible. This API is asynchronous and will return a 200 status code if the request is accepted. The user and all associated data will be queued for deletion. Once deleted, a `USER_DELETED` webhook will be sent.
34
34
  #
35
35
  # @param user_id [String]
36
36
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
@@ -38,8 +38,8 @@ module SnapTrade
38
38
  delete_snap_trade_user_with_http_info_impl(user_id, extra)
39
39
  end
40
40
 
41
- # Delete SnapTrade user
42
- # Deletes a user you've registered over the SnapTrade API, and any data associated with them or their investment accounts.
41
+ # Delete user
42
+ # Deletes a registered user and all associated data. This action is irreversible. This API is asynchronous and will return a 200 status code if the request is accepted. The user and all associated data will be queued for deletion. Once deleted, a `USER_DELETED` webhook will be sent.
43
43
  # @param user_id [String]
44
44
  # @param [Hash] opts the optional parameters
45
45
  # @return [DeleteUserResponse]
@@ -48,8 +48,8 @@ module SnapTrade
48
48
  data
49
49
  end
50
50
 
51
- # Delete SnapTrade user
52
- # Deletes a user you&#39;ve registered over the SnapTrade API, and any data associated with them or their investment accounts.
51
+ # Delete user
52
+ # Deletes a registered user and all associated data. This action is irreversible. This API is asynchronous and will return a 200 status code if the request is accepted. The user and all associated data will be queued for deletion. Once deleted, a &#x60;USER_DELETED&#x60; webhook will be sent.
53
53
  # @param user_id [String]
54
54
  # @param [Hash] opts the optional parameters
55
55
  # @return [Array<(DeleteUserResponse, Integer, Hash)>] DeleteUserResponse data, response status code and response headers
@@ -103,9 +103,9 @@ module SnapTrade
103
103
  end
104
104
 
105
105
 
106
- # List SnapTrade users
106
+ # List all users
107
107
  #
108
- # Returns a list of users you've registered over the SnapTrade API.
108
+ # Returns a list of all registered user IDs.
109
109
  #
110
110
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
111
111
  def list_snap_trade_users(extra: {})
@@ -113,17 +113,17 @@ module SnapTrade
113
113
  data
114
114
  end
115
115
 
116
- # List SnapTrade users
116
+ # List all users
117
117
  #
118
- # Returns a list of users you've registered over the SnapTrade API.
118
+ # Returns a list of all registered user IDs.
119
119
  #
120
120
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
121
121
  def list_snap_trade_users_with_http_info(extra: {})
122
122
  list_snap_trade_users_with_http_info_impl(extra)
123
123
  end
124
124
 
125
- # List SnapTrade users
126
- # Returns a list of users you've registered over the SnapTrade API.
125
+ # List all users
126
+ # Returns a list of all registered user IDs.
127
127
  # @param [Hash] opts the optional parameters
128
128
  # @return [Array<String>]
129
129
  private def list_snap_trade_users_impl(opts = {})
@@ -131,8 +131,8 @@ module SnapTrade
131
131
  data
132
132
  end
133
133
 
134
- # List SnapTrade users
135
- # Returns a list of users you&#39;ve registered over the SnapTrade API.
134
+ # List all users
135
+ # Returns a list of all registered user IDs.
136
136
  # @param [Hash] opts the optional parameters
137
137
  # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
138
138
  private def list_snap_trade_users_with_http_info_impl(opts = {})
@@ -186,15 +186,15 @@ module SnapTrade
186
186
  #
187
187
  # @param user_id [String]
188
188
  # @param user_secret [String]
189
- # @param broker [String] Slug of the brokerage to connect the user to. See [this document](https://snaptrade.notion.site/SnapTrade-Brokerage-Integrations-f83946a714a84c3caf599f6a945f0ead) for a list of supported brokerages and their slugs.
190
- # @param immediate_redirect [Boolean] When set to True, user will be redirected back to the partner's site instead of the connection portal
191
- # @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account
192
- # @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See ‘Reconnecting Accounts’ for more information.
193
- # @param connection_type [ConnectionType] Sets whether the connection should be read or trade
194
- # @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render, with a default to 'v3'
189
+ # @param broker [String] Slug of the brokerage to connect the user to. See [the integrations page](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=3cfea70ef4254afc89704e47275a7a9a&pvs=4) for a list of supported brokerages and their slugs.
190
+ # @param immediate_redirect [Boolean] When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more information.
191
+ # @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more information.
192
+ # @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See the [guide on fixing broken connections](https://docs.snaptrade.com/docs/fix-broken-connections) for more information.
193
+ # @param connection_type [ConnectionType] Sets whether the connection should be read-only or trade-enabled.
194
+ # @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render.
195
195
  # @param body [SnapTradeLoginUserRequestBody]
196
196
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
197
- def login_snap_trade_user(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: SENTINEL, connection_portal_version: SENTINEL, extra: {})
197
+ def login_snap_trade_user(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: 'read', connection_portal_version: 'v3', extra: {})
198
198
  _body = {}
199
199
  _body[:broker] = broker if broker != SENTINEL
200
200
  _body[:immediateRedirect] = immediate_redirect if immediate_redirect != SENTINEL
@@ -213,15 +213,15 @@ module SnapTrade
213
213
  #
214
214
  # @param user_id [String]
215
215
  # @param user_secret [String]
216
- # @param broker [String] Slug of the brokerage to connect the user to. See [this document](https://snaptrade.notion.site/SnapTrade-Brokerage-Integrations-f83946a714a84c3caf599f6a945f0ead) for a list of supported brokerages and their slugs.
217
- # @param immediate_redirect [Boolean] When set to True, user will be redirected back to the partner's site instead of the connection portal
218
- # @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account
219
- # @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See ‘Reconnecting Accounts’ for more information.
220
- # @param connection_type [ConnectionType] Sets whether the connection should be read or trade
221
- # @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render, with a default to 'v3'
216
+ # @param broker [String] Slug of the brokerage to connect the user to. See [the integrations page](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=3cfea70ef4254afc89704e47275a7a9a&pvs=4) for a list of supported brokerages and their slugs.
217
+ # @param immediate_redirect [Boolean] When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more information.
218
+ # @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more information.
219
+ # @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See the [guide on fixing broken connections](https://docs.snaptrade.com/docs/fix-broken-connections) for more information.
220
+ # @param connection_type [ConnectionType] Sets whether the connection should be read-only or trade-enabled.
221
+ # @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render.
222
222
  # @param body [SnapTradeLoginUserRequestBody]
223
223
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
224
- def login_snap_trade_user_with_http_info(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: SENTINEL, connection_portal_version: SENTINEL, extra: {})
224
+ def login_snap_trade_user_with_http_info(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: 'read', connection_portal_version: 'v3', extra: {})
225
225
  _body = {}
226
226
  _body[:broker] = broker if broker != SENTINEL
227
227
  _body[:immediateRedirect] = immediate_redirect if immediate_redirect != SENTINEL
@@ -312,7 +312,7 @@ module SnapTrade
312
312
  end
313
313
 
314
314
 
315
- # Create SnapTrade user
315
+ # Register user
316
316
  #
317
317
  # Registers a new SnapTrade user under your ClientID. A user secret will be automatically generated for you and must be properly stored in your database.
318
318
  # Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
@@ -328,7 +328,7 @@ module SnapTrade
328
328
  data
329
329
  end
330
330
 
331
- # Create SnapTrade user
331
+ # Register user
332
332
  #
333
333
  # Registers a new SnapTrade user under your ClientID. A user secret will be automatically generated for you and must be properly stored in your database.
334
334
  # Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
@@ -343,7 +343,7 @@ module SnapTrade
343
343
  register_snap_trade_user_with_http_info_impl(snap_trade_register_user_request_body, extra)
344
344
  end
345
345
 
346
- # Create SnapTrade user
346
+ # Register user
347
347
  # Registers a new SnapTrade user under your ClientID. A user secret will be automatically generated for you and must be properly stored in your database. Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
348
348
  # @param snap_trade_register_user_request_body [SnapTradeRegisterUserRequestBody]
349
349
  # @param [Hash] opts the optional parameters
@@ -353,7 +353,7 @@ module SnapTrade
353
353
  data
354
354
  end
355
355
 
356
- # Create SnapTrade user
356
+ # Register user
357
357
  # Registers a new SnapTrade user under your ClientID. A user secret will be automatically generated for you and must be properly stored in your database. Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
358
358
  # @param snap_trade_register_user_request_body [SnapTradeRegisterUserRequestBody]
359
359
  # @param [Hash] opts the optional parameters
@@ -412,13 +412,12 @@ module SnapTrade
412
412
  end
413
413
 
414
414
 
415
- # Obtain a new user secret for a user
415
+ # Rotate user secret
416
416
  #
417
- # This API is used to rotate the secret for a SnapTrade user. You might use this if a userSecret
418
- # is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
417
+ # Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
419
418
  #
420
419
  # @param user_id [String] SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.
421
- # @param user_secret [String] SnapTrade User Secret randomly generated by SnapTrade. This is privileged information and if compromised, should be rotated via the SnapTrade API.
420
+ # @param user_secret [String] SnapTrade User Secret randomly generated by SnapTrade. This is privileged information and if compromised, should be rotated via the [rotate user secret endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret)
422
421
  # @param body [UserIDandSecret]
423
422
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
424
423
  def reset_snap_trade_user_secret(user_id: SENTINEL, user_secret: SENTINEL, extra: {})
@@ -430,13 +429,12 @@ module SnapTrade
430
429
  data
431
430
  end
432
431
 
433
- # Obtain a new user secret for a user
432
+ # Rotate user secret
434
433
  #
435
- # This API is used to rotate the secret for a SnapTrade user. You might use this if a userSecret
436
- # is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
434
+ # Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
437
435
  #
438
436
  # @param user_id [String] SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.
439
- # @param user_secret [String] SnapTrade User Secret randomly generated by SnapTrade. This is privileged information and if compromised, should be rotated via the SnapTrade API.
437
+ # @param user_secret [String] SnapTrade User Secret randomly generated by SnapTrade. This is privileged information and if compromised, should be rotated via the [rotate user secret endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret)
440
438
  # @param body [UserIDandSecret]
441
439
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
442
440
  def reset_snap_trade_user_secret_with_http_info(user_id: SENTINEL, user_secret: SENTINEL, extra: {})
@@ -447,8 +445,8 @@ module SnapTrade
447
445
  reset_snap_trade_user_secret_with_http_info_impl(user_i_dand_secret, extra)
448
446
  end
449
447
 
450
- # Obtain a new user secret for a user
451
- # This API is used to rotate the secret for a SnapTrade user. You might use this if a userSecret is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
448
+ # Rotate user secret
449
+ # Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
452
450
  # @param user_i_dand_secret [UserIDandSecret]
453
451
  # @param [Hash] opts the optional parameters
454
452
  # @return [UserIDandSecret]
@@ -457,8 +455,8 @@ module SnapTrade
457
455
  data
458
456
  end
459
457
 
460
- # Obtain a new user secret for a user
461
- # This API is used to rotate the secret for a SnapTrade user. You might use this if a userSecret is compromised. Please note that if you call this endpoint and fail to save the new secret, you&#39;ll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
458
+ # Rotate user secret
459
+ # Rotates the secret for a SnapTrade user. You might use this if &#x60;userSecret&#x60; is compromised. Please note that if you call this endpoint and fail to save the new secret, you&#39;ll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
462
460
  # @param user_i_dand_secret [UserIDandSecret]
463
461
  # @param [Hash] opts the optional parameters
464
462
  # @return [Array<(UserIDandSecret, Integer, Hash)>] UserIDandSecret data, response status code and response headers
@@ -527,8 +527,8 @@ module SnapTrade
527
527
  # Returns a list of session events associated with a user.
528
528
  #
529
529
  # @param partner_client_id [String]
530
- # @param user_id [String] Optional comma seperated list of user IDs used to filter the request on specific users
531
- # @param session_id [String] Optional comma seperated list of session IDs used to filter the request on specific users
530
+ # @param user_id [String] Optional comma separated list of user IDs used to filter the request on specific users
531
+ # @param session_id [String] Optional comma separated list of session IDs used to filter the request on specific users
532
532
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
533
533
  def session_events(partner_client_id:, user_id: SENTINEL, session_id: SENTINEL, extra: {})
534
534
  extra[:user_id] = user_id if user_id != SENTINEL
@@ -542,8 +542,8 @@ module SnapTrade
542
542
  # Returns a list of session events associated with a user.
543
543
  #
544
544
  # @param partner_client_id [String]
545
- # @param user_id [String] Optional comma seperated list of user IDs used to filter the request on specific users
546
- # @param session_id [String] Optional comma seperated list of session IDs used to filter the request on specific users
545
+ # @param user_id [String] Optional comma separated list of user IDs used to filter the request on specific users
546
+ # @param session_id [String] Optional comma separated list of session IDs used to filter the request on specific users
547
547
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
548
548
  def session_events_with_http_info(partner_client_id:, user_id: SENTINEL, session_id: SENTINEL, extra: {})
549
549
  extra[:user_id] = user_id if user_id != SENTINEL
@@ -555,8 +555,8 @@ module SnapTrade
555
555
  # Returns a list of session events associated with a user.
556
556
  # @param partner_client_id [String]
557
557
  # @param [Hash] opts the optional parameters
558
- # @option opts [String] :user_id Optional comma seperated list of user IDs used to filter the request on specific users
559
- # @option opts [String] :session_id Optional comma seperated list of session IDs used to filter the request on specific users
558
+ # @option opts [String] :user_id Optional comma separated list of user IDs used to filter the request on specific users
559
+ # @option opts [String] :session_id Optional comma separated list of session IDs used to filter the request on specific users
560
560
  # @return [Array<ConnectionsSessionEvents200ResponseInner>]
561
561
  private def session_events_impl(partner_client_id, opts = {})
562
562
  data, _status_code, _headers = session_events_with_http_info(partner_client_id, opts)
@@ -567,8 +567,8 @@ module SnapTrade
567
567
  # Returns a list of session events associated with a user.
568
568
  # @param partner_client_id [String]
569
569
  # @param [Hash] opts the optional parameters
570
- # @option opts [String] :user_id Optional comma seperated list of user IDs used to filter the request on specific users
571
- # @option opts [String] :session_id Optional comma seperated list of session IDs used to filter the request on specific users
570
+ # @option opts [String] :user_id Optional comma separated list of user IDs used to filter the request on specific users
571
+ # @option opts [String] :session_id Optional comma separated list of session IDs used to filter the request on specific users
572
572
  # @return [Array<(Array<ConnectionsSessionEvents200ResponseInner>, Integer, Hash)>] Array<ConnectionsSessionEvents200ResponseInner> data, response status code and response headers
573
573
  private def session_events_with_http_info_impl(partner_client_id, opts = {})
574
574
  if @api_client.config.debugging