lib/purecloud/api/attributes_api.rb in purecloud-0.44.1 vs lib/purecloud/api/attributes_api.rb in purecloud-0.45.1

- old
+ new

@@ -204,28 +204,31 @@ return data, status_code, headers end # Create an attribute. # + # @param body Attribute # @param [Hash] opts the optional parameters - # @option opts [Attribute] :body Attribute # @return [Attribute] - def post_attributes(opts = {}) - data, status_code, headers = post_attributes_with_http_info(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 - # @option opts [Attribute] :body Attribute # @return [Array<(Attribute, Fixnum, Hash)>] Attribute data, response status code and response headers - def post_attributes_with_http_info(opts = {}) + def post_attributes_with_http_info(body, opts = {}) if @api_client.config.debugging @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_attributes" if body.nil? + # resource path local_var_path = "/api/v2/attributes".sub('{format}','json') # query parameters query_params = {} @@ -243,11 +246,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(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, @@ -261,28 +264,31 @@ return data, status_code, headers end # Query attributes # + # @param body query # @param [Hash] opts the optional parameters - # @option opts [AttributeQueryRequest] :body query # @return [AttributeEntityListing] - def post_query(opts = {}) - data, status_code, headers = post_query_with_http_info(opts) + def post_query(body, opts = {}) + data, status_code, headers = post_query_with_http_info(body, opts) return data end # Query attributes # + # @param body query # @param [Hash] opts the optional parameters - # @option opts [AttributeQueryRequest] :body query # @return [Array<(AttributeEntityListing, Fixnum, Hash)>] AttributeEntityListing data, response status code and response headers - def post_query_with_http_info(opts = {}) + def post_query_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttributesApi#post_query ..." end + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling post_query" if body.nil? + # resource path local_var_path = "/api/v2/attributes/query".sub('{format}','json') # query parameters query_params = {} @@ -300,11 +306,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(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, @@ -319,32 +325,35 @@ end # Update an existing attribute. # Fields that can be updated: name, description. The most recent version is required for updates. # @param attribute_id Attribute ID + # @param body Attribute # @param [Hash] opts the optional parameters - # @option opts [Attribute] :body Attribute # @return [Attribute] - def put_attribute_id(attribute_id, opts = {}) - data, status_code, headers = put_attribute_id_with_http_info(attribute_id, opts) + def put_attribute_id(attribute_id, body, opts = {}) + data, status_code, headers = put_attribute_id_with_http_info(attribute_id, body, opts) return data end # Update an existing attribute. # Fields that can be updated: name, description. The most recent version is required for updates. # @param attribute_id Attribute ID + # @param body Attribute # @param [Hash] opts the optional parameters - # @option opts [Attribute] :body Attribute # @return [Array<(Attribute, Fixnum, Hash)>] Attribute data, response status code and response headers - def put_attribute_id_with_http_info(attribute_id, opts = {}) + def put_attribute_id_with_http_info(attribute_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttributesApi#put_attribute_id ..." end # verify the required parameter 'attribute_id' is set fail "Missing the required parameter 'attribute_id' when calling put_attribute_id" if attribute_id.nil? + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling put_attribute_id" if body.nil? + # resource path local_var_path = "/api/v2/attributes/{attributeId}".sub('{format}','json').sub('{' + 'attributeId' + '}', attribute_id.to_s) # query parameters query_params = {} @@ -362,10 +371,10 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(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,