snaptrade 2.0.139 → 2.0.141

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: 177324a2ac7f2e9389c88507b90f97a07610b19a2c0f797af0559a84ad74bc9e
4
- data.tar.gz: a12bf1f72419d045d2f182d5c5ec4e9ab5c2399695e20f0801e9222cdf9fa8bc
3
+ metadata.gz: 81916b27671774af4dabc3bb467c3ccb6f4ee19b43c0b98eb7653f7304f23889
4
+ data.tar.gz: 6d7899e2826b82a38d4a9acbb97a283c5556bee74cf7454011f037f68b8265a2
5
5
  SHA512:
6
- metadata.gz: 84ba0bf06578fd79d06cb93c87318742b28cc79e592545f389bdff7342b8bed81f4d172546d0ed4a4d2e45ba2bd2f4a30edf2ba32f9f8b6a1058ea0c3111094c
7
- data.tar.gz: 8637197462c81af1d740a08595fff1c0e9e5f89d87c57d8c5bf3560f08e12968667e4f799e889ee3621425e3afa22593f596032d796ff0b8d6235fe35fc8fad7
6
+ metadata.gz: c0e7b22c1ece6a16010bf1aff5a0cd5dd6e0e0bdcdb974444776df3eae6cc7943dbb02a7a05e1e00941a7836db6613f2462f5e5bba9561bd932638c6536f518f
7
+ data.tar.gz: ef1ad7dc29b0ad2e7e5c56a377d388e997e9a2c6e505da0b561a63a0ea741a1e370099d60a40d9c5c6f14d387b0b60d4fc9f7f846e6ff3e6df98bdc0fade5734
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.139)
4
+ snaptrade (2.0.141)
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.139-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.139)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.141-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.141)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -81,7 +81,7 @@ Connect brokerage accounts to your app for live positions and trading
81
81
  Add to Gemfile:
82
82
 
83
83
  ```ruby
84
- gem 'snaptrade', '~> 2.0.139'
84
+ gem 'snaptrade', '~> 2.0.141'
85
85
  ```
86
86
 
87
87
  ## Getting Started<a id="getting-started"></a>
@@ -527,6 +527,8 @@ Returns a list of balances, positions, and recent orders for the specified accou
527
527
 
528
528
  The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
529
529
 
530
+ If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
531
+
530
532
 
531
533
  #### 🛠️ Usage<a id="🛠️-usage"></a>
532
534
 
@@ -717,6 +719,7 @@ result = snaptrade.authentication.login_snap_trade_user(
717
719
  custom_redirect: "https://snaptrade.com",
718
720
  reconnect: "8b5f262d-4bb9-365d-888a-202bd3b15fa1",
719
721
  connection_type: "read",
722
+ show_close_button: true,
720
723
  connection_portal_version: "v4",
721
724
  )
722
725
  p result
@@ -754,6 +757,10 @@ Determines connection permissions (default: read) - `read`: Data access only. -
754
757
  a trading connection if the brokerage supports it, otherwise falls back to
755
758
  read-only access automatically.
756
759
 
760
+ ##### showCloseButton: `Boolean`<a id="showclosebutton-boolean"></a>
761
+ Controls whether the close (X) button is displayed in the connection portal.
762
+ When false, you control closing behavior from your app. Defaults to true.
763
+
757
764
  ##### connectionPortalVersion: [`ConnectionPortalVersion`](./lib/snaptrade/models/connection_portal_version.rb)<a id="connectionportalversion-connectionportalversionlibsnaptrademodelsconnection_portal_versionrb"></a>
758
765
  Sets the connection portal version to render. Currently only v4 is supported and
759
766
  is the default. All other versions are deprecated and will automatically be set
@@ -1095,6 +1095,8 @@ module SnapTrade
1095
1095
  # Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__
1096
1096
  #
1097
1097
  # The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
1098
+ #
1099
+ # If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1098
1100
  #
1099
1101
  # @param account_id [String]
1100
1102
  # @param user_id [String]
@@ -1110,6 +1112,8 @@ module SnapTrade
1110
1112
  # Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__
1111
1113
  #
1112
1114
  # The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
1115
+ #
1116
+ # If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1113
1117
  #
1114
1118
  # @param account_id [String]
1115
1119
  # @param user_id [String]
