lib/purecloud/api/content_management_api.rb in purecloud-0.40.1 vs lib/purecloud/api/content_management_api.rb in purecloud-0.41.1

- old
+ new

@@ -1222,9 +1222,64 @@ @api_client.config.logger.debug "API called: ContentManagementApi#get_status_status_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Get usage details. + # + # @param [Hash] opts the optional parameters + # @return [Usage] + def get_usage(opts = {}) + data, status_code, headers = get_usage_with_http_info(opts) + return data + end + + # Get usage details. + # + # @param [Hash] opts the optional parameters + # @return [Array<(Usage, Fixnum, Hash)>] Usage data, response status code and response headers + def get_usage_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: ContentManagementApi#get_usage ..." + end + + # resource path + local_var_path = "/api/v2/contentmanagement/usage".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 = 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 => 'Usage') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentManagementApi#get_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a list of workspaces. # Specifying 'content' access will return all workspaces the user has document access to, while 'admin' access will return all group workspaces the user has administrative rights to. # @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)