snaptrade 2.0.147 → 2.0.149

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: 53fb91666d99d24d7f0cdc3aeb138718f8866c33969da189032618829de3a0c1
4
- data.tar.gz: a083b24828187093a23b276c3abc177a6b3a4f2777439c9859a2d8c3e913e3f1
3
+ metadata.gz: 4c2eea1a162f4063d976df226e31e41c00bee4a5fa86e75bcbfca5a831a804c1
4
+ data.tar.gz: 45ea7534078adfae02de30ca2ba55bd340ac908ed8bae35e3af2d15b1d665f8e
5
5
  SHA512:
6
- metadata.gz: 62c6cdf3102ff3faa8df63128271f449796b193bb4bdaf63b581339381afd6e4df53aab29543e49cc84465afe3110319017344c7fed183b3d82f0c82c3d6b69b
7
- data.tar.gz: dbbc70112a5b7cc5e3d84dcd5d6e089744274f54db083c4fbcf70f7164c6f6b16aa4b63d41f58ca74f98285127a3115cfeeec10a681ea21f10283ec8c51f78c1
6
+ metadata.gz: 1db47ebec287540676e4cc783f750c634a397837ecefe5c07f387fa663864ef65de9c6936ab285998ccaba43d7b7716ee1c44dc768a6978458e8afd6031f9da8
7
+ data.tar.gz: d092f5b7c228660a15f8fab4df9164cd93aa529687dbe5904c1f13fc53a1ed09303bec3c04b6128e24bd407ac8933940216c351436d44f534c34da596805b5e6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.147)
4
+ snaptrade (2.0.149)
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.147-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.147)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.149-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.149)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -83,7 +83,7 @@ Connect brokerage accounts to your app for live positions and trading
83
83
  Add to Gemfile:
84
84
 
85
85
  ```ruby
86
- gem 'snaptrade', '~> 2.0.147'
86
+ gem 'snaptrade', '~> 2.0.149'
87
87
  ```
88
88
 
89
89
  ## Getting Started<a id="getting-started"></a>
@@ -745,6 +745,7 @@ result = snaptrade.authentication.login_snap_trade_user(
745
745
  reconnect: "8b5f262d-4bb9-365d-888a-202bd3b15fa1",
746
746
  connection_type: "read",
747
747
  show_close_button: true,
748
+ dark_mode: true,
748
749
  connection_portal_version: "v4",
749
750
  )
750
751
  p result
@@ -786,6 +787,9 @@ read-only access automatically.
786
787
  Controls whether the close (X) button is displayed in the connection portal.
787
788
  When false, you control closing behavior from your app. Defaults to true.
788
789
 
790
+ ##### darkMode: `Boolean`<a id="darkmode-boolean"></a>
791
+ Enable dark mode for the connection portal. Defaults to false.
792
+
789
793
  ##### connectionPortalVersion: [`ConnectionPortalVersion`](./lib/snaptrade/models/connection_portal_version.rb)<a id="connectionportalversion-connectionportalversionlibsnaptrademodelsconnection_portal_versionrb"></a>
790
794
  Sets the connection portal version to render. Currently only v4 is supported and
791
795
  is the default. All other versions are deprecated and will automatically be set
@@ -194,10 +194,11 @@ module SnapTrade
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
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.
197
+ # @param dark_mode [Boolean] Enable dark mode for the connection portal. Defaults to false.
197
198
  # @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.
198
199
  # @param body [SnapTradeLoginUserRequestBody]
199
200
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
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: {})
201
+ 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, dark_mode: SENTINEL, connection_portal_version: 'v4', extra: {})
201
202
  _body = {}
202
203
  _body[:broker] = broker if broker != SENTINEL
203
204
  _body[:immediateRedirect] = immediate_redirect if immediate_redirect != SENTINEL
@@ -205,6 +206,7 @@ module SnapTrade
205
206
  _body[:reconnect] = reconnect if reconnect != SENTINEL
206
207
  _body[:connectionType] = connection_type if connection_type != SENTINEL
207
208
  _body[:showCloseButton] = show_close_button if show_close_button != SENTINEL
