Class: OpenapiClient::AuthApi

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_client/api/auth_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AuthApi

Returns a new instance of AuthApi.



19
20
21
# File 'lib/openapi_client/api/auth_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/openapi_client/api/auth_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#auth2fa_confirm_post(confirm2fa_request, opts = {}) ⇒ nil

Confirm 2FA setup with a code

Parameters:

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

    the optional parameters

Returns:

  • (nil)


26
27
28
29
# File 'lib/openapi_client/api/auth_api.rb', line 26

def auth2fa_confirm_post(confirm2fa_request, opts = {})
  auth2fa_confirm_post_with_http_info(confirm2fa_request, opts)
  nil
end

#auth2fa_confirm_post_with_http_info(confirm2fa_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Confirm 2FA setup with a code

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



35
36
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/openapi_client/api/auth_api.rb', line 35

def auth2fa_confirm_post_with_http_info(confirm2fa_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth2fa_confirm_post ...'
  end
  # verify the required parameter 'confirm2fa_request' is set
  if @api_client.config.client_side_validation && confirm2fa_request.nil?
    fail ArgumentError, "Missing the required parameter 'confirm2fa_request' when calling AuthApi.auth2fa_confirm_post"
  end
  # resource path
  local_var_path = '/auth/2fa/confirm'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"AuthApi.auth2fa_confirm_post",
    :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: AuthApi#auth2fa_confirm_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth2fa_disable_post(disable2fa_request, opts = {}) ⇒ nil

Disable 2FA

Parameters:

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

    the optional parameters

Returns:

  • (nil)


90
91
92
93
# File 'lib/openapi_client/api/auth_api.rb', line 90

def auth2fa_disable_post(disable2fa_request, opts = {})
  auth2fa_disable_post_with_http_info(disable2fa_request, opts)
  nil
end

#auth2fa_disable_post_with_http_info(disable2fa_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Disable 2FA

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



99
100
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/openapi_client/api/auth_api.rb', line 99

def auth2fa_disable_post_with_http_info(disable2fa_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth2fa_disable_post ...'
  end
  # verify the required parameter 'disable2fa_request' is set
  if @api_client.config.client_side_validation && disable2fa_request.nil?
    fail ArgumentError, "Missing the required parameter 'disable2fa_request' when calling AuthApi.auth2fa_disable_post"
  end
  # resource path
  local_var_path = '/auth/2fa/disable'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"AuthApi.auth2fa_disable_post",
    :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: AuthApi#auth2fa_disable_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth2fa_enable_post(enable2fa_request, opts = {}) ⇒ Auth2faEnablePost200Response

Enable 2FA (returns TOTP secret and QR URL)

Parameters:

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

    the optional parameters

Returns:



154
155
156
157
# File 'lib/openapi_client/api/auth_api.rb', line 154

def auth2fa_enable_post(enable2fa_request, opts = {})
  data, _status_code, _headers = auth2fa_enable_post_with_http_info(enable2fa_request, opts)
  data
end

#auth2fa_enable_post_with_http_info(enable2fa_request, opts = {}) ⇒ Array<(Auth2faEnablePost200Response, Integer, Hash)>

Enable 2FA (returns TOTP secret and QR URL)

Parameters:

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

    the optional parameters

Returns:



163
164
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
209
210
211
212
213
214
# File 'lib/openapi_client/api/auth_api.rb', line 163

def auth2fa_enable_post_with_http_info(enable2fa_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth2fa_enable_post ...'
  end
  # verify the required parameter 'enable2fa_request' is set
  if @api_client.config.client_side_validation && enable2fa_request.nil?
    fail ArgumentError, "Missing the required parameter 'enable2fa_request' when calling AuthApi.auth2fa_enable_post"
  end
  # resource path
  local_var_path = '/auth/2fa/enable'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Auth2faEnablePost200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"AuthApi.auth2fa_enable_post",
    :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: AuthApi#auth2fa_enable_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth2fa_verify_post(verify2fa_request, opts = {}) ⇒ AuthResponse

Verify 2FA code during login

Parameters:

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

    the optional parameters

Returns:



220
221
222
223
# File 'lib/openapi_client/api/auth_api.rb', line 220

def auth2fa_verify_post(verify2fa_request, opts = {})
  data, _status_code, _headers = auth2fa_verify_post_with_http_info(verify2fa_request, opts)
  data
end

#auth2fa_verify_post_with_http_info(verify2fa_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>

Verify 2FA code during login

Parameters:

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

    the optional parameters

Returns:

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

    AuthResponse data, response status code and response headers



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
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/openapi_client/api/auth_api.rb', line 229

def auth2fa_verify_post_with_http_info(verify2fa_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth2fa_verify_post ...'
  end
  # verify the required parameter 'verify2fa_request' is set
  if @api_client.config.client_side_validation && verify2fa_request.nil?
    fail ArgumentError, "Missing the required parameter 'verify2fa_request' when calling AuthApi.auth2fa_verify_post"
  end
  # resource path
  local_var_path = '/auth/2fa/verify'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'AuthResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AuthApi.auth2fa_verify_post",
    :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: AuthApi#auth2fa_verify_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_account_delete(opts = {}) ⇒ nil

Delete account (GDPR)

Parameters:

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

    the optional parameters

Returns:

  • (nil)


285
286
287
288
# File 'lib/openapi_client/api/auth_api.rb', line 285

def (opts = {})
  (opts)
  nil
end

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

Delete account (GDPR)

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
331
332
333
# File 'lib/openapi_client/api/auth_api.rb', line 293

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_account_delete ...'
  end
  # resource path
  local_var_path = '/auth/account'

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"AuthApi.auth_account_delete",
    :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: AuthApi#auth_account_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_export_get(opts = {}) ⇒ nil

Export user data (GDPR)

Parameters:

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

    the optional parameters

Returns:

  • (nil)


338
339
340
341
# File 'lib/openapi_client/api/auth_api.rb', line 338

def auth_export_get(opts = {})
  auth_export_get_with_http_info(opts)
  nil
end

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

Export user data (GDPR)

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



346
347
348
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
# File 'lib/openapi_client/api/auth_api.rb', line 346

def auth_export_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_export_get ...'
  end
  # resource path
  local_var_path = '/auth/export'

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"AuthApi.auth_export_get",
    :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: AuthApi#auth_export_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_forgot_password_post(forgot_password_request, opts = {}) ⇒ nil

Request password reset email

Parameters:

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

    the optional parameters

Returns:

  • (nil)


392
393
394
395
# File 'lib/openapi_client/api/auth_api.rb', line 392

def auth_forgot_password_post(forgot_password_request, opts = {})
  auth_forgot_password_post_with_http_info(forgot_password_request, opts)
  nil
end

#auth_forgot_password_post_with_http_info(forgot_password_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Request password reset email

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



401
402
403
404
405
406
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
449
450
# File 'lib/openapi_client/api/auth_api.rb', line 401

def auth_forgot_password_post_with_http_info(forgot_password_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_forgot_password_post ...'
  end
  # verify the required parameter 'forgot_password_request' is set
  if @api_client.config.client_side_validation && forgot_password_request.nil?
    fail ArgumentError, "Missing the required parameter 'forgot_password_request' when calling AuthApi.auth_forgot_password_post"
  end
  # resource path
  local_var_path = '/auth/forgot-password'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AuthApi.auth_forgot_password_post",
    :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: AuthApi#auth_forgot_password_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_login_post(login_request, opts = {}) ⇒ AuthLoginPost200Response

Login with email and password

Parameters:

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

    the optional parameters

Returns:



456
457
458
459
# File 'lib/openapi_client/api/auth_api.rb', line 456

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

#auth_login_post_with_http_info(login_request, opts = {}) ⇒ Array<(AuthLoginPost200Response, Integer, Hash)>

Login with email and password

Parameters:

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

    the optional parameters

Returns:

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

    AuthLoginPost200Response data, response status code and response headers



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
505
506
507
508
509
510
511
512
513
514
515
516
# File 'lib/openapi_client/api/auth_api.rb', line 465

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_login_post ...'
  end
  # verify the required parameter 'login_request' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'login_request' when calling AuthApi.auth_login_post"
  end
  # resource path
  local_var_path = '/auth/login'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'AuthLoginPost200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AuthApi.auth_login_post",
    :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: AuthApi#auth_login_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_logout_post(opts = {}) ⇒ nil

Logout (invalidate refresh token)

Parameters:

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

    the optional parameters

Returns:

  • (nil)


521
522
523
524
# File 'lib/openapi_client/api/auth_api.rb', line 521

def auth_logout_post(opts = {})
  auth_logout_post_with_http_info(opts)
  nil
end

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

Logout (invalidate refresh token)

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
567
568
569
# File 'lib/openapi_client/api/auth_api.rb', line 529

def auth_logout_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_logout_post ...'
  end
  # resource path
  local_var_path = '/auth/logout'

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"AuthApi.auth_logout_post",
    :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: AuthApi#auth_logout_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_me_get(opts = {}) ⇒ CustomerResponse

Get current user profile

Parameters:

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

    the optional parameters

Returns:



574
575
576
577
# File 'lib/openapi_client/api/auth_api.rb', line 574

def auth_me_get(opts = {})
  data, _status_code, _headers = auth_me_get_with_http_info(opts)
  data
end

#auth_me_get_with_http_info(opts = {}) ⇒ Array<(CustomerResponse, Integer, Hash)>

Get current user profile

Parameters:

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

    the optional parameters

Returns:

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

    CustomerResponse data, response status code and response headers



582
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
# File 'lib/openapi_client/api/auth_api.rb', line 582

def auth_me_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_me_get ...'
  end
  # resource path
  local_var_path = '/auth/me'

  # 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']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"AuthApi.auth_me_get",
    :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: AuthApi#auth_me_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_password_put(change_password_request, opts = {}) ⇒ nil

Change password

Parameters:

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

    the optional parameters

Returns:

  • (nil)


630
631
632
633
# File 'lib/openapi_client/api/auth_api.rb', line 630

def auth_password_put(change_password_request, opts = {})
  auth_password_put_with_http_info(change_password_request, opts)
  nil
end

#auth_password_put_with_http_info(change_password_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Change password

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



639
640
641
642
643
644
645
646
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
# File 'lib/openapi_client/api/auth_api.rb', line 639

def auth_password_put_with_http_info(change_password_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_password_put ...'
  end
  # verify the required parameter 'change_password_request' is set
  if @api_client.config.client_side_validation && change_password_request.nil?
    fail ArgumentError, "Missing the required parameter 'change_password_request' when calling AuthApi.auth_password_put"
  end
  # resource path
  local_var_path = '/auth/password'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"AuthApi.auth_password_put",
    :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: AuthApi#auth_password_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_profile_put(update_profile_request, opts = {}) ⇒ CustomerResponse

Update profile

Parameters:

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

    the optional parameters

Returns:



694
695
696
697
# File 'lib/openapi_client/api/auth_api.rb', line 694

def auth_profile_put(update_profile_request, opts = {})
  data, _status_code, _headers = auth_profile_put_with_http_info(update_profile_request, opts)
  data
end

#auth_profile_put_with_http_info(update_profile_request, opts = {}) ⇒ Array<(CustomerResponse, Integer, Hash)>

Update profile

Parameters:

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

    the optional parameters

Returns:

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

    CustomerResponse data, response status code and response headers



703
704
705
706
707
708
709
710
711
712
713
714
715
716
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
# File 'lib/openapi_client/api/auth_api.rb', line 703

def auth_profile_put_with_http_info(update_profile_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_profile_put ...'
  end
  # verify the required parameter 'update_profile_request' is set
  if @api_client.config.client_side_validation && update_profile_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_profile_request' when calling AuthApi.auth_profile_put"
  end
  # resource path
  local_var_path = '/auth/profile'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"AuthApi.auth_profile_put",
    :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: AuthApi#auth_profile_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_refresh_post(refresh_token_request, opts = {}) ⇒ AuthResponse

Refresh access token

Parameters:

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

    the optional parameters

Returns:



760
761
762
763
# File 'lib/openapi_client/api/auth_api.rb', line 760

def auth_refresh_post(refresh_token_request, opts = {})
  data, _status_code, _headers = auth_refresh_post_with_http_info(refresh_token_request, opts)
  data
end

#auth_refresh_post_with_http_info(refresh_token_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>

Refresh access token

Parameters:

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

    the optional parameters

Returns:

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

    AuthResponse data, response status code and response headers



769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
# File 'lib/openapi_client/api/auth_api.rb', line 769

def auth_refresh_post_with_http_info(refresh_token_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_refresh_post ...'
  end
  # verify the required parameter 'refresh_token_request' is set
  if @api_client.config.client_side_validation && refresh_token_request.nil?
    fail ArgumentError, "Missing the required parameter 'refresh_token_request' when calling AuthApi.auth_refresh_post"
  end
  # resource path
  local_var_path = '/auth/refresh'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'AuthResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AuthApi.auth_refresh_post",
    :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: AuthApi#auth_refresh_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_register_post(register_request, opts = {}) ⇒ CustomerResponse

Register a new account

Parameters:

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

    the optional parameters

Returns:



826
827
828
829
# File 'lib/openapi_client/api/auth_api.rb', line 826

def auth_register_post(register_request, opts = {})
  data, _status_code, _headers = auth_register_post_with_http_info(register_request, opts)
  data
end

#auth_register_post_with_http_info(register_request, opts = {}) ⇒ Array<(CustomerResponse, Integer, Hash)>

Register a new account

Parameters:

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

    the optional parameters

Returns:

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

    CustomerResponse data, response status code and response headers



835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
# File 'lib/openapi_client/api/auth_api.rb', line 835

def auth_register_post_with_http_info(register_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_register_post ...'
  end
  # verify the required parameter 'register_request' is set
  if @api_client.config.client_side_validation && register_request.nil?
    fail ArgumentError, "Missing the required parameter 'register_request' when calling AuthApi.auth_register_post"
  end
  # resource path
  local_var_path = '/auth/register'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'CustomerResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AuthApi.auth_register_post",
    :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: AuthApi#auth_register_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_resend_verification_post(resend_verification_request, opts = {}) ⇒ nil

Resend verification email

Parameters:

Returns:

  • (nil)


892
893
894
895
# File 'lib/openapi_client/api/auth_api.rb', line 892

def auth_resend_verification_post(resend_verification_request, opts = {})
  auth_resend_verification_post_with_http_info(resend_verification_request, opts)
  nil
end

#auth_resend_verification_post_with_http_info(resend_verification_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Resend verification email

Parameters:

Returns:

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

    nil, response status code and response headers



901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
# File 'lib/openapi_client/api/auth_api.rb', line 901

def auth_resend_verification_post_with_http_info(resend_verification_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_resend_verification_post ...'
  end
  # verify the required parameter 'resend_verification_request' is set
  if @api_client.config.client_side_validation && resend_verification_request.nil?
    fail ArgumentError, "Missing the required parameter 'resend_verification_request' when calling AuthApi.auth_resend_verification_post"
  end
  # resource path
  local_var_path = '/auth/resend-verification'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AuthApi.auth_resend_verification_post",
    :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: AuthApi#auth_resend_verification_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_reset_password_post(reset_password_request, opts = {}) ⇒ nil

Reset password with token

Parameters:

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

    the optional parameters

Returns:

  • (nil)


956
957
958
959
# File 'lib/openapi_client/api/auth_api.rb', line 956

def auth_reset_password_post(reset_password_request, opts = {})
  auth_reset_password_post_with_http_info(reset_password_request, opts)
  nil
end

#auth_reset_password_post_with_http_info(reset_password_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Reset password with token

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
# File 'lib/openapi_client/api/auth_api.rb', line 965

def auth_reset_password_post_with_http_info(reset_password_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_reset_password_post ...'
  end
  # verify the required parameter 'reset_password_request' is set
  if @api_client.config.client_side_validation && reset_password_request.nil?
    fail ArgumentError, "Missing the required parameter 'reset_password_request' when calling AuthApi.auth_reset_password_post"
  end
  # resource path
  local_var_path = '/auth/reset-password'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AuthApi.auth_reset_password_post",
    :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: AuthApi#auth_reset_password_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_verify_email_post(verify_email_request, opts = {}) ⇒ nil

Verify email address

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1020
1021
1022
1023
# File 'lib/openapi_client/api/auth_api.rb', line 1020

def auth_verify_email_post(verify_email_request, opts = {})
  auth_verify_email_post_with_http_info(verify_email_request, opts)
  nil
end

#auth_verify_email_post_with_http_info(verify_email_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Verify email address

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
# File 'lib/openapi_client/api/auth_api.rb', line 1029

def auth_verify_email_post_with_http_info(verify_email_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_verify_email_post ...'
  end
  # verify the required parameter 'verify_email_request' is set
  if @api_client.config.client_side_validation && verify_email_request.nil?
    fail ArgumentError, "Missing the required parameter 'verify_email_request' when calling AuthApi.auth_verify_email_post"
  end
  # resource path
  local_var_path = '/auth/verify-email'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AuthApi.auth_verify_email_post",
    :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: AuthApi#auth_verify_email_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end