Method: Attributes#create_attribute
- Defined in:
- lib/user/config/attributes.rb
#create_attribute(data) ⇒ Object
Create attribute.
Create an attribute with data.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
"title": "New Attribute",
"object_type": "orders",
"slug": "new_attribute",
"attribute_group_id": 1,
"data_type_enum": 10
}
@data = @mints_user.create_attribute(data)
63 64 65 |
# File 'lib/user/config/attributes.rb', line 63 def create_attribute(data) @client.raw("post", "/config/attributes", nil, data_transform(data)) end |