mints 0.0.27 → 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 +4 -4
- data/lib/contact.rb +60 -61
- data/lib/errors.rb +1 -1
- data/lib/generators/mints_config.yml.erb +0 -2
- data/lib/generators/mints_link.rb +3 -3
- data/lib/mints/helpers/mints_helper.rb +2 -2
- data/lib/pub.rb +55 -55
- 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 -106
- 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 +3 -3
- metadata +33 -33
data/lib/pub.rb
CHANGED
@@ -27,7 +27,7 @@ module Mints
|
|
27
27
|
# * +tags+ - [_Boolean_] If present, tags will be returned for each record in the results. _Example:_
|
28
28
|
# { "tags": true }
|
29
29
|
# * +fields+ - [_String_] Specify the fields that you want to be returned. If empty, all fields are returned. The object index can also be used to specify specific fields from relations. _Example:_
|
30
|
-
# {
|
30
|
+
# { fields: "id, title, slug" }
|
31
31
|
# { "fields[products]": "id, title, slug" }
|
32
32
|
#
|
33
33
|
# == Resource collections options
|
@@ -44,7 +44,7 @@ module Mints
|
|
44
44
|
# {
|
45
45
|
# "type":"attribute",
|
46
46
|
# "operator":"==",
|
47
|
-
#
|
47
|
+
# slug:"title",
|
48
48
|
# "value":"Action movies"
|
49
49
|
# }
|
50
50
|
# ],
|
@@ -54,11 +54,11 @@ module Mints
|
|
54
54
|
# * +catfilters+ - [_String_] filter by categories. _Example:_
|
55
55
|
# { "catfilters": "categoryName" }
|
56
56
|
# * +fields+ - [_String_] Specify the fields that you want to be returned. If empty, all fields are returned. The object index can also be used to specify specific fields from relations. _Example:_
|
57
|
-
# {
|
57
|
+
# { fields: "id, title, slug" }
|
58
58
|
# { "fields[products]": "id, title, slug" }
|
59
59
|
# * +sort+ - [_String_] The name of the field to perform the sort. Prefix the value with a minus sign - for ascending order. _Example:_
|
60
|
-
# {
|
61
|
-
# {
|
60
|
+
# { sort: "title" }
|
61
|
+
# { sort: "-title" }
|
62
62
|
# * +include+ - [_String_] Specify additional information to be included in the results from the objects relations. _Example:_
|
63
63
|
# { "include": "events" }
|
64
64
|
# * +attributes+ - [_Boolean_] If present, attributes will be returned for each record in the results. _Example:_
|
@@ -110,7 +110,7 @@ module Mints
|
|
110
110
|
user_agent: user_agent || request.user_agent,
|
111
111
|
url: url || request.fullpath
|
112
112
|
}
|
113
|
-
response = @client.raw(
|
113
|
+
response = @client.raw('post', "/register-visit", nil, data.to_json)
|
114
114
|
return response
|
115
115
|
end
|
116
116
|
|
@@ -125,7 +125,7 @@ module Mints
|
|
125
125
|
# ==== Example
|
126
126
|
# @data = @mints_pub.register_visit_timer("60da2325d29acc7e55684472", 4)
|
127
127
|
def register_visit_timer(visit, time)
|
128
|
-
@client.raw(
|
128
|
+
@client.raw('get', "/register-visit-timer?visit=#{visit}&time=#{time}")
|
129
129
|
end
|
130
130
|
|
131
131
|
### V1/CONTENT ###
|
@@ -140,7 +140,7 @@ module Mints
|
|
140
140
|
# ==== Example
|
141
141
|
# @data = @mints_pub.get_asset_info("asset_slug")
|
142
142
|
def get_asset_info(slug)
|
143
|
-
@client.raw(
|
143
|
+
@client.raw('get', "/content/asset-info/#{slug}")
|
144
144
|
end
|
145
145
|
|
146
146
|
##
|
@@ -156,17 +156,17 @@ module Mints
|
|
156
156
|
#
|
157
157
|
# ==== Second Example
|
158
158
|
# options = {
|
159
|
-
#
|
159
|
+
# fields: 'id, slug'
|
160
160
|
# }
|
161
161
|
# @data = @mints_pub.get_stories(options)
|
162
162
|
#
|
163
163
|
# ==== Third Example
|
164
164
|
# options = {
|
165
|
-
#
|
165
|
+
# fields: 'id, slug'
|
166
166
|
# }
|
167
167
|
# @data = @mints_pub.get_stories(options, false)
|
168
168
|
def get_stories(options = nil, use_post = true)
|
169
|
-
|
169
|
+
get_query_results('/content/stories', options, use_post)
|
170
170
|
end
|
171
171
|
|
172
172
|
##
|
@@ -183,7 +183,7 @@ module Mints
|
|
183
183
|
# ==== Second Example
|
184
184
|
# @data = @mints_pub.get_story("story_slug", options.to_json)
|
185
185
|
def get_story(slug, options = nil)
|
186
|
-
@client.raw(
|
186
|
+
@client.raw('get', "/content/stories/#{slug}", options)
|
187
187
|
end
|
188
188
|
|
189
189
|
##
|
@@ -199,17 +199,17 @@ module Mints
|
|
199
199
|
#
|
200
200
|
# ==== Second Example
|
201
201
|
# options = {
|
202
|
-
#
|
202
|
+
# fields: 'id, title'
|
203
203
|
# }
|
204
204
|
# @data = @mints_pub.get_story_versions(options)
|
205
205
|
#
|
206
206
|
# ==== Third Example
|
207
207
|
# options = {
|
208
|
-
#
|
208
|
+
# fields: 'id, title'
|
209
209
|
# }
|
210
210
|
# @data = @mints_pub.get_story_versions(options, false)
|
211
211
|
def get_story_versions(options = nil, use_post = true)
|
212
|
-
|
212
|
+
get_query_results("/content/story-versions", options, use_post)
|
213
213
|
end
|
214
214
|
|
215
215
|
##
|
@@ -226,7 +226,7 @@ module Mints
|
|
226
226
|
# ==== Second Example
|
227
227
|
# @data = @mints_pub.get_story_version("story_slug", options.to_json)
|
228
228
|
def get_story_version(slug, options = nil)
|
229
|
-
@client.raw(
|
229
|
+
@client.raw('get', "/content/story-versions/#{slug}", options)
|
230
230
|
end
|
231
231
|
|
232
232
|
##
|
@@ -236,7 +236,7 @@ module Mints
|
|
236
236
|
# ==== Example
|
237
237
|
# @data = @mints_pub.get_forms
|
238
238
|
def get_forms(options = nil)
|
239
|
-
@client.raw(
|
239
|
+
@client.raw('get', '/content/forms', options)
|
240
240
|
end
|
241
241
|
|
242
242
|
##
|
@@ -249,7 +249,7 @@ module Mints
|
|
249
249
|
# ==== Example
|
250
250
|
# @data = @mints_pub.get_form("form_slug")
|
251
251
|
def get_form(slug, options = nil)
|
252
|
-
@client.raw(
|
252
|
+
@client.raw('get', "/content/forms/#{slug}", options)
|
253
253
|
end
|
254
254
|
|
255
255
|
##
|
@@ -270,7 +270,7 @@ module Mints
|
|
270
270
|
# }
|
271
271
|
# @data = @mints_pub.submit_form(data)
|
272
272
|
def submit_form(data)
|
273
|
-
@client.raw(
|
273
|
+
@client.raw('post', "/content/forms/submit", nil, data_transform(data))
|
274
274
|
end
|
275
275
|
|
276
276
|
##
|
@@ -289,11 +289,11 @@ module Mints
|
|
289
289
|
# ==== Second Example
|
290
290
|
# options = {
|
291
291
|
# "template": "content_instance_template_slug",
|
292
|
-
#
|
292
|
+
# sort: "-id"
|
293
293
|
# }
|
294
294
|
# @data = @mints_pub.get_content_instances(options)
|
295
|
-
def get_content_instances(options)
|
296
|
-
@client.raw(
|
295
|
+
def get_content_instances(options = nil)
|
296
|
+
@client.raw('get', "/content/content-instances", options)
|
297
297
|
end
|
298
298
|
|
299
299
|
##
|
@@ -306,19 +306,18 @@ module Mints
|
|
306
306
|
# ==== Example
|
307
307
|
# @data = @mints_pub.get_content_instance("content_instance_slug")
|
308
308
|
def get_content_instance(slug)
|
309
|
-
@client.raw(
|
309
|
+
@client.raw('get', "/content/content-instances/#{slug}")
|
310
310
|
end
|
311
311
|
|
312
|
-
#Note: This method is commented for future use
|
313
312
|
##
|
314
313
|
# === Get Content Pages.
|
315
314
|
# Get all content pages.
|
316
315
|
#
|
317
316
|
# ==== Parameters
|
318
317
|
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
319
|
-
|
320
|
-
|
321
|
-
|
318
|
+
def get_content_bundles(options = nil)
|
319
|
+
@client.raw('get', "/content/content-bundles", options)
|
320
|
+
end
|
322
321
|
|
323
322
|
##
|
324
323
|
# === Get Content Page.
|
@@ -330,7 +329,8 @@ module Mints
|
|
330
329
|
# ==== Example
|
331
330
|
# @data = @mints_pub.get_content_page("test-page")
|
332
331
|
def get_content_page(slug, options = nil)
|
333
|
-
|
332
|
+
warn '[DEPRECATED] The get_content_page method is deprecated and will be removed in the future, use get_content_bundle instead'
|
333
|
+
@client.raw('get', "/content/content-pages/#{slug}", options)
|
334
334
|
end
|
335
335
|
|
336
336
|
##
|
@@ -341,9 +341,9 @@ module Mints
|
|
341
341
|
# slug:: (String) -- It's the string identifier generated by Mints.
|
342
342
|
#
|
343
343
|
# ==== Example
|
344
|
-
# @data = @mints_pub.
|
344
|
+
# @data = @mints_pub.get_content_bundle("test-page")
|
345
345
|
def get_content_bundle(slug, options = nil)
|
346
|
-
@client.raw(
|
346
|
+
@client.raw('get', "/content/content-bundles/#{slug}", options)
|
347
347
|
end
|
348
348
|
|
349
349
|
### V1/ECOMMERCE ###
|
@@ -360,14 +360,14 @@ module Mints
|
|
360
360
|
# @data = @mints_pub.get_locations
|
361
361
|
#
|
362
362
|
# ==== Second Example
|
363
|
-
# options = {
|
363
|
+
# options = { fields: "title" }
|
364
364
|
# @data = @mints_pub.get_locations(options)
|
365
365
|
#
|
366
366
|
# ==== Third Example
|
367
|
-
# options = {
|
367
|
+
# options = { fields: "title" }
|
368
368
|
# @data = @mints_pub.get_locations(options, false)
|
369
369
|
def get_locations(options = nil, use_post = true)
|
370
|
-
|
370
|
+
get_query_results("/ecommerce/locations", options, use_post)
|
371
371
|
end
|
372
372
|
|
373
373
|
##
|
@@ -382,14 +382,14 @@ module Mints
|
|
382
382
|
# @data = @mints_pub.get_products
|
383
383
|
#
|
384
384
|
# ==== Second Example
|
385
|
-
# options = {
|
385
|
+
# options = { fields: "title" }
|
386
386
|
# @data = @mints_pub.get_products(options)
|
387
387
|
#
|
388
388
|
# ==== Third Example
|
389
|
-
# options = {
|
389
|
+
# options = { fields: "title" }
|
390
390
|
# @data = @mints_pub.get_products(options, false)
|
391
391
|
def get_products(options = nil, use_post = true)
|
392
|
-
|
392
|
+
get_query_results("/ecommerce/products", options, use_post)
|
393
393
|
end
|
394
394
|
|
395
395
|
##
|
@@ -405,11 +405,11 @@ module Mints
|
|
405
405
|
#
|
406
406
|
# ==== Second Example
|
407
407
|
# options = {
|
408
|
-
#
|
408
|
+
# fields: 'id, slug'
|
409
409
|
# }
|
410
410
|
# @data = @mints_pub.get_product("lego-set", options)
|
411
411
|
def get_product(slug, options = nil)
|
412
|
-
@client.raw(
|
412
|
+
@client.raw('get', "/ecommerce/products/#{slug}", options)
|
413
413
|
end
|
414
414
|
|
415
415
|
### V1/CONFIG ###
|
@@ -430,12 +430,12 @@ module Mints
|
|
430
430
|
# ==== Second Example
|
431
431
|
# options = {
|
432
432
|
# "object_type": "products",
|
433
|
-
#
|
434
|
-
#
|
433
|
+
# fields: "id",
|
434
|
+
# sort: "-id"
|
435
435
|
# }
|
436
436
|
# @data = @mints_pub.get_public_folders(options)
|
437
|
-
def get_public_folders(options)
|
438
|
-
@client.raw(
|
437
|
+
def get_public_folders(options = nil)
|
438
|
+
@client.raw('get', "/config/public-folders", options)
|
439
439
|
end
|
440
440
|
|
441
441
|
##
|
@@ -455,11 +455,11 @@ module Mints
|
|
455
455
|
# ==== Second Example
|
456
456
|
# options = {
|
457
457
|
# "object_type": "products",
|
458
|
-
#
|
458
|
+
# fields: 'id, title'
|
459
459
|
# }
|
460
460
|
# @data = @mints_pub.get_public_folder('yellow', options)
|
461
461
|
def get_public_folder(slug, options)
|
462
|
-
@client.raw(
|
462
|
+
@client.raw('get', "/config/public-folders/#{slug}", options)
|
463
463
|
end
|
464
464
|
|
465
465
|
##
|
@@ -474,11 +474,11 @@ module Mints
|
|
474
474
|
#
|
475
475
|
# ==== Second Example
|
476
476
|
# options = {
|
477
|
-
#
|
477
|
+
# fields: "id, tag"
|
478
478
|
# }
|
479
479
|
# @data = @mints_pub.get_tags(options)
|
480
480
|
def get_tags(options = nil)
|
481
|
-
@client.raw(
|
481
|
+
@client.raw('get', "/config/tags", options)
|
482
482
|
end
|
483
483
|
|
484
484
|
##
|
@@ -494,11 +494,11 @@ module Mints
|
|
494
494
|
#
|
495
495
|
# ==== Second Example
|
496
496
|
# options = {
|
497
|
-
#
|
497
|
+
# fields: "id, tag"
|
498
498
|
# }
|
499
499
|
# @data = @mints_pub.get_tag("velit-0", options)
|
500
500
|
def get_tag(slug, options = nil)
|
501
|
-
@client.raw(
|
501
|
+
@client.raw('get', "/config/tags/#{slug}", options)
|
502
502
|
end
|
503
503
|
|
504
504
|
##
|
@@ -514,17 +514,17 @@ module Mints
|
|
514
514
|
#
|
515
515
|
# ==== Second Example
|
516
516
|
# options = {
|
517
|
-
#
|
517
|
+
# fields: 'id, title'
|
518
518
|
# }
|
519
519
|
# @data = @mints_pub.get_taxonomies(options)
|
520
520
|
#
|
521
521
|
# ==== Third Example
|
522
522
|
# options = {
|
523
|
-
#
|
523
|
+
# fields: 'id, title'
|
524
524
|
# }
|
525
525
|
# @data = @mints_pub.get_taxonomies(options, false)
|
526
526
|
def get_taxonomies(options = nil, use_post = true)
|
527
|
-
|
527
|
+
get_query_results("/config/taxonomies", options, use_post)
|
528
528
|
end
|
529
529
|
|
530
530
|
##
|
@@ -540,11 +540,11 @@ module Mints
|
|
540
540
|
#
|
541
541
|
# ==== Second Example
|
542
542
|
# options = {
|
543
|
-
#
|
543
|
+
# fields: "title"
|
544
544
|
# }
|
545
545
|
# @data = @mints_pub.get_taxonomy("taxonomy_slug", options)
|
546
546
|
def get_taxonomy(slug, options = nil)
|
547
|
-
@client.raw(
|
547
|
+
@client.raw('get', "/config/taxonomies/#{slug}", options)
|
548
548
|
end
|
549
549
|
|
550
550
|
##
|
@@ -554,7 +554,7 @@ module Mints
|
|
554
554
|
# ==== Example
|
555
555
|
# @data = @mints_pub.get_attributes
|
556
556
|
def get_attributes
|
557
|
-
@client.raw(
|
557
|
+
@client.raw('get', "/config/attributes")
|
558
558
|
end
|
559
559
|
|
560
560
|
def send_user_magic_link(email_or_phone, template_slug, redirect_url = '', life_time = 1440, max_visits = nil, driver = 'email')
|
@@ -570,7 +570,7 @@ module Mints
|
|
570
570
|
else
|
571
571
|
data['email'] = email_or_phone
|
572
572
|
end
|
573
|
-
@client.raw(
|
573
|
+
@client.raw('post', "/users/magic-link", nil, { data: data }.to_json, '/api/v1')
|
574
574
|
end
|
575
575
|
|
576
576
|
private
|
data/lib/user/config/api_keys.rb
CHANGED
@@ -13,10 +13,10 @@ module ApiKeys
|
|
13
13
|
# @data = @mints_user.get_api_keys
|
14
14
|
#
|
15
15
|
# ==== Second Example
|
16
|
-
# options = {
|
16
|
+
# options = { fields: "id" }
|
17
17
|
# @data = @mints_user.get_api_keys(options)
|
18
18
|
def get_api_keys(options = nil)
|
19
|
-
@client.raw(
|
19
|
+
@client.raw('get', "/config/api-keys", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Get api key.
|
@@ -30,10 +30,10 @@ module ApiKeys
|
|
30
30
|
# @data = @mints_user.get_api_key(2)
|
31
31
|
#
|
32
32
|
# ==== Second Example
|
33
|
-
# options = {
|
33
|
+
# options = { fields: "id" }
|
34
34
|
# @data = @mints_user.get_api_key(2, options)
|
35
35
|
def get_api_key(id, options = nil)
|
36
|
-
@client.raw(
|
36
|
+
@client.raw('get', "/config/api-keys/#{id}", options)
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Create api key.
|
@@ -44,11 +44,11 @@ module ApiKeys
|
|
44
44
|
#
|
45
45
|
# ==== Example
|
46
46
|
# data = {
|
47
|
-
#
|
47
|
+
# description: "New Api Key Description"
|
48
48
|
# }
|
49
49
|
# @data = @mints_user.create_api_key(data)
|
50
50
|
def create_api_key(data)
|
51
|
-
@client.raw(
|
51
|
+
@client.raw('post', "/config/api-keys", nil, data_transform(data))
|
52
52
|
end
|
53
53
|
|
54
54
|
# === Delete api key.
|
@@ -60,6 +60,6 @@ module ApiKeys
|
|
60
60
|
# ==== Example
|
61
61
|
# @data = @mints_user.delete_api_key(2)
|
62
62
|
def delete_api_key(id)
|
63
|
-
@client.raw(
|
63
|
+
@client.raw('delete', "/config/api-keys/#{id}")
|
64
64
|
end
|
65
65
|
end
|
@@ -14,11 +14,11 @@ module Appointments
|
|
14
14
|
#
|
15
15
|
# ==== Second Example
|
16
16
|
# options = {
|
17
|
-
#
|
17
|
+
# fields: "id"
|
18
18
|
# }
|
19
19
|
# @data = @mints_user.get_appointments(options)
|
20
20
|
def get_appointments(options = nil)
|
21
|
-
@client.raw(
|
21
|
+
@client.raw('get', "/config/appointments", options)
|
22
22
|
end
|
23
23
|
|
24
24
|
# === Get appointment.
|
@@ -33,11 +33,11 @@ module Appointments
|
|
33
33
|
#
|
34
34
|
# ==== Second Example
|
35
35
|
# options = {
|
36
|
-
#
|
36
|
+
# fields: "id"
|
37
37
|
# }
|
38
38
|
# @data = @mints_user.get_appointment(1, options)
|
39
39
|
def get_appointment(id, options = nil)
|
40
|
-
@client.raw(
|
40
|
+
@client.raw('get', "/config/appointments/#{id}", options)
|
41
41
|
end
|
42
42
|
|
43
43
|
# === Create appointment.
|
@@ -50,14 +50,14 @@ module Appointments
|
|
50
50
|
# data = {
|
51
51
|
# "object_type": "contacts",
|
52
52
|
# "object_id": 1,
|
53
|
-
#
|
53
|
+
# title: "New Appointment",
|
54
54
|
# "start": "2021-09-06T20:29:16+00:00",
|
55
55
|
# "end": "2022-09-06T20:29:16+00:00",
|
56
56
|
# "attendee_id": 1
|
57
57
|
# }
|
58
58
|
# @data = @mints_user.create_appointment(data)
|
59
59
|
def create_appointment(data)
|
60
|
-
@client.raw(
|
60
|
+
@client.raw('post', "/config/appointments", nil, data_transform(data))
|
61
61
|
end
|
62
62
|
|
63
63
|
# === Update appointment.
|
@@ -73,7 +73,7 @@ module Appointments
|
|
73
73
|
# }
|
74
74
|
# @data = @mints_user.update_appointment(1, data)
|
75
75
|
def update_appointment(id, data)
|
76
|
-
@client.raw(
|
76
|
+
@client.raw('put', "/config/appointments/#{id}", nil, data_transform(data))
|
77
77
|
end
|
78
78
|
|
79
79
|
# === Delete appointment.
|
@@ -85,7 +85,7 @@ module Appointments
|
|
85
85
|
# ==== Example
|
86
86
|
# @data = @mints_user.delete_appointment(1)
|
87
87
|
def delete_appointment(id)
|
88
|
-
@client.raw(
|
88
|
+
@client.raw('delete', "/config/appointments/#{id}")
|
89
89
|
end
|
90
90
|
|
91
91
|
# === Scheduled appointments.
|
@@ -103,7 +103,7 @@ module Appointments
|
|
103
103
|
# }
|
104
104
|
# @data = @mints_user.scheduled_appointments(data)
|
105
105
|
def scheduled_appointments(data)
|
106
|
-
@client.raw(
|
106
|
+
@client.raw('post', "/config/appointments/scheduled-appointments", nil, data_transform(data))
|
107
107
|
end
|
108
108
|
|
109
109
|
# === Reschedule appointment.
|
@@ -120,7 +120,7 @@ module Appointments
|
|
120
120
|
# }
|
121
121
|
# @data = @mints_user.reschedule_appointment(data)
|
122
122
|
def reschedule_appointment(data)
|
123
|
-
@client.raw(
|
123
|
+
@client.raw('post', "/config/appointments/reschedule-appointment", nil, data_transform(data))
|
124
124
|
end
|
125
125
|
|
126
126
|
# === Attach invitee.
|
@@ -136,7 +136,7 @@ module Appointments
|
|
136
136
|
# }
|
137
137
|
# @data = @mints_user.attach_invitee(data)
|
138
138
|
def attach_invitee(data)
|
139
|
-
@client.raw(
|
139
|
+
@client.raw('post', "/config/appointments/attach-invitee", nil, data_transform(data))
|
140
140
|
end
|
141
141
|
|
142
142
|
# === Attach follower.
|
@@ -152,7 +152,7 @@ module Appointments
|
|
152
152
|
# }
|
153
153
|
# @data = @mints_user.attach_follower(data)
|
154
154
|
def attach_follower(data)
|
155
|
-
@client.raw(
|
155
|
+
@client.raw('post', "/config/appointments/attach-follower", nil, data_transform(data))
|
156
156
|
end
|
157
157
|
|
158
158
|
# === Detach invitee.
|
@@ -168,7 +168,7 @@ module Appointments
|
|
168
168
|
# }
|
169
169
|
# @data = @mints_user.detach_invitee(data)
|
170
170
|
def detach_invitee(data)
|
171
|
-
@client.raw(
|
171
|
+
@client.raw('post', "/config/appointments/detach-invitee", nil, data_transform(data))
|
172
172
|
end
|
173
173
|
|
174
174
|
# === Detach follower.
|
@@ -184,7 +184,7 @@ module Appointments
|
|
184
184
|
# }
|
185
185
|
# @data = @mints_user.detach_follower(data)
|
186
186
|
def detach_follower(data)
|
187
|
-
@client.raw(
|
187
|
+
@client.raw('post', "/config/appointments/detach-follower", nil, data_transform(data))
|
188
188
|
end
|
189
189
|
|
190
190
|
# === Sync invitee.
|
@@ -200,7 +200,7 @@ module Appointments
|
|
200
200
|
# }
|
201
201
|
# @data = @mints_user.sync_invitee(data)
|
202
202
|
def sync_invitee(data)
|
203
|
-
@client.raw(
|
203
|
+
@client.raw('post', "/config/appointments/sync-invitee", nil, data_transform(data))
|
204
204
|
end
|
205
205
|
|
206
206
|
# === Sync follower.
|
@@ -216,6 +216,6 @@ module Appointments
|
|
216
216
|
# }
|
217
217
|
# @data = @mints_user.sync_follower(data)
|
218
218
|
def sync_follower(data)
|
219
|
-
@client.raw(
|
219
|
+
@client.raw('post', "/config/appointments/sync-follower", nil, data_transform(data))
|
220
220
|
end
|
221
221
|
end
|
@@ -9,7 +9,7 @@ module AttributeGroups
|
|
9
9
|
# ==== Example
|
10
10
|
# @data = @mints_user.get_attribute_groups_data_types
|
11
11
|
def get_attribute_groups_data_types
|
12
|
-
@client.raw(
|
12
|
+
@client.raw('get', "/config/attribute-groups/object-types")
|
13
13
|
end
|
14
14
|
|
15
15
|
# === Get attribute groups.
|
@@ -22,10 +22,10 @@ module AttributeGroups
|
|
22
22
|
# @data = @mints_user.get_attribute_groups
|
23
23
|
#
|
24
24
|
# ==== Second Example
|
25
|
-
# options = {
|
25
|
+
# options = { sort: "id" }
|
26
26
|
# @data = @mints_user.get_attribute_groups(options)
|
27
27
|
def get_attribute_groups(options = nil)
|
28
|
-
@client.raw(
|
28
|
+
@client.raw('get', "/config/attribute-groups", options)
|
29
29
|
end
|
30
30
|
|
31
31
|
# === Get attribute group.
|
@@ -37,7 +37,7 @@ module AttributeGroups
|
|
37
37
|
# ==== Example
|
38
38
|
# @data = @mints_user.get_attribute_group(10)
|
39
39
|
def get_attribute_group(id)
|
40
|
-
@client.raw(
|
40
|
+
@client.raw('get', "/config/attribute-groups/#{id}")
|
41
41
|
end
|
42
42
|
|
43
43
|
# === Create attribute group.
|
@@ -48,12 +48,12 @@ module AttributeGroups
|
|
48
48
|
#
|
49
49
|
# ==== Example
|
50
50
|
# data = {
|
51
|
-
#
|
51
|
+
# title: "New Attribute Group",
|
52
52
|
# "object_type": "contacts"
|
53
53
|
# }
|
54
54
|
# @data = @mints_user.create_attribute_group(data)
|
55
55
|
def create_attribute_group(data)
|
56
|
-
@client.raw(
|
56
|
+
@client.raw('post', "/config/attribute-groups", nil, data_transform(data))
|
57
57
|
end
|
58
58
|
|
59
59
|
# === Update attribute group.
|
@@ -65,13 +65,13 @@ module AttributeGroups
|
|
65
65
|
#
|
66
66
|
# ==== Example
|
67
67
|
# data = {
|
68
|
-
#
|
68
|
+
# title: "New Attribute Group Modified",
|
69
69
|
# "object_type": "contacts",
|
70
|
-
#
|
71
|
-
#
|
70
|
+
# slug: "new-attribute-group",
|
71
|
+
# description: "New description"
|
72
72
|
# }
|
73
73
|
# @data = @mints_user.update_attribute_group(36, data)
|
74
74
|
def update_attribute_group(id, data)
|
75
|
-
@client.raw(
|
75
|
+
@client.raw('put', "/config/attribute-groups/#{id}", nil, data_transform(data))
|
76
76
|
end
|
77
77
|
end
|
@@ -9,7 +9,7 @@ module Attributes
|
|
9
9
|
# ==== Example
|
10
10
|
# @data = @mints_user.get_attributes_data_types
|
11
11
|
def get_attributes_data_types
|
12
|
-
@client.raw(
|
12
|
+
@client.raw('get', "/config/attributes/data-types")
|
13
13
|
end
|
14
14
|
|
15
15
|
# === Get sub attributes.
|
@@ -21,7 +21,7 @@ module Attributes
|
|
21
21
|
# ==== Example
|
22
22
|
#
|
23
23
|
def get_sub_attributes(options) #TODO: Test, this method has been added recently
|
24
|
-
@client.raw(
|
24
|
+
@client.raw('get', "/config/attributes/sub-attributes", options)
|
25
25
|
end
|
26
26
|
|
27
27
|
# === Get attributes.
|
@@ -30,7 +30,7 @@ module Attributes
|
|
30
30
|
# ==== Example
|
31
31
|
# @data = @mints_user.get_attributes
|
32
32
|
def get_attributes
|
33
|
-
@client.raw(
|
33
|
+
@client.raw('get', "/config/attributes")
|
34
34
|
end
|
35
35
|
|
36
36
|
# === Get attribute.
|
@@ -42,7 +42,7 @@ module Attributes
|
|
42
42
|
# ==== Example
|
43
43
|
# @data = @mints_user.get_attribute(1)
|
44
44
|
def get_attribute(id)
|
45
|
-
@client.raw(
|
45
|
+
@client.raw('get', "/config/attributes/#{id}")
|
46
46
|
end
|
47
47
|
|
48
48
|
# === Create attribute.
|
@@ -53,15 +53,15 @@ module Attributes
|
|
53
53
|
#
|
54
54
|
# ==== Example
|
55
55
|
# data = {
|
56
|
-
#
|
56
|
+
# title: "New Attribute",
|
57
57
|
# "object_type": "orders",
|
58
|
-
#
|
58
|
+
# slug: "new_attribute",
|
59
59
|
# "attribute_group_id": 1,
|
60
60
|
# "data_type_enum": 10
|
61
61
|
# }
|
62
62
|
# @data = @mints_user.create_attribute(data)
|
63
63
|
def create_attribute(data)
|
64
|
-
@client.raw(
|
64
|
+
@client.raw('post', "/config/attributes", nil, data_transform(data))
|
65
65
|
end
|
66
66
|
|
67
67
|
# === Update attribute.
|
@@ -73,14 +73,14 @@ module Attributes
|
|
73
73
|
#
|
74
74
|
# ==== Example
|
75
75
|
# data = {
|
76
|
-
#
|
76
|
+
# title: "New Attribute Modified",
|
77
77
|
# "object_type": "orders",
|
78
|
-
#
|
78
|
+
# slug: "new_attribute",
|
79
79
|
# "attribute_group_id": 1,
|
80
80
|
# "data_type_enum": 10
|
81
81
|
# }
|
82
82
|
# @data = @mints_user.update_attribute(292, data)
|
83
83
|
def update_attribute(id, data)
|
84
|
-
@client.raw(
|
84
|
+
@client.raw('put', "/config/attributes/#{id}", nil, data_transform(data))
|
85
85
|
end
|
86
86
|
end
|