Class: WalleeRubySdk::ApplicationUsersService

Inherits:
Object
  • Object
show all
Defined in:
lib/wallee-ruby-sdk/service/application_users_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ApplicationUsersService

Returns a new instance of ApplicationUsersService.



28
29
30
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 28

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



25
26
27
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 25

def api_client
  @api_client
end

Instance Method Details

#delete_application_users_id(id, opts = {}) ⇒ nil

Delete an application user Permanently deletes a application user. It cannot be undone.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


36
37
38
39
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 36

def delete_application_users_id(id, opts = {})
  delete_application_users_id_with_http_info(id, opts)
  nil
end

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

Returns nil, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
85
86
87
88
89
90
91
92
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 47

def delete_application_users_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ApplicationUsersService.delete_application_users_id ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ApplicationUsersService.delete_application_users_id"
  end
  # resource path
  local_var_path = '/application-users/{id}'.sub('{' + 'id' + '}', CGI.escape(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']) unless header_params['Accept']

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

  # return_type
  return_type = opts[:debug_return_type]

  new_options = opts.merge(
    :operation => :"ApplicationUsersService.delete_application_users_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ApplicationUsersService#delete_application_users_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#delete_application_users_user_id_keys_id(user_id, id, opts = {}) ⇒ nil

Deactivate an authentication key

Parameters:

  • user_id (Integer)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


100
101
102
103
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 100

def delete_application_users_user_id_keys_id(user_id, id, opts = {})
  delete_application_users_user_id_keys_id_with_http_info(user_id, id, opts)
  nil
end

#delete_application_users_user_id_keys_id_with_http_info(user_id, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Returns nil, response status code and response headers.

Parameters:

  • user_id (Integer)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 111

def delete_application_users_user_id_keys_id_with_http_info(user_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ApplicationUsersService.delete_application_users_user_id_keys_id ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ApplicationUsersService.delete_application_users_user_id_keys_id"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ApplicationUsersService.delete_application_users_user_id_keys_id"
  end
  # resource path
  local_var_path = '/application-users/{userId}/keys/{id}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'id' + '}', CGI.escape(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']) unless header_params['Accept']

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

  # return_type
  return_type = opts[:debug_return_type]

  new_options = opts.merge(
    :operation => :"ApplicationUsersService.delete_application_users_user_id_keys_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ApplicationUsersService#delete_application_users_user_id_keys_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_application_users(opts = {}) ⇒ ApplicationUserListResponse

List all application users

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :after (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately after the named object.

  • :before (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately before the named object.

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :order (SortingOrder)

    Specify to retrieve objects in chronological (ASC) or reverse chronological (DESC) order.

Returns:



171
172
173
174
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 171

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

#get_application_users_id(id, opts = {}) ⇒ ApplicationUser

Retrieve an application user

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:



255
256
257
258
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 255

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

#get_application_users_id_with_http_info(id, opts = {}) ⇒ Array<(ApplicationUser, Integer, Hash)>

Returns ApplicationUser data, response status code and response headers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:

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

    ApplicationUser data, response status code and response headers



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
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
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 266

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

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?

  # 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] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"ApplicationUsersService.get_application_users_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ApplicationUsersService#get_application_users_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_application_users_search(opts = {}) ⇒ ApplicationUserSearchResponse

Search application users

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :offset (Integer)

    A cursor for pagination, specifies the number of objects to skip.

  • :order (String)

    The fields and order to sort the objects by.

  • :query (String)

    The search query to filter the objects by.

Returns:



323
324
325
326
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 323

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

#get_application_users_search_with_http_info(opts = {}) ⇒ Array<(ApplicationUserSearchResponse, Integer, Hash)>

Returns ApplicationUserSearchResponse data, response status code and response headers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :offset (Integer)

    A cursor for pagination, specifies the number of objects to skip.

  • :order (String)

    The fields and order to sort the objects by.

  • :query (String)

    The search query to filter the objects by.

Returns:



337
338
339
340
341
342
343
344
345
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
387
388
389
390
391
392
393
394
395
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 337

def get_application_users_search_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ApplicationUsersService.get_application_users_search ...'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ApplicationUsersService.get_application_users_search, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ApplicationUsersService.get_application_users_search, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ApplicationUsersService.get_application_users_search, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = '/application-users/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?
  query_params[:'limit'] = opts[:'limit'] unless opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] unless opts[:'offset'].nil?
  query_params[:'order'] = opts[:'order'] unless opts[:'order'].nil?
  query_params[:'query'] = opts[:'query'] unless opts[:'query'].nil?

  # 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] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"ApplicationUsersService.get_application_users_search",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ApplicationUsersService#get_application_users_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_application_users_user_id_keys(user_id, opts = {}) ⇒ Array<RestApplicationUserMacKey>

List a user’s authentication keys

Parameters:

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

    the optional parameters

Returns:



402
403
404
405
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 402

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

#get_application_users_user_id_keys_with_http_info(user_id, opts = {}) ⇒ Array<(Array<RestApplicationUserMacKey>, Integer, Hash)>

Returns Array<RestApplicationUserMacKey> data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    Array<RestApplicationUserMacKey> data, response status code and response headers



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
451
452
453
454
455
456
457
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 412

def get_application_users_user_id_keys_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ApplicationUsersService.get_application_users_user_id_keys ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ApplicationUsersService.get_application_users_user_id_keys"
  end
  # resource path
  local_var_path = '/application-users/{userId}/keys'.sub('{' + 'userId' + '}', CGI.escape(user_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']) unless header_params['Accept']

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<RestApplicationUserMacKey>'

  new_options = opts.merge(
    :operation => :"ApplicationUsersService.get_application_users_user_id_keys",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ApplicationUsersService#get_application_users_user_id_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_application_users_with_http_info(opts = {}) ⇒ Array<(ApplicationUserListResponse, Integer, Hash)>

Returns ApplicationUserListResponse data, response status code and response headers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :after (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately after the named object.

  • :before (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately before the named object.

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :order (SortingOrder)

    Specify to retrieve objects in chronological (ASC) or reverse chronological (DESC) order.

Returns:

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

    ApplicationUserListResponse data, response status code and response headers



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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 185

def get_application_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ApplicationUsersService.get_application_users ...'
  end
  if @api_client.config.client_side_validation && !opts[:'after'].nil? && opts[:'after'] < 1
    fail ArgumentError, 'invalid value for "opts[:"after"]" when calling ApplicationUsersService.get_application_users, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'before'].nil? && opts[:'before'] < 1
    fail ArgumentError, 'invalid value for "opts[:"before"]" when calling ApplicationUsersService.get_application_users, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ApplicationUsersService.get_application_users, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ApplicationUsersService.get_application_users, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/application-users'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'after'] = opts[:'after'] unless opts[:'after'].nil?
  query_params[:'before'] = opts[:'before'] unless opts[:'before'].nil?
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?
  query_params[:'limit'] = opts[:'limit'] unless opts[:'limit'].nil?
  query_params[:'order'] = opts[:'order'] unless opts[:'order'].nil?

  # 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] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"ApplicationUsersService.get_application_users",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ApplicationUsersService#get_application_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#patch_application_users_id(id, application_user_update, opts = {}) ⇒ ApplicationUser

Update an application user

Parameters:

  • id (Integer)
  • application_user_update (ApplicationUserUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:



466
467
468
469
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 466

def patch_application_users_id(id, application_user_update, opts = {})
  data, _status_code, _headers = patch_application_users_id_with_http_info(id, application_user_update, opts)
  data
end

#patch_application_users_id_with_http_info(id, application_user_update, opts = {}) ⇒ Array<(ApplicationUser, Integer, Hash)>

Returns ApplicationUser data, response status code and response headers.

Parameters:

  • id (Integer)
  • application_user_update (ApplicationUserUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:

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

    ApplicationUser data, response status code and response headers



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
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 478

def patch_application_users_id_with_http_info(id, application_user_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ApplicationUsersService.patch_application_users_id ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ApplicationUsersService.patch_application_users_id"
  end
  # verify the required parameter 'application_user_update' is set
  if @api_client.config.client_side_validation && application_user_update.nil?
    fail ArgumentError, "Missing the required parameter 'application_user_update' when calling ApplicationUsersService.patch_application_users_id"
  end
  # resource path
  local_var_path = '/application-users/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?

  # 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'])
  unless content_type.nil?
    header_params['Content-Type'] = content_type
  end

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"ApplicationUsersService.patch_application_users_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ApplicationUsersService#patch_application_users_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_application_users(application_user_create, opts = {}) ⇒ ApplicationUserCreateWithMacKey

Create an application user

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:



541
542
543
544
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 541

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

#post_application_users_user_id_keys(user_id, opts = {}) ⇒ RestApplicationUserMacKeyCreated

Generate a new authentication key

Parameters:

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

    the optional parameters

Returns:



610
611
612
613
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 610

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

#post_application_users_user_id_keys_with_http_info(user_id, opts = {}) ⇒ Array<(RestApplicationUserMacKeyCreated, Integer, Hash)>

Returns RestApplicationUserMacKeyCreated data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:



620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
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
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 620

def post_application_users_user_id_keys_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ApplicationUsersService.post_application_users_user_id_keys ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ApplicationUsersService.post_application_users_user_id_keys"
  end
  # resource path
  local_var_path = '/application-users/{userId}/keys'.sub('{' + 'userId' + '}', CGI.escape(user_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']) unless header_params['Accept']

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"ApplicationUsersService.post_application_users_user_id_keys",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ApplicationUsersService#post_application_users_user_id_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_application_users_with_http_info(application_user_create, opts = {}) ⇒ Array<(ApplicationUserCreateWithMacKey, Integer, Hash)>

Returns ApplicationUserCreateWithMacKey data, response status code and response headers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:



552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
# File 'lib/wallee-ruby-sdk/service/application_users_service.rb', line 552

def post_application_users_with_http_info(application_user_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ApplicationUsersService.post_application_users ...'
  end
  # verify the required parameter 'application_user_create' is set
  if @api_client.config.client_side_validation && application_user_create.nil?
    fail ArgumentError, "Missing the required parameter 'application_user_create' when calling ApplicationUsersService.post_application_users"
  end
  # resource path
  local_var_path = '/application-users'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?

  # 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'])
  unless content_type.nil?
    header_params['Content-Type'] = content_type
  end

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"ApplicationUsersService.post_application_users",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ApplicationUsersService#post_application_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end