Class: PureCloud::WebChatApi

Inherits:
Object
  • Object
show all
Defined in:
lib/purecloudplatformclientv2/api/web_chat_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ WebChatApi

Returns a new instance of WebChatApi.



23
24
25
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 23

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



21
22
23
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 21

def api_client
  @api_client
end

Instance Method Details

#delete_webchat_deployment(deployment_id, opts = {}) ⇒ nil

Delete a WebChat deployment

Parameters:

  • deployment_id

    Deployment Id

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

    the optional parameters

Returns:

  • (nil)


32
33
34
35
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 32

def delete_webchat_deployment(deployment_id, opts = {})
  delete_webchat_deployment_with_http_info(deployment_id, opts)
  return nil
end

#delete_webchat_deployment_with_http_info(deployment_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a WebChat deployment

Parameters:

  • deployment_id

    Deployment Id

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
85
86
87
88
89
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 42

def delete_webchat_deployment_with_http_info(deployment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.delete_webchat_deployment ..."
  end
  
  
  # verify the required parameter 'deployment_id' is set
  fail ArgumentError, "Missing the required parameter 'deployment_id' when calling WebChatApi.delete_webchat_deployment" if deployment_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/deployments/{deploymentId}".sub('{format}','json').sub('{' + 'deploymentId' + '}', deployment_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  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: WebChatApi#delete_webchat_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_webchat_guest_conversation_member(conversation_id, member_id, opts = {}) ⇒ nil

Remove a member from a chat conversation

Parameters:

  • conversation_id

    conversationId

  • member_id

    memberId

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

    the optional parameters

Returns:

  • (nil)


97
98
99
100
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 97

def delete_webchat_guest_conversation_member(conversation_id, member_id, opts = {})
  delete_webchat_guest_conversation_member_with_http_info(conversation_id, member_id, opts)
  return nil
end

#delete_webchat_guest_conversation_member_with_http_info(conversation_id, member_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Remove a member from a chat conversation

Parameters:

  • conversation_id

    conversationId

  • member_id

    memberId

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 108

def delete_webchat_guest_conversation_member_with_http_info(conversation_id, member_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.delete_webchat_guest_conversation_member ..."
  end
  
  
  # verify the required parameter 'conversation_id' is set
  fail ArgumentError, "Missing the required parameter 'conversation_id' when calling WebChatApi.delete_webchat_guest_conversation_member" if conversation_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'member_id' is set
  fail ArgumentError, "Missing the required parameter 'member_id' when calling WebChatApi.delete_webchat_guest_conversation_member" if member_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['Guest Chat 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: WebChatApi#delete_webchat_guest_conversation_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_webchat_settings(opts = {}) ⇒ nil

Remove WebChat deployment settings

Parameters:

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

    the optional parameters

Returns:

  • (nil)


169
170
171
172
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 169

def delete_webchat_settings(opts = {})
  delete_webchat_settings_with_http_info(opts)
  return nil
end

#delete_webchat_settings_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Remove WebChat deployment settings

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
215
216
217
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 178

def delete_webchat_settings_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.delete_webchat_settings ..."
  end
  
  # resource path
  local_var_path = "/api/v2/webchat/settings".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  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: WebChatApi#delete_webchat_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webchat_deployment(deployment_id, opts = {}) ⇒ WebChatDeployment

Get a WebChat deployment

Parameters:

  • deployment_id

    Deployment Id

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

    the optional parameters

Returns:



224
225
226
227
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 224

def get_webchat_deployment(deployment_id, opts = {})
  data, _status_code, _headers = get_webchat_deployment_with_http_info(deployment_id, opts)
  return data
end

#get_webchat_deployment_with_http_info(deployment_id, opts = {}) ⇒ Array<(WebChatDeployment, Fixnum, Hash)>

Get a WebChat deployment

Parameters:

  • deployment_id

    Deployment Id

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

    the optional parameters

Returns:

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

    WebChatDeployment data, response status code and response headers



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
281
282
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 234

def get_webchat_deployment_with_http_info(deployment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.get_webchat_deployment ..."
  end
  
  
  # verify the required parameter 'deployment_id' is set
  fail ArgumentError, "Missing the required parameter 'deployment_id' when calling WebChatApi.get_webchat_deployment" if deployment_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/deployments/{deploymentId}".sub('{format}','json').sub('{' + 'deploymentId' + '}', deployment_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  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 => 'WebChatDeployment')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#get_webchat_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webchat_deployments(opts = {}) ⇒ WebChatDeploymentEntityListing

List WebChat deployments

Parameters:

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

    the optional parameters

Returns:



288
289
290
291
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 288

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

#get_webchat_deployments_with_http_info(opts = {}) ⇒ Array<(WebChatDeploymentEntityListing, Fixnum, Hash)>

List WebChat deployments

Parameters:

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

    the optional parameters

Returns:



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
334
335
336
337
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 297

def get_webchat_deployments_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.get_webchat_deployments ..."
  end
  
  # resource path
  local_var_path = "/api/v2/webchat/deployments".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  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 => 'WebChatDeploymentEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#get_webchat_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webchat_guest_conversation_mediarequest(conversation_id, media_request_id, opts = {}) ⇒ WebChatGuestMediaRequest

Get a media request in the conversation

Parameters:

  • conversation_id

    conversationId

  • media_request_id

    mediaRequestId

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

    the optional parameters

Returns:



345
346
347
348
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 345

def get_webchat_guest_conversation_mediarequest(conversation_id, media_request_id, opts = {})
  data, _status_code, _headers = get_webchat_guest_conversation_mediarequest_with_http_info(conversation_id, media_request_id, opts)
  return data
end

#get_webchat_guest_conversation_mediarequest_with_http_info(conversation_id, media_request_id, opts = {}) ⇒ Array<(WebChatGuestMediaRequest, Fixnum, Hash)>

Get a media request in the conversation

Parameters:

  • conversation_id

    conversationId

  • media_request_id

    mediaRequestId

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

    the optional parameters

Returns:

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

    WebChatGuestMediaRequest data, response status code and response headers



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
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 356

def get_webchat_guest_conversation_mediarequest_with_http_info(conversation_id, media_request_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.get_webchat_guest_conversation_mediarequest ..."
  end
  
  
  # verify the required parameter 'conversation_id' is set
  fail ArgumentError, "Missing the required parameter 'conversation_id' when calling WebChatApi.get_webchat_guest_conversation_mediarequest" if conversation_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'media_request_id' is set
  fail ArgumentError, "Missing the required parameter 'media_request_id' when calling WebChatApi.get_webchat_guest_conversation_mediarequest" if media_request_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'mediaRequestId' + '}', media_request_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['Guest Chat 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 => 'WebChatGuestMediaRequest')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#get_webchat_guest_conversation_mediarequest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webchat_guest_conversation_mediarequests(conversation_id, opts = {}) ⇒ WebChatGuestMediaRequestEntityList

Get all media requests to the guest in the conversation

Parameters:

  • conversation_id

    conversationId

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

    the optional parameters

Returns:



419
420
421
422
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 419

def get_webchat_guest_conversation_mediarequests(conversation_id, opts = {})
  data, _status_code, _headers = get_webchat_guest_conversation_mediarequests_with_http_info(conversation_id, opts)
  return data
end

#get_webchat_guest_conversation_mediarequests_with_http_info(conversation_id, opts = {}) ⇒ Array<(WebChatGuestMediaRequestEntityList, Fixnum, Hash)>

Get all media requests to the guest in the conversation

Parameters:

  • conversation_id

    conversationId

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

    the optional parameters

Returns:



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
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 429

def get_webchat_guest_conversation_mediarequests_with_http_info(conversation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.get_webchat_guest_conversation_mediarequests ..."
  end
  
  
  # verify the required parameter 'conversation_id' is set
  fail ArgumentError, "Missing the required parameter 'conversation_id' when calling WebChatApi.get_webchat_guest_conversation_mediarequests" if conversation_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/guest/conversations/{conversationId}/mediarequests".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['Guest Chat 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 => 'WebChatGuestMediaRequestEntityList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#get_webchat_guest_conversation_mediarequests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webchat_guest_conversation_member(conversation_id, member_id, opts = {}) ⇒ WebChatMemberInfo

Get a web chat conversation member

Parameters:

  • conversation_id

    conversationId

  • member_id

    memberId

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

    the optional parameters

Returns:



485
486
487
488
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 485

def get_webchat_guest_conversation_member(conversation_id, member_id, opts = {})
  data, _status_code, _headers = get_webchat_guest_conversation_member_with_http_info(conversation_id, member_id, opts)
  return data
end

#get_webchat_guest_conversation_member_with_http_info(conversation_id, member_id, opts = {}) ⇒ Array<(WebChatMemberInfo, Fixnum, Hash)>

Get a web chat conversation member

Parameters:

  • conversation_id

    conversationId

  • member_id

    memberId

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

    the optional parameters

Returns:

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

    WebChatMemberInfo data, response status code and response headers



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
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 496

def get_webchat_guest_conversation_member_with_http_info(conversation_id, member_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.get_webchat_guest_conversation_member ..."
  end
  
  
  # verify the required parameter 'conversation_id' is set
  fail ArgumentError, "Missing the required parameter 'conversation_id' when calling WebChatApi.get_webchat_guest_conversation_member" if conversation_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'member_id' is set
  fail ArgumentError, "Missing the required parameter 'member_id' when calling WebChatApi.get_webchat_guest_conversation_member" if member_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['Guest Chat 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 => 'WebChatMemberInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#get_webchat_guest_conversation_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webchat_guest_conversation_members(conversation_id, opts = {}) ⇒ WebChatMemberInfoEntityList

Get the members of a chat conversation.

Parameters:

  • conversation_id

    conversationId

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of entries to return per page, or omitted for the default. (default to 25)

  • :page_number (Integer)

    The page number to return, or omitted for the first page. (default to 1)

  • :exclude_disconnected_members (BOOLEAN)

    If true, the results will not contain members who have a DISCONNECTED state. (default to false)

Returns:



562
563
564
565
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 562

def get_webchat_guest_conversation_members(conversation_id, opts = {})
  data, _status_code, _headers = get_webchat_guest_conversation_members_with_http_info(conversation_id, opts)
  return data
end

#get_webchat_guest_conversation_members_with_http_info(conversation_id, opts = {}) ⇒ Array<(WebChatMemberInfoEntityList, Fixnum, Hash)>

Get the members of a chat conversation.

Parameters:

  • conversation_id

    conversationId

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of entries to return per page, or omitted for the default.

  • :page_number (Integer)

    The page number to return, or omitted for the first page.

  • :exclude_disconnected_members (BOOLEAN)

    If true, the results will not contain members who have a DISCONNECTED state.

Returns:



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
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 575

def get_webchat_guest_conversation_members_with_http_info(conversation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.get_webchat_guest_conversation_members ..."
  end
  
  
  # verify the required parameter 'conversation_id' is set
  fail ArgumentError, "Missing the required parameter 'conversation_id' when calling WebChatApi.get_webchat_guest_conversation_members" if conversation_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/guest/conversations/{conversationId}/members".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
  query_params[:'excludeDisconnectedMembers'] = opts[:'exclude_disconnected_members'] if opts[:'exclude_disconnected_members']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['Guest Chat 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 => 'WebChatMemberInfoEntityList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#get_webchat_guest_conversation_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webchat_guest_conversation_message(conversation_id, message_id, opts = {}) ⇒ WebChatMessage

Get a web chat conversation message

Parameters:

  • conversation_id

    conversationId

  • message_id

    messageId

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

    the optional parameters

Returns:



652
653
654
655
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 652

def get_webchat_guest_conversation_message(conversation_id, message_id, opts = {})
  data, _status_code, _headers = get_webchat_guest_conversation_message_with_http_info(conversation_id, message_id, opts)
  return data
end

#get_webchat_guest_conversation_message_with_http_info(conversation_id, message_id, opts = {}) ⇒ Array<(WebChatMessage, Fixnum, Hash)>

Get a web chat conversation message

Parameters:

  • conversation_id

    conversationId

  • message_id

    messageId

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

    the optional parameters

Returns:

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

    WebChatMessage data, response status code and response headers



663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 663

def get_webchat_guest_conversation_message_with_http_info(conversation_id, message_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.get_webchat_guest_conversation_message ..."
  end
  
  
  # verify the required parameter 'conversation_id' is set
  fail ArgumentError, "Missing the required parameter 'conversation_id' when calling WebChatApi.get_webchat_guest_conversation_message" if conversation_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'message_id' is set
  fail ArgumentError, "Missing the required parameter 'message_id' when calling WebChatApi.get_webchat_guest_conversation_message" if message_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/guest/conversations/{conversationId}/messages/{messageId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['Guest Chat 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 => 'WebChatMessage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#get_webchat_guest_conversation_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webchat_guest_conversation_messages(conversation_id, opts = {}) ⇒ WebChatMessageEntityList

Get the messages of a chat conversation.

Parameters:

  • conversation_id

    conversationId

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

    the optional parameters

Options Hash (opts):

  • :after (String)

    If available, get the messages chronologically after the id of this message

  • :before (String)

    If available, get the messages chronologically before the id of this message

  • :sort_order (String)

    Sort order (default to ascending)

  • :max_results (Integer)

    Limit the returned number of messages, up to a maximum of 100 (default to 100)

Returns:



730
731
732
733
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 730

def get_webchat_guest_conversation_messages(conversation_id, opts = {})
  data, _status_code, _headers = get_webchat_guest_conversation_messages_with_http_info(conversation_id, opts)
  return data
end

#get_webchat_guest_conversation_messages_with_http_info(conversation_id, opts = {}) ⇒ Array<(WebChatMessageEntityList, Fixnum, Hash)>

Get the messages of a chat conversation.

Parameters:

  • conversation_id

    conversationId

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

    the optional parameters

Options Hash (opts):

  • :after (String)

    If available, get the messages chronologically after the id of this message

  • :before (String)

    If available, get the messages chronologically before the id of this message

  • :sort_order (String)

    Sort order

  • :max_results (Integer)

    Limit the returned number of messages, up to a maximum of 100

Returns:

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

    WebChatMessageEntityList data, response status code and response headers



744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
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
821
822
823
824
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 744

def get_webchat_guest_conversation_messages_with_http_info(conversation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.get_webchat_guest_conversation_messages ..."
  end
  
  
  # verify the required parameter 'conversation_id' is set
  fail ArgumentError, "Missing the required parameter 'conversation_id' when calling WebChatApi.get_webchat_guest_conversation_messages" if conversation_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order'])
    fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending'
  end
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/guest/conversations/{conversationId}/messages".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'after'] = opts[:'after'] if opts[:'after']
  query_params[:'before'] = opts[:'before'] if opts[:'before']
  query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
  query_params[:'maxResults'] = opts[:'max_results'] if opts[:'max_results']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['Guest Chat 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 => 'WebChatMessageEntityList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#get_webchat_guest_conversation_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webchat_settings(opts = {}) ⇒ WebChatSettings

Get WebChat deployment settings

Parameters:

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

    the optional parameters

Returns:



830
831
832
833
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 830

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

#get_webchat_settings_with_http_info(opts = {}) ⇒ Array<(WebChatSettings, Fixnum, Hash)>

Get WebChat deployment settings

Parameters:

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

    the optional parameters

Returns:

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

    WebChatSettings data, response status code and response headers



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
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 839

def get_webchat_settings_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.get_webchat_settings ..."
  end
  
  # resource path
  local_var_path = "/api/v2/webchat/settings".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  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 => 'WebChatSettings')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#get_webchat_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_webchat_guest_conversation_mediarequest(conversation_id, media_request_id, body, opts = {}) ⇒ WebChatGuestMediaRequest

Update a media request in the conversation, setting the state to ACCEPTED/DECLINED/ERRORED

Parameters:

  • conversation_id

    conversationId

  • media_request_id

    mediaRequestId

  • body

    Request

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

    the optional parameters

Returns:



888
889
890
891
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 888

def patch_webchat_guest_conversation_mediarequest(conversation_id, media_request_id, body, opts = {})
  data, _status_code, _headers = patch_webchat_guest_conversation_mediarequest_with_http_info(conversation_id, media_request_id, body, opts)
  return data
end

#patch_webchat_guest_conversation_mediarequest_with_http_info(conversation_id, media_request_id, body, opts = {}) ⇒ Array<(WebChatGuestMediaRequest, Fixnum, Hash)>

Update a media request in the conversation, setting the state to ACCEPTED/DECLINED/ERRORED

Parameters:

  • conversation_id

    conversationId

  • media_request_id

    mediaRequestId

  • body

    Request

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

    the optional parameters

Returns:

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

    WebChatGuestMediaRequest data, response status code and response headers



900
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
951
952
953
954
955
956
957
958
959
960
961
962
963
964
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 900

def patch_webchat_guest_conversation_mediarequest_with_http_info(conversation_id, media_request_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.patch_webchat_guest_conversation_mediarequest ..."
  end
  
  
  # verify the required parameter 'conversation_id' is set
  fail ArgumentError, "Missing the required parameter 'conversation_id' when calling WebChatApi.patch_webchat_guest_conversation_mediarequest" if conversation_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'media_request_id' is set
  fail ArgumentError, "Missing the required parameter 'media_request_id' when calling WebChatApi.patch_webchat_guest_conversation_mediarequest" if media_request_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling WebChatApi.patch_webchat_guest_conversation_mediarequest" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'mediaRequestId' + '}', media_request_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['Guest Chat JWT']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'WebChatGuestMediaRequest')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#patch_webchat_guest_conversation_mediarequest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_webchat_deployments(body, opts = {}) ⇒ WebChatDeployment

Create WebChat deployment

Parameters:

  • body

    Deployment

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

    the optional parameters

Returns:



971
972
973
974
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 971

def post_webchat_deployments(body, opts = {})
  data, _status_code, _headers = post_webchat_deployments_with_http_info(body, opts)
  return data
end

#post_webchat_deployments_with_http_info(body, opts = {}) ⇒ Array<(WebChatDeployment, Fixnum, Hash)>

Create WebChat deployment

Parameters:

  • body

    Deployment

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

    the optional parameters

Returns:

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

    WebChatDeployment data, response status code and response headers



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
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 981

def post_webchat_deployments_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.post_webchat_deployments ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling WebChatApi.post_webchat_deployments" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/deployments".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud OAuth']
  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 => 'WebChatDeployment')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#post_webchat_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_webchat_guest_conversation_member_messages(conversation_id, member_id, body, opts = {}) ⇒ WebChatMessage

Send a message in a chat conversation.

Parameters:

  • conversation_id

    conversationId

  • member_id

    memberId

  • body

    Message

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

    the optional parameters

Returns:



1038
1039
1040
1041
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 1038

def post_webchat_guest_conversation_member_messages(conversation_id, member_id, body, opts = {})
  data, _status_code, _headers = post_webchat_guest_conversation_member_messages_with_http_info(conversation_id, member_id, body, opts)
  return data
end

#post_webchat_guest_conversation_member_messages_with_http_info(conversation_id, member_id, body, opts = {}) ⇒ Array<(WebChatMessage, Fixnum, Hash)>

Send a message in a chat conversation.

Parameters:

  • conversation_id

    conversationId

  • member_id

    memberId

  • body

    Message

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

    the optional parameters

Returns:

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

    WebChatMessage data, response status code and response headers



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
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 1050

def post_webchat_guest_conversation_member_messages_with_http_info(conversation_id, member_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.post_webchat_guest_conversation_member_messages ..."
  end
  
  
  # verify the required parameter 'conversation_id' is set
  fail ArgumentError, "Missing the required parameter 'conversation_id' when calling WebChatApi.post_webchat_guest_conversation_member_messages" if conversation_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'member_id' is set
  fail ArgumentError, "Missing the required parameter 'member_id' when calling WebChatApi.post_webchat_guest_conversation_member_messages" if member_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling WebChatApi.post_webchat_guest_conversation_member_messages" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/messages".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['Guest Chat 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 => 'WebChatMessage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#post_webchat_guest_conversation_member_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_webchat_guest_conversation_member_typing(conversation_id, member_id, opts = {}) ⇒ WebChatTyping

Send a typing-indicator in a chat conversation.

Parameters:

  • conversation_id

    conversationId

  • member_id

    memberId

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

    the optional parameters

Returns:



1122
1123
1124
1125
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 1122

def post_webchat_guest_conversation_member_typing(conversation_id, member_id, opts = {})
  data, _status_code, _headers = post_webchat_guest_conversation_member_typing_with_http_info(conversation_id, member_id, opts)
  return data
end

#post_webchat_guest_conversation_member_typing_with_http_info(conversation_id, member_id, opts = {}) ⇒ Array<(WebChatTyping, Fixnum, Hash)>

Send a typing-indicator in a chat conversation.

Parameters:

  • conversation_id

    conversationId

  • member_id

    memberId

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

    the optional parameters

Returns:

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

    WebChatTyping data, response status code and response headers



1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 1133

def post_webchat_guest_conversation_member_typing_with_http_info(conversation_id, member_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.post_webchat_guest_conversation_member_typing ..."
  end
  
  
  # verify the required parameter 'conversation_id' is set
  fail ArgumentError, "Missing the required parameter 'conversation_id' when calling WebChatApi.post_webchat_guest_conversation_member_typing" if conversation_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'member_id' is set
  fail ArgumentError, "Missing the required parameter 'member_id' when calling WebChatApi.post_webchat_guest_conversation_member_typing" if member_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/typing".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['Guest Chat 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 => 'WebChatTyping')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#post_webchat_guest_conversation_member_typing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_webchat_guest_conversations(body, opts = {}) ⇒ CreateWebChatConversationResponse

Create an ACD chat conversation from an external customer. This endpoint will create a new ACD Chat conversation under the specified Chat Deployment. The conversation will begin with a guest member in it (with a role=CUSTOMER) according to the customer information that is supplied. If the guest member is authenticated, the ‘memberAuthToken’ field should include his JWT as generated by the ‘POST /api/v2/signeddata’ resource; if the guest member is anonymous (and the Deployment permits it) this field can be omitted. The returned data includes the IDs of the conversation created, along with a newly-create JWT token that you can supply to all future endpoints as authentication to perform operations against that conversation. After successfully creating a conversation, you should connect a websocket to the event stream named in the ‘eventStreamUri’ field of the response; the conversation is not routed until the event stream is attached.

Parameters:

  • body

    CreateConversationRequest

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

    the optional parameters

Returns:



1196
1197
1198
1199
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 1196

def post_webchat_guest_conversations(body, opts = {})
  data, _status_code, _headers = post_webchat_guest_conversations_with_http_info(body, opts)
  return data
end

#post_webchat_guest_conversations_with_http_info(body, opts = {}) ⇒ Array<(CreateWebChatConversationResponse, Fixnum, Hash)>

Create an ACD chat conversation from an external customer. This endpoint will create a new ACD Chat conversation under the specified Chat Deployment. The conversation will begin with a guest member in it (with a role=CUSTOMER) according to the customer information that is supplied. If the guest member is authenticated, the &#39;memberAuthToken&#39; field should include his JWT as generated by the &#39;POST /api/v2/signeddata&#39; resource; if the guest member is anonymous (and the Deployment permits it) this field can be omitted. The returned data includes the IDs of the conversation created, along with a newly-create JWT token that you can supply to all future endpoints as authentication to perform operations against that conversation. After successfully creating a conversation, you should connect a websocket to the event stream named in the &#39;eventStreamUri&#39; field of the response; the conversation is not routed until the event stream is attached.

Parameters:

  • body

    CreateConversationRequest

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

    the optional parameters

Returns:



1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 1206

def post_webchat_guest_conversations_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.post_webchat_guest_conversations ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling WebChatApi.post_webchat_guest_conversations" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/guest/conversations".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = []
  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 => 'CreateWebChatConversationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#post_webchat_guest_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_webchat_deployment(deployment_id, body, opts = {}) ⇒ WebChatDeployment

Update a WebChat deployment

Parameters:

  • deployment_id

    Deployment Id

  • body

    Deployment

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

    the optional parameters

Returns:



1262
1263
1264
1265
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 1262

def put_webchat_deployment(deployment_id, body, opts = {})
  data, _status_code, _headers = put_webchat_deployment_with_http_info(deployment_id, body, opts)
  return data
end

#put_webchat_deployment_with_http_info(deployment_id, body, opts = {}) ⇒ Array<(WebChatDeployment, Fixnum, Hash)>

Update a WebChat deployment

Parameters:

  • deployment_id

    Deployment Id

  • body

    Deployment

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

    the optional parameters

Returns:

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

    WebChatDeployment data, response status code and response headers



1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 1273

def put_webchat_deployment_with_http_info(deployment_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.put_webchat_deployment ..."
  end
  
  
  # verify the required parameter 'deployment_id' is set
  fail ArgumentError, "Missing the required parameter 'deployment_id' when calling WebChatApi.put_webchat_deployment" if deployment_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling WebChatApi.put_webchat_deployment" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/deployments/{deploymentId}".sub('{format}','json').sub('{' + 'deploymentId' + '}', deployment_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud OAuth']
  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 => 'WebChatDeployment')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#put_webchat_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_webchat_settings(body, opts = {}) ⇒ WebChatSettings

Update WebChat deployment settings

Parameters:

  • body

    webChatSettings

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

    the optional parameters

Returns:



1336
1337
1338
1339
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 1336

def put_webchat_settings(body, opts = {})
  data, _status_code, _headers = put_webchat_settings_with_http_info(body, opts)
  return data
end

#put_webchat_settings_with_http_info(body, opts = {}) ⇒ Array<(WebChatSettings, Fixnum, Hash)>

Update WebChat deployment settings

Parameters:

  • body

    webChatSettings

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

    the optional parameters

Returns:

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

    WebChatSettings data, response status code and response headers



1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
# File 'lib/purecloudplatformclientv2/api/web_chat_api.rb', line 1346

def put_webchat_settings_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebChatApi.put_webchat_settings ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling WebChatApi.put_webchat_settings" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/webchat/settings".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud OAuth']
  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 => 'WebChatSettings')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebChatApi#put_webchat_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end