Class: RainbowSubmarineTest3356::AppUserApi

Inherits:
Object
  • Object
show all
Defined in:
lib/rainbow-submarine-test-3356/api/app_user_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AppUserApi

Returns a new instance of AppUserApi.



18
19
20
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 18

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



16
17
18
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 16

def api_client
  @api_client
end

Instance Method Details

#app_user_device_update(user_id, device_id, app_user_device_update, opts = {}) ⇒ ClientResponse

Update specified device information.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • device_id

    Id of the device.

  • app_user_device_update

    Supported properties for an updateAppUserDevice request.

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

    the optional parameters

Returns:



29
30
31
32
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 29

def app_user_device_update(user_id, device_id, app_user_device_update, opts = {})
  data, _status_code, _headers = app_user_device_update_with_http_info(user_id, device_id, app_user_device_update, opts)
  return data
end

#app_user_device_update_with_http_info(user_id, device_id, app_user_device_update, opts = {}) ⇒ Array<(ClientResponse, Fixnum, Hash)>

Update specified device information.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • device_id

    Id of the device.

  • app_user_device_update

    Supported properties for an updateAppUserDevice request.

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

    the optional parameters

Returns:

  • (Array<(ClientResponse, Fixnum, Hash)>)

    ClientResponse data, response status code and response headers



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
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 41