209
+ _body[:darkMode] = dark_mode if dark_mode != SENTINEL
208
210
  _body[:connectionPortalVersion] = connection_portal_version if connection_portal_version != SENTINEL
209
211
  extra[:snap_trade_login_user_request_body] = _body if !_body.empty?
210
212
  data, _status_code, _headers = login_snap_trade_user_with_http_info_impl(user_id, user_secret, extra)
@@ -225,10 +227,11 @@ module SnapTrade
225
227
  # @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.
226
228
  # @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
229
  # @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.
230
+ # @param dark_mode [Boolean] Enable dark mode for the connection portal. Defaults to false.
228
231
  # @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.
229
232
  # @param body [SnapTradeLoginUserRequestBody]
230
233
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
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: {})
234
+ 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, dark_mode: SENTINEL, connection_portal_version: 'v4', extra: {})
232
235
  _body = {}
233
236
  _body[:broker] = broker if broker != SENTINEL
234
237
  _body[:immediateRedirect] = immediate_redirect if immediate_redirect != SENTINEL
@@ -236,6 +239,7 @@ module SnapTrade
236
239
  _body[:reconnect] = reconnect if reconnect != SENTINEL
237
240
  _body[:connectionType] = connection_type if connection_type != SENTINEL
238
241
  _body[:showCloseButton] = show_close_button if show_close_button != SENTINEL
242
+ _body[:darkMode] = dark_mode if dark_mode != SENTINEL
239
243
  _body[:connectionPortalVersion] = connection_portal_version if connection_portal_version != SENTINEL
240
244
  extra[:snap_trade_login_user_request_body] = _body if !_body.empty?
241
245
  login_snap_trade_user_with_http_info_impl(user_id, user_secret, extra)
@@ -50,6 +50,9 @@ module SnapTrade
50
50
  # This field is deprecated.
51
51
  attr_accessor :cash_restrictions
52
52
 
53
+ # Indicates whether the account is a paper (simulated) trading account.
54
+ attr_accessor :is_paper
55
+
53
56
  # Attribute mapping from ruby-style variable name to JSON key.
54
57
  def self.attribute_map
55
58
  {
@@ -65,7 +68,8 @@ module SnapTrade
65
68
  :'raw_type' => :'raw_type',
66
69
  :'meta' => :'meta',
67
70
  :'portfolio_group' => :'portfolio_group',
68
- :'cash_restrictions' => :'cash_restrictions'
71
+ :'cash_restrictions' => :'cash_restrictions',
72
+ :'is_paper' => :'is_paper'
69
73
  }
70
74
  end
71
75
 
@@ -89,7 +93,8 @@ module SnapTrade
89
93
  :'raw_type' => :'String',
90
94
  :'meta' => :'Hash<String, Object>',
91
95
  :'portfolio_group' => :'String',
92
- :'cash_restrictions' => :'Array<String>'
96
+ :'cash_restrictions' => :'Array<String>',
97
+ :'is_paper' => :'Boolean'
93
98
  }
94
99
  end
95
100
 
@@ -172,6 +177,10 @@ module SnapTrade
172
177
  self.cash_restrictions = value
173
178
  end
174
179
  end
180
+
181
+ if attributes.key?(:'is_paper')
182
+ self.is_paper = attributes[:'is_paper']
183
+ end
175
184
  end
176
185
 
177
186
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -206,6 +215,10 @@ module SnapTrade
206
215
  invalid_properties.push('invalid value for "balance", balance cannot be nil.')
207
216
  end
208
217
 
218
+ if @is_paper.nil?
219
+ invalid_properties.push('invalid value for "is_paper", is_paper cannot be nil.')
220
+ end
221
+
209
222
  invalid_properties
210
223
  end
211
224
 
@@ -219,6 +232,7 @@ module SnapTrade
219
232
  return false if @created_date.nil?
220
233
  return false if @sync_status.nil?
221
234
  return false if @balance.nil?
235
+ return false if @is_paper.nil?
222
236
  true
223
237
  end
224
238
 
