mints 0.0.26 → 0.0.27
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 +72 -34
- data/lib/contact.rb +46 -46
- data/lib/errors.rb +98 -0
- 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 +21 -21
- data/lib/user/config/api_keys.rb +4 -4
- data/lib/user/config/appointments.rb +13 -13
- data/lib/user/config/attribute_groups.rb +5 -5
- data/lib/user/config/attributes.rb +6 -6
- data/lib/user/config/calendars.rb +5 -5
- data/lib/user/config/config.rb +7 -7
- data/lib/user/config/importers.rb +13 -13
- data/lib/user/config/public_folders.rb +7 -7
- data/lib/user/config/relationships.rb +9 -9
- data/lib/user/config/roles.rb +6 -6
- data/lib/user/config/seeds.rb +3 -3
- data/lib/user/config/system_settings.rb +4 -4
- data/lib/user/config/tags.rb +4 -4
- data/lib/user/config/taxonomies.rb +7 -7
- data/lib/user/config/teams.rb +5 -5
- data/lib/user/config/users.rb +5 -5
- data/lib/user/contacts/contacts.rb +1 -1
- data/lib/user/content/assets.rb +17 -17
- data/lib/user/content/content.rb +13 -13
- data/lib/user/content/content_instances.rb +9 -9
- data/lib/user/content/content_templates.rb +7 -7
- data/lib/user/content/conversations.rb +13 -13
- data/lib/user/content/dam.rb +8 -8
- data/lib/user/content/forms.rb +16 -16
- data/lib/user/content/message_templates.rb +11 -11
- data/lib/user/content/messages.rb +5 -5
- data/lib/user/content/pages.rb +7 -7
- data/lib/user/content/stories.rb +6 -6
- data/lib/user/content/story_templates.rb +6 -6
- data/lib/user/content/story_versions.rb +6 -6
- data/lib/user/crm/companies.rb +5 -5
- data/lib/user/crm/contacts.rb +18 -18
- data/lib/user/crm/deals.rb +6 -6
- data/lib/user/crm/favorites.rb +3 -3
- data/lib/user/crm/segments.rb +9 -9
- data/lib/user/crm/users.rb +1 -1
- data/lib/user/crm/workflow_step_objects.rb +5 -5
- data/lib/user/crm/workflow_steps.rb +3 -3
- data/lib/user/crm/workflows.rb +4 -4
- data/lib/user/ecommerce/item_prices.rb +5 -5
- data/lib/user/ecommerce/locations.rb +10 -10
- data/lib/user/ecommerce/order_items_groups.rb +15 -14
- data/lib/user/ecommerce/order_statuses.rb +2 -2
- data/lib/user/ecommerce/orders.rb +16 -16
- data/lib/user/ecommerce/price_lists.rb +3 -3
- data/lib/user/ecommerce/product_templates.rb +7 -7
- data/lib/user/ecommerce/product_variations.rb +8 -8
- data/lib/user/ecommerce/products.rb +10 -10
- data/lib/user/ecommerce/skus.rb +5 -5
- data/lib/user/ecommerce/taxes.rb +5 -5
- data/lib/user/ecommerce/variant_options.rb +4 -4
- data/lib/user/ecommerce/variant_values.rb +4 -4
- data/lib/user/helpers/helpers.rb +8 -8
- data/lib/user/helpers/object_activities.rb +5 -5
- data/lib/user/helpers/object_folders.rb +5 -5
- data/lib/user/helpers/user_folders.rb +5 -5
- data/lib/user/marketing/marketing.rb +8 -8
- data/lib/user/profile/profile.rb +8 -8
- data/lib/user.rb +1 -1
- metadata +10 -4
@@ -11,7 +11,7 @@ module Products
|
|
11
11
|
# data:: (Hash) -- Data to be submitted.
|
12
12
|
#
|
13
13
|
def update_product_variations_config(productId, data) #TODO: Method doesnt work, research use
|
14
|
-
|
14
|
+
@client.raw("post", "/ecommerce/products/update-variations-config/#{productId}", nil, data_transform(data))
|
15
15
|
end
|
16
16
|
|
17
17
|
# === Get product support data.
|
@@ -20,7 +20,7 @@ module Products
|
|
20
20
|
# ==== Example
|
21
21
|
# @data = @mints_user.get_products_support_data
|
22
22
|
def get_products_support_data
|
23
|
-
|
23
|
+
@client.raw("get", "/ecommerce/products/support-data")
|
24
24
|
end
|
25
25
|
|
26
26
|
# === Delete product.
|
@@ -30,7 +30,7 @@ module Products
|
|
30
30
|
# id:: (Integer) -- Product id.
|
31
31
|
#
|
32
32
|
def delete_product(id)
|
33
|
-
|
33
|
+
@client.raw("delete", "/ecommerce/products/#{id}")
|
34
34
|
end
|
35
35
|
|
36
36
|
# === Publish product.
|
@@ -46,7 +46,7 @@ module Products
|
|
46
46
|
# }
|
47
47
|
# @data = @mints_user.publish_product(2, data)
|
48
48
|
def publish_product(id, data)
|
49
|
-
|
49
|
+
@client.raw("put", "/ecommerce/products/#{id}/publish", nil, data_transform(data))
|
50
50
|
end
|
51
51
|
|
52
52
|
# === Schedule product.
|
@@ -62,7 +62,7 @@ module Products
|
|
62
62
|
# }
|
63
63
|
# @data = @mints_user.schedule_product(2, data)
|
64
64
|
def schedule_product(id, data)
|
65
|
-
|
65
|
+
@client.raw("put", "/ecommerce/products/#{id}/schedule", nil, data_transform(data))
|
66
66
|
end
|
67
67
|
|
68
68
|
# === Get product variant options config.
|
@@ -74,7 +74,7 @@ module Products
|
|
74
74
|
# ==== Example
|
75
75
|
# @data = @mints_user.get_product_variant_options_config(1)
|
76
76
|
def get_product_variant_options_config(id)
|
77
|
-
|
77
|
+
@client.raw("get", "/ecommerce/products/#{id}/variant-options-config")
|
78
78
|
end
|
79
79
|
|
80
80
|
# === Revert published product.
|
@@ -86,7 +86,7 @@ module Products
|
|
86
86
|
# ==== Example
|
87
87
|
# @data = @mints_user.revert_published_product(2)
|
88
88
|
def revert_published_product(id)
|
89
|
-
|
89
|
+
@client.raw("get", "/ecommerce/products/#{id}/revert-published-data")
|
90
90
|
end
|
91
91
|
|
92
92
|
# === Get products.
|
@@ -130,7 +130,7 @@ module Products
|
|
130
130
|
# }
|
131
131
|
# @data = @mints_user.get_product(3, options)
|
132
132
|
def get_product(id, options = nil)
|
133
|
-
|
133
|
+
@client.raw("get", "/ecommerce/products/#{id}", options)
|
134
134
|
end
|
135
135
|
|
136
136
|
# === Create product.
|
@@ -147,7 +147,7 @@ module Products
|
|
147
147
|
# }
|
148
148
|
# @data = @mints_user.create_product(data)
|
149
149
|
def create_product(data, options = nil)
|
150
|
-
|
150
|
+
@client.raw("post", "/ecommerce/products/", options, data_transform(data))
|
151
151
|
end
|
152
152
|
|
153
153
|
# === Update product.
|
@@ -164,6 +164,6 @@ module Products
|
|
164
164
|
# }
|
165
165
|
# @data = @mints_user.update_product(9, data)
|
166
166
|
def update_product(id, data, options = nil)
|
167
|
-
|
167
|
+
@client.raw("put", "/ecommerce/products/#{id}", options, data_transform(data))
|
168
168
|
end
|
169
169
|
end
|
data/lib/user/ecommerce/skus.rb
CHANGED
@@ -18,7 +18,7 @@ module Skus
|
|
18
18
|
# }
|
19
19
|
# @data = @mints_user.get_skus(options)
|
20
20
|
def get_skus(options = nil)
|
21
|
-
|
21
|
+
@client.raw("get", "/ecommerce/skus", options)
|
22
22
|
end
|
23
23
|
|
24
24
|
# === Get sku.
|
@@ -37,7 +37,7 @@ module Skus
|
|
37
37
|
# }
|
38
38
|
# @data = @mints_user.get_sku(1, options)
|
39
39
|
def get_sku(id, options = nil)
|
40
|
-
|
40
|
+
@client.raw("get", "/ecommerce/skus/#{id}", options)
|
41
41
|
end
|
42
42
|
|
43
43
|
# === Create sku.
|
@@ -55,7 +55,7 @@ module Skus
|
|
55
55
|
# }
|
56
56
|
# @data = @mints_user.create_sku(data)
|
57
57
|
def create_sku(data)
|
58
|
-
|
58
|
+
@client.raw("post", "/ecommerce/skus", nil, data_transform(data))
|
59
59
|
end
|
60
60
|
|
61
61
|
# === Update sku.
|
@@ -71,7 +71,7 @@ module Skus
|
|
71
71
|
# }
|
72
72
|
# @data = @mints_user.update_sku(531, data)
|
73
73
|
def update_sku(id, data)
|
74
|
-
|
74
|
+
@client.raw("put", "/ecommerce/skus/#{id}", nil, data_transform(data))
|
75
75
|
end
|
76
76
|
|
77
77
|
# === Delete sku.
|
@@ -83,6 +83,6 @@ module Skus
|
|
83
83
|
# ==== Example
|
84
84
|
# @data = @mints_user.delete_sku(531)
|
85
85
|
def delete_sku(id)
|
86
|
-
|
86
|
+
@client.raw("delete", "/ecommerce/skus/#{id}")
|
87
87
|
end
|
88
88
|
end
|
data/lib/user/ecommerce/taxes.rb
CHANGED
@@ -16,7 +16,7 @@ module Taxes
|
|
16
16
|
# options = { "fields": "title" }
|
17
17
|
# @data = @mints_user.get_taxes(options)
|
18
18
|
def get_taxes(options = nil)
|
19
|
-
|
19
|
+
@client.raw("get", "/ecommerce/taxes", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Get tax.
|
@@ -33,7 +33,7 @@ module Taxes
|
|
33
33
|
# options = { "fields": "title" }
|
34
34
|
# @data = @mints_user.get_tax(1, options)
|
35
35
|
def get_tax(id, options = nil)
|
36
|
-
|
36
|
+
@client.raw("get", "/ecommerce/taxes/#{id}", options)
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Create tax.
|
@@ -49,7 +49,7 @@ module Taxes
|
|
49
49
|
# }
|
50
50
|
# @data = @mints_user.create_tax(data)
|
51
51
|
def create_tax(data)
|
52
|
-
|
52
|
+
@client.raw("post", "/ecommerce/taxes", nil, data_transform(data))
|
53
53
|
end
|
54
54
|
|
55
55
|
# === Update tax.
|
@@ -65,7 +65,7 @@ module Taxes
|
|
65
65
|
# }
|
66
66
|
# @data = @mints_user.update_tax(11, data)
|
67
67
|
def update_tax(id, data)
|
68
|
-
|
68
|
+
@client.raw("put", "/ecommerce/taxes/#{id}", nil, data_transform(data))
|
69
69
|
end
|
70
70
|
|
71
71
|
# === Delete tax.
|
@@ -77,6 +77,6 @@ module Taxes
|
|
77
77
|
# ==== Example
|
78
78
|
# @data = @mints_user.delete_tax(11)
|
79
79
|
def delete_tax(id)
|
80
|
-
|
80
|
+
@client.raw("delete", "/ecommerce/taxes/#{id}")
|
81
81
|
end
|
82
82
|
end
|
@@ -16,7 +16,7 @@ module VariantOptions
|
|
16
16
|
# options = { "fields": "id, title" }
|
17
17
|
# @data = @mints_user.get_variant_options(options)
|
18
18
|
def get_variant_options(options = nil)
|
19
|
-
|
19
|
+
@client.raw("get", "/ecommerce/variant-options", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Get variant option.
|
@@ -33,7 +33,7 @@ module VariantOptions
|
|
33
33
|
# options = { "fields": "id, title" }
|
34
34
|
# @data = @mints_user.get_variant_option(1, options)
|
35
35
|
def get_variant_option(id, options = nil)
|
36
|
-
|
36
|
+
@client.raw("get", "/ecommerce/variant-options/#{id}", options)
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Create variant option.
|
@@ -48,7 +48,7 @@ module VariantOptions
|
|
48
48
|
# }
|
49
49
|
# @data = @mints_user.create_variant_option(data)
|
50
50
|
def create_variant_option(data)
|
51
|
-
|
51
|
+
@client.raw("post", "/ecommerce/variant-options", nil, data_transform(data))
|
52
52
|
end
|
53
53
|
|
54
54
|
# === Update variant option.
|
@@ -64,6 +64,6 @@ module VariantOptions
|
|
64
64
|
# }
|
65
65
|
# @data = @mints_user.update_variant_option(6, data)
|
66
66
|
def update_variant_option(id, data)
|
67
|
-
|
67
|
+
@client.raw("put", "/ecommerce/variant-options/#{id}", nil, data_transform(data))
|
68
68
|
end
|
69
69
|
end
|
@@ -16,7 +16,7 @@ module VariantValues
|
|
16
16
|
# options = { "sort": "-id"}
|
17
17
|
# @data = @mints_user.get_variant_values(options)
|
18
18
|
def get_variant_values(options = nil)
|
19
|
-
|
19
|
+
@client.raw("get", "/ecommerce/variant-values", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Get variant value.
|
@@ -33,7 +33,7 @@ module VariantValues
|
|
33
33
|
# options = { "fields": "id"}
|
34
34
|
# @data = @mints_user.get_variant_value(5, options)
|
35
35
|
def get_variant_value(id, options = nil)
|
36
|
-
|
36
|
+
@client.raw("get", "/ecommerce/variant-values/#{id}", options)
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Create variant value.
|
@@ -51,7 +51,7 @@ module VariantValues
|
|
51
51
|
# }
|
52
52
|
# @data = @mints_user.create_variant_value(data)
|
53
53
|
def create_variant_value(data)
|
54
|
-
|
54
|
+
@client.raw("post", "/ecommerce/variant-values", nil, data_transform(data))
|
55
55
|
end
|
56
56
|
|
57
57
|
# === Update variant value.
|
@@ -67,6 +67,6 @@ module VariantValues
|
|
67
67
|
# }
|
68
68
|
# @data = @mints_user.update_variant_value(22, data)
|
69
69
|
def update_variant_value(id, data)
|
70
|
-
|
70
|
+
@client.raw("put", "/ecommerce/variant-values/#{id}", nil, data_transform(data))
|
71
71
|
end
|
72
72
|
end
|
data/lib/user/helpers/helpers.rb
CHANGED
@@ -21,7 +21,7 @@ module Helpers
|
|
21
21
|
# ==== Example
|
22
22
|
#
|
23
23
|
def slugify(data) #TODO: Research use of variable polymorphicObjectType
|
24
|
-
|
24
|
+
@client.raw("post", "/helpers/slugify", nil, data_transform(data))
|
25
25
|
end
|
26
26
|
|
27
27
|
# === Get available types from usage.
|
@@ -31,7 +31,7 @@ module Helpers
|
|
31
31
|
# usage:: () -- ...
|
32
32
|
#
|
33
33
|
def get_available_types_from_usage(usage) #TODO: Research use
|
34
|
-
|
34
|
+
@client.raw("get", "/helpers/available-types/#{usage}")
|
35
35
|
end
|
36
36
|
|
37
37
|
# === Get magic link config.
|
@@ -40,7 +40,7 @@ module Helpers
|
|
40
40
|
# ==== Example
|
41
41
|
# @data = @mints_user.get_magic_link_config
|
42
42
|
def get_magic_link_config
|
43
|
-
|
43
|
+
@client.raw("get", "/helpers/magic-link-config")
|
44
44
|
end
|
45
45
|
|
46
46
|
##
|
@@ -57,7 +57,7 @@ module Helpers
|
|
57
57
|
# ==== Example
|
58
58
|
# @data = @mints_user.get_activities_by_object_type_and_id("contacts", 1)
|
59
59
|
def get_activities_by_object_type_and_id(object_type, id)
|
60
|
-
|
60
|
+
@client.raw("get", "/helpers/activities/#{object_type}/#{id}")
|
61
61
|
end
|
62
62
|
|
63
63
|
##
|
@@ -78,7 +78,7 @@ module Helpers
|
|
78
78
|
# }
|
79
79
|
# @data = @mints_user.get_dice_coefficient(options)
|
80
80
|
def get_dice_coefficient(options)
|
81
|
-
|
81
|
+
@client.raw("get", "/helpers/dice-coefficient", options)
|
82
82
|
end
|
83
83
|
|
84
84
|
##
|
@@ -91,7 +91,7 @@ module Helpers
|
|
91
91
|
# ==== Example
|
92
92
|
# @data = @mints_user.get_permission_menu
|
93
93
|
def get_permission_menu
|
94
|
-
|
94
|
+
@client.raw("get", "/helpers/menu")
|
95
95
|
end
|
96
96
|
|
97
97
|
##
|
@@ -107,7 +107,7 @@ module Helpers
|
|
107
107
|
#
|
108
108
|
# ==== Example
|
109
109
|
# @data = @mints_user.generate_seed("contacts", 1)
|
110
|
-
def generate_seed(
|
111
|
-
|
110
|
+
def generate_seed(object_type, id)
|
111
|
+
@client.raw("get", "/helpers/seeds/#{object_type}/#{id}")
|
112
112
|
end
|
113
113
|
end
|
@@ -16,7 +16,7 @@ module ObjectActivities
|
|
16
16
|
# options = { "fields": "object_type" }
|
17
17
|
# @data = @mints_user.get_object_activities(options)
|
18
18
|
def get_object_activities(options = nil)
|
19
|
-
|
19
|
+
@client.raw("get", "/helpers/object-activities", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Get object activity.
|
@@ -33,7 +33,7 @@ module ObjectActivities
|
|
33
33
|
# options = { "fields": "activity_type" }
|
34
34
|
# @data = @mints_user.get_object_activity(1, options)
|
35
35
|
def get_object_activity(id, options = nil)
|
36
|
-
|
36
|
+
@client.raw("get", "/helpers/object-activities/#{id}", options)
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Create object activity.
|
@@ -50,7 +50,7 @@ module ObjectActivities
|
|
50
50
|
# }
|
51
51
|
# @data = @mints_user.create_object_activity(data)
|
52
52
|
def create_object_activity(data)
|
53
|
-
|
53
|
+
@client.raw("post", "/helpers/object-activities", nil, data_transform(data))
|
54
54
|
end
|
55
55
|
|
56
56
|
# === Update object activity.
|
@@ -66,7 +66,7 @@ module ObjectActivities
|
|
66
66
|
# }
|
67
67
|
# @data = @mints_user.update_object_activity(573, data)
|
68
68
|
def update_object_activity(id, data)
|
69
|
-
|
69
|
+
@client.raw("put", "/helpers/object-activities/#{id}", nil, data_transform(data))
|
70
70
|
end
|
71
71
|
|
72
72
|
# === Delete object activity.
|
@@ -78,6 +78,6 @@ module ObjectActivities
|
|
78
78
|
# ==== Example
|
79
79
|
# @data = @mints_user.delete_object_activity(573)
|
80
80
|
def delete_object_activity(id)
|
81
|
-
|
81
|
+
@client.raw("delete", "/helpers/object-activities/#{id}")
|
82
82
|
end
|
83
83
|
end
|
@@ -16,7 +16,7 @@ module ObjectFolders
|
|
16
16
|
# options = { "fields": "id" }
|
17
17
|
# @data = @mints_user.get_object_folders(options)
|
18
18
|
def get_object_folders(options = nil)
|
19
|
-
|
19
|
+
@client.raw("get", "/helpers/object-folders", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Get object folder.
|
@@ -33,7 +33,7 @@ module ObjectFolders
|
|
33
33
|
# options = { "fields": "id" }
|
34
34
|
# @data = @mints_user.get_object_folder(1, options)
|
35
35
|
def get_object_folder(id, options = nil)
|
36
|
-
|
36
|
+
@client.raw("get", "/helpers/object-folders/#{id}", options)
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Create object folder.
|
@@ -49,7 +49,7 @@ module ObjectFolders
|
|
49
49
|
# }
|
50
50
|
# @data = @mints_user.create_object_folder(data)
|
51
51
|
def create_object_folder(data)
|
52
|
-
|
52
|
+
@client.raw("post", "/helpers/object-folders", nil, data_transform(data))
|
53
53
|
end
|
54
54
|
|
55
55
|
# === Update object folder.
|
@@ -65,7 +65,7 @@ module ObjectFolders
|
|
65
65
|
# }
|
66
66
|
# @data = @mints_user.update_object_folder(1, data)
|
67
67
|
def update_object_folder(id, data)
|
68
|
-
|
68
|
+
@client.raw("put", "/helpers/object-folders/#{id}", nil, data_transform(data))
|
69
69
|
end
|
70
70
|
|
71
71
|
# === Delete object folder.
|
@@ -77,6 +77,6 @@ module ObjectFolders
|
|
77
77
|
# ==== Example
|
78
78
|
# @data = @mints_user.delete_object_folder(2)
|
79
79
|
def delete_object_folder(id)
|
80
|
-
|
80
|
+
@client.raw("delete", "/helpers/object-folders/#{id}")
|
81
81
|
end
|
82
82
|
end
|
@@ -16,7 +16,7 @@ module UserFolders
|
|
16
16
|
# options = { "fields": "folder" }
|
17
17
|
# @data = @mints_user.get_user_folders(options)
|
18
18
|
def get_user_folders(options = nil)
|
19
|
-
|
19
|
+
@client.raw("get", "/helpers/folders", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Get user folder.
|
@@ -33,7 +33,7 @@ module UserFolders
|
|
33
33
|
# options = { "fields": "user_id, folder" }
|
34
34
|
# @data = @mints_user.get_user_folder(1, options)
|
35
35
|
def get_user_folder(id, options = nil)
|
36
|
-
|
36
|
+
@client.raw("get", "/helpers/folders/#{id}", options)
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Create user folder.
|
@@ -49,7 +49,7 @@ module UserFolders
|
|
49
49
|
# }
|
50
50
|
# @data = @mints_user.create_user_folder(data)
|
51
51
|
def create_user_folder(data)
|
52
|
-
|
52
|
+
@client.raw("post", "/helpers/folders", nil, data_transform(data))
|
53
53
|
end
|
54
54
|
|
55
55
|
# === Update user folder.
|
@@ -66,7 +66,7 @@ module UserFolders
|
|
66
66
|
# }
|
67
67
|
# @data = @mints_user.update_user_folder(289, data)
|
68
68
|
def update_user_folder(id, data)
|
69
|
-
|
69
|
+
@client.raw("put", "/helpers/folders/#{id}", nil, data_transform(data))
|
70
70
|
end
|
71
71
|
|
72
72
|
# === Delete user folder.
|
@@ -78,6 +78,6 @@ module UserFolders
|
|
78
78
|
# ==== Example
|
79
79
|
# @data = @mints_user.delete_user_folder(289)
|
80
80
|
def delete_user_folder(id)
|
81
|
-
|
81
|
+
@client.raw("delete", "/helpers/folders/#{id}")
|
82
82
|
end
|
83
83
|
end
|
@@ -18,7 +18,7 @@ module Marketing
|
|
18
18
|
# }
|
19
19
|
# @data = @mints_user.get_automations(options)
|
20
20
|
def get_automations(options = nil)
|
21
|
-
|
21
|
+
@client.raw("get", "/marketing/automation", options)
|
22
22
|
end
|
23
23
|
|
24
24
|
# === Get automation.
|
@@ -37,7 +37,7 @@ module Marketing
|
|
37
37
|
# }
|
38
38
|
# @data = @mints_user.get_automation(1, options)
|
39
39
|
def get_automation(id, options = nil)
|
40
|
-
|
40
|
+
@client.raw("get", "/marketing/automation/#{id}", options)
|
41
41
|
end
|
42
42
|
|
43
43
|
# === Create automation.
|
@@ -52,7 +52,7 @@ module Marketing
|
|
52
52
|
# }
|
53
53
|
# @data = @mints_user.create_automation(data)
|
54
54
|
def create_automation(data)
|
55
|
-
|
55
|
+
@client.raw("post", "/marketing/automation/", nil, data_transform(data))
|
56
56
|
end
|
57
57
|
|
58
58
|
# === Update automation.
|
@@ -63,7 +63,7 @@ module Marketing
|
|
63
63
|
# data:: (Hash) -- Data to be submitted.
|
64
64
|
#
|
65
65
|
def update_automation(id, data) #FIXME: Method doesn't work.
|
66
|
-
|
66
|
+
@client.raw("put", "/marketing/automation/#{id}", nil, data_transform(data))
|
67
67
|
end
|
68
68
|
|
69
69
|
# === Delete automation.
|
@@ -75,7 +75,7 @@ module Marketing
|
|
75
75
|
# ==== Example
|
76
76
|
# @data = @mints_user.delete_automation(5)
|
77
77
|
def delete_automation(id)
|
78
|
-
|
78
|
+
@client.raw("delete", "/marketing/automation/#{id}")
|
79
79
|
end
|
80
80
|
|
81
81
|
# === Get automation executions.
|
@@ -87,7 +87,7 @@ module Marketing
|
|
87
87
|
# ==== Example
|
88
88
|
# @data = @mints_user.get_automation_executions(1)
|
89
89
|
def get_automation_executions(id)
|
90
|
-
|
90
|
+
@client.raw("get", "/marketing/automation/#{id}/executions")
|
91
91
|
end
|
92
92
|
|
93
93
|
# === Reset automation.
|
@@ -99,7 +99,7 @@ module Marketing
|
|
99
99
|
# ==== Example
|
100
100
|
# @data = @mints_user.reset_automation(1)
|
101
101
|
def reset_automation(id)
|
102
|
-
|
102
|
+
@client.raw("post", "/marketing/automation/#{id}/reset")
|
103
103
|
end
|
104
104
|
|
105
105
|
# === Duplicate automation.
|
@@ -115,6 +115,6 @@ module Marketing
|
|
115
115
|
# }
|
116
116
|
# @data = @mints_user.duplicate_automation(1, data.to_json)
|
117
117
|
def duplicate_automation(id, data)
|
118
|
-
|
118
|
+
@client.raw("post", "/marketing/automation/#{id}/duplicate", nil, data)
|
119
119
|
end
|
120
120
|
end
|
data/lib/user/profile/profile.rb
CHANGED
@@ -6,7 +6,7 @@ module Profile
|
|
6
6
|
# ==== Example
|
7
7
|
# @data = @mints_user.me
|
8
8
|
def me(options = nil)
|
9
|
-
|
9
|
+
@client.raw("get", "/profile/me", options)
|
10
10
|
end
|
11
11
|
|
12
12
|
##
|
@@ -20,7 +20,7 @@ module Profile
|
|
20
20
|
# ==== Example
|
21
21
|
# @data = @mints_user.get_preferences
|
22
22
|
def get_preferences
|
23
|
-
|
23
|
+
@client.raw("get", "/profile/preferences")
|
24
24
|
end
|
25
25
|
|
26
26
|
##
|
@@ -36,7 +36,7 @@ module Profile
|
|
36
36
|
# }
|
37
37
|
# @data = @mints_user.create_preferences(data)
|
38
38
|
def create_preferences(data)
|
39
|
-
|
39
|
+
@client.raw("post", "/profile/preferences", nil, data_transform(data))
|
40
40
|
end
|
41
41
|
|
42
42
|
##
|
@@ -49,7 +49,7 @@ module Profile
|
|
49
49
|
# ==== Example
|
50
50
|
# @data = @mints_user.get_preferences_by_setting_key("time_zone")
|
51
51
|
def get_preferences_by_setting_key(setting_key)
|
52
|
-
|
52
|
+
@client.raw("get", "/profile/preferences/#{setting_key}")
|
53
53
|
end
|
54
54
|
|
55
55
|
##
|
@@ -62,7 +62,7 @@ module Profile
|
|
62
62
|
# ==== Example
|
63
63
|
# @data = @mints_user.get_notifications
|
64
64
|
def get_notifications
|
65
|
-
|
65
|
+
@client.raw("get", "/profile/notifications")
|
66
66
|
end
|
67
67
|
|
68
68
|
# === Get paginated notifications.
|
@@ -71,7 +71,7 @@ module Profile
|
|
71
71
|
# ==== Example
|
72
72
|
# @data = @mints_user.get_paginated_notifications
|
73
73
|
def get_paginated_notifications
|
74
|
-
|
74
|
+
@client.raw("get", "/profile/notificationsp")
|
75
75
|
end
|
76
76
|
|
77
77
|
# === Read notifications.
|
@@ -89,7 +89,7 @@ module Profile
|
|
89
89
|
def read_notifications(data)
|
90
90
|
#TODO: Inform NotificationController.read method has been modified
|
91
91
|
#TODO: Method in controller didnt return data
|
92
|
-
|
92
|
+
@client.raw("post", "/profile/notifications/read", nil, data_transform(data))
|
93
93
|
end
|
94
94
|
|
95
95
|
# === Delete notifications.
|
@@ -106,6 +106,6 @@ module Profile
|
|
106
106
|
def delete_notifications(data)
|
107
107
|
#TODO: Inform NotificationController.delete method has been modified
|
108
108
|
#TODO: Method in controller didnt return data
|
109
|
-
|
109
|
+
@client.raw("post", "/profile/notifications/delete", nil, data_transform(data))
|
110
110
|
end
|
111
111
|
end
|
data/lib/user.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mints
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Ruben Gomez Garcia, Omar Mora, Luis Payan, Oscar Castillo
|
7
|
+
- Ruben Gomez Garcia, Omar Mora, Luis Payan, Oscar Castillo, Fabian Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- README.md
|
115
115
|
- lib/client.rb
|
116
116
|
- lib/contact.rb
|
117
|
+
- lib/errors.rb
|
117
118
|
- lib/generators/mints_assets_controller.rb
|
118
119
|
- lib/generators/mints_config.yml.erb
|
119
120
|
- lib/generators/mints_contact_controller.rb
|
@@ -126,10 +127,15 @@ files:
|
|
126
127
|
- lib/mints/controllers/admin_base_controller.rb
|
127
128
|
- lib/mints/controllers/base_api_controller.rb
|
128
129
|
- lib/mints/controllers/base_controller.rb
|
130
|
+
- lib/mints/controllers/concerns/mints_clients.rb
|
131
|
+
- lib/mints/controllers/concerns/read_config_file.rb
|
129
132
|
- lib/mints/controllers/contact_api_controller.rb
|
130
133
|
- lib/mints/controllers/public_api_controller.rb
|
131
134
|
- lib/mints/controllers/user_api_controller.rb
|
132
|
-
- lib/
|
135
|
+
- lib/mints/helpers/contact_auth_helper.rb
|
136
|
+
- lib/mints/helpers/mints_helper.rb
|
137
|
+
- lib/mints/helpers/proxy_controllers_methods.rb
|
138
|
+
- lib/mints/helpers/user_auth_helper.rb
|
133
139
|
- lib/pub.rb
|
134
140
|
- lib/user.rb
|
135
141
|
- lib/user/config/api_keys.rb
|