def app_user_device_update_with_http_info(user_id, device_id, app_user_device_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppUserApi.app_user_device_update ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.app_user_device_update" if user_id.nil?
  # verify the required parameter 'device_id' is set
  fail ArgumentError, "Missing the required parameter 'device_id' when calling AppUserApi.app_user_device_update" if device_id.nil?
  # verify the required parameter 'app_user_device_update' is set
  fail ArgumentError, "Missing the required parameter 'app_user_device_update' when calling AppUserApi.app_user_device_update" if app_user_device_update.nil?
  # resource path
  local_var_path = "/appusers/{userId}/devices/{deviceId}".sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'deviceId' + '}', device_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(app_user_device_update)
  auth_names = ['appToken', 'jwt']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ClientResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppUserApi#app_user_device_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_app_user_profile(user_id, opts = {}) ⇒ AppUserResponse

Delete specified app users profile.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

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

    the optional parameters

Returns:



88
89
90
91
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 88

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

#delete_app_user_profile_with_http_info(user_id, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>

Delete specified app users profile.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

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

    the optional parameters

Returns:

  • (Array<(AppUserResponse, Fixnum, Hash)>)

    AppUserResponse data, response status code and response headers



98
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
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 98

def (user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppUserApi.delete_app_user_profile ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.delete_app_user_profile" if user_id.nil?
  # resource path
  local_var_path = "/appusers/{userId}/profile".sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['appToken', 'jwt']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppUserResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppUserApi#delete_app_user_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_app_user(user_id, opts = {}) ⇒ AppUserResponse

Get the specified app user.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

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

    the optional parameters

Returns:



141
142
143
144
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 141

def get_app_user(user_id, opts = {})
  data, _status_code, _headers = get_app_user_with_http_info(user_id, opts)
  return data
end

#get_app_user_entity_ids(user_id, opts = {}) ⇒ AppUserResponse

Get specified app users channel entity IDs.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

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

    the optional parameters

Returns:



194
195
196
197
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 194

def get_app_user_entity_ids(user_id, opts = {})
  data, _status_code, _headers = get_app_user_entity_ids_with_http_info(user_id, opts)
  return data
end

#get_app_user_entity_ids_with_http_info(user_id, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>

Get specified app users channel entity IDs.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

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

    the optional parameters

Returns:

  • (Array<(AppUserResponse, Fixnum, Hash)>)

    AppUserResponse data, response status code and response headers



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
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 204

def get_app_user_entity_ids_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppUserApi.get_app_user_entity_ids ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.get_app_user_entity_ids" if user_id.nil?
  # resource path
  local_var_path = "/appusers/{userId}/channels".sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['appToken', 'jwt']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppUserResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppUserApi#get_app_user_entity_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_app_user_with_http_info(user_id, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>

Get the specified app user.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

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

    the optional parameters

Returns:

  • (Array<(AppUserResponse, Fixnum, Hash)>)

    AppUserResponse data, response status code and response headers



151
152
153
154
155
156
157
158
159
160
161
162
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
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 151

def get_app_user_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppUserApi.get_app_user ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.get_app_user" if user_id.nil?
  # resource path
  local_var_path = "/appusers/{userId}".sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['appToken', 'jwt']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppUserResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppUserApi#get_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Link specified app user to given channel.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • app_user_link

    Supported properties for a linkAppUser request.

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

    the optional parameters

Returns:



248
249
250
251
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 248

def link_app_user(user_id, app_user_link, opts = {})
  data, _status_code, _headers = link_app_user_with_http_info(user_id, app_user_link, opts)
  return data
end

Link specified app user to given channel.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • app_user_link

    Supported properties for a linkAppUser request.

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

    the optional parameters

Returns:

  • (Array<(AppUserResponse, Fixnum, Hash)>)

    AppUserResponse data, response status code and response headers



259
260
261
262
263
264
265
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
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 259

def link_app_user_with_http_info(user_id, app_user_link, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppUserApi.link_app_user ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.link_app_user" if user_id.nil?
  # verify the required parameter 'app_user_link' is set
  fail ArgumentError, "Missing the required parameter 'app_user_link' when calling AppUserApi.link_app_user" if app_user_link.nil?
  # resource path
  local_var_path = "/appusers/{userId}/channels".sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(app_user_link)
  auth_names = ['appToken', 'jwt']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppUserResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppUserApi#link_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_image_message(user_id, source, role, opts = {}) ⇒ MessageResponse

Send an image message to the conversation

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • source

    Image to be uploaded

  • role

    Role of the sender

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

    the optional parameters

Returns:



306
307
308
309
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 306

def post_image_message(user_id, source, role, opts = {})
  data, _status_code, _headers = post_image_message_with_http_info(user_id, source, role, opts)
  return data
end

#post_image_message_with_http_info(user_id, source, role, opts = {}) ⇒ Array<(MessageResponse, Fixnum, Hash)>

Send an image message to the conversation

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • source

    Image to be uploaded

  • role

    Role of the sender

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

    the optional parameters

Returns:

  • (Array<(MessageResponse, Fixnum, Hash)>)

    MessageResponse data, response status code and response headers



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 318

def post_image_message_with_http_info(user_id, source, role, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppUserApi.post_image_message ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.post_image_message" if user_id.nil?
  # verify the required parameter 'source' is set
  fail ArgumentError, "Missing the required parameter 'source' when calling AppUserApi.post_image_message" if source.nil?
  # verify the required parameter 'role' is set
  fail ArgumentError, "Missing the required parameter 'role' when calling AppUserApi.post_image_message" if role.nil?
  # resource path
  local_var_path = "/appusers/{userId}/images".sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params["source"] = source
  form_params["role"] = role

  # http body (model)
  post_body = nil
  auth_names = ['appToken', 'jwt']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'MessageResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppUserApi#post_image_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pre_create_app_user(app_user_pre_create, opts = {}) ⇒ AppUserResponse

Pre-create an app user.

Parameters:

  • app_user_pre_create

    Supported properties for a preCreateAppUser request.

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

    the optional parameters

Returns:



367
368
369
370
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 367

def pre_create_app_user(app_user_pre_create, opts = {})
  data, _status_code, _headers = pre_create_app_user_with_http_info(app_user_pre_create, opts)
  return data
end

#pre_create_app_user_with_http_info(app_user_pre_create, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>

Pre-create an app user.

Parameters:

  • app_user_pre_create

    Supported properties for a preCreateAppUser request.

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

    the optional parameters

Returns:

  • (Array<(AppUserResponse, Fixnum, Hash)>)

    AppUserResponse data, response status code and response headers



377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 377

def pre_create_app_user_with_http_info(app_user_pre_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppUserApi.pre_create_app_user ..."
  end
  # verify the required parameter 'app_user_pre_create' is set
  fail ArgumentError, "Missing the required parameter 'app_user_pre_create' when calling AppUserApi.pre_create_app_user" if app_user_pre_create.nil?
  # resource path
  local_var_path = "/appusers"

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(app_user_pre_create)
  auth_names = ['jwt']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppUserResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppUserApi#pre_create_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#track_event(user_id, event, opts = {}) ⇒ TrackEventResponse

Track an event for the given app user.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • event

    Supported properties for a trackEvent request.

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

    the optional parameters

Returns:



421
422
423
424
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 421

def track_event(user_id, event, opts = {})
  data, _status_code, _headers = track_event_with_http_info(user_id, event, opts)
  return data
end

#track_event_with_http_info(user_id, event, opts = {}) ⇒ Array<(TrackEventResponse, Fixnum, Hash)>

Track an event for the given app user.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • event

    Supported properties for a trackEvent request.

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

    the optional parameters

Returns:

  • (Array<(TrackEventResponse, Fixnum, Hash)>)

    TrackEventResponse data, response status code and response headers



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
458
459
460
461
462
463
464
465
466
467
468
469
470
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 432

def track_event_with_http_info(user_id, event, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppUserApi.track_event ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.track_event" if user_id.nil?
  # verify the required parameter 'event' is set
  fail ArgumentError, "Missing the required parameter 'event' when calling AppUserApi.track_event" if event.nil?
  # resource path
  local_var_path = "/appusers/{userId}/events".sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(event)
  auth_names = ['appToken', 'jwt']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TrackEventResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppUserApi#track_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Unlink specified app user from given channel.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • channel

    Name of the channel.

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

    the optional parameters

Returns:

  • (nil)


478
479
480
481
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 478

def unlink_app_user(user_id, channel, opts = {})
  unlink_app_user_with_http_info(user_id, channel, opts)
  return nil
end

Unlink specified app user from given channel.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • channel

    Name of the channel.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 489

def unlink_app_user_with_http_info(user_id, channel, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppUserApi.unlink_app_user ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.unlink_app_user" if user_id.nil?
  # verify the required parameter 'channel' is set
  fail ArgumentError, "Missing the required parameter 'channel' when calling AppUserApi.unlink_app_user" if channel.nil?
  # resource path
  local_var_path = "/appusers/{userId}/channels/{channel}".sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'channel' + '}', channel.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['appToken', 'jwt']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppUserApi#unlink_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_app_user(user_id, app_user_update, opts = {}) ⇒ AppUserResponse

Update the specified app user.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • app_user_update

    Supported properties for an updateAppUser request.

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

    the optional parameters

Returns:



534
535
536
537
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 534

def update_app_user(user_id, app_user_update, opts = {})
  data, _status_code, _headers = update_app_user_with_http_info(user_id, app_user_update, opts)
  return data
end

#update_app_user_with_http_info(user_id, app_user_update, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>

Update the specified app user.

Parameters:

  • user_id

    Identifies the user. Can be either the smoochId or the userId.

  • app_user_update

    Supported properties for an updateAppUser request.

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

    the optional parameters

Returns:

  • (Array<(AppUserResponse, Fixnum, Hash)>)

    AppUserResponse data, response status code and response headers



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
570
571
572
573
574
575
576
577
578
579
580
581
582
583
# File 'lib/rainbow-submarine-test-3356/api/app_user_api.rb', line 545

def update_app_user_with_http_info(user_id, app_user_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppUserApi.update_app_user ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.update_app_user" if user_id.nil?
  # verify the required parameter 'app_user_update' is set
  fail ArgumentError, "Missing the required parameter 'app_user_update' when calling AppUserApi.update_app_user" if app_user_update.nil?
  # resource path
  local_var_path = "/appusers/{userId}".sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(app_user_update)
  auth_names = ['appToken', 'jwt']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppUserResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppUserApi#update_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end