@@ -1120,7 +1124,7 @@ module SnapTrade
1120
1124
  end
1121
1125
 
1122
1126
  # List account holdings
1123
- # Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
1127
+ # Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1124
1128
  # @param account_id [String]
1125
1129
  # @param user_id [String]
1126
1130
  # @param user_secret [String]
@@ -1132,7 +1136,7 @@ module SnapTrade
1132
1136
  end
1133
1137
 
1134
1138
  # List account holdings
1135
- # Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v&#x3D;d16c4c97b8d5438bbb2d8581ac53b11e) and look for \&quot;Cache Expiry Time\&quot; to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
1139
+ # Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v&#x3D;d16c4c97b8d5438bbb2d8581ac53b11e) and look for \&quot;Cache Expiry Time\&quot; to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1136
1140
  # @param account_id [String]
1137
1141
  # @param user_id [String]
1138
1142
  # @param user_secret [String]
@@ -193,16 +193,18 @@ module SnapTrade
193
193
  # @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](/docs/implement-connection-portal) for more information.
194
194
  # @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](/docs/fix-broken-connections) for more information.
195
195
  # @param connection_type [ConnectionType] Determines connection permissions (default: read) - `read`: Data access only. - `trade`: Data and trading access. - `trade-if-available`: Attempts to establish a trading connection if the brokerage supports it, otherwise falls back to read-only access automatically.
196
+ # @param show_close_button [Boolean] Controls whether the close (X) button is displayed in the connection portal. When false, you control closing behavior from your app. Defaults to true.
196
197
  # @param connection_portal_version [ConnectionPortalVersion] Sets the connection portal version to render. Currently only v4 is supported and is the default. All other versions are deprecated and will automatically be set to v4.
197
198
  # @param body [SnapTradeLoginUserRequestBody]
198
199
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
199
- 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: 'v4', extra: {})
200
+ def login_snap_trade_user(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: 'read', show_close_button: SENTINEL, connection_portal_version: 'v4', extra: {})
200
201
  _body = {}
201
202
  _body[:broker] = broker if broker != SENTINEL
202
203
  _body[:immediateRedirect] = immediate_redirect if immediate_redirect != SENTINEL
203
204
  _body[:customRedirect] = custom_redirect if custom_redirect != SENTINEL
204
205
  _body[:reconnect] = reconnect if reconnect != SENTINEL
205
206
  _body[:connectionType] = connection_type if connection_type != SENTINEL
207
+ _body[:showCloseButton] = show_close_button if show_close_button != SENTINEL
206
208
  _body[:connectionPortalVersion] = connection_portal_version if connection_portal_version != SENTINEL
207
209
  extra[:snap_trade_login_user_request_body] = _body if !_body.empty?
208
210
  data, _status_code, _headers = login_snap_trade_user_with_http_info_impl(user_id, user_secret, extra)
@@ -222,16 +224,18 @@ module SnapTrade
222
224
  # @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](/docs/implement-connection-portal) for more information.
223
225
  # @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](/docs/fix-broken-connections) for more information.
224
226
  # @param connection_type [ConnectionType] Determines connection permissions (default: read) - `read`: Data access only. - `trade`: Data and trading access. - `trade-if-available`: Attempts to establish a trading connection if the brokerage supports it, otherwise falls back to read-only access automatically.
227
+ # @param show_close_button [Boolean] Controls whether the close (X) button is displayed in the connection portal. When false, you control closing behavior from your app. Defaults to true.
225
228
  # @param connection_portal_version [ConnectionPortalVersion] Sets the connection portal version to render. Currently only v4 is supported and is the default. All other versions are deprecated and will automatically be set to v4.
226
229
  # @param body [SnapTradeLoginUserRequestBody]
227
230
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
228
- 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: 'v4', extra: {})
231
+ 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', show_close_button: SENTINEL, connection_portal_version: 'v4', extra: {})
229
232
  _body = {}
230
233
  _body[:broker] = broker if broker != SENTINEL
231
234
  _body[:immediateRedirect] = immediate_redirect if immediate_redirect != SENTINEL
232
235
  _body[:customRedirect] = custom_redirect if custom_redirect != SENTINEL
233
236
  _body[:reconnect] = reconnect if reconnect != SENTINEL
234
237
  _body[:connectionType] = connection_type if connection_type != SENTINEL
