mints 0.0.26 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/lib/client.rb +75 -37
- data/lib/contact.rb +61 -62
- data/lib/errors.rb +98 -0
- data/lib/generators/mints_config.yml.erb +0 -2
- data/lib/generators/mints_link.rb +3 -3
- data/lib/mints/controllers/admin_base_controller.rb +8 -66
- data/lib/mints/controllers/base_api_controller.rb +16 -134
- data/lib/mints/controllers/base_controller.rb +20 -106
- data/lib/mints/controllers/concerns/mints_clients.rb +74 -0
- data/lib/mints/controllers/concerns/read_config_file.rb +28 -0
- data/lib/mints/controllers/contact_api_controller.rb +6 -85
- data/lib/mints/controllers/public_api_controller.rb +6 -79
- data/lib/mints/controllers/user_api_controller.rb +7 -82
- data/lib/mints/helpers/contact_auth_helper.rb +67 -0
- data/lib/{mints_helper.rb → mints/helpers/mints_helper.rb} +7 -5
- data/lib/mints/helpers/proxy_controllers_methods.rb +126 -0
- data/lib/mints/helpers/user_auth_helper.rb +53 -0
- data/lib/mints.rb +2 -0
- data/lib/pub.rb +56 -56
- data/lib/user/config/api_keys.rb +7 -7
- data/lib/user/config/appointments.rb +16 -16
- data/lib/user/config/attribute_groups.rb +10 -10
- data/lib/user/config/attributes.rb +10 -10
- data/lib/user/config/calendars.rb +9 -9
- data/lib/user/config/config.rb +7 -7
- data/lib/user/config/importers.rb +15 -15
- data/lib/user/config/public_folders.rb +11 -11
- data/lib/user/config/relationships.rb +11 -11
- data/lib/user/config/roles.rb +9 -9
- data/lib/user/config/seeds.rb +5 -5
- data/lib/user/config/system_settings.rb +5 -5
- data/lib/user/config/tags.rb +5 -5
- data/lib/user/config/taxonomies.rb +15 -15
- data/lib/user/config/teams.rb +67 -68
- data/lib/user/config/users.rb +70 -71
- data/lib/user/contacts/contacts.rb +19 -20
- data/lib/user/content/assets.rb +273 -278
- data/lib/user/content/content.rb +48 -48
- data/lib/user/content/content_instances.rb +136 -138
- data/lib/user/content/content_templates.rb +103 -103
- data/lib/user/content/conversations.rb +193 -193
- data/lib/user/content/dam.rb +83 -80
- data/lib/user/content/forms.rb +229 -233
- data/lib/user/content/message_templates.rb +152 -151
- data/lib/user/content/messages.rb +87 -87
- data/lib/user/content/pages.rb +82 -82
- data/lib/user/content/stories.rb +101 -101
- data/lib/user/content/story_templates.rb +88 -88
- data/lib/user/content/story_versions.rb +115 -117
- data/lib/user/crm/companies.rb +103 -105
- data/lib/user/crm/contacts.rb +285 -292
- data/lib/user/crm/crm.rb +19 -19
- data/lib/user/crm/deals.rb +103 -103
- data/lib/user/crm/favorites.rb +14 -13
- data/lib/user/crm/segments.rb +121 -123
- data/lib/user/crm/users.rb +20 -20
- data/lib/user/crm/workflow_step_objects.rb +84 -84
- data/lib/user/crm/workflow_steps.rb +45 -45
- data/lib/user/crm/workflows.rb +65 -65
- data/lib/user/ecommerce/ecommerce.rb +27 -27
- data/lib/user/ecommerce/item_prices.rb +82 -81
- data/lib/user/ecommerce/locations.rb +160 -160
- data/lib/user/ecommerce/order_items_groups.rb +107 -105
- data/lib/user/ecommerce/order_statuses.rb +24 -24
- data/lib/user/ecommerce/orders.rb +250 -246
- data/lib/user/ecommerce/price_lists.rb +68 -68
- data/lib/user/ecommerce/product_templates.rb +99 -99
- data/lib/user/ecommerce/product_variations.rb +122 -120
- data/lib/user/ecommerce/products.rb +160 -159
- data/lib/user/ecommerce/skus.rb +85 -85
- data/lib/user/ecommerce/taxes.rb +79 -79
- data/lib/user/ecommerce/variant_options.rb +66 -66
- data/lib/user/ecommerce/variant_values.rb +69 -69
- data/lib/user/helpers/helpers.rb +102 -101
- data/lib/user/helpers/object_activities.rb +78 -78
- data/lib/user/helpers/object_folders.rb +76 -76
- data/lib/user/helpers/user_folders.rb +77 -77
- data/lib/user/marketing/marketing.rb +114 -113
- data/lib/user/profile/profile.rb +94 -103
- data/lib/user.rb +4 -4
- metadata +41 -35
data/lib/user/content/dam.rb
CHANGED
@@ -1,88 +1,91 @@
|
|
1
1
|
module DAM
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# == dam
|
4
|
+
#
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
# === Get dam load_tree.
|
7
|
+
# Get dam load_tree.
|
8
|
+
#
|
9
|
+
# ==== Example
|
10
|
+
# @data = @mints_user.get_dam_load_tree
|
11
|
+
def get_dam_load_tree
|
12
|
+
@client.raw('get', '/content/dam/loadtree')
|
13
|
+
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
def paste_dam(data) #FIXME: Controller detect object array like a single array.
|
28
|
-
return @client.raw("post", "/content/dam/paste", nil, data)
|
29
|
-
end
|
15
|
+
# === Get dam asset locations.
|
16
|
+
# Get an asset locations in dam.
|
17
|
+
#
|
18
|
+
# ==== Parameters
|
19
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
20
|
+
#
|
21
|
+
# ==== Example
|
22
|
+
# @data = @mints_user.get_dam_asset_locations(options)
|
23
|
+
def get_dam_asset_locations(options)
|
24
|
+
@client.raw('get', '/content/dam/asset-locations', options)
|
25
|
+
end
|
30
26
|
|
31
|
-
|
32
|
-
#
|
33
|
-
|
34
|
-
|
35
|
-
# data:: (Hash) -- Data to be submitted.
|
36
|
-
#
|
37
|
-
# ==== Example
|
38
|
-
# data = {
|
39
|
-
# "itemType": "asset",
|
40
|
-
# "id": 21,
|
41
|
-
# "title": "accusantium",
|
42
|
-
# "description": "Ea cupiditate",
|
43
|
-
# "slug": "accusantium"
|
44
|
-
# }
|
45
|
-
# @data = @mints_user.rename_dam(data.to_json)
|
46
|
-
def rename_dam(data)
|
47
|
-
return @client.raw("post", "/content/dam/rename", nil, data)
|
48
|
-
end
|
27
|
+
def paste_dam(data)
|
28
|
+
# FIXME: Controller detect object array like a single array.
|
29
|
+
@client.raw('post', '/content/dam/paste', nil, data)
|
30
|
+
end
|
49
31
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
32
|
+
# === Rename dam.
|
33
|
+
# Rename folder or asset in dam.
|
34
|
+
#
|
35
|
+
# ==== Parameters
|
36
|
+
# data:: (Hash) -- Data to be submitted.
|
37
|
+
#
|
38
|
+
# ==== Example
|
39
|
+
# data = {
|
40
|
+
# itemType: 'asset',
|
41
|
+
# id: 21,
|
42
|
+
# title: 'New folder title',
|
43
|
+
# description: 'New folder description',
|
44
|
+
# slug: 'new-folder-title'
|
45
|
+
# }
|
46
|
+
# @data = @mints_user.rename_dam(data.to_json)
|
47
|
+
def rename_dam(data)
|
48
|
+
@client.raw('post', '/content/dam/rename', nil, data)
|
49
|
+
end
|
64
50
|
|
65
|
-
|
66
|
-
|
67
|
-
|
51
|
+
# === Search dam.
|
52
|
+
# Search folder or asset in dam.
|
53
|
+
#
|
54
|
+
# ==== Parameters
|
55
|
+
# data:: (Hash) -- Data to be submitted.
|
56
|
+
#
|
57
|
+
# ==== Example
|
58
|
+
# data = {
|
59
|
+
# searchFor: 'Folder name'
|
60
|
+
# }
|
61
|
+
# @data = @mints_user.search_dam(data.to_json)
|
62
|
+
def search_dam(data)
|
63
|
+
@client.raw('post', '/content/dam/search', nil, data)
|
64
|
+
end
|
68
65
|
|
69
|
-
|
70
|
-
|
71
|
-
|
66
|
+
def send_to_trash_dam(data)
|
67
|
+
# FIXME: Invalid argument supplied for foreach()
|
68
|
+
@client.raw('post', '/content/dam/sendToTrash', nil, data)
|
69
|
+
end
|
72
70
|
|
73
|
-
|
74
|
-
#
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
71
|
+
def delete_dam(data)
|
72
|
+
# FIXME: Invalid argument supplied for foreach()
|
73
|
+
@client.raw('post', '/content/dam/delete', nil, data)
|
74
|
+
end
|
75
|
+
|
76
|
+
# === Create dam folder.
|
77
|
+
# Create a folder in dam.
|
78
|
+
#
|
79
|
+
# ==== Parameters
|
80
|
+
# data:: (Hash) -- Data to be submitted.
|
81
|
+
#
|
82
|
+
# ==== Example
|
83
|
+
# data = {
|
84
|
+
# folder_name: 'New Dam Folder',
|
85
|
+
# slug: 'new-dam-folder'
|
86
|
+
# }
|
87
|
+
# @data = @mints_user.create_dam_folder(data.to_json)
|
88
|
+
def create_dam_folder(data)
|
89
|
+
@client.raw('post', '/content/folders/create', nil, data)
|
90
|
+
end
|
91
|
+
end
|
data/lib/user/content/forms.rb
CHANGED
@@ -1,234 +1,230 @@
|
|
1
1
|
module Forms
|
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
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
#
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
#
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
def reset_form_aggregates(data)
|
232
|
-
return @client.raw("post", "/content/forms/#{id}/aggregates", nil, data_transform(data))
|
233
|
-
end
|
234
|
-
end
|
2
|
+
##
|
3
|
+
# == Forms
|
4
|
+
#
|
5
|
+
|
6
|
+
# === Get forms.
|
7
|
+
# Get a collection of forms.
|
8
|
+
#
|
9
|
+
# ==== Parameters
|
10
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
11
|
+
#
|
12
|
+
# ==== First Example
|
13
|
+
# @data = @mints_user.get_forms
|
14
|
+
#
|
15
|
+
# ==== Second Example
|
16
|
+
# options = { sort: 'id', fields: 'title' }
|
17
|
+
# @data = @mints_user.get_forms(options)
|
18
|
+
def get_forms(options = nil)
|
19
|
+
@client.raw('get', '/content/forms', options)
|
20
|
+
end
|
21
|
+
|
22
|
+
# === Publish form.
|
23
|
+
# Publish a form.
|
24
|
+
#
|
25
|
+
# ==== Parameters
|
26
|
+
# id:: (Integer) -- Form id.
|
27
|
+
# data:: (Hash) -- Data to be submitted.
|
28
|
+
#
|
29
|
+
# ==== Example
|
30
|
+
# data = {
|
31
|
+
# slug: "new-publish"
|
32
|
+
# }
|
33
|
+
# @data = @mints_user.publish_form(1, data)
|
34
|
+
def publish_form(id, data)
|
35
|
+
# FIXME: Output cannot be processed. response cannot be converted to json.
|
36
|
+
@client.raw('put', "/content/forms/#{id}/publish", nil, data_transform(data))
|
37
|
+
end
|
38
|
+
|
39
|
+
# === Schedule form.
|
40
|
+
# Schedule a form in a specified date.
|
41
|
+
#
|
42
|
+
# ==== Parameters
|
43
|
+
# id:: (Integer) -- Form id.
|
44
|
+
# data:: (Hash) -- Data to be submitted.
|
45
|
+
#
|
46
|
+
# ==== Example
|
47
|
+
# data = {
|
48
|
+
# scheduled_at: '2021-09-06T20:29:16+00:00'
|
49
|
+
# }
|
50
|
+
# @data = @mints_user.schedule_form(1, data.to_json)
|
51
|
+
def schedule_form(id, data)
|
52
|
+
# FIXME: Output cannot be processed. response cannot be converted to json.
|
53
|
+
@client.raw('put', "/content/forms/#{id}/schedule", nil, data_transform(data))
|
54
|
+
end
|
55
|
+
|
56
|
+
# === Revert published form.
|
57
|
+
# Revert a published form.
|
58
|
+
#
|
59
|
+
# ==== Parameters
|
60
|
+
# id:: (Integer) -- Form id.
|
61
|
+
#
|
62
|
+
# ==== Example
|
63
|
+
# @data = @mints_user.revert_published_form(1)
|
64
|
+
def revert_published_form(id)
|
65
|
+
@client.raw('get', "/content/forms/#{id}/revert-published-data")
|
66
|
+
end
|
67
|
+
|
68
|
+
# === Duplicate form.
|
69
|
+
# Duplicate a form.
|
70
|
+
#
|
71
|
+
# ==== Parameters
|
72
|
+
# id:: (Integer) -- Form id.
|
73
|
+
#
|
74
|
+
# ==== Example
|
75
|
+
# @data = @mints_user.duplicate_form(3)
|
76
|
+
def duplicate_form(id)
|
77
|
+
@client.raw('post', "/content/forms/#{id}/duplicate")
|
78
|
+
end
|
79
|
+
|
80
|
+
# === Get activation words form.
|
81
|
+
# Get activation words a form.
|
82
|
+
#
|
83
|
+
# ==== Parameters
|
84
|
+
# id:: (Integer) -- Form id.
|
85
|
+
#
|
86
|
+
# ==== Example
|
87
|
+
# @data = @mints_user.get_form_activation_words(3)
|
88
|
+
def get_form_activation_words(id)
|
89
|
+
@client.raw('post', "/content/forms/#{id}/activation-words")
|
90
|
+
end
|
91
|
+
|
92
|
+
# === Get form support data.
|
93
|
+
# Get form support data.
|
94
|
+
#
|
95
|
+
# ==== Example
|
96
|
+
# @data = @mints_user.get_form_support_data
|
97
|
+
def get_form_support_data
|
98
|
+
@client.raw('get', '/content/forms/support-data')
|
99
|
+
end
|
100
|
+
|
101
|
+
# === Get form submissions.
|
102
|
+
# Get form submissions.
|
103
|
+
#
|
104
|
+
# ==== Parameters
|
105
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
106
|
+
#
|
107
|
+
# ==== First Example
|
108
|
+
# @data = @mints_user.get_form_submissions
|
109
|
+
#
|
110
|
+
# ==== Second Example
|
111
|
+
# options = { fields: 'id' }
|
112
|
+
# @data = @mints_user.get_form_submissions(options)
|
113
|
+
def get_form_submissions(options = nil)
|
114
|
+
@client.raw('get', '/content/forms/submissions', options)
|
115
|
+
end
|
116
|
+
|
117
|
+
# === Get form submission.
|
118
|
+
# Get form submission.
|
119
|
+
#
|
120
|
+
# ==== Parameters
|
121
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
122
|
+
#
|
123
|
+
# ==== First Example
|
124
|
+
# @data = @mints_user.get_form_submissions
|
125
|
+
#
|
126
|
+
# ==== Second Example
|
127
|
+
# options = { fields: 'id' }
|
128
|
+
# @data = @mints_user.get_form_submissions(options)
|
129
|
+
def get_form_submission(id, options)
|
130
|
+
@client.raw('get', "/content/forms/submissions/#{id}", options)
|
131
|
+
end
|
132
|
+
|
133
|
+
# === Delete form submission.
|
134
|
+
# Delete a form submission.
|
135
|
+
#
|
136
|
+
# ==== Parameters
|
137
|
+
# id:: (Integer) -- Form submission id.
|
138
|
+
#
|
139
|
+
# ==== Example
|
140
|
+
# @data = @mints_user.delete_form_submission(1)
|
141
|
+
def delete_form_submission(id)
|
142
|
+
@client.raw('delete', "/content/forms/submissions/#{id}")
|
143
|
+
end
|
144
|
+
|
145
|
+
# === Get form.
|
146
|
+
# Get a form info.
|
147
|
+
#
|
148
|
+
# ==== Parameters
|
149
|
+
# id:: (Integer) -- Form id.
|
150
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
151
|
+
#
|
152
|
+
# ==== First Example
|
153
|
+
# @data = @mints_user.get_form(9)
|
154
|
+
#
|
155
|
+
# ==== Second Example
|
156
|
+
# options = { sort: 'id', fields: 'title' }
|
157
|
+
# @data = @mints_user.get_form(2, options)
|
158
|
+
def get_form(id, options = nil)
|
159
|
+
@client.raw('get', "/content/forms/#{id}", options)
|
160
|
+
end
|
161
|
+
|
162
|
+
# === Create form.
|
163
|
+
# Create a form with data.
|
164
|
+
#
|
165
|
+
# ==== Parameters
|
166
|
+
# data:: (Hash) -- Data to be submitted.
|
167
|
+
#
|
168
|
+
# ==== Example
|
169
|
+
# data = {
|
170
|
+
# title: 'New Form',
|
171
|
+
# slug: 'new-form-slug'
|
172
|
+
# }
|
173
|
+
# @data = @mints_user.create_form(data)
|
174
|
+
def create_form(data)
|
175
|
+
@client.raw('post', '/content/forms', nil, data_transform(data))
|
176
|
+
end
|
177
|
+
|
178
|
+
# === Update form.
|
179
|
+
# Update a form info.
|
180
|
+
#
|
181
|
+
# ==== Parameters
|
182
|
+
# id:: (Integer) -- Form id.
|
183
|
+
# data:: (Hash) -- Data to be submitted.
|
184
|
+
#
|
185
|
+
# ==== Example
|
186
|
+
# data = {
|
187
|
+
# title: 'New Form Modified',
|
188
|
+
# slug: 'new-form-slug'
|
189
|
+
# }
|
190
|
+
# @data = @mints_user.update_form(3, data)
|
191
|
+
def update_form(id, data)
|
192
|
+
@client.raw('put', "/content/forms/#{id}", nil, data_transform(data))
|
193
|
+
end
|
194
|
+
|
195
|
+
# === Delete form.
|
196
|
+
# Delete a form.
|
197
|
+
#
|
198
|
+
# ==== Parameters
|
199
|
+
# id:: (Integer) -- Form id.
|
200
|
+
#
|
201
|
+
# ==== Example
|
202
|
+
# @data = @mints_user.delete_form(9)
|
203
|
+
def delete_form(id)
|
204
|
+
@client.raw('delete', "/content/forms/#{id}")
|
205
|
+
end
|
206
|
+
|
207
|
+
# === Get form aggregates.
|
208
|
+
# Get a form aggregates info.
|
209
|
+
#
|
210
|
+
# ==== Parameters
|
211
|
+
# id:: (Integer) -- Form id.
|
212
|
+
# object_id:: (Integer) -- Object id.
|
213
|
+
# ==== First Example
|
214
|
+
# @data = @mints_user.get_form_aggregates(1)
|
215
|
+
def get_form_aggregates(id, object_id)
|
216
|
+
@client.raw('get', "/content/forms/#{id}/aggregates?object_id=#{object_id}", options)
|
217
|
+
end
|
218
|
+
|
219
|
+
# === Reset aggregates.
|
220
|
+
#
|
221
|
+
# ==== Parameters
|
222
|
+
# data:: (Hash) -- Data to be submitted.
|
223
|
+
#
|
224
|
+
# ==== Example
|
225
|
+
# data = { object_id: 1 }
|
226
|
+
# @data = @mints_user.reset_form_aggregates(data)
|
227
|
+
def reset_form_aggregates(data)
|
228
|
+
@client.raw('post', "/content/forms/#{id}/aggregates", nil, data_transform(data))
|
229
|
+
end
|
230
|
+
end
|