=begin
PureCloud Platform API

With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.

OpenAPI spec version: v2
Contact: DeveloperEvangelists@inin.com
Generated by: https://github.com/swagger-api/swagger-codegen.git

License: ININ
http://www.inin.com

Terms of Service: https://developer.mypurecloud.com/tos

=end

require "uri"

module PureCloud
  class ConversationsApi
    attr_accessor :api_client

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

    # Delete a code used to add a communication to this participant
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param add_communication_code addCommunicationCode
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def delete_conversation_participant_code(conversation_id, participant_id, add_communication_code, opts = {})
      delete_conversation_participant_code_with_http_info(conversation_id, participant_id, add_communication_code, opts)
      return nil
    end

    # Delete a code used to add a communication to this participant
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param add_communication_code addCommunicationCode
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def delete_conversation_participant_code_with_http_info(conversation_id, participant_id, add_communication_code, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.delete_conversation_participant_code ..."
      end
      # verify the required parameter 'conversation_id' is set
      fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.delete_conversation_participant_code" if conversation_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.delete_conversation_participant_code" if participant_id.nil?
      # verify the required parameter 'add_communication_code' is set
      fail ArgumentError, "Missing the required parameter 'add_communication_code' when calling ConversationsApi.delete_conversation_participant_code" if add_communication_code.nil?
      # resource path
      local_var_path = "/api/v2/conversations/{conversationId}/participants/{participantId}/codes/{addCommunicationCode}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s).sub('{' + 'addCommunicationCode' + '}', add_communication_code.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 Auth']
      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: ConversationsApi#delete_conversation_participant_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Cancel the transfer
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [String]
    def delete_conversations_call_participant_consult(call_id, participant_id, opts = {})
      data, _status_code, _headers = delete_conversations_call_participant_consult_with_http_info(call_id, participant_id, opts)
      return data
    end

    # Cancel the transfer
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
    def delete_conversations_call_participant_consult_with_http_info(call_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.delete_conversations_call_participant_consult ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.delete_conversations_call_participant_consult" if call_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.delete_conversations_call_participant_consult" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}/participants/{participantId}/consult".sub('{format}','json').sub('{' + 'callId' + '}', call_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'String')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#delete_conversations_call_participant_consult\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete attachment from draft
    # 
    # @param email_id emailId
    # @param attachment_id attachmentId
    # @param [Hash] opts the optional parameters
    # @return [String]
    def delete_conversations_email_messages_draft_attachment(email_id, attachment_id, opts = {})
      data, _status_code, _headers = delete_conversations_email_messages_draft_attachment_with_http_info(email_id, attachment_id, opts)
      return data
    end

    # Delete attachment from draft
    # 
    # @param email_id emailId
    # @param attachment_id attachmentId
    # @param [Hash] opts the optional parameters
    # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
    def delete_conversations_email_messages_draft_attachment_with_http_info(email_id, attachment_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.delete_conversations_email_messages_draft_attachment ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.delete_conversations_email_messages_draft_attachment" if email_id.nil?
      # verify the required parameter 'attachment_id' is set
      fail ArgumentError, "Missing the required parameter 'attachment_id' when calling ConversationsApi.delete_conversations_email_messages_draft_attachment" if attachment_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/messages/draft/attachments/{attachmentId}".sub('{format}','json').sub('{' + 'emailId' + '}', email_id.to_s).sub('{' + 'attachmentId' + '}', attachment_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 Auth']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'String')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#delete_conversations_email_messages_draft_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get a conversation by id
    # 
    # @param conversation_id conversationId
    # @param [Hash] opts the optional parameters
    # @return [AnalyticsConversation]
    def get_analytics_conversation_details(conversation_id, opts = {})
      data, _status_code, _headers = get_analytics_conversation_details_with_http_info(conversation_id, opts)
      return data
    end

    # Get a conversation by id
    # 
    # @param conversation_id conversationId
    # @param [Hash] opts the optional parameters
    # @return [Array<(AnalyticsConversation, Fixnum, Hash)>] AnalyticsConversation data, response status code and response headers
    def get_analytics_conversation_details_with_http_info(conversation_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_analytics_conversation_details ..."
      end
      # verify the required parameter 'conversation_id' is set
      fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.get_analytics_conversation_details" if conversation_id.nil?
      # resource path
      local_var_path = "/api/v2/analytics/conversations/{conversationId}/details".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 = ['PureCloud Auth']
      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 => 'AnalyticsConversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_analytics_conversation_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get conversation
    # 
    # @param conversation_id conversation ID
    # @param [Hash] opts the optional parameters
    # @return [Conversation]
    def get_conversation(conversation_id, opts = {})
      data, _status_code, _headers = get_conversation_with_http_info(conversation_id, opts)
      return data
    end

    # Get conversation
    # 
    # @param conversation_id conversation ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers
    def get_conversation_with_http_info(conversation_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversation ..."
      end
      # verify the required parameter 'conversation_id' is set
      fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.get_conversation" if conversation_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/{conversationId}".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 = ['PureCloud Auth']
      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 => 'Conversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional. (default to false)
    # @return [WrapupCode]
    def get_conversation_participant_wrapup(conversation_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversation_participant_wrapup_with_http_info(conversation_id, participant_id, opts)
      return data
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional.
    # @return [Array<(WrapupCode, Fixnum, Hash)>] WrapupCode data, response status code and response headers
    def get_conversation_participant_wrapup_with_http_info(conversation_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversation_participant_wrapup ..."
      end
      # verify the required parameter 'conversation_id' is set
      fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.get_conversation_participant_wrapup" if conversation_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversation_participant_wrapup" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/{conversationId}/participants/{participantId}/wrapup".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'provisional'] = opts[:'provisional'] if opts[:'provisional']

      # 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 Auth']
      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 => 'WrapupCode')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversation_participant_wrapup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param [Hash] opts the optional parameters
    # @return [Array<WrapupCode>]
    def get_conversation_participant_wrapupcodes(conversation_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversation_participant_wrapupcodes_with_http_info(conversation_id, participant_id, opts)
      return data
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<WrapupCode>, Fixnum, Hash)>] Array<WrapupCode> data, response status code and response headers
    def get_conversation_participant_wrapupcodes_with_http_info(conversation_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversation_participant_wrapupcodes ..."
      end
      # verify the required parameter 'conversation_id' is set
      fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.get_conversation_participant_wrapupcodes" if conversation_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversation_participant_wrapupcodes" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/{conversationId}/participants/{participantId}/wrapupcodes".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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 => 'Array<WrapupCode>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversation_participant_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get conversations
    # 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :communication_type Call or Chat communication filtering
    # @return [ConversationEntityListing]
    def get_conversations(opts = {})
      data, _status_code, _headers = get_conversations_with_http_info(opts)
      return data
    end

    # Get conversations
    # 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :communication_type Call or Chat communication filtering
    # @return [Array<(ConversationEntityListing, Fixnum, Hash)>] ConversationEntityListing data, response status code and response headers
    def get_conversations_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations ..."
      end
      # resource path
      local_var_path = "/api/v2/conversations".sub('{format}','json')

      # query parameters
      query_params = {}
      query_params[:'communicationType'] = opts[:'communication_type'] if opts[:'communication_type']

      # 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 Auth']
      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 => 'ConversationEntityListing')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get call conversation
    # 
    # @param call_id callId
    # @param [Hash] opts the optional parameters
    # @return [CallConversation]
    def get_conversations_call(call_id, opts = {})
      data, _status_code, _headers = get_conversations_call_with_http_info(call_id, opts)
      return data
    end

    # Get call conversation
    # 
    # @param call_id callId
    # @param [Hash] opts the optional parameters
    # @return [Array<(CallConversation, Fixnum, Hash)>] CallConversation data, response status code and response headers
    def get_conversations_call_with_http_info(call_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_call ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.get_conversations_call" if call_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}".sub('{format}','json').sub('{' + 'callId' + '}', call_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 Auth']
      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 => 'CallConversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_call\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional. (default to false)
    # @return [Wrapup]
    def get_conversations_call_participant_wrapup(call_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversations_call_participant_wrapup_with_http_info(call_id, participant_id, opts)
      return data
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional.
    # @return [Array<(Wrapup, Fixnum, Hash)>] Wrapup data, response status code and response headers
    def get_conversations_call_participant_wrapup_with_http_info(call_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_call_participant_wrapup ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.get_conversations_call_participant_wrapup" if call_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversations_call_participant_wrapup" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}/participants/{participantId}/wrapup".sub('{format}','json').sub('{' + 'callId' + '}', call_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'provisional'] = opts[:'provisional'] if opts[:'provisional']

      # 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 Auth']
      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 => 'Wrapup')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_call_participant_wrapup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<WrapupCode>]
    def get_conversations_call_participant_wrapupcodes(call_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversations_call_participant_wrapupcodes_with_http_info(call_id, participant_id, opts)
      return data
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<WrapupCode>, Fixnum, Hash)>] Array<WrapupCode> data, response status code and response headers
    def get_conversations_call_participant_wrapupcodes_with_http_info(call_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_call_participant_wrapupcodes ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.get_conversations_call_participant_wrapupcodes" if call_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversations_call_participant_wrapupcodes" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}/participants/{participantId}/wrapupcodes".sub('{format}','json').sub('{' + 'callId' + '}', call_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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 => 'Array<WrapupCode>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_call_participant_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get callback conversation
    # 
    # @param callback_id callbackId
    # @param [Hash] opts the optional parameters
    # @return [CallbackConversation]
    def get_conversations_callback(callback_id, opts = {})
      data, _status_code, _headers = get_conversations_callback_with_http_info(callback_id, opts)
      return data
    end

    # Get callback conversation
    # 
    # @param callback_id callbackId
    # @param [Hash] opts the optional parameters
    # @return [Array<(CallbackConversation, Fixnum, Hash)>] CallbackConversation data, response status code and response headers
    def get_conversations_callback_with_http_info(callback_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_callback ..."
      end
      # verify the required parameter 'callback_id' is set
      fail ArgumentError, "Missing the required parameter 'callback_id' when calling ConversationsApi.get_conversations_callback" if callback_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/callbacks/{callbackId}".sub('{format}','json').sub('{' + 'callbackId' + '}', callback_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 Auth']
      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 => 'CallbackConversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional. (default to false)
    # @return [Wrapup]
    def get_conversations_callback_participant_wrapup(callback_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversations_callback_participant_wrapup_with_http_info(callback_id, participant_id, opts)
      return data
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional.
    # @return [Array<(Wrapup, Fixnum, Hash)>] Wrapup data, response status code and response headers
    def get_conversations_callback_participant_wrapup_with_http_info(callback_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_callback_participant_wrapup ..."
      end
      # verify the required parameter 'callback_id' is set
      fail ArgumentError, "Missing the required parameter 'callback_id' when calling ConversationsApi.get_conversations_callback_participant_wrapup" if callback_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversations_callback_participant_wrapup" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/callbacks/{callbackId}/participants/{participantId}/wrapup".sub('{format}','json').sub('{' + 'callbackId' + '}', callback_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'provisional'] = opts[:'provisional'] if opts[:'provisional']

      # 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 Auth']
      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 => 'Wrapup')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_callback_participant_wrapup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<WrapupCode>]
    def get_conversations_callback_participant_wrapupcodes(callback_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversations_callback_participant_wrapupcodes_with_http_info(callback_id, participant_id, opts)
      return data
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<WrapupCode>, Fixnum, Hash)>] Array<WrapupCode> data, response status code and response headers
    def get_conversations_callback_participant_wrapupcodes_with_http_info(callback_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_callback_participant_wrapupcodes ..."
      end
      # verify the required parameter 'callback_id' is set
      fail ArgumentError, "Missing the required parameter 'callback_id' when calling ConversationsApi.get_conversations_callback_participant_wrapupcodes" if callback_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversations_callback_participant_wrapupcodes" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/callbacks/{callbackId}/participants/{participantId}/wrapupcodes".sub('{format}','json').sub('{' + 'callbackId' + '}', callback_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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 => 'Array<WrapupCode>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_callback_participant_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get callback conversations
    # 
    # @param [Hash] opts the optional parameters
    # @return [CallbackConversationEntityListing]
    def get_conversations_callbacks(opts = {})
      data, _status_code, _headers = get_conversations_callbacks_with_http_info(opts)
      return data
    end

    # Get callback conversations
    # 
    # @param [Hash] opts the optional parameters
    # @return [Array<(CallbackConversationEntityListing, Fixnum, Hash)>] CallbackConversationEntityListing data, response status code and response headers
    def get_conversations_callbacks_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_callbacks ..."
      end
      # resource path
      local_var_path = "/api/v2/conversations/callbacks".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 Auth']
      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 => 'CallbackConversationEntityListing')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_callbacks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get recent conversations
    # 
    # @param [Hash] opts the optional parameters
    # @return [CallConversationEntityListing]
    def get_conversations_calls(opts = {})
      data, _status_code, _headers = get_conversations_calls_with_http_info(opts)
      return data
    end

    # Get recent conversations
    # 
    # @param [Hash] opts the optional parameters
    # @return [Array<(CallConversationEntityListing, Fixnum, Hash)>] CallConversationEntityListing data, response status code and response headers
    def get_conversations_calls_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_calls ..."
      end
      # resource path
      local_var_path = "/api/v2/conversations/calls".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 Auth']
      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 => 'CallConversationEntityListing')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_calls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get call history
    # 
    # @param [Hash] opts the optional parameters
    # @option opts [Integer] :page_size Page size (default to 25)
    # @option opts [Integer] :page_number Page number (default to 1)
    # @option opts [String] :interval Interval string; format is ISO-8601. Separate start and end times with forward slash &#39;/&#39;
    # @return [CallConversationEntityListing]
    def get_conversations_calls_history(opts = {})
      data, _status_code, _headers = get_conversations_calls_history_with_http_info(opts)
      return data
    end

    # Get call history
    # 
    # @param [Hash] opts the optional parameters
    # @option opts [Integer] :page_size Page size
    # @option opts [Integer] :page_number Page number
    # @option opts [String] :interval Interval string; format is ISO-8601. Separate start and end times with forward slash &#39;/&#39;
    # @return [Array<(CallConversationEntityListing, Fixnum, Hash)>] CallConversationEntityListing data, response status code and response headers
    def get_conversations_calls_history_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_calls_history ..."
      end
      # resource path
      local_var_path = "/api/v2/conversations/calls/history".sub('{format}','json')

      # 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[:'interval'] = opts[:'interval'] if opts[:'interval']

      # 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 Auth']
      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 => 'CallConversationEntityListing')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_calls_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get the maximum number of participants that this user can have on a conference
    # 
    # @param [Hash] opts the optional parameters
    # @return [MaxParticipants]
    def get_conversations_calls_maximumconferenceparties(opts = {})
      data, _status_code, _headers = get_conversations_calls_maximumconferenceparties_with_http_info(opts)
      return data
    end

    # Get the maximum number of participants that this user can have on a conference
    # 
    # @param [Hash] opts the optional parameters
    # @return [Array<(MaxParticipants, Fixnum, Hash)>] MaxParticipants data, response status code and response headers
    def get_conversations_calls_maximumconferenceparties_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_calls_maximumconferenceparties ..."
      end
      # resource path
      local_var_path = "/api/v2/conversations/calls/maximumconferenceparties".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 Auth']
      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 => 'MaxParticipants')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_calls_maximumconferenceparties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get chat conversation
    # 
    # @param chat_id chatId
    # @param [Hash] opts the optional parameters
    # @return [ChatConversation]
    def get_conversations_chat(chat_id, opts = {})
      data, _status_code, _headers = get_conversations_chat_with_http_info(chat_id, opts)
      return data
    end

    # Get chat conversation
    # 
    # @param chat_id chatId
    # @param [Hash] opts the optional parameters
    # @return [Array<(ChatConversation, Fixnum, Hash)>] ChatConversation data, response status code and response headers
    def get_conversations_chat_with_http_info(chat_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_chat ..."
      end
      # verify the required parameter 'chat_id' is set
      fail ArgumentError, "Missing the required parameter 'chat_id' when calling ConversationsApi.get_conversations_chat" if chat_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/chats/{chatId}".sub('{format}','json').sub('{' + 'chatId' + '}', chat_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 Auth']
      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 => 'ChatConversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_chat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional. (default to false)
    # @return [Wrapup]
    def get_conversations_chat_participant_wrapup(chat_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversations_chat_participant_wrapup_with_http_info(chat_id, participant_id, opts)
      return data
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional.
    # @return [Array<(Wrapup, Fixnum, Hash)>] Wrapup data, response status code and response headers
    def get_conversations_chat_participant_wrapup_with_http_info(chat_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_chat_participant_wrapup ..."
      end
      # verify the required parameter 'chat_id' is set
      fail ArgumentError, "Missing the required parameter 'chat_id' when calling ConversationsApi.get_conversations_chat_participant_wrapup" if chat_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversations_chat_participant_wrapup" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/chats/{chatId}/participants/{participantId}/wrapup".sub('{format}','json').sub('{' + 'chatId' + '}', chat_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'provisional'] = opts[:'provisional'] if opts[:'provisional']

      # 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 Auth']
      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 => 'Wrapup')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_chat_participant_wrapup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<WrapupCode>]
    def get_conversations_chat_participant_wrapupcodes(chat_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversations_chat_participant_wrapupcodes_with_http_info(chat_id, participant_id, opts)
      return data
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<WrapupCode>, Fixnum, Hash)>] Array<WrapupCode> data, response status code and response headers
    def get_conversations_chat_participant_wrapupcodes_with_http_info(chat_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_chat_participant_wrapupcodes ..."
      end
      # verify the required parameter 'chat_id' is set
      fail ArgumentError, "Missing the required parameter 'chat_id' when calling ConversationsApi.get_conversations_chat_participant_wrapupcodes" if chat_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversations_chat_participant_wrapupcodes" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/chats/{chatId}/participants/{participantId}/wrapupcodes".sub('{format}','json').sub('{' + 'chatId' + '}', chat_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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 => 'Array<WrapupCode>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_chat_participant_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get recent chat conversations
    # 
    # @param [Hash] opts the optional parameters
    # @return [ChatConversationEntityListing]
    def get_conversations_chats(opts = {})
      data, _status_code, _headers = get_conversations_chats_with_http_info(opts)
      return data
    end

    # Get recent chat conversations
    # 
    # @param [Hash] opts the optional parameters
    # @return [Array<(ChatConversationEntityListing, Fixnum, Hash)>] ChatConversationEntityListing data, response status code and response headers
    def get_conversations_chats_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_chats ..."
      end
      # resource path
      local_var_path = "/api/v2/conversations/chats".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 Auth']
      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 => 'ChatConversationEntityListing')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_chats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get cobrowse conversation
    # 
    # @param cobrowse_id cobrowseId
    # @param [Hash] opts the optional parameters
    # @return [CobrowseConversation]
    def get_conversations_cobrowsesession(cobrowse_id, opts = {})
      data, _status_code, _headers = get_conversations_cobrowsesession_with_http_info(cobrowse_id, opts)
      return data
    end

    # Get cobrowse conversation
    # 
    # @param cobrowse_id cobrowseId
    # @param [Hash] opts the optional parameters
    # @return [Array<(CobrowseConversation, Fixnum, Hash)>] CobrowseConversation data, response status code and response headers
    def get_conversations_cobrowsesession_with_http_info(cobrowse_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_cobrowsesession ..."
      end
      # verify the required parameter 'cobrowse_id' is set
      fail ArgumentError, "Missing the required parameter 'cobrowse_id' when calling ConversationsApi.get_conversations_cobrowsesession" if cobrowse_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/cobrowsesessions/{cobrowseId}".sub('{format}','json').sub('{' + 'cobrowseId' + '}', cobrowse_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 Auth']
      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 => 'CobrowseConversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_cobrowsesession\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional. (default to false)
    # @return [Wrapup]
    def get_conversations_cobrowsesession_participant_wrapup(cobrowse_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversations_cobrowsesession_participant_wrapup_with_http_info(cobrowse_id, participant_id, opts)
      return data
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional.
    # @return [Array<(Wrapup, Fixnum, Hash)>] Wrapup data, response status code and response headers
    def get_conversations_cobrowsesession_participant_wrapup_with_http_info(cobrowse_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_cobrowsesession_participant_wrapup ..."
      end
      # verify the required parameter 'cobrowse_id' is set
      fail ArgumentError, "Missing the required parameter 'cobrowse_id' when calling ConversationsApi.get_conversations_cobrowsesession_participant_wrapup" if cobrowse_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversations_cobrowsesession_participant_wrapup" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/cobrowsesessions/{cobrowseId}/participants/{participantId}/wrapup".sub('{format}','json').sub('{' + 'cobrowseId' + '}', cobrowse_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'provisional'] = opts[:'provisional'] if opts[:'provisional']

      # 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 Auth']
      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 => 'Wrapup')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_cobrowsesession_participant_wrapup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<WrapupCode>]
    def get_conversations_cobrowsesession_participant_wrapupcodes(cobrowse_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversations_cobrowsesession_participant_wrapupcodes_with_http_info(cobrowse_id, participant_id, opts)
      return data
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<WrapupCode>, Fixnum, Hash)>] Array<WrapupCode> data, response status code and response headers
    def get_conversations_cobrowsesession_participant_wrapupcodes_with_http_info(cobrowse_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_cobrowsesession_participant_wrapupcodes ..."
      end
      # verify the required parameter 'cobrowse_id' is set
      fail ArgumentError, "Missing the required parameter 'cobrowse_id' when calling ConversationsApi.get_conversations_cobrowsesession_participant_wrapupcodes" if cobrowse_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversations_cobrowsesession_participant_wrapupcodes" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/cobrowsesessions/{cobrowseId}/participants/{participantId}/wrapupcodes".sub('{format}','json').sub('{' + 'cobrowseId' + '}', cobrowse_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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 => 'Array<WrapupCode>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_cobrowsesession_participant_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get recent cobrowse conversations
    # 
    # @param [Hash] opts the optional parameters
    # @return [CobrowseConversationEntityListing]
    def get_conversations_cobrowsesessions(opts = {})
      data, _status_code, _headers = get_conversations_cobrowsesessions_with_http_info(opts)
      return data
    end

    # Get recent cobrowse conversations
    # 
    # @param [Hash] opts the optional parameters
    # @return [Array<(CobrowseConversationEntityListing, Fixnum, Hash)>] CobrowseConversationEntityListing data, response status code and response headers
    def get_conversations_cobrowsesessions_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_cobrowsesessions ..."
      end
      # resource path
      local_var_path = "/api/v2/conversations/cobrowsesessions".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 Auth']
      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 => 'CobrowseConversationEntityListing')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_cobrowsesessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get email conversation
    # 
    # @param email_id emailId
    # @param [Hash] opts the optional parameters
    # @return [EmailConversation]
    def get_conversations_email(email_id, opts = {})
      data, _status_code, _headers = get_conversations_email_with_http_info(email_id, opts)
      return data
    end

    # Get email conversation
    # 
    # @param email_id emailId
    # @param [Hash] opts the optional parameters
    # @return [Array<(EmailConversation, Fixnum, Hash)>] EmailConversation data, response status code and response headers
    def get_conversations_email_with_http_info(email_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_email ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.get_conversations_email" if email_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}".sub('{format}','json').sub('{' + 'emailId' + '}', email_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 Auth']
      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 => 'EmailConversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get conversation message
    # 
    # @param email_id emailId
    # @param message_id messageId
    # @param [Hash] opts the optional parameters
    # @return [EmailMessage]
    def get_conversations_email_message(email_id, message_id, opts = {})
      data, _status_code, _headers = get_conversations_email_message_with_http_info(email_id, message_id, opts)
      return data
    end

    # Get conversation message
    # 
    # @param email_id emailId
    # @param message_id messageId
    # @param [Hash] opts the optional parameters
    # @return [Array<(EmailMessage, Fixnum, Hash)>] EmailMessage data, response status code and response headers
    def get_conversations_email_message_with_http_info(email_id, message_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_email_message ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.get_conversations_email_message" if email_id.nil?
      # verify the required parameter 'message_id' is set
      fail ArgumentError, "Missing the required parameter 'message_id' when calling ConversationsApi.get_conversations_email_message" if message_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/messages/{messageId}".sub('{format}','json').sub('{' + 'emailId' + '}', email_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 = ['PureCloud Auth']
      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 => 'EmailMessage')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_email_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get conversation messages
    # 
    # @param email_id emailId
    # @param [Hash] opts the optional parameters
    # @return [EmailMessageListing]
    def get_conversations_email_messages(email_id, opts = {})
      data, _status_code, _headers = get_conversations_email_messages_with_http_info(email_id, opts)
      return data
    end

    # Get conversation messages
    # 
    # @param email_id emailId
    # @param [Hash] opts the optional parameters
    # @return [Array<(EmailMessageListing, Fixnum, Hash)>] EmailMessageListing data, response status code and response headers
    def get_conversations_email_messages_with_http_info(email_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_email_messages ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.get_conversations_email_messages" if email_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/messages".sub('{format}','json').sub('{' + 'emailId' + '}', email_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 Auth']
      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 => 'EmailMessageListing')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_email_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get conversation draft reply
    # 
    # @param email_id emailId
    # @param [Hash] opts the optional parameters
    # @return [EmailMessage]
    def get_conversations_email_messages_draft(email_id, opts = {})
      data, _status_code, _headers = get_conversations_email_messages_draft_with_http_info(email_id, opts)
      return data
    end

    # Get conversation draft reply
    # 
    # @param email_id emailId
    # @param [Hash] opts the optional parameters
    # @return [Array<(EmailMessage, Fixnum, Hash)>] EmailMessage data, response status code and response headers
    def get_conversations_email_messages_draft_with_http_info(email_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_email_messages_draft ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.get_conversations_email_messages_draft" if email_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/messages/draft".sub('{format}','json').sub('{' + 'emailId' + '}', email_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 Auth']
      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 => 'EmailMessage')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_email_messages_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional. (default to false)
    # @return [Wrapup]
    def get_conversations_email_participant_wrapup(email_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversations_email_participant_wrapup_with_http_info(email_id, participant_id, opts)
      return data
    end

    # Get the wrap-up for this conversation participant. 
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional.
    # @return [Array<(Wrapup, Fixnum, Hash)>] Wrapup data, response status code and response headers
    def get_conversations_email_participant_wrapup_with_http_info(email_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_email_participant_wrapup ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.get_conversations_email_participant_wrapup" if email_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversations_email_participant_wrapup" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/participants/{participantId}/wrapup".sub('{format}','json').sub('{' + 'emailId' + '}', email_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'provisional'] = opts[:'provisional'] if opts[:'provisional']

      # 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 Auth']
      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 => 'Wrapup')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_email_participant_wrapup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<WrapupCode>]
    def get_conversations_email_participant_wrapupcodes(email_id, participant_id, opts = {})
      data, _status_code, _headers = get_conversations_email_participant_wrapupcodes_with_http_info(email_id, participant_id, opts)
      return data
    end

    # Get list of wrapup codes for this conversation participant
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<WrapupCode>, Fixnum, Hash)>] Array<WrapupCode> data, response status code and response headers
    def get_conversations_email_participant_wrapupcodes_with_http_info(email_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_email_participant_wrapupcodes ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.get_conversations_email_participant_wrapupcodes" if email_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.get_conversations_email_participant_wrapupcodes" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/participants/{participantId}/wrapupcodes".sub('{format}','json').sub('{' + 'emailId' + '}', email_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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 => 'Array<WrapupCode>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_email_participant_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get recent email conversations
    # 
    # @param [Hash] opts the optional parameters
    # @return [EmailConversationEntityListing]
    def get_conversations_emails(opts = {})
      data, _status_code, _headers = get_conversations_emails_with_http_info(opts)
      return data
    end

    # Get recent email conversations
    # 
    # @param [Hash] opts the optional parameters
    # @return [Array<(EmailConversationEntityListing, Fixnum, Hash)>] EmailConversationEntityListing data, response status code and response headers
    def get_conversations_emails_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.get_conversations_emails ..."
      end
      # resource path
      local_var_path = "/api/v2/conversations/emails".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 Auth']
      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 => 'EmailConversationEntityListing')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update a participant.
    # Update conversation participant.
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param body Update request
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def patch_conversation_participant(conversation_id, participant_id, body, opts = {})
      patch_conversation_participant_with_http_info(conversation_id, participant_id, body, opts)
      return nil
    end

    # Update a participant.
    # Update conversation participant.
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param body Update request
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversation_participant_with_http_info(conversation_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversation_participant ..."
      end
      # verify the required parameter 'conversation_id' is set
      fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.patch_conversation_participant" if conversation_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversation_participant" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversation_participant" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/{conversationId}/participants/{participantId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversation_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update the attributes on a conversation participant.
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param body Participant attributes
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def patch_conversation_participant_attributes(conversation_id, participant_id, body, opts = {})
      patch_conversation_participant_attributes_with_http_info(conversation_id, participant_id, body, opts)
      return nil
    end

    # Update the attributes on a conversation participant.
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param body Participant attributes
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversation_participant_attributes_with_http_info(conversation_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversation_participant_attributes ..."
      end
      # verify the required parameter 'conversation_id' is set
      fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.patch_conversation_participant_attributes" if conversation_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversation_participant_attributes" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversation_participant_attributes" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/{conversationId}/participants/{participantId}/attributes".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversation_participant_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update a conversation by setting it's recording state, merging in other conversations to create a conference, or disconnecting all of the participants
    # 
    # @param call_id callId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Conversation]
    def patch_conversations_call(call_id, body, opts = {})
      data, _status_code, _headers = patch_conversations_call_with_http_info(call_id, body, opts)
      return data
    end

    # Update a conversation by setting it&#39;s recording state, merging in other conversations to create a conference, or disconnecting all of the participants
    # 
    # @param call_id callId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers
    def patch_conversations_call_with_http_info(call_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_call ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.patch_conversations_call" if call_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_call" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}".sub('{format}','json').sub('{' + 'callId' + '}', call_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 Auth']
      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 => 'Conversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_call\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update conversation participant
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param body Participant request
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def patch_conversations_call_participant(call_id, participant_id, body, opts = {})
      patch_conversations_call_participant_with_http_info(call_id, participant_id, body, opts)
      return nil
    end

    # Update conversation participant
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param body Participant request
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversations_call_participant_with_http_info(call_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_call_participant ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.patch_conversations_call_participant" if call_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_call_participant" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_call_participant" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}/participants/{participantId}".sub('{format}','json').sub('{' + 'callId' + '}', call_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_call_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update the attributes on a conversation participant.
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param body Participant attributes
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def patch_conversations_call_participant_attributes(call_id, participant_id, body, opts = {})
      patch_conversations_call_participant_attributes_with_http_info(call_id, participant_id, body, opts)
      return nil
    end

    # Update the attributes on a conversation participant.
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param body Participant attributes
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversations_call_participant_attributes_with_http_info(call_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_call_participant_attributes ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.patch_conversations_call_participant_attributes" if call_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_call_participant_attributes" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_call_participant_attributes" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}/participants/{participantId}/attributes".sub('{format}','json').sub('{' + 'callId' + '}', call_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_call_participant_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update conversation participant's communication by disconnecting it.
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param communication_id communicationId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [Empty]
    def patch_conversations_call_participant_communication(call_id, participant_id, communication_id, body, opts = {})
      data, _status_code, _headers = patch_conversations_call_participant_communication_with_http_info(call_id, participant_id, communication_id, body, opts)
      return data
    end

    # Update conversation participant&#39;s communication by disconnecting it.
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param communication_id communicationId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers
    def patch_conversations_call_participant_communication_with_http_info(call_id, participant_id, communication_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_call_participant_communication ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.patch_conversations_call_participant_communication" if call_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_call_participant_communication" if participant_id.nil?
      # verify the required parameter 'communication_id' is set
      fail ArgumentError, "Missing the required parameter 'communication_id' when calling ConversationsApi.patch_conversations_call_participant_communication" if communication_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_call_participant_communication" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}/participants/{participantId}/communications/{communicationId}".sub('{format}','json').sub('{' + 'callId' + '}', call_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s).sub('{' + 'communicationId' + '}', communication_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 Auth']
      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 => 'Empty')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_call_participant_communication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Change who can speak
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param body new speak to
    # @param [Hash] opts the optional parameters
    # @return [ConsultTransferResponse]
    def patch_conversations_call_participant_consult(call_id, participant_id, body, opts = {})
      data, _status_code, _headers = patch_conversations_call_participant_consult_with_http_info(call_id, participant_id, body, opts)
      return data
    end

    # Change who can speak
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param body new speak to
    # @param [Hash] opts the optional parameters
    # @return [Array<(ConsultTransferResponse, Fixnum, Hash)>] ConsultTransferResponse data, response status code and response headers
    def patch_conversations_call_participant_consult_with_http_info(call_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_call_participant_consult ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.patch_conversations_call_participant_consult" if call_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_call_participant_consult" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_call_participant_consult" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}/participants/{participantId}/consult".sub('{format}','json').sub('{' + 'callId' + '}', call_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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 => 'ConsultTransferResponse')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_call_participant_consult\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update a conversation by disconnecting all of the participants
    # 
    # @param callback_id callbackId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Conversation]
    def patch_conversations_callback(callback_id, body, opts = {})
      data, _status_code, _headers = patch_conversations_callback_with_http_info(callback_id, body, opts)
      return data
    end

    # Update a conversation by disconnecting all of the participants
    # 
    # @param callback_id callbackId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers
    def patch_conversations_callback_with_http_info(callback_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_callback ..."
      end
      # verify the required parameter 'callback_id' is set
      fail ArgumentError, "Missing the required parameter 'callback_id' when calling ConversationsApi.patch_conversations_callback" if callback_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_callback" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/callbacks/{callbackId}".sub('{format}','json').sub('{' + 'callbackId' + '}', callback_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 Auth']
      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 => 'Conversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update conversation participant
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def patch_conversations_callback_participant(callback_id, participant_id, body, opts = {})
      patch_conversations_callback_participant_with_http_info(callback_id, participant_id, body, opts)
      return nil
    end

    # Update conversation participant
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversations_callback_participant_with_http_info(callback_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_callback_participant ..."
      end
      # verify the required parameter 'callback_id' is set
      fail ArgumentError, "Missing the required parameter 'callback_id' when calling ConversationsApi.patch_conversations_callback_participant" if callback_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_callback_participant" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_callback_participant" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/callbacks/{callbackId}/participants/{participantId}".sub('{format}','json').sub('{' + 'callbackId' + '}', callback_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_callback_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update the attributes on a conversation participant.
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param body Attributes
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def patch_conversations_callback_participant_attributes(callback_id, participant_id, body, opts = {})
      patch_conversations_callback_participant_attributes_with_http_info(callback_id, participant_id, body, opts)
      return nil
    end

    # Update the attributes on a conversation participant.
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param body Attributes
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversations_callback_participant_attributes_with_http_info(callback_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_callback_participant_attributes ..."
      end
      # verify the required parameter 'callback_id' is set
      fail ArgumentError, "Missing the required parameter 'callback_id' when calling ConversationsApi.patch_conversations_callback_participant_attributes" if callback_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_callback_participant_attributes" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_callback_participant_attributes" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/callbacks/{callbackId}/participants/{participantId}/attributes".sub('{format}','json').sub('{' + 'callbackId' + '}', callback_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_callback_participant_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update conversation participant's communication by disconnecting it.
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param communication_id communicationId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [Empty]
    def patch_conversations_callback_participant_communication(callback_id, participant_id, communication_id, body, opts = {})
      data, _status_code, _headers = patch_conversations_callback_participant_communication_with_http_info(callback_id, participant_id, communication_id, body, opts)
      return data
    end

    # Update conversation participant&#39;s communication by disconnecting it.
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param communication_id communicationId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers
    def patch_conversations_callback_participant_communication_with_http_info(callback_id, participant_id, communication_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_callback_participant_communication ..."
      end
      # verify the required parameter 'callback_id' is set
      fail ArgumentError, "Missing the required parameter 'callback_id' when calling ConversationsApi.patch_conversations_callback_participant_communication" if callback_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_callback_participant_communication" if participant_id.nil?
      # verify the required parameter 'communication_id' is set
      fail ArgumentError, "Missing the required parameter 'communication_id' when calling ConversationsApi.patch_conversations_callback_participant_communication" if communication_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_callback_participant_communication" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/callbacks/{callbackId}/participants/{participantId}/communications/{communicationId}".sub('{format}','json').sub('{' + 'callbackId' + '}', callback_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s).sub('{' + 'communicationId' + '}', communication_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 Auth']
      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 => 'Empty')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_callback_participant_communication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update a conversation by disconnecting all of the participants
    # 
    # @param chat_id chatId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Conversation]
    def patch_conversations_chat(chat_id, body, opts = {})
      data, _status_code, _headers = patch_conversations_chat_with_http_info(chat_id, body, opts)
      return data
    end

    # Update a conversation by disconnecting all of the participants
    # 
    # @param chat_id chatId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers
    def patch_conversations_chat_with_http_info(chat_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_chat ..."
      end
      # verify the required parameter 'chat_id' is set
      fail ArgumentError, "Missing the required parameter 'chat_id' when calling ConversationsApi.patch_conversations_chat" if chat_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_chat" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/chats/{chatId}".sub('{format}','json').sub('{' + 'chatId' + '}', chat_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 Auth']
      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 => 'Conversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_chat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update conversation participant
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param body Update request
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def patch_conversations_chat_participant(chat_id, participant_id, body, opts = {})
      patch_conversations_chat_participant_with_http_info(chat_id, participant_id, body, opts)
      return nil
    end

    # Update conversation participant
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param body Update request
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversations_chat_participant_with_http_info(chat_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_chat_participant ..."
      end
      # verify the required parameter 'chat_id' is set
      fail ArgumentError, "Missing the required parameter 'chat_id' when calling ConversationsApi.patch_conversations_chat_participant" if chat_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_chat_participant" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_chat_participant" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/chats/{chatId}/participants/{participantId}".sub('{format}','json').sub('{' + 'chatId' + '}', chat_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_chat_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update the attributes on a conversation participant.
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param body Participant attributes
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def patch_conversations_chat_participant_attributes(chat_id, participant_id, body, opts = {})
      patch_conversations_chat_participant_attributes_with_http_info(chat_id, participant_id, body, opts)
      return nil
    end

    # Update the attributes on a conversation participant.
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param body Participant attributes
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversations_chat_participant_attributes_with_http_info(chat_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_chat_participant_attributes ..."
      end
      # verify the required parameter 'chat_id' is set
      fail ArgumentError, "Missing the required parameter 'chat_id' when calling ConversationsApi.patch_conversations_chat_participant_attributes" if chat_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_chat_participant_attributes" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_chat_participant_attributes" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/chats/{chatId}/participants/{participantId}/attributes".sub('{format}','json').sub('{' + 'chatId' + '}', chat_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_chat_participant_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update conversation participant's communication by disconnecting it.
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param communication_id communicationId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [Empty]
    def patch_conversations_chat_participant_communication(chat_id, participant_id, communication_id, body, opts = {})
      data, _status_code, _headers = patch_conversations_chat_participant_communication_with_http_info(chat_id, participant_id, communication_id, body, opts)
      return data
    end

    # Update conversation participant&#39;s communication by disconnecting it.
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param communication_id communicationId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers
    def patch_conversations_chat_participant_communication_with_http_info(chat_id, participant_id, communication_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_chat_participant_communication ..."
      end
      # verify the required parameter 'chat_id' is set
      fail ArgumentError, "Missing the required parameter 'chat_id' when calling ConversationsApi.patch_conversations_chat_participant_communication" if chat_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_chat_participant_communication" if participant_id.nil?
      # verify the required parameter 'communication_id' is set
      fail ArgumentError, "Missing the required parameter 'communication_id' when calling ConversationsApi.patch_conversations_chat_participant_communication" if communication_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_chat_participant_communication" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/chats/{chatId}/participants/{participantId}/communications/{communicationId}".sub('{format}','json').sub('{' + 'chatId' + '}', chat_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s).sub('{' + 'communicationId' + '}', communication_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 Auth']
      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 => 'Empty')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_chat_participant_communication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update a conversation by disconnecting all of the participants
    # 
    # @param cobrowse_id cobrowseId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Conversation]
    def patch_conversations_cobrowsesession(cobrowse_id, body, opts = {})
      data, _status_code, _headers = patch_conversations_cobrowsesession_with_http_info(cobrowse_id, body, opts)
      return data
    end

    # Update a conversation by disconnecting all of the participants
    # 
    # @param cobrowse_id cobrowseId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers
    def patch_conversations_cobrowsesession_with_http_info(cobrowse_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_cobrowsesession ..."
      end
      # verify the required parameter 'cobrowse_id' is set
      fail ArgumentError, "Missing the required parameter 'cobrowse_id' when calling ConversationsApi.patch_conversations_cobrowsesession" if cobrowse_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_cobrowsesession" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/cobrowsesessions/{cobrowseId}".sub('{format}','json').sub('{' + 'cobrowseId' + '}', cobrowse_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 Auth']
      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 => 'Conversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_cobrowsesession\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update conversation participant
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [MediaParticipantRequest] :body 
    # @return [nil]
    def patch_conversations_cobrowsesession_participant(cobrowse_id, participant_id, opts = {})
      patch_conversations_cobrowsesession_participant_with_http_info(cobrowse_id, participant_id, opts)
      return nil
    end

    # Update conversation participant
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [MediaParticipantRequest] :body 
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversations_cobrowsesession_participant_with_http_info(cobrowse_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_cobrowsesession_participant ..."
      end
      # verify the required parameter 'cobrowse_id' is set
      fail ArgumentError, "Missing the required parameter 'cobrowse_id' when calling ConversationsApi.patch_conversations_cobrowsesession_participant" if cobrowse_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_cobrowsesession_participant" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/cobrowsesessions/{cobrowseId}/participants/{participantId}".sub('{format}','json').sub('{' + 'cobrowseId' + '}', cobrowse_id.to_s).sub('{' + 'participantId' + '}', participant_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(opts[:'body'])
      auth_names = ['PureCloud Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_cobrowsesession_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update the attributes on a conversation participant.
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [ParticipantAttributes] :body 
    # @return [nil]
    def patch_conversations_cobrowsesession_participant_attributes(cobrowse_id, participant_id, opts = {})
      patch_conversations_cobrowsesession_participant_attributes_with_http_info(cobrowse_id, participant_id, opts)
      return nil
    end

    # Update the attributes on a conversation participant.
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [ParticipantAttributes] :body 
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversations_cobrowsesession_participant_attributes_with_http_info(cobrowse_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_cobrowsesession_participant_attributes ..."
      end
      # verify the required parameter 'cobrowse_id' is set
      fail ArgumentError, "Missing the required parameter 'cobrowse_id' when calling ConversationsApi.patch_conversations_cobrowsesession_participant_attributes" if cobrowse_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_cobrowsesession_participant_attributes" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/cobrowsesessions/{cobrowseId}/participants/{participantId}/attributes".sub('{format}','json').sub('{' + 'cobrowseId' + '}', cobrowse_id.to_s).sub('{' + 'participantId' + '}', participant_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(opts[:'body'])
      auth_names = ['PureCloud Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_cobrowsesession_participant_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update conversation participant's communication by disconnecting it.
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param communication_id communicationId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [Empty]
    def patch_conversations_cobrowsesession_participant_communication(cobrowse_id, participant_id, communication_id, body, opts = {})
      data, _status_code, _headers = patch_conversations_cobrowsesession_participant_communication_with_http_info(cobrowse_id, participant_id, communication_id, body, opts)
      return data
    end

    # Update conversation participant&#39;s communication by disconnecting it.
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param communication_id communicationId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers
    def patch_conversations_cobrowsesession_participant_communication_with_http_info(cobrowse_id, participant_id, communication_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_cobrowsesession_participant_communication ..."
      end
      # verify the required parameter 'cobrowse_id' is set
      fail ArgumentError, "Missing the required parameter 'cobrowse_id' when calling ConversationsApi.patch_conversations_cobrowsesession_participant_communication" if cobrowse_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_cobrowsesession_participant_communication" if participant_id.nil?
      # verify the required parameter 'communication_id' is set
      fail ArgumentError, "Missing the required parameter 'communication_id' when calling ConversationsApi.patch_conversations_cobrowsesession_participant_communication" if communication_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_cobrowsesession_participant_communication" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/cobrowsesessions/{cobrowseId}/participants/{participantId}/communications/{communicationId}".sub('{format}','json').sub('{' + 'cobrowseId' + '}', cobrowse_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s).sub('{' + 'communicationId' + '}', communication_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 Auth']
      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 => 'Empty')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_cobrowsesession_participant_communication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update a conversation by disconnecting all of the participants
    # 
    # @param email_id emailId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Conversation]
    def patch_conversations_email(email_id, body, opts = {})
      data, _status_code, _headers = patch_conversations_email_with_http_info(email_id, body, opts)
      return data
    end

    # Update a conversation by disconnecting all of the participants
    # 
    # @param email_id emailId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers
    def patch_conversations_email_with_http_info(email_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_email ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.patch_conversations_email" if email_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_email" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}".sub('{format}','json').sub('{' + 'emailId' + '}', email_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 Auth']
      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 => 'Conversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update conversation participant
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param body Update request
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def patch_conversations_email_participant(email_id, participant_id, body, opts = {})
      patch_conversations_email_participant_with_http_info(email_id, participant_id, body, opts)
      return nil
    end

    # Update conversation participant
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param body Update request
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversations_email_participant_with_http_info(email_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_email_participant ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.patch_conversations_email_participant" if email_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_email_participant" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_email_participant" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/participants/{participantId}".sub('{format}','json').sub('{' + 'emailId' + '}', email_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_email_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update the attributes on a conversation participant.
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param body Participant attributes
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def patch_conversations_email_participant_attributes(email_id, participant_id, body, opts = {})
      patch_conversations_email_participant_attributes_with_http_info(email_id, participant_id, body, opts)
      return nil
    end

    # Update the attributes on a conversation participant.
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param body Participant attributes
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def patch_conversations_email_participant_attributes_with_http_info(email_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_email_participant_attributes ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.patch_conversations_email_participant_attributes" if email_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_email_participant_attributes" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_email_participant_attributes" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/participants/{participantId}/attributes".sub('{format}','json').sub('{' + 'emailId' + '}', email_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_email_participant_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update conversation participant's communication by disconnecting it.
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param communication_id communicationId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [Empty]
    def patch_conversations_email_participant_communication(email_id, participant_id, communication_id, body, opts = {})
      data, _status_code, _headers = patch_conversations_email_participant_communication_with_http_info(email_id, participant_id, communication_id, body, opts)
      return data
    end

    # Update conversation participant&#39;s communication by disconnecting it.
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param communication_id communicationId
    # @param body Participant
    # @param [Hash] opts the optional parameters
    # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers
    def patch_conversations_email_participant_communication_with_http_info(email_id, participant_id, communication_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.patch_conversations_email_participant_communication ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.patch_conversations_email_participant_communication" if email_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.patch_conversations_email_participant_communication" if participant_id.nil?
      # verify the required parameter 'communication_id' is set
      fail ArgumentError, "Missing the required parameter 'communication_id' when calling ConversationsApi.patch_conversations_email_participant_communication" if communication_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.patch_conversations_email_participant_communication" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/participants/{participantId}/communications/{communicationId}".sub('{format}','json').sub('{' + 'emailId' + '}', email_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s).sub('{' + 'communicationId' + '}', communication_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 Auth']
      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 => 'Empty')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#patch_conversations_email_participant_communication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Index conversation properties
    # 
    # @param conversation_id conversationId
    # @param body request
    # @param [Hash] opts the optional parameters
    # @return [PropertyIndexRequest]
    def post_analytics_conversation_details_properties(conversation_id, body, opts = {})
      data, _status_code, _headers = post_analytics_conversation_details_properties_with_http_info(conversation_id, body, opts)
      return data
    end

    # Index conversation properties
    # 
    # @param conversation_id conversationId
    # @param body request
    # @param [Hash] opts the optional parameters
    # @return [Array<(PropertyIndexRequest, Fixnum, Hash)>] PropertyIndexRequest data, response status code and response headers
    def post_analytics_conversation_details_properties_with_http_info(conversation_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_analytics_conversation_details_properties ..."
      end
      # verify the required parameter 'conversation_id' is set
      fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.post_analytics_conversation_details_properties" if conversation_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_analytics_conversation_details_properties" if body.nil?
      # resource path
      local_var_path = "/api/v2/analytics/conversations/{conversationId}/details/properties".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 = @api_client.object_to_http_body(body)
      auth_names = ['PureCloud Auth']
      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 => 'PropertyIndexRequest')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_analytics_conversation_details_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Query for conversation aggregates
    # 
    # @param body query
    # @param [Hash] opts the optional parameters
    # @return [AggregateQueryResponse]
    def post_analytics_conversations_aggregates_query(body, opts = {})
      data, _status_code, _headers = post_analytics_conversations_aggregates_query_with_http_info(body, opts)
      return data
    end

    # Query for conversation aggregates
    # 
    # @param body query
    # @param [Hash] opts the optional parameters
    # @return [Array<(AggregateQueryResponse, Fixnum, Hash)>] AggregateQueryResponse data, response status code and response headers
    def post_analytics_conversations_aggregates_query_with_http_info(body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_analytics_conversations_aggregates_query ..."
      end
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_analytics_conversations_aggregates_query" if body.nil?
      # resource path
      local_var_path = "/api/v2/analytics/conversations/aggregates/query".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 Auth']
      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 => 'AggregateQueryResponse')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_analytics_conversations_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Query for conversation details
    # 
    # @param body query
    # @param [Hash] opts the optional parameters
    # @return [AnalyticsConversationQueryResponse]
    def post_analytics_conversations_details_query(body, opts = {})
      data, _status_code, _headers = post_analytics_conversations_details_query_with_http_info(body, opts)
      return data
    end

    # Query for conversation details
    # 
    # @param body query
    # @param [Hash] opts the optional parameters
    # @return [Array<(AnalyticsConversationQueryResponse, Fixnum, Hash)>] AnalyticsConversationQueryResponse data, response status code and response headers
    def post_analytics_conversations_details_query_with_http_info(body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_analytics_conversations_details_query ..."
      end
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_analytics_conversations_details_query" if body.nil?
      # resource path
      local_var_path = "/api/v2/analytics/conversations/details/query".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 Auth']
      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 => 'AnalyticsConversationQueryResponse')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_analytics_conversations_details_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create a new callback for the specified participant on the conversation.
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param [Hash] opts the optional parameters
    # @option opts [CreateCallbackCommand] :body 
    # @return [nil]
    def post_conversation_participant_callbacks(conversation_id, participant_id, opts = {})
      post_conversation_participant_callbacks_with_http_info(conversation_id, participant_id, opts)
      return nil
    end

    # Create a new callback for the specified participant on the conversation.
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param [Hash] opts the optional parameters
    # @option opts [CreateCallbackCommand] :body 
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def post_conversation_participant_callbacks_with_http_info(conversation_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversation_participant_callbacks ..."
      end
      # verify the required parameter 'conversation_id' is set
      fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.post_conversation_participant_callbacks" if conversation_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.post_conversation_participant_callbacks" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/{conversationId}/participants/{participantId}/callbacks".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_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(opts[:'body'])
      auth_names = ['PureCloud Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversation_participant_callbacks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param body Transfer request
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def post_conversation_participant_replace(conversation_id, participant_id, body, opts = {})
      post_conversation_participant_replace_with_http_info(conversation_id, participant_id, body, opts)
      return nil
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param conversation_id conversation ID
    # @param participant_id participant ID
    # @param body Transfer request
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def post_conversation_participant_replace_with_http_info(conversation_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversation_participant_replace ..."
      end
      # verify the required parameter 'conversation_id' is set
      fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.post_conversation_participant_replace" if conversation_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.post_conversation_participant_replace" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversation_participant_replace" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/{conversationId}/participants/{participantId}/replace".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversation_participant_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Add a new call to a conversation
    # 
    # @param call_id callId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Conversation]
    def post_conversations_call(call_id, body, opts = {})
      data, _status_code, _headers = post_conversations_call_with_http_info(call_id, body, opts)
      return data
    end

    # Add a new call to a conversation
    # 
    # @param call_id callId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers
    def post_conversations_call_with_http_info(call_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_call ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.post_conversations_call" if call_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_call" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}".sub('{format}','json').sub('{' + 'callId' + '}', call_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 Auth']
      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 => 'Conversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_call\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Initiate and update consult transfer
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param body Destination address &amp; initial speak to
    # @param [Hash] opts the optional parameters
    # @return [ConsultTransferResponse]
    def post_conversations_call_participant_consult(call_id, participant_id, body, opts = {})
      data, _status_code, _headers = post_conversations_call_participant_consult_with_http_info(call_id, participant_id, body, opts)
      return data
    end

    # Initiate and update consult transfer
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param body Destination address &amp; initial speak to
    # @param [Hash] opts the optional parameters
    # @return [Array<(ConsultTransferResponse, Fixnum, Hash)>] ConsultTransferResponse data, response status code and response headers
    def post_conversations_call_participant_consult_with_http_info(call_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_call_participant_consult ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.post_conversations_call_participant_consult" if call_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.post_conversations_call_participant_consult" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_call_participant_consult" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}/participants/{participantId}/consult".sub('{format}','json').sub('{' + 'callId' + '}', call_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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 => 'ConsultTransferResponse')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_call_participant_consult\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Listen in on the conversation from the point of view of a given participant.
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def post_conversations_call_participant_monitor(call_id, participant_id, opts = {})
      post_conversations_call_participant_monitor_with_http_info(call_id, participant_id, opts)
      return nil
    end

    # Listen in on the conversation from the point of view of a given participant.
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def post_conversations_call_participant_monitor_with_http_info(call_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_call_participant_monitor ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.post_conversations_call_participant_monitor" if call_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.post_conversations_call_participant_monitor" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}/participants/{participantId}/monitor".sub('{format}','json').sub('{' + 'callId' + '}', call_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_call_participant_monitor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param body Transfer request
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def post_conversations_call_participant_replace(call_id, participant_id, body, opts = {})
      post_conversations_call_participant_replace_with_http_info(call_id, participant_id, body, opts)
      return nil
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param call_id callId
    # @param participant_id participantId
    # @param body Transfer request
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def post_conversations_call_participant_replace_with_http_info(call_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_call_participant_replace ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.post_conversations_call_participant_replace" if call_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.post_conversations_call_participant_replace" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_call_participant_replace" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}/participants/{participantId}/replace".sub('{format}','json').sub('{' + 'callId' + '}', call_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_call_participant_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Add participants to a conversation
    # 
    # @param call_id callId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Conversation]
    def post_conversations_call_participants(call_id, body, opts = {})
      data, _status_code, _headers = post_conversations_call_participants_with_http_info(call_id, body, opts)
      return data
    end

    # Add participants to a conversation
    # 
    # @param call_id callId
    # @param body Conversation
    # @param [Hash] opts the optional parameters
    # @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers
    def post_conversations_call_participants_with_http_info(call_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_call_participants ..."
      end
      # verify the required parameter 'call_id' is set
      fail ArgumentError, "Missing the required parameter 'call_id' when calling ConversationsApi.post_conversations_call_participants" if call_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_call_participants" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls/{callId}/participants".sub('{format}','json').sub('{' + 'callId' + '}', call_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 Auth']
      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 => 'Conversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_call_participants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param body Transfer request
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def post_conversations_callback_participant_replace(callback_id, participant_id, body, opts = {})
      post_conversations_callback_participant_replace_with_http_info(callback_id, participant_id, body, opts)
      return nil
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param callback_id callbackId
    # @param participant_id participantId
    # @param body Transfer request
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def post_conversations_callback_participant_replace_with_http_info(callback_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_callback_participant_replace ..."
      end
      # verify the required parameter 'callback_id' is set
      fail ArgumentError, "Missing the required parameter 'callback_id' when calling ConversationsApi.post_conversations_callback_participant_replace" if callback_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.post_conversations_callback_participant_replace" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_callback_participant_replace" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/callbacks/{callbackId}/participants/{participantId}/replace".sub('{format}','json').sub('{' + 'callbackId' + '}', callback_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_callback_participant_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create a Callback
    # 
    # @param body Callback
    # @param [Hash] opts the optional parameters
    # @return [CreateCallbackResponse]
    def post_conversations_callbacks(body, opts = {})
      data, _status_code, _headers = post_conversations_callbacks_with_http_info(body, opts)
      return data
    end

    # Create a Callback
    # 
    # @param body Callback
    # @param [Hash] opts the optional parameters
    # @return [Array<(CreateCallbackResponse, Fixnum, Hash)>] CreateCallbackResponse data, response status code and response headers
    def post_conversations_callbacks_with_http_info(body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_callbacks ..."
      end
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_callbacks" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/callbacks".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 Auth']
      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 => 'CreateCallbackResponse')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_callbacks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create a call conversation
    # 
    # @param body Call request
    # @param [Hash] opts the optional parameters
    # @return [CreateCallResponse]
    def post_conversations_calls(body, opts = {})
      data, _status_code, _headers = post_conversations_calls_with_http_info(body, opts)
      return data
    end

    # Create a call conversation
    # 
    # @param body Call request
    # @param [Hash] opts the optional parameters
    # @return [Array<(CreateCallResponse, Fixnum, Hash)>] CreateCallResponse data, response status code and response headers
    def post_conversations_calls_with_http_info(body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_calls ..."
      end
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_calls" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/calls".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 Auth']
      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 => 'CreateCallResponse')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_calls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param body Transfer request
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def post_conversations_chat_participant_replace(chat_id, participant_id, body, opts = {})
      post_conversations_chat_participant_replace_with_http_info(chat_id, participant_id, body, opts)
      return nil
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param chat_id chatId
    # @param participant_id participantId
    # @param body Transfer request
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def post_conversations_chat_participant_replace_with_http_info(chat_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_chat_participant_replace ..."
      end
      # verify the required parameter 'chat_id' is set
      fail ArgumentError, "Missing the required parameter 'chat_id' when calling ConversationsApi.post_conversations_chat_participant_replace" if chat_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.post_conversations_chat_participant_replace" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_chat_participant_replace" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/chats/{chatId}/participants/{participantId}/replace".sub('{format}','json').sub('{' + 'chatId' + '}', chat_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_chat_participant_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create a web chat conversation
    # 
    # @param body Create web chat request
    # @param [Hash] opts the optional parameters
    # @return [ChatConversation]
    def post_conversations_chats(body, opts = {})
      data, _status_code, _headers = post_conversations_chats_with_http_info(body, opts)
      return data
    end

    # Create a web chat conversation
    # 
    # @param body Create web chat request
    # @param [Hash] opts the optional parameters
    # @return [Array<(ChatConversation, Fixnum, Hash)>] ChatConversation data, response status code and response headers
    def post_conversations_chats_with_http_info(body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_chats ..."
      end
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_chats" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/chats".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 Auth']
      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 => 'ChatConversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_chats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [TransferRequest] :body 
    # @return [nil]
    def post_conversations_cobrowsesession_participant_replace(cobrowse_id, participant_id, opts = {})
      post_conversations_cobrowsesession_participant_replace_with_http_info(cobrowse_id, participant_id, opts)
      return nil
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param cobrowse_id cobrowseId
    # @param participant_id participantId
    # @param [Hash] opts the optional parameters
    # @option opts [TransferRequest] :body 
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def post_conversations_cobrowsesession_participant_replace_with_http_info(cobrowse_id, participant_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_cobrowsesession_participant_replace ..."
      end
      # verify the required parameter 'cobrowse_id' is set
      fail ArgumentError, "Missing the required parameter 'cobrowse_id' when calling ConversationsApi.post_conversations_cobrowsesession_participant_replace" if cobrowse_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.post_conversations_cobrowsesession_participant_replace" if participant_id.nil?
      # resource path
      local_var_path = "/api/v2/conversations/cobrowsesessions/{cobrowseId}/participants/{participantId}/replace".sub('{format}','json').sub('{' + 'cobrowseId' + '}', cobrowse_id.to_s).sub('{' + 'participantId' + '}', participant_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(opts[:'body'])
      auth_names = ['PureCloud Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_cobrowsesession_participant_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Send an email reply
    # 
    # @param email_id emailId
    # @param body Reply
    # @param [Hash] opts the optional parameters
    # @return [EmailMessage]
    def post_conversations_email_messages(email_id, body, opts = {})
      data, _status_code, _headers = post_conversations_email_messages_with_http_info(email_id, body, opts)
      return data
    end

    # Send an email reply
    # 
    # @param email_id emailId
    # @param body Reply
    # @param [Hash] opts the optional parameters
    # @return [Array<(EmailMessage, Fixnum, Hash)>] EmailMessage data, response status code and response headers
    def post_conversations_email_messages_with_http_info(email_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_email_messages ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.post_conversations_email_messages" if email_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_email_messages" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/messages".sub('{format}','json').sub('{' + 'emailId' + '}', email_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 Auth']
      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 => 'EmailMessage')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_email_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param body Transfer request
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def post_conversations_email_participant_replace(email_id, participant_id, body, opts = {})
      post_conversations_email_participant_replace_with_http_info(email_id, participant_id, body, opts)
      return nil
    end

    # Replace this participant with the specified user and/or address
    # 
    # @param email_id emailId
    # @param participant_id participantId
    # @param body Transfer request
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def post_conversations_email_participant_replace_with_http_info(email_id, participant_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_email_participant_replace ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.post_conversations_email_participant_replace" if email_id.nil?
      # verify the required parameter 'participant_id' is set
      fail ArgumentError, "Missing the required parameter 'participant_id' when calling ConversationsApi.post_conversations_email_participant_replace" if participant_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_email_participant_replace" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/participants/{participantId}/replace".sub('{format}','json').sub('{' + 'emailId' + '}', email_id.to_s).sub('{' + 'participantId' + '}', participant_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 Auth']
      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)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_email_participant_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create an email conversation
    # 
    # @param body Create email request
    # @param [Hash] opts the optional parameters
    # @return [EmailConversation]
    def post_conversations_emails(body, opts = {})
      data, _status_code, _headers = post_conversations_emails_with_http_info(body, opts)
      return data
    end

    # Create an email conversation
    # 
    # @param body Create email request
    # @param [Hash] opts the optional parameters
    # @return [Array<(EmailConversation, Fixnum, Hash)>] EmailConversation data, response status code and response headers
    def post_conversations_emails_with_http_info(body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_emails ..."
      end
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_emails" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails".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 Auth']
      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 => 'EmailConversation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create Fax Conversation
    # 
    # @param body Fax
    # @param [Hash] opts the optional parameters
    # @return [FaxSendResponse]
    def post_conversations_faxes(body, opts = {})
      data, _status_code, _headers = post_conversations_faxes_with_http_info(body, opts)
      return data
    end

    # Create Fax Conversation
    # 
    # @param body Fax
    # @param [Hash] opts the optional parameters
    # @return [Array<(FaxSendResponse, Fixnum, Hash)>] FaxSendResponse data, response status code and response headers
    def post_conversations_faxes_with_http_info(body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.post_conversations_faxes ..."
      end
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.post_conversations_faxes" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/faxes".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 Auth']
      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 => 'FaxSendResponse')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#post_conversations_faxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update conversation draft reply
    # 
    # @param email_id emailId
    # @param body Draft
    # @param [Hash] opts the optional parameters
    # @return [EmailMessage]
    def put_conversations_email_messages_draft(email_id, body, opts = {})
      data, _status_code, _headers = put_conversations_email_messages_draft_with_http_info(email_id, body, opts)
      return data
    end

    # Update conversation draft reply
    # 
    # @param email_id emailId
    # @param body Draft
    # @param [Hash] opts the optional parameters
    # @return [Array<(EmailMessage, Fixnum, Hash)>] EmailMessage data, response status code and response headers
    def put_conversations_email_messages_draft_with_http_info(email_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ConversationsApi.put_conversations_email_messages_draft ..."
      end
      # verify the required parameter 'email_id' is set
      fail ArgumentError, "Missing the required parameter 'email_id' when calling ConversationsApi.put_conversations_email_messages_draft" if email_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling ConversationsApi.put_conversations_email_messages_draft" if body.nil?
      # resource path
      local_var_path = "/api/v2/conversations/emails/{emailId}/messages/draft".sub('{format}','json').sub('{' + 'emailId' + '}', email_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 Auth']
      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 => 'EmailMessage')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ConversationsApi#put_conversations_email_messages_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
  end
end