Class: Nodeum::UsersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/nodeum_sdk/api/users_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UsersApi

Returns a new instance of UsersApi.



19
20
21
# File 'lib/nodeum_sdk/api/users_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/nodeum_sdk/api/users_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_api_key(api_key_body, opts = {}) ⇒ ApiKeyFull

Creates a new API Key for current user. **API Key Scope**: api_keys / create

Parameters:

  • api_key_body (ApiKeyFull)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/nodeum_sdk/api/users_api.rb', line 27

def create_api_key(api_key_body, opts = {})
  data, _status_code, _headers = create_api_key_with_http_info(api_key_body, opts)
  data
end

#create_api_key_with_http_info(api_key_body, opts = {}) ⇒ Array<(ApiKeyFull, Integer, Hash)>

Creates a new API Key for current user. **API Key Scope**: api_keys / create

Parameters:

  • api_key_body (ApiKeyFull)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiKeyFull, Integer, Hash)>)

    ApiKeyFull data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/nodeum_sdk/api/users_api.rb', line 37

def create_api_key_with_http_info(api_key_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.create_api_key ...'
  end
  # verify the required parameter 'api_key_body' is set
  if @api_client.config.client_side_validation && api_key_body.nil?
    fail ArgumentError, "Missing the required parameter 'api_key_body' when calling UsersApi.create_api_key"
  end
  # resource path
  local_var_path = '/users/me/api_keys'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(api_key_body) 

  # return_type
  return_type = opts[:return_type] || 'ApiKeyFull' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#create_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_configuration(configuration_body, opts = {}) ⇒ UserConfiguration

Creates a new configuration value for current user. **API Key Scope**: configurations / create

Parameters:

  • configuration_body (UserConfiguration)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



91
92
93
94
# File 'lib/nodeum_sdk/api/users_api.rb', line 91

def create_configuration(configuration_body, opts = {})
  data, _status_code, _headers = create_configuration_with_http_info(configuration_body, opts)
  data
end

#create_configuration_with_http_info(configuration_body, opts = {}) ⇒ Array<(UserConfiguration, Integer, Hash)>

Creates a new configuration value for current user. **API Key Scope**: configurations / create

Parameters:

  • configuration_body (UserConfiguration)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(UserConfiguration, Integer, Hash)>)

    UserConfiguration data, response status code and response headers



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/nodeum_sdk/api/users_api.rb', line 101