238
+ _body[:showCloseButton] = show_close_button if show_close_button != SENTINEL
235
239
  _body[:connectionPortalVersion] = connection_portal_version if connection_portal_version != SENTINEL
236
240
  extra[:snap_trade_login_user_request_body] = _body if !_body.empty?
237
241
  login_snap_trade_user_with_http_info_impl(user_id, user_secret, extra)
@@ -28,6 +28,9 @@ module SnapTrade
28
28
  # Determines connection permissions (default: read) - `read`: Data access only. - `trade`: Data and trading access. - `trade-if-available`: Attempts to establish a trading connection if the brokerage supports it, otherwise falls back to read-only access automatically.
29
29
  attr_accessor :connection_type
30
30
 
31
+ # Controls whether the close (X) button is displayed in the connection portal. When false, you control closing behavior from your app. Defaults to true.
32
+ attr_accessor :show_close_button
33
+
31
34
  # Sets the connection portal version to render. Currently only v4 is supported and is the default. All other versions are deprecated and will automatically be set to v4.
32
35
  attr_accessor :connection_portal_version
33
36
 
@@ -39,6 +42,7 @@ module SnapTrade
39
42
  :'custom_redirect' => :'customRedirect',
40
43
  :'reconnect' => :'reconnect',
41
44
  :'connection_type' => :'connectionType',
45
+ :'show_close_button' => :'showCloseButton',
42
46
  :'connection_portal_version' => :'connectionPortalVersion'
43
47
  }
44
48
  end
@@ -56,6 +60,7 @@ module SnapTrade
56
60
  :'custom_redirect' => :'String',
57
61
  :'reconnect' => :'String',
58
62
  :'connection_type' => :'ConnectionType',
63
+ :'show_close_button' => :'Boolean',
59
64
  :'connection_portal_version' => :'ConnectionPortalVersion'
60
65
  }
61
66
  end
@@ -103,6 +108,10 @@ module SnapTrade
103
108
  self.connection_type = 'read'
104
109
  end
105
110
 
111
+ if attributes.key?(:'show_close_button')
112
+ self.show_close_button = attributes[:'show_close_button']
113
+ end
114
+
106
115
  if attributes.key?(:'connection_portal_version')
107
116
  self.connection_portal_version = attributes[:'connection_portal_version']
108
117
  else
@@ -133,6 +142,7 @@ module SnapTrade
133
142
  custom_redirect == o.custom_redirect &&
134
143
  reconnect == o.reconnect &&
135
144
  connection_type == o.connection_type &&
145
+ show_close_button == o.show_close_button &&
136
146
  connection_portal_version == o.connection_portal_version
137
147
  end
138
148
 
@@ -145,7 +155,7 @@ module SnapTrade
145
155
  # Calculates hash code according to all attributes.
146
156
  # @return [Integer] Hash code
147
157
  def hash
148
- [broker, immediate_redirect, custom_redirect, reconnect, connection_type, connection_portal_version].hash
158
+ [broker, immediate_redirect, custom_redirect, reconnect, connection_type, show_close_button, connection_portal_version].hash
149
159
  end
150
160
 
151
161
  # Builds the object from hash
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.139'
11
+ VERSION = '2.0.141'
12
12
  end
@@ -164,7 +164,7 @@ describe 'AccountInformationApi' do
164
164
 
165
165
  # unit tests for get_user_holdings
166
166
  # List account holdings
167
- # Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v&#x3D;d16c4c97b8d5438bbb2d8581ac53b11e) and look for \&quot;Cache Expiry Time\&quot; to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
167
+ # Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v&#x3D;d16c4c97b8d5438bbb2d8581ac53b11e) and look for \&quot;Cache Expiry Time\&quot; to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
168
168
  # @param account_id
169
169
  # @param user_id
170
170
  # @param user_secret
@@ -50,6 +50,12 @@ describe SnapTrade::SnapTradeLoginUserRequestBody do
50
50
  end
51
51
  end
52
52
 
53
+ describe 'test attribute "show_close_button"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
53
59
  describe 'test attribute "connection_portal_version"' do
54
60
  it 'should work' do
55
61
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snaptrade
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.139
4
+ version: 2.0.141
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-29 00:00:00.000000000 Z
11
+ date: 2025-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday