app_token_api 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/app_token_api.gemspec +1 -1
- data/lib/admin_api/api/app_token_api.rb +2 -2
- data/lib/admin_api/api/auto_generate_app_token_api.rb +2 -2
- data/lib/admin_api/api/card_api.rb +371 -0
- data/lib/admin_api/api/client_api.rb +368 -0
- data/lib/admin_api/api_client.rb +2 -2
- data/lib/admin_api/api_error.rb +1 -1
- data/lib/admin_api/auth_configuration.rb +4 -4
- data/lib/admin_api/configuration.rb +2 -2
- data/lib/admin_api/models/app_token.rb +1 -1
- data/lib/admin_api/models/card.rb +499 -0
- data/lib/admin_api/models/card_address.rb +271 -0
- data/lib/admin_api/models/client.rb +557 -0
- data/lib/admin_api/models/client_address.rb +281 -0
- data/lib/admin_api/models/employment.rb +216 -0
- data/lib/admin_api/models/page_card.rb +261 -0
- data/lib/admin_api/models/page_client.rb +261 -0
- data/lib/admin_api/models/sort.rb +236 -0
- data/lib/admin_api/version.rb +2 -2
- data/lib/admin_api.rb +1 -1
- data/spec/api/app_token_api_spec.rb +1 -1
- data/spec/api/card_api_spec.rb +88 -0
- data/spec/api/client_api_spec.rb +20 -27
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/app_token_spec.rb +1 -1
- data/spec/models/card_address_spec.rb +77 -0
- data/spec/models/card_spec.rb +215 -0
- data/spec/models/client_address_spec.rb +83 -0
- data/spec/models/client_spec.rb +162 -6
- data/spec/models/employment_spec.rb +59 -0
- data/spec/models/page_card_spec.rb +89 -0
- data/spec/models/page_client_spec.rb +1 -1
- data/spec/models/sort_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +24 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b5b1439f7765c0b20e70aa33c1002b3dfc386e88edf07fdfd10cad8d4dc29bc
|
4
|
+
data.tar.gz: 388ac1881c00b64c52944ca212aba551f906a12aaf51d148f17f211b8f4a67a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 156daee456f3491bfe50c616142c223337fcfdb248eec669de29856f93ae782d26e4944db80caa19e31f4ce4712be4304e555f7e6d350dc36a456ab8e0f9d31e
|
7
|
+
data.tar.gz: 9c5950c326668b96ae78dee4eb804c6ebea0f9ecb073bdb76dc2af27b1d0bd65561dad0385fd8f4855a65c67ad4e301e748d448074454caf17a5f61e5fa8a109
|
data/README.md
CHANGED
@@ -11,13 +11,13 @@ For more information, please visit [https://www.hydrogenplatform.com/no-code](ht
|
|
11
11
|
|
12
12
|
```shell
|
13
13
|
gem build app_token_api.gemspec
|
14
|
-
gem install app_token_api-1.0.
|
14
|
+
gem install app_token_api-1.0.2.gem
|
15
15
|
```
|
16
|
-
(for development, run `gem install --dev ./app_token_api-1.0.
|
16
|
+
(for development, run `gem install --dev ./app_token_api-1.0.2.gem` to install the development dependencies)
|
17
17
|
|
18
18
|
Finally add this to the Gemfile:
|
19
19
|
|
20
|
-
gem 'app_token_api', '~> 1.0.
|
20
|
+
gem 'app_token_api', '~> 1.0.2'
|
21
21
|
|
22
22
|
### Include the Ruby code directly
|
23
23
|
|
@@ -38,10 +38,10 @@ Follow steps to verify the base URL path:
|
|
38
38
|
2. Search for @host and change/verify the URL according to the environment.
|
39
39
|
|
40
40
|
**Sandbox Base URL**
|
41
|
-
https://sandbox.hydrogenplatform.com
|
41
|
+
https://sandbox.hydrogenplatform.com
|
42
42
|
|
43
43
|
**Production Base URL**
|
44
|
-
https://api.hydrogenplatform.com
|
44
|
+
https://api.hydrogenplatform.com
|
45
45
|
|
46
46
|
### Sample Code
|
47
47
|
Now you are ready to execute the following Ruby code:
|
@@ -66,8 +66,8 @@ appTokenConfig['clientId'] = "xxxx"
|
|
66
66
|
appTokenConfig['clientSecret'] = "xxxx"
|
67
67
|
appTokenConfig['username'] = "xxxx"
|
68
68
|
appTokenConfig['password'] = "xxxx"
|
69
|
-
appTokenConfig['basePath'] = "https://api.hydrogenplatform.com
|
70
|
-
|
69
|
+
appTokenConfig['basePath'] = "https://api.hydrogenplatform.com"
|
70
|
+
appTokenConfig['authType'] = "client_credentials"
|
71
71
|
|
72
72
|
begin
|
73
73
|
#getAppToken
|
data/app_token_api.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Hydrogen Admin API
|
5
5
|
|
6
|
-
OpenAPI spec version: 1.
|
6
|
+
OpenAPI spec version: 1.0.2
|
7
7
|
Contact: info@hydrogenplatform.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.15
|
@@ -41,7 +41,7 @@ module AdminApi
|
|
41
41
|
fail ArgumentError, "Missing the required parameter 'app_name' when calling AppTokenApi.get_app_token_using_get"
|
42
42
|
end
|
43
43
|
# resource path
|
44
|
-
local_var_path = '/app_token'
|
44
|
+
local_var_path = '/component/v1/app_token'
|
45
45
|
|
46
46
|
# query parameters
|
47
47
|
query_params = {}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Hydrogen Admin API
|
5
5
|
|
6
|
-
OpenAPI spec version: 1.
|
6
|
+
OpenAPI spec version: 1.0.2
|
7
7
|
Contact: info@hydrogenplatform.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.15
|
@@ -63,7 +63,7 @@ module AdminApi
|
|
63
63
|
@api_client.config.host = appTokenConfig['basePath']
|
64
64
|
|
65
65
|
# resource path
|
66
|
-
local_var_path = '/app_token'
|
66
|
+
local_var_path = '/component/v1/app_token'
|
67
67
|
|
68
68
|
# query parameters
|
69
69
|
query_params = {}
|
@@ -0,0 +1,371 @@
|
|
1
|
+
=begin
|
2
|
+
#Hydrogen Admin API
|
3
|
+
|
4
|
+
#The Hydrogen Admin API
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.2
|
7
|
+
Contact: info@hydrogenplatform.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module AdminApi
|
16
|
+
class CardApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
attr_accessor :auth_config
|
19
|
+
def initialize(api_client = ApiClient.default, auth_config = AuthConfiguration.default)
|
20
|
+
@api_client = api_client
|
21
|
+
@auth_config = auth_config
|
22
|
+
end
|
23
|
+
|
24
|
+
def create_client_credential_return(appTokenConfig)
|
25
|
+
client_credentials_token = @auth_config.create_client_credential_return(appTokenConfig['clientId'], appTokenConfig['clientSecret'])
|
26
|
+
if @api_client.config.debugging
|
27
|
+
@api_client.config.logger.debug "API called: AppTokenApi#client_credentials_token\nData: #{client_credentials_token.inspect}"
|
28
|
+
end
|
29
|
+
return client_credentials_token
|
30
|
+
end
|
31
|
+
|
32
|
+
def create_password_credential_return(appTokenConfig)
|
33
|
+
|
34
|
+
password_credentials_token = @auth_config.create_password_credential_return(appTokenConfig['clientId'], appTokenConfig['clientSecret'],appTokenConfig['username'], appTokenConfig['password'] )
|
35
|
+
if @api_client.config.debugging
|
36
|
+
@api_client.config.logger.debug "API called: AppTokenApi#password_credentials_token\nData: #{password_credentials_token.inspect}"
|
37
|
+
end
|
38
|
+
return password_credentials_token
|
39
|
+
end
|
40
|
+
|
41
|
+
def create_client_token_credential_return(appTokenConfig)
|
42
|
+
|
43
|
+
client_token_credentials = @auth_config.create_client_token_credential(appTokenConfig['clientId'], appTokenConfig['clientSecret'],appTokenConfig['clientToken'])
|
44
|
+
if @api_client.config.debugging
|
45
|
+
@api_client.config.logger.debug "API called: AppTokenApi#client_token_credentials\nData: #{client_token_credentials.inspect}"
|
46
|
+
end
|
47
|
+
return client_token_credentials
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
# Create a card request
|
53
|
+
# Create a new card request.
|
54
|
+
# @param card_request cardRequest
|
55
|
+
# @param [Hash] opts the optional parameters
|
56
|
+
# @return [Card]
|
57
|
+
def create_card_using_post(card_request, appTokenConfig = {}, opts = {})
|
58
|
+
data, _status_code, _headers = create_card_using_post_with_http_info(card_request, appTokenConfig, opts)
|
59
|
+
data
|
60
|
+
end
|
61
|
+
|
62
|
+
# Create a card request
|
63
|
+
# Create a new card request.
|
64
|
+
# @param card_request cardRequest
|
65
|
+
# @param [Hash] opts the optional parameters
|
66
|
+
# @return [Array<(Card, Fixnum, Hash)>] Card data, response status code and response headers
|
67
|
+
def create_card_using_post_with_http_info(card_request, appTokenConfig = {}, opts = {})
|
68
|
+
if @api_client.config.debugging
|
69
|
+
@api_client.config.logger.debug 'Calling API: CardApi.create_card_using_post ...'
|
70
|
+
end
|
71
|
+
# verify the required parameter 'card_request' is set
|
72
|
+
if @api_client.config.client_side_validation && card_request.nil?
|
73
|
+
fail ArgumentError, "Missing the required parameter 'card_request' when calling CardApi.create_card_using_post"
|
74
|
+
end
|
75
|
+
|
76
|
+
# resource path
|
77
|
+
local_var_path = '/nucleus/v1/card'
|
78
|
+
|
79
|
+
# query parameters
|
80
|
+
query_params = {}
|
81
|
+
|
82
|
+
# header parameters
|
83
|
+
header_params = {}
|
84
|
+
# HTTP header 'Accept' (if needed)
|
85
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
86
|
+
# HTTP header 'Content-Type'
|
87
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
88
|
+
|
89
|
+
# form parameters
|
90
|
+
form_params = {}
|
91
|
+
|
92
|
+
if @api_client.config.client_side_validation && appTokenConfig['basePath'].nil?
|
93
|
+
fail ArgumentError, "Missing the required parameter 'basePath'"
|
94
|
+
end
|
95
|
+
|
96
|
+
if @api_client.config.client_side_validation && appTokenConfig['authType'].nil?
|
97
|
+
fail ArgumentError, "Missing the required parameter 'authType'"
|
98
|
+
end
|
99
|
+
|
100
|
+
@auth_config.config.host = appTokenConfig['basePath']
|
101
|
+
@api_client.config.host = appTokenConfig['basePath']
|
102
|
+
|
103
|
+
if appTokenConfig['authType'].downcase == 'client_credentials'
|
104
|
+
client_credentials_token = create_client_credential_return(appTokenConfig)
|
105
|
+
@api_client.config.access_token = client_credentials_token
|
106
|
+
elsif appTokenConfig['authType'].downcase == 'password_credentials'
|
107
|
+
password_credential_token = create_password_credential_return(appTokenConfig)
|
108
|
+
@api_client.config.access_token = password_credential_token
|
109
|
+
elsif appTokenConfig['authType'].downcase == 'password_credentials'
|
110
|
+
client_token_credential = create_client_token_credential_return(appTokenConfig)
|
111
|
+
@api_client.config.access_token = client_token_credential
|
112
|
+
end
|
113
|
+
|
114
|
+
# http body (model)
|
115
|
+
post_body = @api_client.object_to_http_body(card_request)
|
116
|
+
auth_names = ['oauth2']
|
117
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
118
|
+
:header_params => header_params,
|
119
|
+
:query_params => query_params,
|
120
|
+
:form_params => form_params,
|
121
|
+
:body => post_body,
|
122
|
+
:auth_names => auth_names,
|
123
|
+
:return_type => 'Card')
|
124
|
+
if @api_client.config.debugging
|
125
|
+
@api_client.config.logger.debug "API called: CardApi#create_card_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
126
|
+
end
|
127
|
+
return data, status_code, headers
|
128
|
+
end
|
129
|
+
# List all card requests
|
130
|
+
# Get the information for all card requests.
|
131
|
+
# @param [Hash] opts the optional parameters
|
132
|
+
# @option opts [BOOLEAN] :ascending ascending (default to false)
|
133
|
+
# @option opts [String] :filter filter
|
134
|
+
# @option opts [String] :order_by order_by (default to update_date)
|
135
|
+
# @option opts [Integer] :page page (default to 0)
|
136
|
+
# @option opts [Integer] :size size (default to 25)
|
137
|
+
# @return [PageCard]
|
138
|
+
def get_card_all_using_get(appTokenConfig = {}, opts = {})
|
139
|
+
data, _status_code, _headers = get_card_all_using_get_with_http_info(appTokenConfig, opts)
|
140
|
+
data
|
141
|
+
end
|
142
|
+
|
143
|
+
# List all card requests
|
144
|
+
# Get the information for all card requests.
|
145
|
+
# @param [Hash] opts the optional parameters
|
146
|
+
# @option opts [BOOLEAN] :ascending ascending
|
147
|
+
# @option opts [String] :filter filter
|
148
|
+
# @option opts [String] :order_by order_by
|
149
|
+
# @option opts [Integer] :page page
|
150
|
+
# @option opts [Integer] :size size
|
151
|
+
# @return [Array<(PageCard, Fixnum, Hash)>] PageCard data, response status code and response headers
|
152
|
+
def get_card_all_using_get_with_http_info(appTokenConfig = {}, opts = {})
|
153
|
+
if @api_client.config.debugging
|
154
|
+
@api_client.config.logger.debug 'Calling API: CardApi.get_card_all_using_get ...'
|
155
|
+
end
|
156
|
+
# resource path
|
157
|
+
local_var_path = '/nucleus/v1/card'
|
158
|
+
|
159
|
+
# query parameters
|
160
|
+
query_params = {}
|
161
|
+
query_params[:'ascending'] = opts[:'ascending'] if !opts[:'ascending'].nil?
|
162
|
+
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
163
|
+
query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
|
164
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
165
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
166
|
+
|
167
|
+
# header parameters
|
168
|
+
header_params = {}
|
169
|
+
# HTTP header 'Accept' (if needed)
|
170
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
171
|
+
|
172
|
+
# form parameters
|
173
|
+
form_params = {}
|
174
|
+
|
175
|
+
# http body (model)
|
176
|
+
post_body = nil
|
177
|
+
auth_names = ['oauth2']
|
178
|
+
|
179
|
+
if @api_client.config.client_side_validation && appTokenConfig['basePath'].nil?
|
180
|
+
fail ArgumentError, "Missing the required parameter 'basePath'"
|
181
|
+
end
|
182
|
+
|
183
|
+
if @api_client.config.client_side_validation && appTokenConfig['authType'].nil?
|
184
|
+
fail ArgumentError, "Missing the required parameter 'authType'"
|
185
|
+
end
|
186
|
+
|
187
|
+
@auth_config.config.host = appTokenConfig['basePath']
|
188
|
+
@api_client.config.host = appTokenConfig['basePath']
|
189
|
+
|
190
|
+
if appTokenConfig['authType'].downcase == 'client_credentials'
|
191
|
+
client_credentials_token = create_client_credential_return(appTokenConfig)
|
192
|
+
@api_client.config.access_token = client_credentials_token
|
193
|
+
elsif appTokenConfig['authType'].downcase == 'password_credentials'
|
194
|
+
password_credential_token = create_password_credential_return(appTokenConfig)
|
195
|
+
@api_client.config.access_token = password_credential_token
|
196
|
+
elsif appTokenConfig['authType'].downcase == 'password_credentials'
|
197
|
+
client_token_credential = create_client_token_credential_return(appTokenConfig)
|
198
|
+
@api_client.config.access_token = client_token_credential
|
199
|
+
end
|
200
|
+
|
201
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names,
|
207
|
+
:return_type => 'PageCard')
|
208
|
+
if @api_client.config.debugging
|
209
|
+
@api_client.config.logger.debug "API called: CardApi#get_card_all_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
210
|
+
end
|
211
|
+
return data, status_code, headers
|
212
|
+
end
|
213
|
+
# Retrieve a card request
|
214
|
+
# Retrieve the information for a card request.
|
215
|
+
# @param card_id UUID card_id
|
216
|
+
# @param [Hash] opts the optional parameters
|
217
|
+
# @return [Card]
|
218
|
+
def get_card_using_get(card_id, appTokenConfig = {}, opts = {})
|
219
|
+
data, _status_code, _headers = get_card_using_get_with_http_info(card_id, appTokenConfig, opts)
|
220
|
+
data
|
221
|
+
end
|
222
|
+
|
223
|
+
# Retrieve a card request
|
224
|
+
# Retrieve the information for a card request.
|
225
|
+
# @param card_id UUID card_id
|
226
|
+
# @param [Hash] opts the optional parameters
|
227
|
+
# @return [Array<(Card, Fixnum, Hash)>] Card data, response status code and response headers
|
228
|
+
def get_card_using_get_with_http_info(card_id, appTokenConfig = {}, opts = {})
|
229
|
+
if @api_client.config.debugging
|
230
|
+
@api_client.config.logger.debug 'Calling API: CardApi.get_card_using_get ...'
|
231
|
+
end
|
232
|
+
# verify the required parameter 'card_id' is set
|
233
|
+
if @api_client.config.client_side_validation && card_id.nil?
|
234
|
+
fail ArgumentError, "Missing the required parameter 'card_id' when calling CardApi.get_card_using_get"
|
235
|
+
end
|
236
|
+
# resource path
|
237
|
+
local_var_path = '/nucleus/v1/card/{card_id}'.sub('{' + 'card_id' + '}', card_id.to_s)
|
238
|
+
|
239
|
+
# query parameters
|
240
|
+
query_params = {}
|
241
|
+
|
242
|
+
# header parameters
|
243
|
+
header_params = {}
|
244
|
+
# HTTP header 'Accept' (if needed)
|
245
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
246
|
+
|
247
|
+
# form parameters
|
248
|
+
form_params = {}
|
249
|
+
|
250
|
+
# http body (model)
|
251
|
+
post_body = nil
|
252
|
+
auth_names = ['oauth2']
|
253
|
+
|
254
|
+
if @api_client.config.client_side_validation && appTokenConfig['basePath'].nil?
|
255
|
+
fail ArgumentError, "Missing the required parameter 'basePath'"
|
256
|
+
end
|
257
|
+
|
258
|
+
if @api_client.config.client_side_validation && appTokenConfig['authType'].nil?
|
259
|
+
fail ArgumentError, "Missing the required parameter 'authType'"
|
260
|
+
end
|
261
|
+
|
262
|
+
@auth_config.config.host = appTokenConfig['basePath']
|
263
|
+
@api_client.config.host = appTokenConfig['basePath']
|
264
|
+
|
265
|
+
if appTokenConfig['authType'].downcase == 'client_credentials'
|
266
|
+
client_credentials_token = create_client_credential_return(appTokenConfig)
|
267
|
+
@api_client.config.access_token = client_credentials_token
|
268
|
+
elsif appTokenConfig['authType'].downcase == 'password_credentials'
|
269
|
+
password_credential_token = create_password_credential_return(appTokenConfig)
|
270
|
+
@api_client.config.access_token = password_credential_token
|
271
|
+
elsif appTokenConfig['authType'].downcase == 'password_credentials'
|
272
|
+
client_token_credential = create_client_token_credential_return(appTokenConfig)
|
273
|
+
@api_client.config.access_token = client_token_credential
|
274
|
+
end
|
275
|
+
|
276
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
277
|
+
:header_params => header_params,
|
278
|
+
:query_params => query_params,
|
279
|
+
:form_params => form_params,
|
280
|
+
:body => post_body,
|
281
|
+
:auth_names => auth_names,
|
282
|
+
:return_type => 'Card')
|
283
|
+
if @api_client.config.debugging
|
284
|
+
@api_client.config.logger.debug "API called: CardApi#get_card_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
285
|
+
end
|
286
|
+
return data, status_code, headers
|
287
|
+
end
|
288
|
+
# Update a card request
|
289
|
+
# Update the information for a card request.
|
290
|
+
# @param card card
|
291
|
+
# @param card_id UUID card_id
|
292
|
+
# @param [Hash] opts the optional parameters
|
293
|
+
# @return [Card]
|
294
|
+
def update_card_using_put(card, card_id, appTokenConfig = {}, opts = {})
|
295
|
+
data, _status_code, _headers = update_card_using_put_with_http_info(card, card_id, appTokenConfig, opts)
|
296
|
+
data
|
297
|
+
end
|
298
|
+
|
299
|
+
# Update a card request
|
300
|
+
# Update the information for a card request.
|
301
|
+
# @param card card
|
302
|
+
# @param card_id UUID card_id
|
303
|
+
# @param [Hash] opts the optional parameters
|
304
|
+
# @return [Array<(Card, Fixnum, Hash)>] Card data, response status code and response headers
|
305
|
+
def update_card_using_put_with_http_info(card, card_id, appTokenConfig = {}, opts = {})
|
306
|
+
if @api_client.config.debugging
|
307
|
+
@api_client.config.logger.debug 'Calling API: CardApi.update_card_using_put ...'
|
308
|
+
end
|
309
|
+
# verify the required parameter 'card' is set
|
310
|
+
if @api_client.config.client_side_validation && card.nil?
|
311
|
+
fail ArgumentError, "Missing the required parameter 'card' when calling CardApi.update_card_using_put"
|
312
|
+
end
|
313
|
+
# verify the required parameter 'card_id' is set
|
314
|
+
if @api_client.config.client_side_validation && card_id.nil?
|
315
|
+
fail ArgumentError, "Missing the required parameter 'card_id' when calling CardApi.update_card_using_put"
|
316
|
+
end
|
317
|
+
# resource path
|
318
|
+
local_var_path = '/nucleus/v1/card/{card_id}'.sub('{' + 'card_id' + '}', card_id.to_s)
|
319
|
+
|
320
|
+
# query parameters
|
321
|
+
query_params = {}
|
322
|
+
|
323
|
+
# header parameters
|
324
|
+
header_params = {}
|
325
|
+
# HTTP header 'Accept' (if needed)
|
326
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
327
|
+
# HTTP header 'Content-Type'
|
328
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
329
|
+
|
330
|
+
# form parameters
|
331
|
+
form_params = {}
|
332
|
+
|
333
|
+
# http body (model)
|
334
|
+
post_body = @api_client.object_to_http_body(card)
|
335
|
+
auth_names = ['oauth2']
|
336
|
+
|
337
|
+
if @api_client.config.client_side_validation && appTokenConfig['basePath'].nil?
|
338
|
+
fail ArgumentError, "Missing the required parameter 'basePath'"
|
339
|
+
end
|
340
|
+
|
341
|
+
if @api_client.config.client_side_validation && appTokenConfig['authType'].nil?
|
342
|
+
fail ArgumentError, "Missing the required parameter 'authType'"
|
343
|
+
end
|
344
|
+
|
345
|
+
@auth_config.config.host = appTokenConfig['basePath']
|
346
|
+
@api_client.config.host = appTokenConfig['basePath']
|
347
|
+
|
348
|
+
if appTokenConfig['authType'].downcase == 'client_credentials'
|
349
|
+
client_credentials_token = create_client_credential_return(appTokenConfig)
|
350
|
+
@api_client.config.access_token = client_credentials_token
|
351
|
+
elsif appTokenConfig['authType'].downcase == 'password_credentials'
|
352
|
+
password_credential_token = create_password_credential_return(appTokenConfig)
|
353
|
+
@api_client.config.access_token = password_credential_token
|
354
|
+
elsif appTokenConfig['authType'].downcase == 'password_credentials'
|
355
|
+
client_token_credential = create_client_token_credential_return(appTokenConfig)
|
356
|
+
@api_client.config.access_token = client_token_credential
|
357
|
+
end
|
358
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
359
|
+
:header_params => header_params,
|
360
|
+
:query_params => query_params,
|
361
|
+
:form_params => form_params,
|
362
|
+
:body => post_body,
|
363
|
+
:auth_names => auth_names,
|
364
|
+
:return_type => 'Card')
|
365
|
+
if @api_client.config.debugging
|
366
|
+
@api_client.config.logger.debug "API called: CardApi#update_card_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
367
|
+
end
|
368
|
+
return data, status_code, headers
|
369
|
+
end
|
370
|
+
end
|
371
|
+
end
|