=begin #UltraCart Rest API V2 #UltraCart REST API Version 2 OpenAPI spec version: 2.0.0 Contact: support@ultracart.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.15-SNAPSHOT =end require 'addressable/uri' module UltracartClient class ConversationApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false) api_config = Configuration.new api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key api_config.api_version = '2017-03-01' api_config.verify_ssl = verify_ssl api_client = ApiClient.new(api_config) api_client.config.debugging = debugging UltracartClient::ConversationApi.new(api_client) end # Delete a conversation canned message # Delete a conversation canned message # @param conversation_canned_message_oid # @param [Hash] opts the optional parameters # @return [nil] def delete_conversation_canned_message(conversation_canned_message_oid, opts = {}) delete_conversation_canned_message_with_http_info(conversation_canned_message_oid, opts) nil end # Delete a conversation canned message # Delete a conversation canned message # @param conversation_canned_message_oid # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_conversation_canned_message_with_http_info(conversation_canned_message_oid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.delete_conversation_canned_message ...' end # verify the required parameter 'conversation_canned_message_oid' is set if @api_client.config.client_side_validation && conversation_canned_message_oid.nil? fail ArgumentError, "Missing the required parameter 'conversation_canned_message_oid' when calling ConversationApi.delete_conversation_canned_message" end # resource path local_var_path = '/conversation/canned_messages/{conversation_canned_message_oid}'.sub('{' + 'conversation_canned_message_oid' + '}', conversation_canned_message_oid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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: ConversationApi#delete_conversation_canned_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a conversation department # Delete a conversation department # @param conversation_department_oid # @param [Hash] opts the optional parameters # @return [nil] def delete_department(conversation_department_oid, opts = {}) delete_department_with_http_info(conversation_department_oid, opts) nil end # Delete a conversation department # Delete a conversation department # @param conversation_department_oid # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_department_with_http_info(conversation_department_oid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.delete_department ...' end # verify the required parameter 'conversation_department_oid' is set if @api_client.config.client_side_validation && conversation_department_oid.nil? fail ArgumentError, "Missing the required parameter 'conversation_department_oid' when calling ConversationApi.delete_department" end # resource path local_var_path = '/conversation/departments/{conversation_department_oid}'.sub('{' + 'conversation_department_oid' + '}', conversation_department_oid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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: ConversationApi#delete_department\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a conversation engagement # Delete a conversation engagement # @param conversation_engagement_oid # @param [Hash] opts the optional parameters # @return [nil] def delete_engagement(conversation_engagement_oid, opts = {}) delete_engagement_with_http_info(conversation_engagement_oid, opts) nil end # Delete a conversation engagement # Delete a conversation engagement # @param conversation_engagement_oid # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_engagement_with_http_info(conversation_engagement_oid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.delete_engagement ...' end # verify the required parameter 'conversation_engagement_oid' is set if @api_client.config.client_side_validation && conversation_engagement_oid.nil? fail ArgumentError, "Missing the required parameter 'conversation_engagement_oid' when calling ConversationApi.delete_engagement" end # resource path local_var_path = '/conversation/engagements/{conversation_engagement_oid}'.sub('{' + 'conversation_engagement_oid' + '}', conversation_engagement_oid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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: ConversationApi#delete_engagement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Agent keep alive # Called periodically by the conversation API to keep the session alive. # @param [Hash] opts the optional parameters # @return [nil] def get_agent_keep_alive(opts = {}) get_agent_keep_alive_with_http_info(opts) nil end # Agent keep alive # Called periodically by the conversation API to keep the session alive. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def get_agent_keep_alive_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_agent_keep_alive ...' end # resource path local_var_path = '/conversation/agent/keepalive' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_agent_keep_alive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get agent websocket authorization # Retrieve a JWT to authorize an agent to make a websocket connection. # @param [Hash] opts the optional parameters # @return [ConversationAgentAuthResponse] def get_agent_websocket_authorization(opts = {}) data, _status_code, _headers = get_agent_websocket_authorization_with_http_info(opts) data end # Get agent websocket authorization # Retrieve a JWT to authorize an agent to make a websocket connection. # @param [Hash] opts the optional parameters # @return [Array<(ConversationAgentAuthResponse, Fixnum, Hash)>] ConversationAgentAuthResponse data, response status code and response headers def get_agent_websocket_authorization_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_agent_websocket_authorization ...' end # resource path local_var_path = '/conversation/agent/auth' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationAgentAuthResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_agent_websocket_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a conversation # Retrieve a conversation including the participants and messages # @param conversation_uuid # @param [Hash] opts the optional parameters # @option opts [Integer] :limit # @return [ConversationResponse] def get_conversation(conversation_uuid, opts = {}) data, _status_code, _headers = get_conversation_with_http_info(conversation_uuid, opts) data end # Retrieve a conversation # Retrieve a conversation including the participants and messages # @param conversation_uuid # @param [Hash] opts the optional parameters # @option opts [Integer] :limit # @return [Array<(ConversationResponse, Fixnum, Hash)>] ConversationResponse data, response status code and response headers def get_conversation_with_http_info(conversation_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation ...' end # verify the required parameter 'conversation_uuid' is set if @api_client.config.client_side_validation && conversation_uuid.nil? fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.get_conversation" end # resource path local_var_path = '/conversation/conversations/{conversation_uuid}'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a list of canned messages ordered by short_code # Retrieve a list of canned messages ordered by short_code # @param [Hash] opts the optional parameters # @return [ConversationCannedMessagesResponse] def get_conversation_canned_messages(opts = {}) data, _status_code, _headers = get_conversation_canned_messages_with_http_info(opts) data end # Retrieve a list of canned messages ordered by short_code # Retrieve a list of canned messages ordered by short_code # @param [Hash] opts the optional parameters # @return [Array<(ConversationCannedMessagesResponse, Fixnum, Hash)>] ConversationCannedMessagesResponse data, response status code and response headers def get_conversation_canned_messages_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_canned_messages ...' end # resource path local_var_path = '/conversation/canned_messages' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationCannedMessagesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_canned_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a webchat conversation context # Get a webchat conversation context # @param conversation_uuid # @param [Hash] opts the optional parameters # @return [ConversationWebchatContext] def get_conversation_context(conversation_uuid, opts = {}) data, _status_code, _headers = get_conversation_context_with_http_info(conversation_uuid, opts) data end # Get a webchat conversation context # Get a webchat conversation context # @param conversation_uuid # @param [Hash] opts the optional parameters # @return [Array<(ConversationWebchatContext, Fixnum, Hash)>] ConversationWebchatContext data, response status code and response headers def get_conversation_context_with_http_info(conversation_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_context ...' end # verify the required parameter 'conversation_uuid' is set if @api_client.config.client_side_validation && conversation_uuid.nil? fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.get_conversation_context" end # resource path local_var_path = '/conversation/conversations/{conversation_uuid}/context'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationWebchatContext') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_context\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a list of possible department members # Retrieve a list of possible department members # @param [Hash] opts the optional parameters # @return [ConversationDepartmentMembersResponse] def get_conversation_department_member_list(opts = {}) data, _status_code, _headers = get_conversation_department_member_list_with_http_info(opts) data end # Retrieve a list of possible department members # Retrieve a list of possible department members # @param [Hash] opts the optional parameters # @return [Array<(ConversationDepartmentMembersResponse, Fixnum, Hash)>] ConversationDepartmentMembersResponse data, response status code and response headers def get_conversation_department_member_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_department_member_list ...' end # resource path local_var_path = '/conversation/department_members' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationDepartmentMembersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_department_member_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a list of departments ordered by name # Retrieve a list of departments ordered by name # @param [Hash] opts the optional parameters # @return [ConversationDepartmentsResponse] def get_conversation_departments(opts = {}) data, _status_code, _headers = get_conversation_departments_with_http_info(opts) data end # Retrieve a list of departments ordered by name # Retrieve a list of departments ordered by name # @param [Hash] opts the optional parameters # @return [Array<(ConversationDepartmentsResponse, Fixnum, Hash)>] ConversationDepartmentsResponse data, response status code and response headers def get_conversation_departments_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_departments ...' end # resource path local_var_path = '/conversation/departments' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationDepartmentsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_departments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a list of engagements ordered by name # Retrieve a list of engagements ordered by name # @param [Hash] opts the optional parameters # @return [ConversationEngagementsResponse] def get_conversation_engagements(opts = {}) data, _status_code, _headers = get_conversation_engagements_with_http_info(opts) data end # Retrieve a list of engagements ordered by name # Retrieve a list of engagements ordered by name # @param [Hash] opts the optional parameters # @return [Array<(ConversationEngagementsResponse, Fixnum, Hash)>] ConversationEngagementsResponse data, response status code and response headers def get_conversation_engagements_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_engagements ...' end # resource path local_var_path = '/conversation/engagements' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationEngagementsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_engagements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve conversation messages # Retrieve conversation messages since a particular time # @param conversation_uuid # @param since # @param [Hash] opts the optional parameters # @option opts [Integer] :limit # @return [ConversationMessagesResponse] def get_conversation_messages(conversation_uuid, since, opts = {}) data, _status_code, _headers = get_conversation_messages_with_http_info(conversation_uuid, since, opts) data end # Retrieve conversation messages # Retrieve conversation messages since a particular time # @param conversation_uuid # @param since # @param [Hash] opts the optional parameters # @option opts [Integer] :limit # @return [Array<(ConversationMessagesResponse, Fixnum, Hash)>] ConversationMessagesResponse data, response status code and response headers def get_conversation_messages_with_http_info(conversation_uuid, since, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_messages ...' end # verify the required parameter 'conversation_uuid' is set if @api_client.config.client_side_validation && conversation_uuid.nil? fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.get_conversation_messages" end # verify the required parameter 'since' is set if @api_client.config.client_side_validation && since.nil? fail ArgumentError, "Missing the required parameter 'since' when calling ConversationApi.get_conversation_messages" end # resource path local_var_path = '/conversation/conversations/{conversation_uuid}/messages/{since}'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s).sub('{' + 'since' + '}', since.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationMessagesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a presigned conersation multimedia upload URL # Get a presigned conersation multimedia upload URL # @param extension # @param [Hash] opts the optional parameters # @return [ConversationMultimediaUploadUrlResponse] def get_conversation_multimedia_upload_url(extension, opts = {}) data, _status_code, _headers = get_conversation_multimedia_upload_url_with_http_info(extension, opts) data end # Get a presigned conersation multimedia upload URL # Get a presigned conersation multimedia upload URL # @param extension # @param [Hash] opts the optional parameters # @return [Array<(ConversationMultimediaUploadUrlResponse, Fixnum, Hash)>] ConversationMultimediaUploadUrlResponse data, response status code and response headers def get_conversation_multimedia_upload_url_with_http_info(extension, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_multimedia_upload_url ...' end # verify the required parameter 'extension' is set if @api_client.config.client_side_validation && extension.nil? fail ArgumentError, "Missing the required parameter 'extension' when calling ConversationApi.get_conversation_multimedia_upload_url" end # resource path local_var_path = '/conversation/upload_url/{extension}'.sub('{' + 'extension' + '}', extension.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationMultimediaUploadUrlResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_multimedia_upload_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve conversation permissions # Retrieve conversation permissions # @param [Hash] opts the optional parameters # @return [ConversationPermissionsResponse] def get_conversation_permissions(opts = {}) data, _status_code, _headers = get_conversation_permissions_with_http_info(opts) data end # Retrieve conversation permissions # Retrieve conversation permissions # @param [Hash] opts the optional parameters # @return [Array<(ConversationPermissionsResponse, Fixnum, Hash)>] ConversationPermissionsResponse data, response status code and response headers def get_conversation_permissions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_permissions ...' end # resource path local_var_path = '/conversation/permissions' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationPermissionsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a conversation webchat queue statuses # Retrieve a conversation webchat queue statuses including agent status and queue entries # @param [Hash] opts the optional parameters # @return [ConversationWebchatQueueStatusesResponse] def get_conversation_webchat_queue_statuses(opts = {}) data, _status_code, _headers = get_conversation_webchat_queue_statuses_with_http_info(opts) data end # Retrieve a conversation webchat queue statuses # Retrieve a conversation webchat queue statuses including agent status and queue entries # @param [Hash] opts the optional parameters # @return [Array<(ConversationWebchatQueueStatusesResponse, Fixnum, Hash)>] ConversationWebchatQueueStatusesResponse data, response status code and response headers def get_conversation_webchat_queue_statuses_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_webchat_queue_statuses ...' end # resource path local_var_path = '/conversation/conversations/queues/statuses' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationWebchatQueueStatusesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_webchat_queue_statuses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a list of conversation summaries newest to oldest # Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read. # @param [Hash] opts the optional parameters # @option opts [String] :medium # @option opts [String] :before # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100) # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0) # @return [ConversationsResponse] def get_conversations(opts = {}) data, _status_code, _headers = get_conversations_with_http_info(opts) data end # Retrieve a list of conversation summaries newest to oldest # Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read. # @param [Hash] opts the optional parameters # @option opts [String] :medium # @option opts [String] :before # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. # @return [Array<(ConversationsResponse, Fixnum, Hash)>] ConversationsResponse 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: ConversationApi.get_conversations ...' end # resource path local_var_path = '/conversation/conversations' # query parameters query_params = {} query_params[:'medium'] = opts[:'medium'] if !opts[:'medium'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil? query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a list of matching terms for a search field # Retrieve a list of matching terms for a search field # @param autocomplete_request Autocomplete Request # @param [Hash] opts the optional parameters # @return [ConversationAutocompleteResponse] def get_conversations_autocomplete(autocomplete_request, opts = {}) data, _status_code, _headers = get_conversations_autocomplete_with_http_info(autocomplete_request, opts) data end # Retrieve a list of matching terms for a search field # Retrieve a list of matching terms for a search field # @param autocomplete_request Autocomplete Request # @param [Hash] opts the optional parameters # @return [Array<(ConversationAutocompleteResponse, Fixnum, Hash)>] ConversationAutocompleteResponse data, response status code and response headers def get_conversations_autocomplete_with_http_info(autocomplete_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversations_autocomplete ...' end # verify the required parameter 'autocomplete_request' is set if @api_client.config.client_side_validation && autocomplete_request.nil? fail ArgumentError, "Missing the required parameter 'autocomplete_request' when calling ConversationApi.get_conversations_autocomplete" end # resource path local_var_path = '/conversation/conversations/autocomplete' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(autocomplete_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationAutocompleteResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversations_autocomplete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Search conversations # Search conversations # @param search_request Search Request # @param [Hash] opts the optional parameters # @return [ConversationSearchResponse] def get_conversations_search(search_request, opts = {}) data, _status_code, _headers = get_conversations_search_with_http_info(search_request, opts) data end # Search conversations # Search conversations # @param search_request Search Request # @param [Hash] opts the optional parameters # @return [Array<(ConversationSearchResponse, Fixnum, Hash)>] ConversationSearchResponse data, response status code and response headers def get_conversations_search_with_http_info(search_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversations_search ...' end # verify the required parameter 'search_request' is set if @api_client.config.client_side_validation && search_request.nil? fail ArgumentError, "Missing the required parameter 'search_request' when calling ConversationApi.get_conversations_search" end # resource path local_var_path = '/conversation/conversations/search' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(search_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationSearchResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversations_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Insert a canned message # Insert a canned message # @param canned_message Canned message # @param [Hash] opts the optional parameters # @return [ConversationCannedMessageResponse] def insert_conversation_canned_message(canned_message, opts = {}) data, _status_code, _headers = insert_conversation_canned_message_with_http_info(canned_message, opts) data end # Insert a canned message # Insert a canned message # @param canned_message Canned message # @param [Hash] opts the optional parameters # @return [Array<(ConversationCannedMessageResponse, Fixnum, Hash)>] ConversationCannedMessageResponse data, response status code and response headers def insert_conversation_canned_message_with_http_info(canned_message, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.insert_conversation_canned_message ...' end # verify the required parameter 'canned_message' is set if @api_client.config.client_side_validation && canned_message.nil? fail ArgumentError, "Missing the required parameter 'canned_message' when calling ConversationApi.insert_conversation_canned_message" end # resource path local_var_path = '/conversation/canned_messages' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(canned_message) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationCannedMessageResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#insert_conversation_canned_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Insert a department # Insert a department # @param department Department # @param [Hash] opts the optional parameters # @return [ConversationDepartmentResponse] def insert_conversation_department(department, opts = {}) data, _status_code, _headers = insert_conversation_department_with_http_info(department, opts) data end # Insert a department # Insert a department # @param department Department # @param [Hash] opts the optional parameters # @return [Array<(ConversationDepartmentResponse, Fixnum, Hash)>] ConversationDepartmentResponse data, response status code and response headers def insert_conversation_department_with_http_info(department, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.insert_conversation_department ...' end # verify the required parameter 'department' is set if @api_client.config.client_side_validation && department.nil? fail ArgumentError, "Missing the required parameter 'department' when calling ConversationApi.insert_conversation_department" end # resource path local_var_path = '/conversation/departments' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(department) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationDepartmentResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#insert_conversation_department\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Insert a engagement # Insert a engagement # @param engagement Engagement # @param [Hash] opts the optional parameters # @return [ConversationEngagementResponse] def insert_conversation_engagement(engagement, opts = {}) data, _status_code, _headers = insert_conversation_engagement_with_http_info(engagement, opts) data end # Insert a engagement # Insert a engagement # @param engagement Engagement # @param [Hash] opts the optional parameters # @return [Array<(ConversationEngagementResponse, Fixnum, Hash)>] ConversationEngagementResponse data, response status code and response headers def insert_conversation_engagement_with_http_info(engagement, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.insert_conversation_engagement ...' end # verify the required parameter 'engagement' is set if @api_client.config.client_side_validation && engagement.nil? fail ArgumentError, "Missing the required parameter 'engagement' when calling ConversationApi.insert_conversation_engagement" end # resource path local_var_path = '/conversation/engagements' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(engagement) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationEngagementResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#insert_conversation_engagement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Join a conversation # Join a conversation # @param conversation_uuid # @param [Hash] opts the optional parameters # @option opts [ConversationJoinRequest] :join_request Join request # @return [nil] def join_conversation(conversation_uuid, opts = {}) join_conversation_with_http_info(conversation_uuid, opts) nil end # Join a conversation # Join a conversation # @param conversation_uuid # @param [Hash] opts the optional parameters # @option opts [ConversationJoinRequest] :join_request Join request # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def join_conversation_with_http_info(conversation_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.join_conversation ...' end # verify the required parameter 'conversation_uuid' is set if @api_client.config.client_side_validation && conversation_uuid.nil? fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.join_conversation" end # resource path local_var_path = '/conversation/conversations/{conversation_uuid}/join'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'join_request']) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#join_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Leave a conversation # Leave a conversation # @param conversation_uuid # @param [Hash] opts the optional parameters # @return [nil] def leave_conversation(conversation_uuid, opts = {}) leave_conversation_with_http_info(conversation_uuid, opts) nil end # Leave a conversation # Leave a conversation # @param conversation_uuid # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def leave_conversation_with_http_info(conversation_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.leave_conversation ...' end # verify the required parameter 'conversation_uuid' is set if @api_client.config.client_side_validation && conversation_uuid.nil? fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.leave_conversation" end # resource path local_var_path = '/conversation/conversations/{conversation_uuid}/leave'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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: ConversationApi#leave_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Mark a conversation as read # Mark a conversation as read # @param conversation_uuid # @param [Hash] opts the optional parameters # @return [nil] def mark_read_conversation(conversation_uuid, opts = {}) mark_read_conversation_with_http_info(conversation_uuid, opts) nil end # Mark a conversation as read # Mark a conversation as read # @param conversation_uuid # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def mark_read_conversation_with_http_info(conversation_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.mark_read_conversation ...' end # verify the required parameter 'conversation_uuid' is set if @api_client.config.client_side_validation && conversation_uuid.nil? fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.mark_read_conversation" end # resource path local_var_path = '/conversation/conversations/{conversation_uuid}/markread'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#mark_read_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Search for canned messages by short_code # Search for canned messages by short_code # @param search_request Search request # @param [Hash] opts the optional parameters # @return [ConversationCannedMessagesResponse] def search_conversation_canned_messages(search_request, opts = {}) data, _status_code, _headers = search_conversation_canned_messages_with_http_info(search_request, opts) data end # Search for canned messages by short_code # Search for canned messages by short_code # @param search_request Search request # @param [Hash] opts the optional parameters # @return [Array<(ConversationCannedMessagesResponse, Fixnum, Hash)>] ConversationCannedMessagesResponse data, response status code and response headers def search_conversation_canned_messages_with_http_info(search_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.search_conversation_canned_messages ...' end # verify the required parameter 'search_request' is set if @api_client.config.client_side_validation && search_request.nil? fail ArgumentError, "Missing the required parameter 'search_request' when calling ConversationApi.search_conversation_canned_messages" end # resource path local_var_path = '/conversation/canned_messages/search' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(search_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationCannedMessagesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#search_conversation_canned_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Start a conversation # Start a new conversation # @param start_request Start request # @param [Hash] opts the optional parameters # @return [ConversationStartResponse] def start_conversation(start_request, opts = {}) data, _status_code, _headers = start_conversation_with_http_info(start_request, opts) data end # Start a conversation # Start a new conversation # @param start_request Start request # @param [Hash] opts the optional parameters # @return [Array<(ConversationStartResponse, Fixnum, Hash)>] ConversationStartResponse data, response status code and response headers def start_conversation_with_http_info(start_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.start_conversation ...' end # verify the required parameter 'start_request' is set if @api_client.config.client_side_validation && start_request.nil? fail ArgumentError, "Missing the required parameter 'start_request' when calling ConversationApi.start_conversation" end # resource path local_var_path = '/conversation/conversations' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(start_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationStartResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#start_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a canned message # Update a canned message # @param conversation_canned_message_oid # @param canned_message Canned message # @param [Hash] opts the optional parameters # @return [ConversationCannedMessageResponse] def update_conversation_canned_message(conversation_canned_message_oid, canned_message, opts = {}) data, _status_code, _headers = update_conversation_canned_message_with_http_info(conversation_canned_message_oid, canned_message, opts) data end # Update a canned message # Update a canned message # @param conversation_canned_message_oid # @param canned_message Canned message # @param [Hash] opts the optional parameters # @return [Array<(ConversationCannedMessageResponse, Fixnum, Hash)>] ConversationCannedMessageResponse data, response status code and response headers def update_conversation_canned_message_with_http_info(conversation_canned_message_oid, canned_message, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.update_conversation_canned_message ...' end # verify the required parameter 'conversation_canned_message_oid' is set if @api_client.config.client_side_validation && conversation_canned_message_oid.nil? fail ArgumentError, "Missing the required parameter 'conversation_canned_message_oid' when calling ConversationApi.update_conversation_canned_message" end # verify the required parameter 'canned_message' is set if @api_client.config.client_side_validation && canned_message.nil? fail ArgumentError, "Missing the required parameter 'canned_message' when calling ConversationApi.update_conversation_canned_message" end # resource path local_var_path = '/conversation/canned_messages/{conversation_canned_message_oid}'.sub('{' + 'conversation_canned_message_oid' + '}', conversation_canned_message_oid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(canned_message) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationCannedMessageResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#update_conversation_canned_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a department # Update a department # @param conversation_department_oid # @param department Department # @param [Hash] opts the optional parameters # @return [ConversationDepartmentResponse] def update_conversation_department(conversation_department_oid, department, opts = {}) data, _status_code, _headers = update_conversation_department_with_http_info(conversation_department_oid, department, opts) data end # Update a department # Update a department # @param conversation_department_oid # @param department Department # @param [Hash] opts the optional parameters # @return [Array<(ConversationDepartmentResponse, Fixnum, Hash)>] ConversationDepartmentResponse data, response status code and response headers def update_conversation_department_with_http_info(conversation_department_oid, department, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.update_conversation_department ...' end # verify the required parameter 'conversation_department_oid' is set if @api_client.config.client_side_validation && conversation_department_oid.nil? fail ArgumentError, "Missing the required parameter 'conversation_department_oid' when calling ConversationApi.update_conversation_department" end # verify the required parameter 'department' is set if @api_client.config.client_side_validation && department.nil? fail ArgumentError, "Missing the required parameter 'department' when calling ConversationApi.update_conversation_department" end # resource path local_var_path = '/conversation/departments/{conversation_department_oid}'.sub('{' + 'conversation_department_oid' + '}', conversation_department_oid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(department) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationDepartmentResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#update_conversation_department\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a engagement # Update a engagement # @param conversation_engagement_oid # @param engagement Engagement # @param [Hash] opts the optional parameters # @return [ConversationEngagementResponse] def update_conversation_engagement(conversation_engagement_oid, engagement, opts = {}) data, _status_code, _headers = update_conversation_engagement_with_http_info(conversation_engagement_oid, engagement, opts) data end # Update a engagement # Update a engagement # @param conversation_engagement_oid # @param engagement Engagement # @param [Hash] opts the optional parameters # @return [Array<(ConversationEngagementResponse, Fixnum, Hash)>] ConversationEngagementResponse data, response status code and response headers def update_conversation_engagement_with_http_info(conversation_engagement_oid, engagement, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.update_conversation_engagement ...' end # verify the required parameter 'conversation_engagement_oid' is set if @api_client.config.client_side_validation && conversation_engagement_oid.nil? fail ArgumentError, "Missing the required parameter 'conversation_engagement_oid' when calling ConversationApi.update_conversation_engagement" end # verify the required parameter 'engagement' is set if @api_client.config.client_side_validation && engagement.nil? fail ArgumentError, "Missing the required parameter 'engagement' when calling ConversationApi.update_conversation_engagement" end # resource path local_var_path = '/conversation/engagements/{conversation_engagement_oid}'.sub('{' + 'conversation_engagement_oid' + '}', conversation_engagement_oid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(engagement) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'ConversationEngagementResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#update_conversation_engagement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update status within the queue # Update status within the queue # @param queue_name # @param status_request Status request # @param [Hash] opts the optional parameters # @return [nil] def update_conversation_webchat_queue_status(queue_name, status_request, opts = {}) update_conversation_webchat_queue_status_with_http_info(queue_name, status_request, opts) nil end # Update status within the queue # Update status within the queue # @param queue_name # @param status_request Status request # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def update_conversation_webchat_queue_status_with_http_info(queue_name, status_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.update_conversation_webchat_queue_status ...' end # verify the required parameter 'queue_name' is set if @api_client.config.client_side_validation && queue_name.nil? fail ArgumentError, "Missing the required parameter 'queue_name' when calling ConversationApi.update_conversation_webchat_queue_status" end # verify the required parameter 'status_request' is set if @api_client.config.client_side_validation && status_request.nil? fail ArgumentError, "Missing the required parameter 'status_request' when calling ConversationApi.update_conversation_webchat_queue_status" end # resource path local_var_path = '/conversation/conversations/queues/{queue_name}/status'.sub('{' + 'queue_name' + '}', queue_name.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(status_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#update_conversation_webchat_queue_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end