@@ -239,7 +253,8 @@ module SnapTrade
239
253
  raw_type == o.raw_type &&
240
254
  meta == o.meta &&
241
255
  portfolio_group == o.portfolio_group &&
242
- cash_restrictions == o.cash_restrictions
256
+ cash_restrictions == o.cash_restrictions &&
257
+ is_paper == o.is_paper
243
258
  end
244
259
 
245
260
  # @see the `==` method
@@ -251,7 +266,7 @@ module SnapTrade
251
266
  # Calculates hash code according to all attributes.
252
267
  # @return [Integer] Hash code
253
268
  def hash
254
- [id, brokerage_authorization, name, number, institution_name, created_date, sync_status, balance, status, raw_type, meta, portfolio_group, cash_restrictions].hash
269
+ [id, brokerage_authorization, name, number, institution_name, created_date, sync_status, balance, status, raw_type, meta, portfolio_group, cash_restrictions, is_paper].hash
255
270
  end
256
271
 
257
272
  # Builds the object from hash
@@ -31,6 +31,9 @@ module SnapTrade
31
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
32
  attr_accessor :show_close_button
33
33
 
34
+ # Enable dark mode for the connection portal. Defaults to false.
35
+ attr_accessor :dark_mode
36
+
34
37
  # 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.
35
38
  attr_accessor :connection_portal_version
36
39
 
@@ -43,6 +46,7 @@ module SnapTrade
43
46
  :'reconnect' => :'reconnect',
44
47
  :'connection_type' => :'connectionType',
45
48
  :'show_close_button' => :'showCloseButton',
49
+ :'dark_mode' => :'darkMode',
46
50
  :'connection_portal_version' => :'connectionPortalVersion'
47
51
  }
48
52
  end
@@ -61,6 +65,7 @@ module SnapTrade
61
65
  :'reconnect' => :'String',
62
66
  :'connection_type' => :'ConnectionType',
63
67
  :'show_close_button' => :'Boolean',
68
+ :'dark_mode' => :'Boolean',
64
69
  :'connection_portal_version' => :'ConnectionPortalVersion'
65
70
  }
66
71
  end
@@ -112,6 +117,10 @@ module SnapTrade
112
117
  self.show_close_button = attributes[:'show_close_button']
113
118
  end
114
119
 
120
+ if attributes.key?(:'dark_mode')
121
+ self.dark_mode = attributes[:'dark_mode']
122
+ end
123
+
115
124
  if attributes.key?(:'connection_portal_version')
116
125
  self.connection_portal_version = attributes[:'connection_portal_version']
117
126
  else
@@ -143,6 +152,7 @@ module SnapTrade
143
152
  reconnect == o.reconnect &&
144
153
  connection_type == o.connection_type &&
145
154
  show_close_button == o.show_close_button &&
155
+ dark_mode == o.dark_mode &&
146
156
  connection_portal_version == o.connection_portal_version
147
157
  end
148
158
 
@@ -155,7 +165,7 @@ module SnapTrade
155
165
  # Calculates hash code according to all attributes.
156
166
  # @return [Integer] Hash code
157
167
  def hash
158
- [broker, immediate_redirect, custom_redirect, reconnect, connection_type, show_close_button, connection_portal_version].hash
168
+ [broker, immediate_redirect, custom_redirect, reconnect, connection_type, show_close_button, dark_mode, connection_portal_version].hash
159
169
  end
160
170
 
161
171
  # 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.147'
11
+ VERSION = '2.0.149'
12
12
  end
@@ -98,4 +98,10 @@ describe SnapTrade::Account do
98
98
  end
99
99
  end
100
100
 
101
+ describe 'test attribute "is_paper"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
101
107
  end
@@ -56,6 +56,12 @@ describe SnapTrade::SnapTradeLoginUserRequestBody do
56
56
  end
57
57
  end
58
58
 
59
+ describe 'test attribute "dark_mode"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
59
65
  describe 'test attribute "connection_portal_version"' do
60
66
  it 'should work' do
61
67
  # 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.147
4
+ version: 2.0.149
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-14 00:00:00.000000000 Z
11
+ date: 2025-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday