snaptrade 2.0.139 → 2.0.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +7 -2
- data/lib/snaptrade/api/authentication_api.rb +6 -2
- data/lib/snaptrade/models/snap_trade_login_user_request_body.rb +11 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/models/snap_trade_login_user_request_body_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a96d386681ce83b08ebd7c60947e1f1dc3374dc00f0cb7a687b7258937ea941b
|
4
|
+
data.tar.gz: 988bad9b950c80b1f84e9c3cb960e616f0ddc92e99020f60cfac16e70864bfd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac8b86d303bddf1229551047f49903f6825f0c799bf3e4d9b3f59a1c8a49ad3a1bd20205d40583522a8630a4e449e797c284438ce5f4191f328d18f489a806d4
|
7
|
+
data.tar.gz: c2919a88abbd4c6a5871ea4c7f0801eb79d8a6515ffdfe601a3a01069aa904ad1ad79134999ccbfbe164febf05f23cf563e94b42cd151b0514f912553509b632
|
data/Gemfile.lock
CHANGED
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
|
-
[](https://rubygems.org/gems/snaptrade/versions/2.0.140)
|
10
10
|
[](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.
|
84
|
+
gem 'snaptrade', '~> 2.0.140'
|
85
85
|
```
|
86
86
|
|
87
87
|
## Getting Started<a id="getting-started"></a>
|
@@ -717,6 +717,7 @@ result = snaptrade.authentication.login_snap_trade_user(
|
|
717
717
|
custom_redirect: "https://snaptrade.com",
|
718
718
|
reconnect: "8b5f262d-4bb9-365d-888a-202bd3b15fa1",
|
719
719
|
connection_type: "read",
|
720
|
+
show_close_button: true,
|
720
721
|
connection_portal_version: "v4",
|
721
722
|
)
|
722
723
|
p result
|
@@ -754,6 +755,10 @@ Determines connection permissions (default: read) - `read`: Data access only. -
|
|
754
755
|
a trading connection if the brokerage supports it, otherwise falls back to
|
755
756
|
read-only access automatically.
|
756
757
|
|
758
|
+
##### showCloseButton: `Boolean`<a id="showclosebutton-boolean"></a>
|
759
|
+
Controls whether the close (X) button is displayed in the connection portal.
|
760
|
+
When false, you control closing behavior from your app. Defaults to true.
|
761
|
+
|
757
762
|
##### connectionPortalVersion: [`ConnectionPortalVersion`](./lib/snaptrade/models/connection_portal_version.rb)<a id="connectionportalversion-connectionportalversionlibsnaptrademodelsconnection_portal_versionrb"></a>
|
758
763
|
Sets the connection portal version to render. Currently only v4 is supported and
|
759
764
|
is the default. All other versions are deprecated and will automatically be set
|
@@ -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
|
data/lib/snaptrade/version.rb
CHANGED
@@ -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
|