require "uri" module PureCloud class OrphanedRecordingsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Gets all orphan recordings # # @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 # @return [OrphanRecordingListing] def get_orphanrecordings(opts = {}) data, status_code, headers = get_orphanrecordings_with_http_info(opts) return data end # Gets all orphan recordings # # @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 # @return [Array<(OrphanRecordingListing, Fixnum, Hash)>] OrphanRecordingListing data, response status code and response headers def get_orphanrecordings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrphanedRecordingsApi#get_orphanrecordings ..." end # resource path path = "/api/v1/orphanrecordings".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'] # 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 => 'OrphanRecordingListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrphanedRecordingsApi#get_orphanrecordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets a single orphan recording # # @param orphan_id Orphan ID # @param [Hash] opts the optional parameters # @return [OrphanRecording] def get_orphanrecording(orphan_id, opts = {}) data, status_code, headers = get_orphanrecording_with_http_info(orphan_id, opts) return data end # Gets a single orphan recording # # @param orphan_id Orphan ID # @param [Hash] opts the optional parameters # @return [Array<(OrphanRecording, Fixnum, Hash)>] OrphanRecording data, response status code and response headers def get_orphanrecording_with_http_info(orphan_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrphanedRecordingsApi#get_orphanrecording ..." end # verify the required parameter 'orphan_id' is set fail "Missing the required parameter 'orphan_id' when calling get_orphanrecording" if orphan_id.nil? # resource path path = "/api/v1/orphanrecordings/{orphanId}".sub('{format}','json').sub('{' + 'orphanId' + '}', orphan_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 => 'OrphanRecording') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrphanedRecordingsApi#get_orphanrecording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # deletes a single orphan recording # # @param orphan_id Orphan ID # @param [Hash] opts the optional parameters # @return [OrphanRecording] def delete_orphanrecording(orphan_id, opts = {}) data, status_code, headers = delete_orphanrecording_with_http_info(orphan_id, opts) return data end # deletes a single orphan recording # # @param orphan_id Orphan ID # @param [Hash] opts the optional parameters # @return [Array<(OrphanRecording, Fixnum, Hash)>] OrphanRecording data, response status code and response headers def delete_orphanrecording_with_http_info(orphan_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrphanedRecordingsApi#delete_orphanrecording ..." end # verify the required parameter 'orphan_id' is set fail "Missing the required parameter 'orphan_id' when calling delete_orphanrecording" if orphan_id.nil? # resource path path = "/api/v1/orphanrecordings/{orphanId}".sub('{format}','json').sub('{' + 'orphanId' + '}', orphan_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, :return_type => 'OrphanRecording') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrphanedRecordingsApi#delete_orphanrecording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end