Method: Attributes#update_attribute
- Defined in:
- lib/user/config/attributes.rb
#update_attribute(id, data) ⇒ Object
Update attribute.
Update an attribute info.
Parameters
- id
-
(Integer) – Attribute id.
- data
-
(Hash) – Data to be submitted.
Example
data = {
title: 'New Attribute Modified',
object_type: 'orders',
slug: 'new_attribute',
attribute_group_id: 1,
data_type_enum: 10
}
@data = @cxf_user.update_attribute(292, data)
85 86 87 |
# File 'lib/user/config/attributes.rb', line 85 def update_attribute(id, data) @client.raw('put', "/config/attributes/#{id}", nil, data_transform(data)) end |