Module: AttributeGroups
- Included in:
- Config
- Defined in:
- lib/user/config/attribute_groups.rb
Instance Method Summary collapse
-
#create_attribute_group(data) ⇒ Object
Create attribute group.
-
#get_attribute_group(id) ⇒ Object
Get attribute group.
-
#get_attribute_groups(options = nil) ⇒ Object
Get attribute groups.
-
#get_attribute_groups_data_types ⇒ Object
Get attribute groups data types.
-
#update_attribute_group(id, data) ⇒ Object
Update attribute group.
Instance Method Details
#create_attribute_group(data) ⇒ Object
Create attribute group.
Create an attribute group with data.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
title: 'New Attribute Group',
object_type: 'contacts'
}
@data = @mints_user.create_attribute_group(data)
57 58 59 |
# File 'lib/user/config/attribute_groups.rb', line 57 def create_attribute_group(data) @client.raw('post', '/config/attribute-groups', nil, data_transform(data)) end |
#get_attribute_group(id) ⇒ Object
Get attribute group.
Get an attribute group info.
Parameters
- id
-
(Integer) – Attribute group id.
Example
@data = @mints_user.get_attribute_group(10)
41 42 43 |
# File 'lib/user/config/attribute_groups.rb', line 41 def get_attribute_group(id) @client.raw('get', "/config/attribute-groups/#{id}") end |
#get_attribute_groups(options = nil) ⇒ Object
Get attribute groups.
Get a collection of attribute groups.
Parameters
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_attribute_groups
Second Example
= { sort: 'id' }
@data = @mints_user.get_attribute_groups()
29 30 31 |
# File 'lib/user/config/attribute_groups.rb', line 29 def get_attribute_groups( = nil) @client.raw('get', '/config/attribute-groups', ) end |
#get_attribute_groups_data_types ⇒ Object
Get attribute groups data types.
Get data types used in attribute groups.
Example
@data = @mints_user.get_attribute_groups_data_types
13 14 15 |
# File 'lib/user/config/attribute_groups.rb', line 13 def get_attribute_groups_data_types @client.raw('get', '/config/attribute-groups/object-types') end |
#update_attribute_group(id, data) ⇒ Object
Update attribute group.
Update an attribute group info.
Parameters
- id
-
(Integer) – Attribute group id.
- data
-
(Hash) – Data to be submitted.
Example
data = {
title: 'New Attribute Group Modified',
object_type: 'contacts',
slug: 'new-attribute-group',
description: 'New description'
}
@data = @mints_user.update_attribute_group(36, data)
76 77 78 |
# File 'lib/user/config/attribute_groups.rb', line 76 def update_attribute_group(id, data) @client.raw('put', "/config/attribute-groups/#{id}", nil, data_transform(data)) end |