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)
65 66 67 |
# File 'lib/user/config/attributes.rb', line 65 def create_attribute(data) @client.raw('post', '/config/attributes', nil, data_transform(data)) end |