class PureCloud::WebChatApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/purecloudplatformclientv2/api/web_chat_api.rb, line 23
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

delete_webchat_deployment(deployment_id, opts = {}) click to toggle source

Delete a WebChat deployment

@param deployment_id Deployment Id @param [Hash] opts the optional parameters @return [nil]

# 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 = {}) click to toggle source

Delete a WebChat deployment

@param deployment_id Deployment Id @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# 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 = {}) click to toggle source

Remove a member from a chat conversation

@param conversation_id conversationId @param member_id memberId @param [Hash] opts the optional parameters @return [nil]

# 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 = {}) click to toggle source

Remove a member from a chat conversation

@param conversation_id conversationId @param member_id memberId @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# 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 = {}) click to toggle source

Remove WebChat deployment settings

@param [Hash] opts the optional parameters @return [nil]

# 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 = {}) click to toggle source

Remove WebChat deployment settings

@param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# 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 = {}) click to toggle source

Get a WebChat deployment

@param deployment_id Deployment Id @param [Hash] opts the optional parameters @return [WebChatDeployment]

# 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 = {}) click to toggle source

Get a WebChat deployment

@param deployment_id Deployment Id @param [Hash] opts the optional parameters @return [Array<(WebChatDeployment, Fixnum, Hash)>] WebChatDeployment data, response status code and response headers

# 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 = {}) click to toggle source

List WebChat deployments

@param [Hash] opts the optional parameters @return [WebChatDeploymentEntityListing]

# 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 = {}) click to toggle source

List WebChat deployments

@param [Hash] opts the optional parameters @return [Array<(WebChatDeploymentEntityListing, Fixnum, Hash)>] WebChatDeploymentEntityListing data, response status code and response headers

# 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 = {}) click to toggle source

Get a media request in the conversation

@param conversation_id conversationId @param media_request_id mediaRequestId @param [Hash] opts the optional parameters @return [WebChatGuestMediaRequest]

# 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 = {}) click to toggle source

Get a media request in the conversation

@param conversation_id conversationId @param media_request_id mediaRequestId @param [Hash] opts the optional parameters @return [Array<(WebChatGuestMediaRequest, Fixnum, Hash)>] WebChatGuestMediaRequest data, response status code and response headers

# 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 = {}) click to toggle source

Get all media requests to the guest in the conversation

@param conversation_id conversationId @param [Hash] opts the optional parameters @return [WebChatGuestMediaRequestEntityList]

# 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 = {}) click to toggle source

Get all media requests to the guest in the conversation

@param conversation_id conversationId @param [Hash] opts the optional parameters @return [Array<(WebChatGuestMediaRequestEntityList, Fixnum, Hash)>] WebChatGuestMediaRequestEntityList data, response status code and response headers

# 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 = {}) click to toggle source

Get a web chat conversation member

@param conversation_id conversationId @param member_id memberId @param [Hash] opts the optional parameters @return [WebChatMemberInfo]

# 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 = {}) click to toggle source

Get a web chat conversation member

@param conversation_id conversationId @param member_id memberId @param [Hash] opts the optional parameters @return [Array<(WebChatMemberInfo, Fixnum, Hash)>] WebChatMemberInfo data, response status code and response headers

# 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 = {}) click to toggle source

Get the members of a chat conversation.

@param conversation_id conversationId @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of entries to return per page, or omitted for the default. (default to 25) @option opts [Integer] :page_number The page number to return, or omitted for the first page. (default to 1) @option opts [BOOLEAN] :exclude_disconnected_members If true, the results will not contain members who have a DISCONNECTED state. (default to false) @return [WebChatMemberInfoEntityList]

# 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 = {}) click to toggle source

Get the members of a chat conversation.

@param conversation_id conversationId @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of entries to return per page, or omitted for the default. @option opts [Integer] :page_number The page number to return, or omitted for the first page. @option opts [BOOLEAN] :exclude_disconnected_members If true, the results will not contain members who have a DISCONNECTED state. @return [Array<(WebChatMemberInfoEntityList, Fixnum, Hash)>] WebChatMemberInfoEntityList data, response status code and response headers

# 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 = {}) click to toggle source

Get a web chat conversation message

@param conversation_id conversationId @param message_id messageId @param [Hash] opts the optional parameters @return [WebChatMessage]

# 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 = {}) click to toggle source

Get a web chat conversation message

@param conversation_id conversationId @param message_id messageId @param [Hash] opts the optional parameters @return [Array<(WebChatMessage, Fixnum, Hash)>] WebChatMessage data, response status code and response headers

