=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 QualityApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete a calibration by id. # # @param calibration_id Calibration ID # @param calibrator_id calibratorId # @param [Hash] opts the optional parameters # @return [Calibration] def delete_calibrations_calibration_id(calibration_id, calibrator_id, opts = {}) data, status_code, headers = delete_calibrations_calibration_id_with_http_info(calibration_id, calibrator_id, opts) return data end # Delete a calibration by id. # # @param calibration_id Calibration ID # @param calibrator_id calibratorId # @param [Hash] opts the optional parameters # @return [Array<(Calibration, Fixnum, Hash)>] Calibration data, response status code and response headers def delete_calibrations_calibration_id_with_http_info(calibration_id, calibrator_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#delete_calibrations_calibration_id ..." end # verify the required parameter 'calibration_id' is set fail "Missing the required parameter 'calibration_id' when calling delete_calibrations_calibration_id" if calibration_id.nil? # verify the required parameter 'calibrator_id' is set fail "Missing the required parameter 'calibrator_id' when calling delete_calibrations_calibration_id" if calibrator_id.nil? # resource path local_var_path = "/api/v2/quality/calibrations/{calibrationId}".sub('{format}','json').sub('{' + 'calibrationId' + '}', calibration_id.to_s) # query parameters query_params = {} query_params[:'calibratorId'] = calibrator_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'Calibration') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#delete_calibrations_calibration_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete an evaluation # # @param conversation_id # @param evaluation_id # @param [Hash] opts the optional parameters # @option opts [String] :expand evaluatorId # @return [Evaluation] def delete_conversations_conversation_id_evaluations_evaluation_id(conversation_id, evaluation_id, opts = {}) data, status_code, headers = delete_conversations_conversation_id_evaluations_evaluation_id_with_http_info(conversation_id, evaluation_id, opts) return data end # Delete an evaluation # # @param conversation_id # @param evaluation_id # @param [Hash] opts the optional parameters # @option opts [String] :expand evaluatorId # @return [Array<(Evaluation, Fixnum, Hash)>] Evaluation data, response status code and response headers def delete_conversations_conversation_id_evaluations_evaluation_id_with_http_info(conversation_id, evaluation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#delete_conversations_conversation_id_evaluations_evaluation_id ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling delete_conversations_conversation_id_evaluations_evaluation_id" if conversation_id.nil? # verify the required parameter 'evaluation_id' is set fail "Missing the required parameter 'evaluation_id' when calling delete_conversations_conversation_id_evaluations_evaluation_id" if evaluation_id.nil? # resource path local_var_path = "/api/v2/quality/conversations/{conversationId}/evaluations/{evaluationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'evaluationId' + '}', evaluation_id.to_s) # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'Evaluation') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#delete_conversations_conversation_id_evaluations_evaluation_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete an evaluation form. # # @param form_id Form ID # @param [Hash] opts the optional parameters # @return [String] def delete_forms_form_id(form_id, opts = {}) data, status_code, headers = delete_forms_form_id_with_http_info(form_id, opts) return data end # Delete an evaluation form. # # @param form_id Form ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_forms_form_id_with_http_info(form_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#delete_forms_form_id ..." end # verify the required parameter 'form_id' is set fail "Missing the required parameter 'form_id' when calling delete_forms_form_id" if form_id.nil? # resource path local_var_path = "/api/v2/quality/forms/{formId}".sub('{format}','json').sub('{' + 'formId' + '}', form_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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: QualityApi#delete_forms_form_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete keyword sets # Bulk delete of keyword sets; this will only delete the keyword sets that match the ids specified in the query param. # @param ids A comma-delimited list of valid KeywordSet ids # @param [Hash] opts the optional parameters # @return [String] def delete_keywordsets(ids, opts = {}) data, status_code, headers = delete_keywordsets_with_http_info(ids, opts) return data end # Delete keyword sets # Bulk delete of keyword sets; this will only delete the keyword sets that match the ids specified in the query param. # @param ids A comma-delimited list of valid KeywordSet ids # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_keywordsets_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#delete_keywordsets ..." end # verify the required parameter 'ids' is set fail "Missing the required parameter 'ids' when calling delete_keywordsets" if ids.nil? # resource path local_var_path = "/api/v2/quality/keywordsets".sub('{format}','json') # query parameters query_params = {} query_params[:'ids'] = ids # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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: QualityApi#delete_keywordsets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a keywordSet by id. # # @param keyword_set_id KeywordSet ID # @param [Hash] opts the optional parameters # @return [nil] def delete_keywordsets_keywordset_id(keyword_set_id, opts = {}) delete_keywordsets_keywordset_id_with_http_info(keyword_set_id, opts) return nil end # Delete a keywordSet by id. # # @param keyword_set_id KeywordSet ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_keywordsets_keywordset_id_with_http_info(keyword_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#delete_keywordsets_keywordset_id ..." end # verify the required parameter 'keyword_set_id' is set fail "Missing the required parameter 'keyword_set_id' when calling delete_keywordsets_keywordset_id" if keyword_set_id.nil? # resource path local_var_path = "/api/v2/quality/keywordsets/{keywordSetId}".sub('{format}','json').sub('{' + 'keywordSetId' + '}', keyword_set_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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: QualityApi#delete_keywordsets_keywordset_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets a list of Agent Activities # Including the number of evaluations and average evaluation score # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [DateTime] :start_time Start time of agent activity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @option opts [DateTime] :end_time End time of agent activity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @option opts [Array] :agent_user_id user id of agent requested # @option opts [String] :evaluator_user_id user id of the evaluator # @option opts [String] :name name # @option opts [String] :group group id # @return [AgentActivityEntityListing] def get_agents_activity(opts = {}) data, status_code, headers = get_agents_activity_with_http_info(opts) return data end # Gets a list of Agent Activities # Including the number of evaluations and average evaluation score # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [DateTime] :start_time Start time of agent activity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @option opts [DateTime] :end_time End time of agent activity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @option opts [Array] :agent_user_id user id of agent requested # @option opts [String] :evaluator_user_id user id of the evaluator # @option opts [String] :name name # @option opts [String] :group group id # @return [Array<(AgentActivityEntityListing, Fixnum, Hash)>] AgentActivityEntityListing data, response status code and response headers def get_agents_activity_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_agents_activity ..." end # resource path local_var_path = "/api/v2/quality/agents/activity".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[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] query_params[:'startTime'] = opts[:'start_time'] if opts[:'start_time'] query_params[:'endTime'] = opts[:'end_time'] if opts[:'end_time'] query_params[:'agentUserId'] = @api_client.build_collection_param(opts[:'agent_user_id'], :multi) if opts[:'agent_user_id'] query_params[:'evaluatorUserId'] = opts[:'evaluator_user_id'] if opts[:'evaluator_user_id'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'group'] = opts[:'group'] if opts[:'group'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'AgentActivityEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_agents_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the list of calibrations # # @param calibrator_id user id of calibrator # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :conversation_id conversation id # @option opts [DateTime] :start_time Beginning of the calibration query. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @option opts [DateTime] :end_time end of the calibration query. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @return [CalibrationEntityListing] def get_calibrations(calibrator_id, opts = {}) data, status_code, headers = get_calibrations_with_http_info(calibrator_id, opts) return data end # Get the list of calibrations # # @param calibrator_id user id of calibrator # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :conversation_id conversation id # @option opts [DateTime] :start_time Beginning of the calibration query. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @option opts [DateTime] :end_time end of the calibration query. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @return [Array<(CalibrationEntityListing, Fixnum, Hash)>] CalibrationEntityListing data, response status code and response headers def get_calibrations_with_http_info(calibrator_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_calibrations ..." end # verify the required parameter 'calibrator_id' is set fail "Missing the required parameter 'calibrator_id' when calling get_calibrations" if calibrator_id.nil? # resource path local_var_path = "/api/v2/quality/calibrations".sub('{format}','json') # query parameters query_params = {} query_params[:'calibratorId'] = calibrator_id query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] query_params[:'conversationId'] = opts[:'conversation_id'] if opts[:'conversation_id'] query_params[:'startTime'] = opts[:'start_time'] if opts[:'start_time'] query_params[:'endTime'] = opts[:'end_time'] if opts[:'end_time'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'CalibrationEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_calibrations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a calibration by id. # # @param calibration_id Calibration ID # @param calibrator_id calibratorId # @param [Hash] opts the optional parameters # @return [Calibration] def get_calibrations_calibration_id(calibration_id, calibrator_id, opts = {}) data, status_code, headers = get_calibrations_calibration_id_with_http_info(calibration_id, calibrator_id, opts) return data end # Get a calibration by id. # # @param calibration_id Calibration ID # @param calibrator_id calibratorId # @param [Hash] opts the optional parameters # @return [Array<(Calibration, Fixnum, Hash)>] Calibration data, response status code and response headers def get_calibrations_calibration_id_with_http_info(calibration_id, calibrator_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_calibrations_calibration_id ..." end # verify the required parameter 'calibration_id' is set fail "Missing the required parameter 'calibration_id' when calling get_calibrations_calibration_id" if calibration_id.nil? # verify the required parameter 'calibrator_id' is set fail "Missing the required parameter 'calibrator_id' when calling get_calibrations_calibration_id" if calibrator_id.nil? # resource path local_var_path = "/api/v2/quality/calibrations/{calibrationId}".sub('{format}','json').sub('{' + 'calibrationId' + '}', calibration_id.to_s) # query parameters query_params = {} query_params[:'calibratorId'] = calibrator_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'Calibration') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_calibrations_calibration_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get audits for conversation or recording # # @param conversation_id Conversation ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :recording_id id of the recording # @option opts [String] :entity_type entity type options: Recording, Calibration, Evaluation, Annotation (default to RECORDING) # @return [QualityAuditPage] def get_conversations_conversation_id_audits(conversation_id, opts = {}) data, status_code, headers = get_conversations_conversation_id_audits_with_http_info(conversation_id, opts) return data end # Get audits for conversation or recording # # @param conversation_id Conversation ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :recording_id id of the recording # @option opts [String] :entity_type entity type options: Recording, Calibration, Evaluation, Annotation # @return [Array<(QualityAuditPage, Fixnum, Hash)>] QualityAuditPage data, response status code and response headers def get_conversations_conversation_id_audits_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_conversations_conversation_id_audits ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversations_conversation_id_audits" if conversation_id.nil? # resource path local_var_path = "/api/v2/quality/conversations/{conversationId}/audits".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] query_params[:'recordingId'] = opts[:'recording_id'] if opts[:'recording_id'] query_params[:'entityType'] = opts[:'entity_type'] if opts[:'entity_type'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'QualityAuditPage') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_conversations_conversation_id_audits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get an evaluation # # @param conversation_id # @param evaluation_id # @param [Hash] opts the optional parameters # @option opts [String] :expand agent, evaluator, evaluationForm # @return [Evaluation] def get_conversations_conversation_id_evaluations_evaluation_id(conversation_id, evaluation_id, opts = {}) data, status_code, headers = get_conversations_conversation_id_evaluations_evaluation_id_with_http_info(conversation_id, evaluation_id, opts) return data end # Get an evaluation # # @param conversation_id # @param evaluation_id # @param [Hash] opts the optional parameters # @option opts [String] :expand agent, evaluator, evaluationForm # @return [Array<(Evaluation, Fixnum, Hash)>] Evaluation data, response status code and response headers def get_conversations_conversation_id_evaluations_evaluation_id_with_http_info(conversation_id, evaluation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_conversations_conversation_id_evaluations_evaluation_id ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversations_conversation_id_evaluations_evaluation_id" if conversation_id.nil? # verify the required parameter 'evaluation_id' is set fail "Missing the required parameter 'evaluation_id' when calling get_conversations_conversation_id_evaluations_evaluation_id" if evaluation_id.nil? # resource path local_var_path = "/api/v2/quality/conversations/{conversationId}/evaluations/{evaluationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'evaluationId' + '}', evaluation_id.to_s) # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'Evaluation') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_conversations_conversation_id_evaluations_evaluation_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Queries Evaluations and returns a paged list # Query params must include one of conversationId, evaluatorUserId, or agentUserId # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :conversation_id conversationId specified # @option opts [String] :agent_user_id user id of the agent # @option opts [String] :evaluator_user_id evaluator user id # @option opts [String] :queue_id queue id # @option opts [String] :start_time start time of the evaluation query # @option opts [String] :end_time end time of the evaluation query # @option opts [Array] :evaluation_state evaluation state options: Pending, InProgress, Finished # @option opts [BOOLEAN] :is_released the evaluation has been released # @option opts [BOOLEAN] :agent_has_read agent has the evaluation # @option opts [BOOLEAN] :expand_answer_total_scores get the total scores for evaluations # @option opts [Integer] :maximum maximum # @return [EvaluationEntityListing] def get_evaluations_query(opts = {}) data, status_code, headers = get_evaluations_query_with_http_info(opts) return data end # Queries Evaluations and returns a paged list # Query params must include one of conversationId, evaluatorUserId, or agentUserId # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :conversation_id conversationId specified # @option opts [String] :agent_user_id user id of the agent # @option opts [String] :evaluator_user_id evaluator user id # @option opts [String] :queue_id queue id # @option opts [String] :start_time start time of the evaluation query # @option opts [String] :end_time end time of the evaluation query # @option opts [Array] :evaluation_state evaluation state options: Pending, InProgress, Finished # @option opts [BOOLEAN] :is_released the evaluation has been released # @option opts [BOOLEAN] :agent_has_read agent has the evaluation # @option opts [BOOLEAN] :expand_answer_total_scores get the total scores for evaluations # @option opts [Integer] :maximum maximum # @return [Array<(EvaluationEntityListing, Fixnum, Hash)>] EvaluationEntityListing data, response status code and response headers def get_evaluations_query_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_evaluations_query ..." end # resource path local_var_path = "/api/v2/quality/evaluations/query".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[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] query_params[:'conversationId'] = opts[:'conversation_id'] if opts[:'conversation_id'] query_params[:'agentUserId'] = opts[:'agent_user_id'] if opts[:'agent_user_id'] query_params[:'evaluatorUserId'] = opts[:'evaluator_user_id'] if opts[:'evaluator_user_id'] query_params[:'queueId'] = opts[:'queue_id'] if opts[:'queue_id'] query_params[:'startTime'] = opts[:'start_time'] if opts[:'start_time'] query_params[:'endTime'] = opts[:'end_time'] if opts[:'end_time'] query_params[:'evaluationState'] = @api_client.build_collection_param(opts[:'evaluation_state'], :multi) if opts[:'evaluation_state'] query_params[:'isReleased'] = opts[:'is_released'] if opts[:'is_released'] query_params[:'agentHasRead'] = opts[:'agent_has_read'] if opts[:'agent_has_read'] query_params[:'expandAnswerTotalScores'] = opts[:'expand_answer_total_scores'] if opts[:'expand_answer_total_scores'] query_params[:'maximum'] = opts[:'maximum'] if opts[:'maximum'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'EvaluationEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_evaluations_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get an evaluator activity # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [DateTime] :start_time The start time specified. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @option opts [DateTime] :end_time The end time specified. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @option opts [String] :name Evaluator name # @option opts [Array] :permission permission strings # @option opts [String] :group group id # @return [EvaluatorActivityEntityListing] def get_evaluators_activity(opts = {}) data, status_code, headers = get_evaluators_activity_with_http_info(opts) return data end # Get an evaluator activity # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [DateTime] :start_time The start time specified. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @option opts [DateTime] :end_time The end time specified. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ # @option opts [String] :name Evaluator name # @option opts [Array] :permission permission strings # @option opts [String] :group group id # @return [Array<(EvaluatorActivityEntityListing, Fixnum, Hash)>] EvaluatorActivityEntityListing data, response status code and response headers def get_evaluators_activity_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_evaluators_activity ..." end # resource path local_var_path = "/api/v2/quality/evaluators/activity".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[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] query_params[:'startTime'] = opts[:'start_time'] if opts[:'start_time'] query_params[:'endTime'] = opts[:'end_time'] if opts[:'end_time'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'permission'] = @api_client.build_collection_param(opts[:'permission'], :multi) if opts[:'permission'] query_params[:'group'] = opts[:'group'] if opts[:'group'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'EvaluatorActivityEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_evaluators_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the list of evaluation forms # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :expand Expand # @option opts [String] :name Name # @return [EvaluationFormEntityListing] def get_forms(opts = {}) data, status_code, headers = get_forms_with_http_info(opts) return data end # Get the list of evaluation forms # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :expand Expand # @option opts [String] :name Name # @return [Array<(EvaluationFormEntityListing, Fixnum, Hash)>] EvaluationFormEntityListing data, response status code and response headers def get_forms_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_forms ..." end # resource path local_var_path = "/api/v2/quality/forms".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[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] query_params[:'name'] = opts[:'name'] if opts[:'name'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'EvaluationFormEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_forms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get an evaluation form # # @param form_id Form ID # @param [Hash] opts the optional parameters # @return [EvaluationForm] def get_forms_form_id(form_id, opts = {}) data, status_code, headers = get_forms_form_id_with_http_info(form_id, opts) return data end # Get an evaluation form # # @param form_id Form ID # @param [Hash] opts the optional parameters # @return [Array<(EvaluationForm, Fixnum, Hash)>] EvaluationForm data, response status code and response headers def get_forms_form_id_with_http_info(form_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_forms_form_id ..." end # verify the required parameter 'form_id' is set fail "Missing the required parameter 'form_id' when calling get_forms_form_id" if form_id.nil? # resource path local_var_path = "/api/v2/quality/forms/{formId}".sub('{format}','json').sub('{' + 'formId' + '}', form_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'EvaluationForm') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_forms_form_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets all the revisions for a specific evaluation. # # @param form_id Form ID # @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) # @return [EvaluationFormEntityListing] def get_forms_form_id_versions(form_id, opts = {}) data, status_code, headers = get_forms_form_id_versions_with_http_info(form_id, opts) return data end # Gets all the revisions for a specific evaluation. # # @param form_id Form ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(EvaluationFormEntityListing, Fixnum, Hash)>] EvaluationFormEntityListing data, response status code and response headers def get_forms_form_id_versions_with_http_info(form_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_forms_form_id_versions ..." end # verify the required parameter 'form_id' is set fail "Missing the required parameter 'form_id' when calling get_forms_form_id_versions" if form_id.nil? # resource path local_var_path = "/api/v2/quality/forms/{formId}/versions".sub('{format}','json').sub('{' + 'formId' + '}', form_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'EvaluationFormEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_forms_form_id_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the list of keyword sets # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :name the keyword set name - used for filtering results in searches. # @return [KeywordSetEntityListing] def get_keywordsets(opts = {}) data, status_code, headers = get_keywordsets_with_http_info(opts) return data end # Get the list of keyword sets # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :name the keyword set name - used for filtering results in searches. # @return [Array<(KeywordSetEntityListing, Fixnum, Hash)>] KeywordSetEntityListing data, response status code and response headers def get_keywordsets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_keywordsets ..." end # resource path local_var_path = "/api/v2/quality/keywordsets".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[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] query_params[:'name'] = opts[:'name'] if opts[:'name'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'KeywordSetEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_keywordsets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a keywordSet by id. # # @param keyword_set_id KeywordSet ID # @param [Hash] opts the optional parameters # @return [KeywordSet] def get_keywordsets_keywordset_id(keyword_set_id, opts = {}) data, status_code, headers = get_keywordsets_keywordset_id_with_http_info(keyword_set_id, opts) return data end # Get a keywordSet by id. # # @param keyword_set_id KeywordSet ID # @param [Hash] opts the optional parameters # @return [Array<(KeywordSet, Fixnum, Hash)>] KeywordSet data, response status code and response headers def get_keywordsets_keywordset_id_with_http_info(keyword_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_keywordsets_keywordset_id ..." end # verify the required parameter 'keyword_set_id' is set fail "Missing the required parameter 'keyword_set_id' when calling get_keywordsets_keywordset_id" if keyword_set_id.nil? # resource path local_var_path = "/api/v2/quality/keywordsets/{keywordSetId}".sub('{format}','json').sub('{' + 'keywordSetId' + '}', keyword_set_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'KeywordSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_keywordsets_keywordset_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the published evaluation forms. # # @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] :name Name # @return [EvaluationFormEntityListing] def get_publishedforms(opts = {}) data, status_code, headers = get_publishedforms_with_http_info(opts) return data end # Get the published evaluation forms. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :name Name # @return [Array<(EvaluationFormEntityListing, Fixnum, Hash)>] EvaluationFormEntityListing data, response status code and response headers def get_publishedforms_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_publishedforms ..." end # resource path local_var_path = "/api/v2/quality/publishedforms".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[:'name'] = opts[:'name'] if opts[:'name'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'EvaluationFormEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_publishedforms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the published evaluation forms. # # @param form_id Form ID # @param [Hash] opts the optional parameters # @return [EvaluationForm] def get_publishedforms_form_id(form_id, opts = {}) data, status_code, headers = get_publishedforms_form_id_with_http_info(form_id, opts) return data end # Get the published evaluation forms. # # @param form_id Form ID # @param [Hash] opts the optional parameters # @return [Array<(EvaluationForm, Fixnum, Hash)>] EvaluationForm data, response status code and response headers def get_publishedforms_form_id_with_http_info(form_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_publishedforms_form_id ..." end # verify the required parameter 'form_id' is set fail "Missing the required parameter 'form_id' when calling get_publishedforms_form_id" if form_id.nil? # resource path local_var_path = "/api/v2/quality/publishedforms/{formId}".sub('{format}','json').sub('{' + 'formId' + '}', form_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'EvaluationForm') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_publishedforms_form_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a calibration # # @param [Hash] opts the optional parameters # @option opts [Calibration] :body calibration # @option opts [String] :expand calibratorId # @return [Calibration] def post_calibrations(opts = {}) data, status_code, headers = post_calibrations_with_http_info(opts) return data end # Create a calibration # # @param [Hash] opts the optional parameters # @option opts [Calibration] :body calibration # @option opts [String] :expand calibratorId # @return [Array<(Calibration, Fixnum, Hash)>] Calibration data, response status code and response headers def post_calibrations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#post_calibrations ..." end # resource path local_var_path = "/api/v2/quality/calibrations".sub('{format}','json') # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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, :return_type => 'Calibration') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#post_calibrations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create an evaluation # # @param conversation_id # @param [Hash] opts the optional parameters # @option opts [Evaluation] :body evaluation # @option opts [String] :expand evaluatorId # @return [Evaluation] def post_conversations_conversation_id_evaluations(conversation_id, opts = {}) data, status_code, headers = post_conversations_conversation_id_evaluations_with_http_info(conversation_id, opts) return data end # Create an evaluation # # @param conversation_id # @param [Hash] opts the optional parameters # @option opts [Evaluation] :body evaluation # @option opts [String] :expand evaluatorId # @return [Array<(Evaluation, Fixnum, Hash)>] Evaluation data, response status code and response headers def post_conversations_conversation_id_evaluations_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#post_conversations_conversation_id_evaluations ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling post_conversations_conversation_id_evaluations" if conversation_id.nil? # resource path local_var_path = "/api/v2/quality/conversations/{conversationId}/evaluations".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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, :return_type => 'Evaluation') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#post_conversations_conversation_id_evaluations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query for evaluation aggregates # # @param [Hash] opts the optional parameters # @option opts [AggregationQuery] :body query # @return [AggregateQueryResponse] def post_evaluations_aggregates_query(opts = {}) data, status_code, headers = post_evaluations_aggregates_query_with_http_info(opts) return data end # Query for evaluation aggregates # # @param [Hash] opts the optional parameters # @option opts [AggregationQuery] :body query # @return [Array<(AggregateQueryResponse, Fixnum, Hash)>] AggregateQueryResponse data, response status code and response headers def post_evaluations_aggregates_query_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#post_evaluations_aggregates_query ..." end # resource path local_var_path = "/api/v2/analytics/evaluations/aggregates/query".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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, :return_type => 'AggregateQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#post_evaluations_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Score evaluation # # @param [Hash] opts the optional parameters # @option opts [EvaluationFormAndScoringSet] :body evaluationAndScoringSet # @return [EvaluationScoringSet] def post_evaluations_scoring(opts = {}) data, status_code, headers = post_evaluations_scoring_with_http_info(opts) return data end # Score evaluation # # @param [Hash] opts the optional parameters # @option opts [EvaluationFormAndScoringSet] :body evaluationAndScoringSet # @return [Array<(EvaluationScoringSet, Fixnum, Hash)>] EvaluationScoringSet data, response status code and response headers def post_evaluations_scoring_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#post_evaluations_scoring ..." end # resource path local_var_path = "/api/v2/quality/evaluations/scoring".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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, :return_type => 'EvaluationScoringSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#post_evaluations_scoring\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create an evaluation form. # # @param [Hash] opts the optional parameters # @option opts [EvaluationForm] :body # @return [EvaluationForm] def post_forms(opts = {}) data, status_code, headers = post_forms_with_http_info(opts) return data end # Create an evaluation form. # # @param [Hash] opts the optional parameters # @option opts [EvaluationForm] :body # @return [Array<(EvaluationForm, Fixnum, Hash)>] EvaluationForm data, response status code and response headers def post_forms_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#post_forms ..." end # resource path local_var_path = "/api/v2/quality/forms".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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, :return_type => 'EvaluationForm') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#post_forms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a Keyword Set # # @param [Hash] opts the optional parameters # @option opts [KeywordSet] :body keywordSet # @option opts [String] :expand queueId # @return [KeywordSet] def post_keywordsets(opts = {}) data, status_code, headers = post_keywordsets_with_http_info(opts) return data end # Create a Keyword Set # # @param [Hash] opts the optional parameters # @option opts [KeywordSet] :body keywordSet # @option opts [String] :expand queueId # @return [Array<(KeywordSet, Fixnum, Hash)>] KeywordSet data, response status code and response headers def post_keywordsets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#post_keywordsets ..." end # resource path local_var_path = "/api/v2/quality/keywordsets".sub('{format}','json') # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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, :return_type => 'KeywordSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#post_keywordsets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Publish an evaluation form. # # @param [Hash] opts the optional parameters # @option opts [EvaluationForm] :body # @return [EvaluationForm] def post_publishedforms(opts = {}) data, status_code, headers = post_publishedforms_with_http_info(opts) return data end # Publish an evaluation form. # # @param [Hash] opts the optional parameters # @option opts [EvaluationForm] :body # @return [Array<(EvaluationForm, Fixnum, Hash)>] EvaluationForm data, response status code and response headers def post_publishedforms_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#post_publishedforms ..." end # resource path local_var_path = "/api/v2/quality/publishedforms".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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, :return_type => 'EvaluationForm') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#post_publishedforms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a calibration to the specified calibration via PUT. Editable fields include: evaluators, expertEvaluator, and scoringIndex # # @param calibration_id Calibration ID # @param [Hash] opts the optional parameters # @option opts [Calibration] :body Calibration # @return [Calibration] def put_calibrations_calibration_id(calibration_id, opts = {}) data, status_code, headers = put_calibrations_calibration_id_with_http_info(calibration_id, opts) return data end # Update a calibration to the specified calibration via PUT. Editable fields include: evaluators, expertEvaluator, and scoringIndex # # @param calibration_id Calibration ID # @param [Hash] opts the optional parameters # @option opts [Calibration] :body Calibration # @return [Array<(Calibration, Fixnum, Hash)>] Calibration data, response status code and response headers def put_calibrations_calibration_id_with_http_info(calibration_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#put_calibrations_calibration_id ..." end # verify the required parameter 'calibration_id' is set fail "Missing the required parameter 'calibration_id' when calling put_calibrations_calibration_id" if calibration_id.nil? # resource path local_var_path = "/api/v2/quality/calibrations/{calibrationId}".sub('{format}','json').sub('{' + 'calibrationId' + '}', calibration_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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(: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 => 'Calibration') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#put_calibrations_calibration_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an evaluation # # @param conversation_id # @param evaluation_id # @param [Hash] opts the optional parameters # @option opts [Evaluation] :body evaluation # @option opts [String] :expand evaluatorId # @return [Evaluation] def put_conversations_conversation_id_evaluations_evaluation_id(conversation_id, evaluation_id, opts = {}) data, status_code, headers = put_conversations_conversation_id_evaluations_evaluation_id_with_http_info(conversation_id, evaluation_id, opts) return data end # Update an evaluation # # @param conversation_id # @param evaluation_id # @param [Hash] opts the optional parameters # @option opts [Evaluation] :body evaluation # @option opts [String] :expand evaluatorId # @return [Array<(Evaluation, Fixnum, Hash)>] Evaluation data, response status code and response headers def put_conversations_conversation_id_evaluations_evaluation_id_with_http_info(conversation_id, evaluation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#put_conversations_conversation_id_evaluations_evaluation_id ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling put_conversations_conversation_id_evaluations_evaluation_id" if conversation_id.nil? # verify the required parameter 'evaluation_id' is set fail "Missing the required parameter 'evaluation_id' when calling put_conversations_conversation_id_evaluations_evaluation_id" if evaluation_id.nil? # resource path local_var_path = "/api/v2/quality/conversations/{conversationId}/evaluations/{evaluationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'evaluationId' + '}', evaluation_id.to_s) # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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(: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 => 'Evaluation') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#put_conversations_conversation_id_evaluations_evaluation_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an evaluation form. # # @param form_id Form ID # @param [Hash] opts the optional parameters # @option opts [EvaluationForm] :body # @return [EvaluationForm] def put_forms_form_id(form_id, opts = {}) data, status_code, headers = put_forms_form_id_with_http_info(form_id, opts) return data end # Update an evaluation form. # # @param form_id Form ID # @param [Hash] opts the optional parameters # @option opts [EvaluationForm] :body # @return [Array<(EvaluationForm, Fixnum, Hash)>] EvaluationForm data, response status code and response headers def put_forms_form_id_with_http_info(form_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#put_forms_form_id ..." end # verify the required parameter 'form_id' is set fail "Missing the required parameter 'form_id' when calling put_forms_form_id" if form_id.nil? # resource path local_var_path = "/api/v2/quality/forms/{formId}".sub('{format}','json').sub('{' + 'formId' + '}', form_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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(: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 => 'EvaluationForm') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#put_forms_form_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a keywordSet to the specified keywordSet via PUT. # # @param keyword_set_id KeywordSet ID # @param [Hash] opts the optional parameters # @option opts [KeywordSet] :body keywordSet # @return [KeywordSet] def put_keywordsets_keywordset_id(keyword_set_id, opts = {}) data, status_code, headers = put_keywordsets_keywordset_id_with_http_info(keyword_set_id, opts) return data end # Update a keywordSet to the specified keywordSet via PUT. # # @param keyword_set_id KeywordSet ID # @param [Hash] opts the optional parameters # @option opts [KeywordSet] :body keywordSet # @return [Array<(KeywordSet, Fixnum, Hash)>] KeywordSet data, response status code and response headers def put_keywordsets_keywordset_id_with_http_info(keyword_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#put_keywordsets_keywordset_id ..." end # verify the required parameter 'keyword_set_id' is set fail "Missing the required parameter 'keyword_set_id' when calling put_keywordsets_keywordset_id" if keyword_set_id.nil? # resource path local_var_path = "/api/v2/quality/keywordsets/{keywordSetId}".sub('{format}','json').sub('{' + 'keywordSetId' + '}', keyword_set_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_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(: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 => 'KeywordSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#put_keywordsets_keywordset_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end