mints 0.0.28 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/client.rb +287 -385
- data/lib/contact/config/appointments.rb +201 -0
- data/lib/contact/config/config.rb +7 -0
- data/lib/contact/content/content.rb +7 -0
- data/lib/contact/content/conversations.rb +121 -0
- data/lib/contact/ecommerce/ecommerce.rb +12 -0
- data/lib/contact/ecommerce/order_items.rb +19 -0
- data/lib/contact/ecommerce/order_items_groups.rb +95 -0
- data/lib/contact/ecommerce/orders.rb +133 -0
- data/lib/contact.rb +54 -603
- data/lib/errors.rb +3 -1
- data/lib/generators/mints_assets_controller.rb +4 -1
- data/lib/generators/mints_contact_controller.rb +4 -1
- data/lib/generators/mints_files_generator.rb +16 -13
- data/lib/generators/mints_link.rb +7 -4
- data/lib/generators/mints_public_controller.rb +4 -1
- data/lib/generators/mints_user_controller.rb +3 -0
- data/lib/generators/short_link_controller.rb +4 -1
- data/lib/mints/controllers/admin_base_controller.rb +5 -3
- data/lib/mints/controllers/base_api_controller.rb +6 -4
- data/lib/mints/controllers/base_controller.rb +5 -3
- data/lib/mints/controllers/concerns/mints_clients.rb +4 -2
- data/lib/mints/controllers/concerns/read_config_file.rb +3 -1
- data/lib/mints/controllers/contact_api_controller.rb +12 -10
- data/lib/mints/controllers/public_api_controller.rb +10 -8
- data/lib/mints/controllers/user_api_controller.rb +11 -9
- data/lib/mints/helpers/contact_auth_helper.rb +3 -1
- data/lib/mints/helpers/mints_helper.rb +39 -38
- data/lib/mints/helpers/proxy_controllers_methods.rb +24 -24
- data/lib/mints/helpers/user_auth_helper.rb +5 -3
- data/lib/mints.rb +12 -10
- data/lib/pub.rb +35 -53
- data/lib/user/config/api_keys.rb +63 -61
- data/lib/user/config/appointments.rb +217 -215
- data/lib/user/config/attribute_groups.rb +74 -72
- data/lib/user/config/attributes.rb +83 -81
- data/lib/user/config/calendars.rb +88 -86
- data/lib/user/config/config.rb +31 -63
- data/lib/user/config/public_folders.rb +105 -104
- data/lib/user/config/relationships.rb +135 -132
- data/lib/user/config/roles.rb +76 -79
- data/lib/user/config/seeds.rb +52 -51
- data/lib/user/config/system_settings.rb +50 -49
- data/lib/user/config/tags.rb +57 -59
- data/lib/user/config/taxonomies.rb +115 -119
- data/lib/user/config/teams.rb +2 -0
- data/lib/user/config/users.rb +2 -0
- data/lib/user/contacts/contacts.rb +2 -0
- data/lib/user/content/assets.rb +3 -3
- data/lib/user/content/content.rb +224 -223
- data/lib/user/content/content_instances.rb +4 -2
- data/lib/user/content/content_templates.rb +2 -0
- data/lib/user/content/conversations.rb +2 -0
- data/lib/user/content/dam.rb +2 -0
- data/lib/user/content/forms.rb +2 -0
- data/lib/user/content/message_templates.rb +2 -0
- data/lib/user/content/messages.rb +2 -0
- data/lib/user/content/pages.rb +4 -2
- data/lib/user/content/stories.rb +3 -3
- data/lib/user/content/story_templates.rb +5 -3
- data/lib/user/content/story_versions.rb +2 -0
- data/lib/user/crm/companies.rb +3 -1
- data/lib/user/crm/contacts.rb +2 -0
- data/lib/user/crm/crm.rb +2 -0
- data/lib/user/crm/deals.rb +2 -0
- data/lib/user/crm/favorites.rb +2 -0
- data/lib/user/crm/segments.rb +2 -0
- data/lib/user/crm/users.rb +2 -0
- data/lib/user/crm/workflow_step_objects.rb +2 -0
- data/lib/user/crm/workflow_steps.rb +2 -0
- data/lib/user/crm/workflows.rb +2 -0
- data/lib/user/ecommerce/ecommerce.rb +2 -0
- data/lib/user/ecommerce/item_prices.rb +2 -0
- data/lib/user/ecommerce/locations.rb +2 -0
- data/lib/user/ecommerce/order_items_groups.rb +5 -2
- data/lib/user/ecommerce/order_statuses.rb +2 -0
- data/lib/user/ecommerce/orders.rb +4 -1
- data/lib/user/ecommerce/price_lists.rb +2 -0
- data/lib/user/ecommerce/product_templates.rb +3 -1
- data/lib/user/ecommerce/product_variations.rb +2 -0
- data/lib/user/ecommerce/products.rb +3 -1
- data/lib/user/ecommerce/skus.rb +2 -0
- data/lib/user/ecommerce/taxes.rb +2 -0
- data/lib/user/ecommerce/variant_options.rb +2 -0
- data/lib/user/ecommerce/variant_values.rb +2 -0
- data/lib/user/helpers/helpers.rb +2 -0
- data/lib/user/helpers/object_activities.rb +2 -0
- data/lib/user/helpers/object_folders.rb +2 -0
- data/lib/user/helpers/user_folders.rb +2 -0
- data/lib/user/marketing/marketing.rb +2 -0
- data/lib/user/profile/profile.rb +2 -0
- data/lib/user.rb +32 -41
- metadata +23 -16
- data/lib/user/config/importers.rb +0 -184
|
@@ -1,138 +1,141 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Relationships
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
4
|
+
##
|
|
5
|
+
# == Relationships
|
|
6
|
+
#
|
|
7
|
+
# === Get relationships available for.
|
|
8
|
+
# Get relationships available.
|
|
9
|
+
#
|
|
10
|
+
# ==== Parameters
|
|
11
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
12
|
+
#
|
|
13
|
+
# ==== Example
|
|
14
|
+
# options = {
|
|
15
|
+
# objectType: 'contacts'
|
|
16
|
+
# }
|
|
17
|
+
# @data = @mints_user.get_relationships_available_for(options)
|
|
18
|
+
def get_relationships_available_for(options)
|
|
19
|
+
@client.raw('get', '/config/relationships/available-for', options)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# === Attach relationship.
|
|
23
|
+
# Attach a relationship.
|
|
24
|
+
#
|
|
25
|
+
# ==== Parameters
|
|
26
|
+
# data:: (Hash) -- Data to be submitted.
|
|
27
|
+
#
|
|
28
|
+
# ==== Example
|
|
29
|
+
#
|
|
30
|
+
def attach_relationship(data)
|
|
31
|
+
# FIXME: Method doesn't work, RelationshipManager cannot access to id attribute.
|
|
32
|
+
@client.raw('post', '/config/relationships/attach', nil, data_transform(data))
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# === Detach relationship.
|
|
36
|
+
# Detach a relationship.
|
|
37
|
+
#
|
|
38
|
+
# ==== Parameters
|
|
39
|
+
# data:: (Hash) -- Data to be submitted.
|
|
40
|
+
#
|
|
41
|
+
# ==== Example
|
|
42
|
+
#
|
|
43
|
+
def detach_relationship(data)
|
|
44
|
+
# FIXME: Method doesn't work, RelationshipManager cannot access to id attribute.
|
|
45
|
+
@client.raw('post', '/config/relationships/detach', nil, data_transform(data))
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# === Relationship has objects.
|
|
49
|
+
# Get relationships that has objects.
|
|
50
|
+
#
|
|
51
|
+
# ==== Parameters
|
|
52
|
+
# id:: (Integer) -- Relationship id.
|
|
53
|
+
#
|
|
54
|
+
# ==== Example
|
|
55
|
+
# @data = @mints_user.relationship_has_objects(1)
|
|
56
|
+
def relationship_has_objects(id)
|
|
57
|
+
@client.raw('get', "/config/relationships/#{id}/hasObjects")
|
|
58
|
+
end
|
|
32
59
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
# ==== Parameters
|
|
49
|
-
# id:: (Integer) -- Relationship id.
|
|
50
|
-
#
|
|
51
|
-
# ==== Example
|
|
52
|
-
# @data = @mints_user.relationship_has_objects(1)
|
|
53
|
-
def relationship_has_objects(id)
|
|
54
|
-
@client.raw('get', "/config/relationships/#{id}/hasObjects")
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# === Get relationships.
|
|
58
|
-
# Get a collection of relationships.
|
|
59
|
-
#
|
|
60
|
-
# ==== Parameters
|
|
61
|
-
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
62
|
-
#
|
|
63
|
-
# ==== First Example
|
|
64
|
-
# @data = @mints_user.get_relationships
|
|
65
|
-
#
|
|
66
|
-
# ==== Second Example
|
|
67
|
-
# options = { fields: "id" }
|
|
68
|
-
# @data = @mints_user.get_relationships(options)
|
|
69
|
-
def get_relationships(options = nil)
|
|
70
|
-
@client.raw('get', "/config/relationships", options)
|
|
71
|
-
end
|
|
60
|
+
# === Get relationships.
|
|
61
|
+
# Get a collection of relationships.
|
|
62
|
+
#
|
|
63
|
+
# ==== Parameters
|
|
64
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
65
|
+
#
|
|
66
|
+
# ==== First Example
|
|
67
|
+
# @data = @mints_user.get_relationships
|
|
68
|
+
#
|
|
69
|
+
# ==== Second Example
|
|
70
|
+
# options = { fields: 'id' }
|
|
71
|
+
# @data = @mints_user.get_relationships(options)
|
|
72
|
+
def get_relationships(options = nil)
|
|
73
|
+
@client.raw('get', '/config/relationships', options)
|
|
74
|
+
end
|
|
72
75
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
# === Get relationship.
|
|
77
|
+
# Get a relationship info.
|
|
78
|
+
#
|
|
79
|
+
# ==== Parameters
|
|
80
|
+
# id:: (Integer) -- Relationship id.
|
|
81
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
82
|
+
#
|
|
83
|
+
# ==== First Example
|
|
84
|
+
# @data = @mints_user.get_relationship(1)
|
|
85
|
+
#
|
|
86
|
+
# ==== Second Example
|
|
87
|
+
# options = { fields: 'id' }
|
|
88
|
+
# @data = @mints_user.get_relationship(1, options)
|
|
89
|
+
def get_relationship(id, options = nil)
|
|
90
|
+
@client.raw('get', "/config/relationships/#{id}", options)
|
|
91
|
+
end
|
|
89
92
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
# === Create relationship.
|
|
94
|
+
# Create a relationship with data.
|
|
95
|
+
#
|
|
96
|
+
# ==== Parameters
|
|
97
|
+
# data:: (Hash) -- Data to be submitted.
|
|
98
|
+
#
|
|
99
|
+
# ==== Example
|
|
100
|
+
# data = {
|
|
101
|
+
# alias_1: 'eventsCopy',
|
|
102
|
+
# alias_2: 'ticketsCopy',
|
|
103
|
+
# object_model_1: 'Story',
|
|
104
|
+
# object_model_2: 'Product'
|
|
105
|
+
# }
|
|
106
|
+
# @data = @mints_user.create_relationship(data)
|
|
107
|
+
def create_relationship(data)
|
|
108
|
+
@client.raw('post', '/config/relationships', nil, data_transform(data))
|
|
109
|
+
end
|
|
107
110
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
111
|
+
# === Update relationship.
|
|
112
|
+
# Update a relationship info.
|
|
113
|
+
#
|
|
114
|
+
# ==== Parameters
|
|
115
|
+
# id:: (Integer) -- Relationship id.
|
|
116
|
+
# data:: (Hash) -- Data to be submitted.
|
|
117
|
+
#
|
|
118
|
+
# ==== Example
|
|
119
|
+
# data = {
|
|
120
|
+
# alias_1: 'eventsCopyModified',
|
|
121
|
+
# alias_2: 'ticketsCopyModified',
|
|
122
|
+
# object_model_1: 'Story',
|
|
123
|
+
# object_model_2: 'Product'
|
|
124
|
+
# }
|
|
125
|
+
# @data = @mints_user.update_relationship(5, data)
|
|
126
|
+
def update_relationship(id, data)
|
|
127
|
+
@client.raw('put', "/config/relationships/#{id}", nil, data_transform(data))
|
|
128
|
+
end
|
|
126
129
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
end
|
|
130
|
+
# === Delete relationship.
|
|
131
|
+
# Delete a relationship.
|
|
132
|
+
#
|
|
133
|
+
# ==== Parameters
|
|
134
|
+
# id:: (Integer) -- Relationship id.
|
|
135
|
+
#
|
|
136
|
+
# ==== Example
|
|
137
|
+
# @data = @mints_user.delete_relationship(5)
|
|
138
|
+
def delete_relationship(id)
|
|
139
|
+
@client.raw('delete', "/config/relationships/#{id}")
|
|
140
|
+
end
|
|
141
|
+
end
|
data/lib/user/config/roles.rb
CHANGED
|
@@ -1,84 +1,81 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Roles
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
##
|
|
5
|
+
# == Roles
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
# === Duplicate role.
|
|
9
|
+
# Duplicate a role.
|
|
10
|
+
#
|
|
11
|
+
# ==== Parameters
|
|
12
|
+
# id:: (Integer) -- Role id.
|
|
13
|
+
# data:: (Hash) -- Data to be submitted.
|
|
14
|
+
#
|
|
15
|
+
# ==== Example
|
|
16
|
+
# data = { options: { name: 'Duplicated role' } }
|
|
17
|
+
# @data = @mints_user.duplicate_role(1, data.to_json)
|
|
18
|
+
def duplicate_role(id, data)
|
|
19
|
+
@client.raw('post', "/config/roles/#{id}/duplicate", nil, data)
|
|
20
|
+
end
|
|
5
21
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
22
|
+
# === Get roles.
|
|
23
|
+
# Get a collection of roles.
|
|
24
|
+
#
|
|
25
|
+
# ==== Example
|
|
26
|
+
# @data = @mints_user.get_roles
|
|
27
|
+
def get_roles
|
|
28
|
+
@client.raw('get', '/config/roles')
|
|
29
|
+
end
|
|
9
30
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def duplicate_role(id, data)
|
|
23
|
-
@client.raw('post', "/config/roles/#{id}/duplicate", nil, data)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# === Get roles.
|
|
27
|
-
# Get a collection of roles.
|
|
28
|
-
#
|
|
29
|
-
# ==== Example
|
|
30
|
-
# @data = @mints_user.get_roles
|
|
31
|
-
def get_roles
|
|
32
|
-
@client.raw('get', "/config/roles")
|
|
33
|
-
end
|
|
31
|
+
# === Get role.
|
|
32
|
+
# Get a role info.
|
|
33
|
+
#
|
|
34
|
+
# ==== Parameters
|
|
35
|
+
# id:: (Integer) -- Role id.
|
|
36
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
37
|
+
#
|
|
38
|
+
# ==== Example
|
|
39
|
+
# @data = @mints_user.get_role(1)
|
|
40
|
+
def get_role(id)
|
|
41
|
+
@client.raw('get', "/config/roles/#{id}")
|
|
42
|
+
end
|
|
34
43
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
# === Create role.
|
|
45
|
+
# Create a role with data.
|
|
46
|
+
#
|
|
47
|
+
# ==== Parameters
|
|
48
|
+
# data:: (Hash) -- Data to be submitted.
|
|
49
|
+
#
|
|
50
|
+
# ==== Example
|
|
51
|
+
# data = {
|
|
52
|
+
# name: 'new-role',
|
|
53
|
+
# display_name: 'New Role',
|
|
54
|
+
# description: 'Role description'
|
|
55
|
+
# }
|
|
56
|
+
# @data = @mints_user.create_role(data)
|
|
57
|
+
def create_role(data)
|
|
58
|
+
@client.raw('post', '/config/roles', nil, data_transform(data))
|
|
59
|
+
end
|
|
47
60
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
#
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
# id:: (Integer) -- Role id.
|
|
70
|
-
# data:: (Hash) -- Data to be submitted.
|
|
71
|
-
#
|
|
72
|
-
# ==== Example
|
|
73
|
-
# data = {
|
|
74
|
-
# "name": "new-role",
|
|
75
|
-
# "display_name": "New Role Display Name Modified",
|
|
76
|
-
# description: "Role description",
|
|
77
|
-
# "permissions": 1
|
|
78
|
-
# }
|
|
79
|
-
# @data = @mints_user.update_role(8, data)
|
|
80
|
-
def update_role(id, data) #FIXME: This action is unauthorized
|
|
81
|
-
#TODO: Research permissions variable type. This would be the error's solution.
|
|
82
|
-
@client.raw('put', "/config/roles/#{id}", nil, data_transform(data))
|
|
83
|
-
end
|
|
84
|
-
end
|
|
61
|
+
# === Update role.
|
|
62
|
+
# Update a role info.
|
|
63
|
+
#
|
|
64
|
+
# ==== Parameters
|
|
65
|
+
# id:: (Integer) -- Role id.
|
|
66
|
+
# data:: (Hash) -- Data to be submitted.
|
|
67
|
+
#
|
|
68
|
+
# ==== Example
|
|
69
|
+
# data = {
|
|
70
|
+
# name: 'new-role',
|
|
71
|
+
# display_name: 'New Role Display Name Modified',
|
|
72
|
+
# description: 'Role description',
|
|
73
|
+
# permissions: 1
|
|
74
|
+
# }
|
|
75
|
+
# @data = @mints_user.update_role(8, data)
|
|
76
|
+
def update_role(id, data)
|
|
77
|
+
# FIXME: This action is unauthorized
|
|
78
|
+
# TODO: Research permissions variable type. This would be the error's solution.
|
|
79
|
+
@client.raw('put', "/config/roles/#{id}", nil, data_transform(data))
|
|
80
|
+
end
|
|
81
|
+
end
|
data/lib/user/config/seeds.rb
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
##
|
|
3
|
-
# == Seeds
|
|
4
|
-
#
|
|
1
|
+
# frozen_string_literal: true
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
module Seeds
|
|
4
|
+
##
|
|
5
|
+
# == Seeds
|
|
6
|
+
#
|
|
7
|
+
# === Apply seeds.
|
|
8
|
+
# Apply seeds.
|
|
9
|
+
#
|
|
10
|
+
# ==== Example
|
|
11
|
+
#
|
|
12
|
+
def apply_seeds(data, async: false)
|
|
13
|
+
url = '/config/seeds'
|
|
14
|
+
url = "#{url}?async" if async
|
|
15
|
+
@client.raw('post', url, nil, data)
|
|
16
|
+
end
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
# === Get seed processes.
|
|
19
|
+
# Get a collection of seed processes.
|
|
20
|
+
#
|
|
21
|
+
# ==== Parameters
|
|
22
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
23
|
+
# use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
|
|
24
|
+
#
|
|
25
|
+
# ==== First Example
|
|
26
|
+
# @data = @mints_user.get_seed_processes
|
|
27
|
+
#
|
|
28
|
+
# ==== Second Example
|
|
29
|
+
# options = {
|
|
30
|
+
# fields: 'id'
|
|
31
|
+
# }
|
|
32
|
+
# @data = @mints_user.get_seed_processes(options)
|
|
33
|
+
def get_seed_processes(options = nil)
|
|
34
|
+
@client.raw('post', '/config/seed-processes', options)
|
|
35
|
+
end
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
end
|
|
37
|
+
# === Get seed process.
|
|
38
|
+
# Get a seed process info.
|
|
39
|
+
#
|
|
40
|
+
# ==== Parameters
|
|
41
|
+
# id:: (Integer) -- Seed process id.
|
|
42
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
43
|
+
#
|
|
44
|
+
# ==== First Example
|
|
45
|
+
# @data = @mints_user.get_seed_process(1)
|
|
46
|
+
#
|
|
47
|
+
# ==== Second Example
|
|
48
|
+
# options = {
|
|
49
|
+
# fields: 'id, title'
|
|
50
|
+
# }
|
|
51
|
+
# @data = @mints_user.get_seed_process(1, options)
|
|
52
|
+
def get_seed_process(id, options = nil)
|
|
53
|
+
@client.raw('get', "/config/seed-processes/#{id}", options)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -1,53 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module SystemSettings
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
##
|
|
5
|
+
# == System Settings
|
|
6
|
+
#
|
|
7
|
+
# === Get settings by keys.
|
|
8
|
+
# Get a collection of settings using keys.
|
|
9
|
+
#
|
|
10
|
+
# ==== Example
|
|
11
|
+
# options = {
|
|
12
|
+
# setting_keys: 'email_transport_provider,email_template_provider,email_template_default_from_address'
|
|
13
|
+
# }
|
|
14
|
+
# @data = @mints_user.get_settings_by_keys(options)
|
|
15
|
+
def get_settings_by_keys(options)
|
|
16
|
+
@client.raw('get', '/config/settings/by-keys', options)
|
|
17
|
+
end
|
|
5
18
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def get_settings_by_keys(options)
|
|
15
|
-
@client.raw('get', "/config/settings/by-keys", options)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
# === Get settings.
|
|
19
|
-
# Get a collection of settings.
|
|
20
|
-
#
|
|
21
|
-
# ==== Example
|
|
22
|
-
# @data = @mints_user.get_settings
|
|
23
|
-
def get_settings
|
|
24
|
-
@client.raw('get', "/config/settings")
|
|
25
|
-
end
|
|
19
|
+
# === Get settings.
|
|
20
|
+
# Get a collection of settings.
|
|
21
|
+
#
|
|
22
|
+
# ==== Example
|
|
23
|
+
# @data = @mints_user.get_settings
|
|
24
|
+
def get_settings
|
|
25
|
+
@client.raw('get', '/config/settings')
|
|
26
|
+
end
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
# === Create setting.
|
|
29
|
+
# Create a setting title with data.
|
|
30
|
+
#
|
|
31
|
+
# ==== Parameters
|
|
32
|
+
# data:: (Hash) -- Data to be submitted.
|
|
33
|
+
#
|
|
34
|
+
# ==== Example
|
|
35
|
+
# data = {
|
|
36
|
+
# title: 'new_settings'
|
|
37
|
+
# }
|
|
38
|
+
# @data = @mints_user.create_setting(data)
|
|
39
|
+
def create_setting(data)
|
|
40
|
+
@client.raw('post', '/config/settings', nil, data_transform(data))
|
|
41
|
+
end
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
end
|
|
43
|
+
# === Clear tag.
|
|
44
|
+
# Clear a tag info.
|
|
45
|
+
#
|
|
46
|
+
# ==== Parameters
|
|
47
|
+
# tag:: (Integer) -- Tag id.
|
|
48
|
+
#
|
|
49
|
+
# ==== Example
|
|
50
|
+
# @data = @mints_user.clear_tag(1)
|
|
51
|
+
def clear_tag(tag)
|
|
52
|
+
@client.raw('get', "/config/settings/tags/#{tag}/clear")
|
|
53
|
+
end
|
|
54
|
+
end
|