snaptrade 2.0.28 → 2.0.29

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: 2fe92620a58d056da38b520075900fca5e87dba39e7672055d1dc2c3b4397615
4
- data.tar.gz: ca4859a220b98ede43621daaa2fe68d957abe9c082b13c08b69d1b208e86382b
3
+ metadata.gz: eda55725a9b97295f947e385aaa5003b02a7d20e8e4603cefa5a17dbdf27215d
4
+ data.tar.gz: f03cb7a20b125bb83a122fa42ab9948891583bb8f4888d365ec225e51f1220a1
5
5
  SHA512:
6
- metadata.gz: 34e441cc2e218a54300ccbce4e4c4259f75fe4d134cc2f3b0cd7f4bdb8d5ab507ca1c6886fcb248883cbd8d6e321efb78d900099056279747c2a11a35e0e6bab
7
- data.tar.gz: 5197c3ad9f01759083ae79c142a96383dfa3e20dbcd052efea58c260e9e7f5797436576c86dcf784e20d9668c02ff203c9896e03509152abdda192f46dd72987
6
+ metadata.gz: dec55a480470054f6c039189d796edf016ff838ab276afa435c2b8f6fd7df6c94687ca474af52311a16c2a039a819043e938fbb228be751d67ccae77ec145590
7
+ data.tar.gz: 7213d617ae5118e8f7b313bbafa49446e17134c7b5fefc961626cdab60f28e61844bc8345fb40b8b77a2794aabf88b8102df9c2cb3afa1d4ffbc7d854fb35800
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.27)
4
+ snaptrade (2.0.28)
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.28-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.28)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.29-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.29)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -29,7 +29,6 @@ Connect brokerage accounts to your app for live positions and trading
29
29
  * [`snaptrade.account_information.update_user_account`](#snaptradeaccount_informationupdate_user_account)
30
30
  * [`snaptrade.api_status.check`](#snaptradeapi_statuscheck)
31
31
  * [`snaptrade.authentication.delete_snap_trade_user`](#snaptradeauthenticationdelete_snap_trade_user)
32
- * [`snaptrade.authentication.get_user_jwt`](#snaptradeauthenticationget_user_jwt)
33
32
  * [`snaptrade.authentication.list_snap_trade_users`](#snaptradeauthenticationlist_snap_trade_users)
34
33
  * [`snaptrade.authentication.login_snap_trade_user`](#snaptradeauthenticationlogin_snap_trade_user)
35
34
  * [`snaptrade.authentication.register_snap_trade_user`](#snaptradeauthenticationregister_snap_trade_user)
@@ -71,7 +70,7 @@ Connect brokerage accounts to your app for live positions and trading
71
70
  Add to Gemfile:
72
71
 
73
72
  ```ruby
74
- gem 'snaptrade', '~> 2.0.28'
73
+ gem 'snaptrade', '~> 2.0.29'
75
74
  ```
76
75
 
77
76
  ## Getting Started<a id="getting-started"></a>
@@ -457,39 +456,6 @@ p result
457
456
  ---
458
457
 
459
458
 
460
- ### `snaptrade.authentication.get_user_jwt`<a id="snaptradeauthenticationget_user_jwt"></a>
461
-
462
- This API is available to ClientIDs which have opted to use encrypted
463
- JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
464
-
465
-
466
- #### 🛠️ Usage<a id="🛠️-usage"></a>
467
-
468
- ```ruby
469
- result = snaptrade.authentication.get_user_jwt(
470
- user_id: "snaptrade-user-123",
471
- user_secret: "USERSECRET123",
472
- )
473
- p result
474
- ```
475
-
476
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
477
-
478
- ##### user_id: `String`<a id="user_id-string"></a>
479
- ##### user_secret: `String`<a id="user_secret-string"></a>
480
- #### 🔄 Return<a id="🔄-return"></a>
481
-
482
- [EncryptedResponse](./lib/snaptrade/models/encrypted_response.rb)
483
-
484
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
485
-
486
- `/snapTrade/encryptedJWT` `GET`
487
-
488
- [🔙 **Back to Table of Contents**](#table-of-contents)
489
-
490
- ---
491
-
492
-
493
459
  ### `snaptrade.authentication.list_snap_trade_users`<a id="snaptradeauthenticationlist_snap_trade_users"></a>
494
460
 
495
461
  Returns a list of users you've registered over the SnapTrade API.
@@ -103,103 +103,6 @@ module SnapTrade
103
103
  end
104
104
 
105
105
 
106
- # Generate encrypted JWT token
107
- #
108
- # This API is available to ClientIDs which have opted to use encrypted
109
- # JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
110
- #
111
- # @param user_id [String]
112
- # @param user_secret [String]
113
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
114
- def get_user_jwt(user_id:, user_secret:, extra: {})
115
- data, _status_code, _headers = get_user_jwt_with_http_info_impl(user_id, user_secret, extra)
116
- data
117
- end
118
-
119
- # Generate encrypted JWT token
120
- #
121
- # This API is available to ClientIDs which have opted to use encrypted
122
- # JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
123
- #
124
- # @param user_id [String]
125
- # @param user_secret [String]
126
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
127
- def get_user_jwt_with_http_info(user_id:, user_secret:, extra: {})
128
- get_user_jwt_with_http_info_impl(user_id, user_secret, extra)
129
- end
130
-
131
- # Generate encrypted JWT token
132
- # This API is available to ClientIDs which have opted to use encrypted JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
133
- # @param user_id [String]
134
- # @param user_secret [String]
135
- # @param [Hash] opts the optional parameters
136
- # @return [EncryptedResponse]
137
- private def get_user_jwt_impl(user_id, user_secret, opts = {})
138
- data, _status_code, _headers = get_user_jwt_with_http_info(user_id, user_secret, opts)
139
- data
140
- end
141
-
142
- # Generate encrypted JWT token
143
- # This API is available to ClientIDs which have opted to use encrypted JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
144
- # @param user_id [String]
145
- # @param user_secret [String]
146
- # @param [Hash] opts the optional parameters
147
- # @return [Array<(EncryptedResponse, Integer, Hash)>] EncryptedResponse data, response status code and response headers
148
- private def get_user_jwt_with_http_info_impl(user_id, user_secret, opts = {})
149
- if @api_client.config.debugging
150
- @api_client.config.logger.debug 'Calling API: AuthenticationApi.get_user_jwt ...'
151
- end
152
- # verify the required parameter 'user_id' is set
153
- if @api_client.config.client_side_validation && user_id.nil?
154
- fail ArgumentError, "Missing the required parameter 'user_id' when calling AuthenticationApi.get_user_jwt"
155
- end
156
- # verify the required parameter 'user_secret' is set
157
- if @api_client.config.client_side_validation && user_secret.nil?
158
- fail ArgumentError, "Missing the required parameter 'user_secret' when calling AuthenticationApi.get_user_jwt"
159
- end
160
- # resource path
161
- local_var_path = '/snapTrade/encryptedJWT'
162
-
163
- # query parameters
164
- query_params = opts[:query_params] || {}
165
- query_params[:'userId'] = user_id
166
- query_params[:'userSecret'] = user_secret
167
-
168
- # header parameters
169
- header_params = opts[:header_params] || {}
170
- # HTTP header 'Accept' (if needed)
171
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
172
-
173
- # form parameters
174
- form_params = opts[:form_params] || {}
175
-
176
- # http body (model)
177
- post_body = opts[:debug_body]
178
-
179
- # return_type
180
- return_type = opts[:debug_return_type] || 'EncryptedResponse'
181
-
182
- # auth_names
183
- auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
184
-
185
- new_options = opts.merge(
186
- :operation => :"AuthenticationApi.get_user_jwt",
187
- :header_params => header_params,
188
- :query_params => query_params,
189
- :form_params => form_params,
190
- :body => post_body,
191
- :auth_names => auth_names,
192
- :return_type => return_type
193
- )
194
-
195
- data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
196
- if @api_client.config.debugging
197
- @api_client.config.logger.debug "API called: AuthenticationApi#get_user_jwt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
- end
199
- return data, status_code, headers, response
200
- end
201
-
202
-
203
106
  # List SnapTrade users
204
107
  #
205
108
  # Returns a list of users you've registered over the SnapTrade API.
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.28'
11
+ VERSION = '2.0.29'
12
12
  end
@@ -39,19 +39,6 @@ describe 'AuthenticationApi' do
39
39
  end
40
40
  end
41
41
 
42
- # unit tests for get_user_jwt
43
- # Generate encrypted JWT token
44
- # This API is available to ClientIDs which have opted to use encrypted JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
45
- # @param user_id
46
- # @param user_secret
47
- # @param [Hash] opts the optional parameters
48
- # @return [EncryptedResponse]
49
- describe 'get_user_jwt test' do
50
- it 'should work' do
51
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
52
- end
53
- end
54
-
55
42
  # unit tests for list_snap_trade_users
56
43
  # List SnapTrade users
57
44
  # Returns a list of users you&#39;ve registered over the SnapTrade API.
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.28
4
+ version: 2.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-12 00:00:00.000000000 Z
11
+ date: 2024-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday