lib/purecloud/api/attributes_api.rb in purecloud-0.63.1 vs lib/purecloud/api/attributes_api.rb in purecloud-0.64.1

- old
+ new

@@ -81,39 +81,38 @@ @api_client.config.logger.debug "API called: AttributesApi#delete_attribute_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Gets a list of existing attributes. + # Get details about an existing attribute. # + # @param attribute_id Attribute ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_number Page number (default to 1) - # @option opts [Integer] :page_size Page size (default to 25) - # @return [AttributeEntityListing] - def get(opts = {}) - data, status_code, headers = get_with_http_info(opts) + # @return [Attribute] + def get_attribute_id(attribute_id, opts = {}) + data, status_code, headers = get_attribute_id_with_http_info(attribute_id, opts) return data end - # Gets a list of existing attributes. + # Get details about an existing attribute. # + # @param attribute_id Attribute ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_number Page number - # @option opts [Integer] :page_size Page size - # @return [Array<(AttributeEntityListing, Fixnum, Hash)>] AttributeEntityListing data, response status code and response headers - def get_with_http_info(opts = {}) + # @return [Array<(Attribute, Fixnum, Hash)>] Attribute data, response status code and response headers + def get_attribute_id_with_http_info(attribute_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AttributesApi#get ..." + @api_client.config.logger.debug "Calling API: AttributesApi#get_attribute_id ..." end + # verify the required parameter 'attribute_id' is set + fail "Missing the required parameter 'attribute_id' when calling get_attribute_id" if attribute_id.nil? + # resource path - local_var_path = "/api/v2/attributes".sub('{format}','json') + local_var_path = "/api/v2/attributes/{attributeId}".sub('{format}','json').sub('{' + 'attributeId' + '}', attribute_id.to_s) # query parameters query_params = {} - query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] - query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -135,45 +134,46 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'AttributeEntityListing') + :return_type => 'Attribute') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AttributesApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AttributesApi#get_attribute_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get details about an existing attribute. + # Gets a list of existing attributes. # - # @param attribute_id Attribute ID # @param [Hash] opts the optional parameters - # @return [Attribute] - def get_attribute_id(attribute_id, opts = {}) - data, status_code, headers = get_attribute_id_with_http_info(attribute_id, opts) + # @option opts [Integer] :page_number Page number (default to 1) + # @option opts [Integer] :page_size Page size (default to 25) + # @return [AttributeEntityListing] + def get_attributes(opts = {}) + data, status_code, headers = get_attributes_with_http_info(opts) return data end - # Get details about an existing attribute. + # Gets a list of existing attributes. # - # @param attribute_id Attribute ID # @param [Hash] opts the optional parameters - # @return [Array<(Attribute, Fixnum, Hash)>] Attribute data, response status code and response headers - def get_attribute_id_with_http_info(attribute_id, opts = {}) + # @option opts [Integer] :page_number Page number + # @option opts [Integer] :page_size Page size + # @return [Array<(AttributeEntityListing, Fixnum, Hash)>] AttributeEntityListing data, response status code and response headers + def get_attributes_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AttributesApi#get_attribute_id ..." + @api_client.config.logger.debug "Calling API: AttributesApi#get_attributes ..." end - # verify the required parameter 'attribute_id' is set - fail "Missing the required parameter 'attribute_id' when calling get_attribute_id" if attribute_id.nil? - # resource path - local_var_path = "/api/v2/attributes/{attributeId}".sub('{format}','json').sub('{' + 'attributeId' + '}', attribute_id.to_s) + local_var_path = "/api/v2/attributes".sub('{format}','json') # query parameters query_params = {} + query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] + query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -195,39 +195,39 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'Attribute') + :return_type => 'AttributeEntityListing') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AttributesApi#get_attribute_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AttributesApi#get_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create an attribute. # # @param body Attribute # @param [Hash] opts the optional parameters # @return [Attribute] - def post(body, opts = {}) - data, status_code, headers = post_with_http_info(body, opts) + def post_attributes(body, opts = {}) + data, status_code, headers = post_attributes_with_http_info(body, opts) return data end # Create an attribute. # # @param body Attribute # @param [Hash] opts the optional parameters # @return [Array<(Attribute, Fixnum, Hash)>] Attribute data, response status code and response headers - def post_with_http_info(body, opts = {}) + def post_attributes_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AttributesApi#post ..." + @api_client.config.logger.debug "Calling API: AttributesApi#post_attributes ..." end # verify the required parameter 'body' is set - fail "Missing the required parameter 'body' when calling post" if body.nil? + fail "Missing the required parameter 'body' when calling post_attributes" if body.nil? # resource path local_var_path = "/api/v2/attributes".sub('{format}','json') # query parameters @@ -257,10 +257,10 @@ :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Attribute') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AttributesApi#post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AttributesApi#post_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query attributes