require "uri" module PureCloud class QualityApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Get all of a Conversation's Recordings. # # @param conversation_id Conversation ID # @param [Hash] opts the optional parameters # @option opts [Integer] :max_wait_ms The maximum number of milliseconds to wait for the recording to be ready. # @option opts [String] :format_id The desired format (WEBM, WAV, etc.) # @return [Array] def get_conversation_recordings(conversation_id, opts = {}) data, status_code, headers = get_conversation_recordings_with_http_info(conversation_id, opts) return data end # Get all of a Conversation's Recordings. # # @param conversation_id Conversation ID # @param [Hash] opts the optional parameters # @option opts [Integer] :max_wait_ms The maximum number of milliseconds to wait for the recording to be ready. # @option opts [String] :format_id The desired format (WEBM, WAV, etc.) # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_conversation_recordings_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_conversation_recordings ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversation_recordings" if conversation_id.nil? if opts[:'format_id'] && !['WEBM', 'WAV'].include?(opts[:'format_id']) fail 'invalid value for "format_id", must be one of WEBM, WAV' end # resource path path = "/api/v1/conversations/{conversationId}/recordings".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} query_params[:'maxWaitMs'] = opts[:'max_wait_ms'] if opts[:'max_wait_ms'] query_params[:'formatId'] = opts[:'format_id'] if opts[:'format_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, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_conversation_recordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets a specific recording. # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @option opts [Integer] :max_wait_ms The maximum number of milliseconds to wait for completion. # @option opts [String] :format_id The desired format (WEBM, WAV, etc.) # @option opts [BOOLEAN] :download requesting a download format of the recording # @option opts [String] :file_name the name of the downloaded fileName # @return [nil] def get_conversation_recording(conversation_id, recording_id, opts = {}) get_conversation_recording_with_http_info(conversation_id, recording_id, opts) return nil end # Gets a specific recording. # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @option opts [Integer] :max_wait_ms The maximum number of milliseconds to wait for completion. # @option opts [String] :format_id The desired format (WEBM, WAV, etc.) # @option opts [BOOLEAN] :download requesting a download format of the recording # @option opts [String] :file_name the name of the downloaded fileName # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def get_conversation_recording_with_http_info(conversation_id, recording_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_conversation_recording ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversation_recording" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling get_conversation_recording" if recording_id.nil? if opts[:'format_id'] && !['WEBM', 'WAV'].include?(opts[:'format_id']) fail 'invalid value for "format_id", must be one of WEBM, WAV' end # resource path path = "/api/v1/conversations/{conversationId}/recordings/{recordingId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_id.to_s) # query parameters query_params = {} query_params[:'maxWaitMs'] = opts[:'max_wait_ms'] if opts[:'max_wait_ms'] query_params[:'formatId'] = opts[:'format_id'] if opts[:'format_id'] query_params[:'download'] = opts[:'download'] if opts[:'download'] query_params[:'fileName'] = opts[:'file_name'] if opts[:'file_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, 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#get_conversation_recording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Updates the retention records on a recording. # Currently supports updating and removing both archive and delete dates for eligible recordings. A request to change the archival date of an archived recording will result in a restoration of the recording until the new date set. Use of the query parameter 'restoreDays' is deprecated and will be removed in the next major version release. If 'restoreDays' is provided, no attempt at updating other retention data will be made. To migrate to the new usage, issuing a request with restoreDays=10 would instead set the archiveDate's time stamp in the PUT body to 10 days in the future. # @param conversation_id Conversation ID # @param recording_id Recording ID # @param body recording # @param [Hash] opts the optional parameters # @option opts [Integer] :restore_days The number of days the recording will be available before it is re-archived. Deprecated. # @return [nil] def put_conversation_recording(conversation_id, recording_id, body, opts = {}) put_conversation_recording_with_http_info(conversation_id, recording_id, body, opts) return nil end # Updates the retention records on a recording. # Currently supports updating and removing both archive and delete dates for eligible recordings. A request to change the archival date of an archived recording will result in a restoration of the recording until the new date set. Use of the query parameter 'restoreDays' is deprecated and will be removed in the next major version release. If 'restoreDays' is provided, no attempt at updating other retention data will be made. To migrate to the new usage, issuing a request with restoreDays=10 would instead set the archiveDate's time stamp in the PUT body to 10 days in the future. # @param conversation_id Conversation ID # @param recording_id Recording ID # @param body recording # @param [Hash] opts the optional parameters # @option opts [Integer] :restore_days The number of days the recording will be available before it is re-archived. Deprecated. # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def put_conversation_recording_with_http_info(conversation_id, recording_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#put_conversation_recording ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling put_conversation_recording" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling put_conversation_recording" if recording_id.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling put_conversation_recording" if body.nil? # resource path path = "/api/v1/conversations/{conversationId}/recordings/{recordingId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_id.to_s) # query parameters query_params = {} query_params[:'restoreDays'] = opts[:'restore_days'] if opts[:'restore_days'] # 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(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, 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#put_conversation_recording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get annotations for recording # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @return [Array] def get_conversation_recording_annotations(conversation_id, recording_id, opts = {}) data, status_code, headers = get_conversation_recording_annotations_with_http_info(conversation_id, recording_id, opts) return data end # Get annotations for recording # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_conversation_recording_annotations_with_http_info(conversation_id, recording_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_conversation_recording_annotations ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversation_recording_annotations" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling get_conversation_recording_annotations" if recording_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/recordings/{recordingId}/annotations".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_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, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_conversation_recording_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @option opts [Annotation] :body annotation # @return [Annotation] def post_conversation_recording_annotations(conversation_id, recording_id, opts = {}) data, status_code, headers = post_conversation_recording_annotations_with_http_info(conversation_id, recording_id, opts) return data end # Create annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @option opts [Annotation] :body annotation # @return [Array<(Annotation, Fixnum, Hash)>] Annotation data, response status code and response headers def post_conversation_recording_annotations_with_http_info(conversation_id, recording_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#post_conversation_recording_annotations ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling post_conversation_recording_annotations" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling post_conversation_recording_annotations" if recording_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/recordings/{recordingId}/annotations".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_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(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Annotation') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#post_conversation_recording_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @return [Annotation] def get_conversation_recording_annotation(conversation_id, recording_id, annotation_id, opts = {}) data, status_code, headers = get_conversation_recording_annotation_with_http_info(conversation_id, recording_id, annotation_id, opts) return data end # Get annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @return [Array<(Annotation, Fixnum, Hash)>] Annotation data, response status code and response headers def get_conversation_recording_annotation_with_http_info(conversation_id, recording_id, annotation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_conversation_recording_annotation ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversation_recording_annotation" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling get_conversation_recording_annotation" if recording_id.nil? # verify the required parameter 'annotation_id' is set fail "Missing the required parameter 'annotation_id' when calling get_conversation_recording_annotation" if annotation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_id.to_s).sub('{' + 'annotationId' + '}', annotation_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, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Annotation') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#get_conversation_recording_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @option opts [Annotation] :body annotation # @return [Annotation] def put_conversation_recording_annotation(conversation_id, recording_id, annotation_id, opts = {}) data, status_code, headers = put_conversation_recording_annotation_with_http_info(conversation_id, recording_id, annotation_id, opts) return data end # Update annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @option opts [Annotation] :body annotation # @return [Array<(Annotation, Fixnum, Hash)>] Annotation data, response status code and response headers def put_conversation_recording_annotation_with_http_info(conversation_id, recording_id, annotation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#put_conversation_recording_annotation ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling put_conversation_recording_annotation" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling put_conversation_recording_annotation" if recording_id.nil? # verify the required parameter 'annotation_id' is set fail "Missing the required parameter 'annotation_id' when calling put_conversation_recording_annotation" if annotation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_id.to_s).sub('{' + 'annotationId' + '}', annotation_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, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Annotation') if @api_client.config.debugging @api_client.config.logger.debug "API called: QualityApi#put_conversation_recording_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @return [nil] def delete_conversation_recording_annotation(conversation_id, recording_id, annotation_id, opts = {}) delete_conversation_recording_annotation_with_http_info(conversation_id, recording_id, annotation_id, opts) return nil end # Delete annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_conversation_recording_annotation_with_http_info(conversation_id, recording_id, annotation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#delete_conversation_recording_annotation ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling delete_conversation_recording_annotation" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling delete_conversation_recording_annotation" if recording_id.nil? # verify the required parameter 'annotation_id' is set fail "Missing the required parameter 'annotation_id' when calling delete_conversation_recording_annotation" if annotation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_id.to_s).sub('{' + 'annotationId' + '}', annotation_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, 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_conversation_recording_annotation\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 # @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 [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 [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 path = "/api/v1/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[:'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, 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 [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] :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 # @option opts [String] :calibrator_id user id of calibrator # @return [CalibrationEntityListing] def get_calibrations(opts = {}) data, status_code, headers = get_calibrations_with_http_info(opts) return data end # Get the list of calibrations # # @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] :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 # @option opts [String] :calibrator_id user id of calibrator # @return [Array<(CalibrationEntityListing, Fixnum, Hash)>] CalibrationEntityListing data, response status code and response headers def get_calibrations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_calibrations ..." end # resource path path = "/api/v1/quality/calibrations".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[:'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'] query_params[:'calibratorId'] = opts[:'calibrator_id'] if opts[:'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, 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 # 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 path = "/api/v1/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, 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 # Get a calibration by id. # # @param calibration_id Calibration ID # @param [Hash] opts the optional parameters # @option opts [String] :calibrator_id calibratorId # @return [Calibration] def get_calibration(calibration_id, opts = {}) data, status_code, headers = get_calibration_with_http_info(calibration_id, opts) return data end # Get a calibration by id. # # @param calibration_id Calibration ID # @param [Hash] opts the optional parameters # @option opts [String] :calibrator_id calibratorId # @return [Array<(Calibration, Fixnum, Hash)>] Calibration data, response status code and response headers def get_calibration_with_http_info(calibration_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_calibration ..." end # verify the required parameter 'calibration_id' is set fail "Missing the required parameter 'calibration_id' when calling get_calibration" if calibration_id.nil? # resource path path = "/api/v1/quality/calibrations/{calibrationId}".sub('{format}','json').sub('{' + 'calibrationId' + '}', calibration_id.to_s) # query parameters query_params = {} query_params[:'calibratorId'] = opts[:'calibrator_id'] if opts[:'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, 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_calibration\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_calibration(calibration_id, opts = {}) data, status_code, headers = put_calibration_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_calibration_with_http_info(calibration_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#put_calibration ..." end # verify the required parameter 'calibration_id' is set fail "Missing the required parameter 'calibration_id' when calling put_calibration" if calibration_id.nil? # resource path path = "/api/v1/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, 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_calibration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a calibration by id. # # @param calibration_id Calibration ID # @param [Hash] opts the optional parameters # @option opts [String] :calibrator_id calibratorId # @return [Calibration] def delete_calibration(calibration_id, opts = {}) data, status_code, headers = delete_calibration_with_http_info(calibration_id, opts) return data end # Delete a calibration by id. # # @param calibration_id Calibration ID # @param [Hash] opts the optional parameters # @option opts [String] :calibrator_id calibratorId # @return [Array<(Calibration, Fixnum, Hash)>] Calibration data, response status code and response headers def delete_calibration_with_http_info(calibration_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#delete_calibration ..." end # verify the required parameter 'calibration_id' is set fail "Missing the required parameter 'calibration_id' when calling delete_calibration" if calibration_id.nil? # resource path path = "/api/v1/quality/calibrations/{calibrationId}".sub('{format}','json').sub('{' + 'calibrationId' + '}', calibration_id.to_s) # query parameters query_params = {} query_params[:'calibratorId'] = opts[:'calibrator_id'] if opts[:'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, 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_calibration\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 # @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] :recording_id id of the recording # @option opts [String] :entity_type entity type options: Recording, Calibration, Evaluation, Annotation # @return [QualityAuditPage] def get_conversation_audits(conversation_id, opts = {}) data, status_code, headers = get_conversation_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] :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_conversation_audits_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_conversation_audits ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversation_audits" if conversation_id.nil? # resource path path = "/api/v1/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[:'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, 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_conversation_audits\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_conversation_evaluations(conversation_id, opts = {}) data, status_code, headers = post_conversation_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_conversation_evaluations_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#post_conversation_evaluations ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling post_conversation_evaluations" if conversation_id.nil? # resource path path = "/api/v1/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, 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_conversation_evaluations\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_conversation_evaluation(conversation_id, evaluation_id, opts = {}) data, status_code, headers = get_conversation_evaluation_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_conversation_evaluation_with_http_info(conversation_id, evaluation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#get_conversation_evaluation ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversation_evaluation" if conversation_id.nil? # verify the required parameter 'evaluation_id' is set fail "Missing the required parameter 'evaluation_id' when calling get_conversation_evaluation" if evaluation_id.nil? # resource path path = "/api/v1/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, 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_conversation_evaluation\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_conversation_evaluation(conversation_id, evaluation_id, opts = {}) data, status_code, headers = put_conversation_evaluation_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_conversation_evaluation_with_http_info(conversation_id, evaluation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#put_conversation_evaluation ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling put_conversation_evaluation" if conversation_id.nil? # verify the required parameter 'evaluation_id' is set fail "Missing the required parameter 'evaluation_id' when calling put_conversation_evaluation" if evaluation_id.nil? # resource path path = "/api/v1/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, 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_conversation_evaluation\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_conversation_evaluation(conversation_id, evaluation_id, opts = {}) data, status_code, headers = delete_conversation_evaluation_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_conversation_evaluation_with_http_info(conversation_id, evaluation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#delete_conversation_evaluation ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling delete_conversation_evaluation" if conversation_id.nil? # verify the required parameter 'evaluation_id' is set fail "Missing the required parameter 'evaluation_id' when calling delete_conversation_evaluation" if evaluation_id.nil? # resource path path = "/api/v1/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, 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_conversation_evaluation\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 # @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] :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] :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 path = "/api/v1/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[:'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, 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 # Query evaluations # # @param [Hash] opts the optional parameters # @option opts [EvaluationQueryRequest] :body query # @option opts [String] :expand evaluator,agent # @return [EvaluationEntityListing] def post_evaluations_query(opts = {}) data, status_code, headers = post_evaluations_query_with_http_info(opts) return data end # Query evaluations # # @param [Hash] opts the optional parameters # @option opts [EvaluationQueryRequest] :body query # @option opts [String] :expand evaluator,agent # @return [Array<(EvaluationEntityListing, Fixnum, Hash)>] EvaluationEntityListing data, response status code and response headers def post_evaluations_query_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QualityApi#post_evaluations_query ..." end # resource path path = "/api/v1/quality/evaluations/query".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, 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#post_evaluations_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 path = "/api/v1/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, 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 # 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 [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 [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 path = "/api/v1/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[:'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, 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 end end