def create_configuration_with_http_info(configuration_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.create_configuration ...'
  end
  # verify the required parameter 'configuration_body' is set
  if @api_client.config.client_side_validation && configuration_body.nil?
    fail ArgumentError, "Missing the required parameter 'configuration_body' when calling UsersApi.create_configuration"
  end
  # resource path
  local_var_path = '/users/me/configurations'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(configuration_body) 

  # return_type
  return_type = opts[:return_type] || 'UserConfiguration' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#create_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#destroy_api_key(api_key_id, opts = {}) ⇒ nil

Destroys a specific API Key. **API Key Scope**: api_keys / destroy

Parameters:

  • api_key_id (Integer)

    Numeric ID of API Key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


155
156
157
158
# File 'lib/nodeum_sdk/api/users_api.rb', line 155

def destroy_api_key(api_key_id, opts = {})
  destroy_api_key_with_http_info(api_key_id, opts)
  nil
end

#destroy_api_key_with_http_info(api_key_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Destroys a specific API Key. **API Key Scope**: api_keys / destroy

Parameters:

  • api_key_id (Integer)

    Numeric ID of API Key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/nodeum_sdk/api/users_api.rb', line 165

def destroy_api_key_with_http_info(api_key_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.destroy_api_key ...'
  end
  # verify the required parameter 'api_key_id' is set
  if @api_client.config.client_side_validation && api_key_id.nil?
    fail ArgumentError, "Missing the required parameter 'api_key_id' when calling UsersApi.destroy_api_key"
  end
  # resource path
  local_var_path = '/users/me/api_keys/{api_key_id}'.sub('{' + 'api_key_id' + '}', CGI.escape(api_key_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#destroy_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#destroy_configuration(configuration_id, opts = {}) ⇒ nil

Destroys a specific configuration value. **API Key Scope**: configurations / destroy

Parameters:

  • configuration_id (String)

    Numeric ID, or key of configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


215
216
217
218
# File 'lib/nodeum_sdk/api/users_api.rb', line 215

def destroy_configuration(configuration_id, opts = {})
  destroy_configuration_with_http_info(configuration_id, opts)
  nil
end

#destroy_configuration_with_http_info(configuration_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Destroys a specific configuration value. **API Key Scope**: configurations / destroy

Parameters:

  • configuration_id (String)

    Numeric ID, or key of configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/nodeum_sdk/api/users_api.rb', line 225

def destroy_configuration_with_http_info(configuration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.destroy_configuration ...'
  end
  # verify the required parameter 'configuration_id' is set
  if @api_client.config.client_side_validation && configuration_id.nil?
    fail ArgumentError, "Missing the required parameter 'configuration_id' when calling UsersApi.destroy_configuration"
  end
  # resource path
  local_var_path = '/users/me/configurations/{configuration_id}'.sub('{' + 'configuration_id' + '}', CGI.escape(configuration_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#destroy_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#index_api_keys(opts = {}) ⇒ ApiKeyCollection

Lists all API keys of current user. **API Key Scope**: api_keys / index

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of items to display for pagination.

  • :offset (Integer)

    The number of items to skip for pagination.

Returns:



276
277
278
279
# File 'lib/nodeum_sdk/api/users_api.rb', line 276

def index_api_keys(opts = {})
  data, _status_code, _headers = index_api_keys_with_http_info(opts)
  data
end

#index_api_keys_with_http_info(opts = {}) ⇒ Array<(ApiKeyCollection, Integer, Hash)>

Lists all API keys of current user. **API Key Scope**: api_keys / index

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of items to display for pagination.

  • :offset (Integer)

    The number of items to skip for pagination.

Returns:

  • (Array<(ApiKeyCollection, Integer, Hash)>)

    ApiKeyCollection data, response status code and response headers



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/nodeum_sdk/api/users_api.rb', line 287

def index_api_keys_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.index_api_keys ...'
  end
  # resource path
  local_var_path = '/users/me/api_keys'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'ApiKeyCollection' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#index_api_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#index_configurations(opts = {}) ⇒ UserConfigurationCollection

Lists all configurations of current user. **API Key Scope**: configurations / index

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of items to display for pagination.

  • :offset (Integer)

    The number of items to skip for pagination.

Returns:



338
339
340
341
# File 'lib/nodeum_sdk/api/users_api.rb', line 338

def index_configurations(opts = {})
  data, _status_code, _headers = index_configurations_with_http_info(opts)
  data
end

#index_configurations_with_http_info(opts = {}) ⇒ Array<(UserConfigurationCollection, Integer, Hash)>

Lists all configurations of current user. **API Key Scope**: configurations / index

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of items to display for pagination.

  • :offset (Integer)

    The number of items to skip for pagination.

Returns:

  • (Array<(UserConfigurationCollection, Integer, Hash)>)

    UserConfigurationCollection data, response status code and response headers



349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/nodeum_sdk/api/users_api.rb', line 349

def index_configurations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.index_configurations ...'
  end
  # resource path
  local_var_path = '/users/me/configurations'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'UserConfigurationCollection' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#index_configurations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#index_system_groups(opts = {}) ⇒ SystemGroupCollection

List all system groups. **API Key Scope**: groups / systems

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



398
399
400
401
# File 'lib/nodeum_sdk/api/users_api.rb', line 398

def index_system_groups(opts = {})
  data, _status_code, _headers = index_system_groups_with_http_info(opts)
  data
end

#index_system_groups_with_http_info(opts = {}) ⇒ Array<(SystemGroupCollection, Integer, Hash)>

List all system groups. **API Key Scope**: groups / systems

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SystemGroupCollection, Integer, Hash)>)

    SystemGroupCollection data, response status code and response headers



407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/nodeum_sdk/api/users_api.rb', line 407

def index_system_groups_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.index_system_groups ...'
  end
  # resource path
  local_var_path = '/groups/-/systems'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SystemGroupCollection' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#index_system_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#index_system_users(opts = {}) ⇒ SystemUserCollection

List all system users. **API Key Scope**: users / systems

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



454
455
456
457
# File 'lib/nodeum_sdk/api/users_api.rb', line 454

def index_system_users(opts = {})
  data, _status_code, _headers = index_system_users_with_http_info(opts)
  data
end

#index_system_users_with_http_info(opts = {}) ⇒ Array<(SystemUserCollection, Integer, Hash)>

List all system users. **API Key Scope**: users / systems

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SystemUserCollection, Integer, Hash)>)

    SystemUserCollection data, response status code and response headers



463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
# File 'lib/nodeum_sdk/api/users_api.rb', line 463

def index_system_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.index_system_users ...'
  end
  # resource path
  local_var_path = '/users/-/systems'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SystemUserCollection' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#index_system_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_api_key(api_key_id, opts = {}) ⇒ ApiKeyFull

Displays a specific API Key with its scopes. **API Key Scope**: api_keys / show

Parameters:

  • api_key_id (Integer)

    Numeric ID of API Key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



511
512
513
514
# File 'lib/nodeum_sdk/api/users_api.rb', line 511

def show_api_key(api_key_id, opts = {})
  data, _status_code, _headers = show_api_key_with_http_info(api_key_id, opts)
  data
end

#show_api_key_with_http_info(api_key_id, opts = {}) ⇒ Array<(ApiKeyFull, Integer, Hash)>

Displays a specific API Key with its scopes. **API Key Scope**: api_keys / show

Parameters:

  • api_key_id (Integer)

    Numeric ID of API Key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiKeyFull, Integer, Hash)>)

    ApiKeyFull data, response status code and response headers



521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# File 'lib/nodeum_sdk/api/users_api.rb', line 521

def show_api_key_with_http_info(api_key_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.show_api_key ...'
  end
  # verify the required parameter 'api_key_id' is set
  if @api_client.config.client_side_validation && api_key_id.nil?
    fail ArgumentError, "Missing the required parameter 'api_key_id' when calling UsersApi.show_api_key"
  end
  # resource path
  local_var_path = '/users/me/api_keys/{api_key_id}'.sub('{' + 'api_key_id' + '}', CGI.escape(api_key_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'ApiKeyFull' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#show_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_configuration(configuration_id, opts = {}) ⇒ UserConfiguration

Displays a specific configuration value. **API Key Scope**: configurations / show

Parameters:

  • configuration_id (String)

    Numeric ID, or key of configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



573
574
575
576
# File 'lib/nodeum_sdk/api/users_api.rb', line 573

def show_configuration(configuration_id, opts = {})
  data, _status_code, _headers = show_configuration_with_http_info(configuration_id, opts)
  data
end

#show_configuration_with_http_info(configuration_id, opts = {}) ⇒ Array<(UserConfiguration, Integer, Hash)>

Displays a specific configuration value. **API Key Scope**: configurations / show

Parameters:

  • configuration_id (String)

    Numeric ID, or key of configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(UserConfiguration, Integer, Hash)>)

    UserConfiguration data, response status code and response headers



583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
# File 'lib/nodeum_sdk/api/users_api.rb', line 583

def show_configuration_with_http_info(configuration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.show_configuration ...'
  end
  # verify the required parameter 'configuration_id' is set
  if @api_client.config.client_side_validation && configuration_id.nil?
    fail ArgumentError, "Missing the required parameter 'configuration_id' when calling UsersApi.show_configuration"
  end
  # resource path
  local_var_path = '/users/me/configurations/{configuration_id}'.sub('{' + 'configuration_id' + '}', CGI.escape(configuration_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'UserConfiguration' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#show_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_api_key(api_key_id, api_key_body, opts = {}) ⇒ ApiKeyFull

Updates a specific API Key. **API Key Scope**: api_keys / update

Parameters:

  • api_key_id (Integer)

    Numeric ID of API Key.

  • api_key_body (ApiKeyFull)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



636
637
638
639
# File 'lib/nodeum_sdk/api/users_api.rb', line 636

def update_api_key(api_key_id, api_key_body, opts = {})
  data, _status_code, _headers = update_api_key_with_http_info(api_key_id, api_key_body, opts)
  data
end

#update_api_key_with_http_info(api_key_id, api_key_body, opts = {}) ⇒ Array<(ApiKeyFull, Integer, Hash)>

Updates a specific API Key. **API Key Scope**: api_keys / update

Parameters:

  • api_key_id (Integer)

    Numeric ID of API Key.

  • api_key_body (ApiKeyFull)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiKeyFull, Integer, Hash)>)

    ApiKeyFull data, response status code and response headers



647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
# File 'lib/nodeum_sdk/api/users_api.rb', line 647

def update_api_key_with_http_info(api_key_id, api_key_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.update_api_key ...'
  end
  # verify the required parameter 'api_key_id' is set
  if @api_client.config.client_side_validation && api_key_id.nil?
    fail ArgumentError, "Missing the required parameter 'api_key_id' when calling UsersApi.update_api_key"
  end
  # verify the required parameter 'api_key_body' is set
  if @api_client.config.client_side_validation && api_key_body.nil?
    fail ArgumentError, "Missing the required parameter 'api_key_body' when calling UsersApi.update_api_key"
  end
  # resource path
  local_var_path = '/users/me/api_keys/{api_key_id}'.sub('{' + 'api_key_id' + '}', CGI.escape(api_key_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(api_key_body) 

  # return_type
  return_type = opts[:return_type] || 'ApiKeyFull' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#update_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_configuration(configuration_id, configuration_body, opts = {}) ⇒ UserConfiguration

Updates a specific configuration value. **API Key Scope**: configurations / update

Parameters:

  • configuration_id (String)

    Numeric ID, or key of configuration.

  • configuration_body (UserConfiguration)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



706
707
708
709
# File 'lib/nodeum_sdk/api/users_api.rb', line 706

def update_configuration(configuration_id, configuration_body, opts = {})
  data, _status_code, _headers = update_configuration_with_http_info(configuration_id, configuration_body, opts)
  data
end

#update_configuration_with_http_info(configuration_id, configuration_body, opts = {}) ⇒ Array<(UserConfiguration, Integer, Hash)>

Updates a specific configuration value. **API Key Scope**: configurations / update

Parameters:

  • configuration_id (String)

    Numeric ID, or key of configuration.

  • configuration_body (UserConfiguration)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(UserConfiguration, Integer, Hash)>)

    UserConfiguration data, response status code and response headers



717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
# File 'lib/nodeum_sdk/api/users_api.rb', line 717

def update_configuration_with_http_info(configuration_id, configuration_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.update_configuration ...'
  end
  # verify the required parameter 'configuration_id' is set
  if @api_client.config.client_side_validation && configuration_id.nil?
    fail ArgumentError, "Missing the required parameter 'configuration_id' when calling UsersApi.update_configuration"
  end
  # verify the required parameter 'configuration_body' is set
  if @api_client.config.client_side_validation && configuration_body.nil?
    fail ArgumentError, "Missing the required parameter 'configuration_body' when calling UsersApi.update_configuration"
  end
  # resource path
  local_var_path = '/users/me/configurations/{configuration_id}'.sub('{' + 'configuration_id' + '}', CGI.escape(configuration_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(configuration_body) 

  # return_type
  return_type = opts[:return_type] || 'UserConfiguration' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#update_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end