# 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 = {}) click to toggle source

Get the messages of a chat conversation.

@param conversation_id conversationId @param [Hash] opts the optional parameters @option opts [String] :after If available, get the messages chronologically after the id of this message @option opts [String] :before If available, get the messages chronologically before the id of this message @option opts [String] :sort_order Sort order (default to ascending) @option opts [Integer] :max_results Limit the returned number of messages, up to a maximum of 100 (default to 100) @return [WebChatMessageEntityList]

# 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 = {}) click to toggle source

Get the messages of a chat conversation.

@param conversation_id conversationId @param [Hash] opts the optional parameters @option opts [String] :after If available, get the messages chronologically after the id of this message @option opts [String] :before If available, get the messages chronologically before the id of this message @option opts [String] :sort_order Sort order @option opts [Integer] :max_results Limit the returned number of messages, up to a maximum of 100 @return [Array<(WebChatMessageEntityList, Fixnum, Hash)>] WebChatMessageEntityList data, response status code and response headers

# 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 = {}) click to toggle source

Get WebChat deployment settings

@param [Hash] opts the optional parameters @return [WebChatSettings]

# 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 = {}) click to toggle source

Get WebChat deployment settings

@param [Hash] opts the optional parameters @return [Array<(WebChatSettings, Fixnum, Hash)>] WebChatSettings data, response status code and response headers

# 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 = {}) click to toggle source

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

@param conversation_id conversationId @param media_request_id mediaRequestId @param body Request @param [Hash] opts the optional parameters @return [WebChatGuestMediaRequest]

# 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 = {}) click to toggle source

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

@param conversation_id conversationId @param media_request_id mediaRequestId @param body Request @param [Hash] opts the optional parameters @return [Array<(WebChatGuestMediaRequest, Fixnum, Hash)>] WebChatGuestMediaRequest data, response status code and response headers

# 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 = {}) click to toggle source

Create WebChat deployment

@param body Deployment @param [Hash] opts the optional parameters @return [WebChatDeployment]

# 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 = {}) click to toggle source

Create WebChat deployment

@param body Deployment @param [Hash] opts the optional parameters @return [Array<(WebChatDeployment, Fixnum, Hash)>] WebChatDeployment data, response status code and response headers

# 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 = {}) click to toggle source

Send a message in a chat conversation.

@param conversation_id conversationId @param member_id memberId @param body Message @param [Hash] opts the optional parameters @return [WebChatMessage]

# 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 = {}) click to toggle source

Send a message in a chat conversation.

@param conversation_id conversationId @param member_id memberId @param body Message @param [Hash] opts the optional parameters @return [Array<(WebChatMessage, Fixnum, Hash)>] WebChatMessage data, response status code and response headers

# 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 = {}) click to toggle source

Send a typing-indicator in a chat conversation.

@param conversation_id conversationId @param member_id memberId @param [Hash] opts the optional parameters @return [WebChatTyping]

# 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 = {}) click to toggle source

Send a typing-indicator in a chat conversation.

@param conversation_id conversationId @param member_id memberId @param [Hash] opts the optional parameters @return [Array<(WebChatTyping, Fixnum, Hash)>] WebChatTyping data, response status code and response headers

# 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 = {}) click to toggle source

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. @param body CreateConversationRequest @param [Hash] opts the optional parameters @return [CreateWebChatConversationResponse]

# 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 = {}) click to toggle source

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. @param body CreateConversationRequest @param [Hash] opts the optional parameters @return [Array<(CreateWebChatConversationResponse, Fixnum, Hash)>] CreateWebChatConversationResponse data, response status code and response headers

# 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 = {}) click to toggle source

Update a WebChat deployment

@param deployment_id Deployment Id @param body Deployment @param [Hash] opts the optional parameters @return [WebChatDeployment]

# 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 = {}) click to toggle source

Update a WebChat deployment

@param deployment_id Deployment Id @param body Deployment @param [Hash] opts the optional parameters @return [Array<(WebChatDeployment, Fixnum, Hash)>] WebChatDeployment data, response status code and response headers

# 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 = {}) click to toggle source

Update WebChat deployment settings

@param body webChatSettings @param [Hash] opts the optional parameters @return [WebChatSettings]

# 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 = {}) click to toggle source

Update WebChat deployment settings

@param body webChatSettings @param [Hash] opts the optional parameters @return [Array<(WebChatSettings, Fixnum, Hash)>] WebChatSettings data, response status code and response headers

# 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