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
@@ -17,7 +17,7 @@ module Messages
|
|
17
17
|
# options = { "fields": "value" }
|
18
18
|
# @data = @mints_user.get_messages(options)
|
19
19
|
def get_messages(options = nil)
|
20
|
-
|
20
|
+
@client.raw("get", "/content/messages", options)
|
21
21
|
end
|
22
22
|
|
23
23
|
# === Get message.
|
@@ -34,7 +34,7 @@ module Messages
|
|
34
34
|
# options = { "fields": "value" }
|
35
35
|
# @data = @mints_user.get_message(1, options)
|
36
36
|
def get_message(id, options = nil)
|
37
|
-
|
37
|
+
@client.raw("get", "/content/messages/#{id}", options)
|
38
38
|
end
|
39
39
|
|
40
40
|
# === Create message.
|
@@ -55,7 +55,7 @@ module Messages
|
|
55
55
|
# }
|
56
56
|
# @data = @mints_user.create_message(data)
|
57
57
|
def create_message(data)
|
58
|
-
|
58
|
+
@client.raw("post", "/content/messages", nil, data_transform(data))
|
59
59
|
end
|
60
60
|
|
61
61
|
# === Update message.
|
@@ -73,7 +73,7 @@ module Messages
|
|
73
73
|
# }
|
74
74
|
# @data = @mints_user.update_message(102, data)
|
75
75
|
def update_message(id, data)
|
76
|
-
|
76
|
+
@client.raw("put", "/content/messages/#{id}", nil, data_transform(data))
|
77
77
|
end
|
78
78
|
|
79
79
|
# === Delete message.
|
@@ -85,6 +85,6 @@ module Messages
|
|
85
85
|
# ==== Example
|
86
86
|
# @data = @mints_user.delete_message(101)
|
87
87
|
def delete_message(id)
|
88
|
-
|
88
|
+
@client.raw("delete", "/content/messages/#{id}")
|
89
89
|
end
|
90
90
|
end
|
data/lib/user/content/pages.rb
CHANGED
@@ -10,7 +10,7 @@ module Pages
|
|
10
10
|
# ==== Example
|
11
11
|
# @data = @mints_user.get_page_groups
|
12
12
|
def get_page_groups
|
13
|
-
|
13
|
+
@client.raw("get", "/content/pages/groups")
|
14
14
|
end
|
15
15
|
|
16
16
|
# === Get pages.
|
@@ -19,7 +19,7 @@ module Pages
|
|
19
19
|
# ==== Example
|
20
20
|
# @data = @mints_user.get_pages
|
21
21
|
def get_pages(options = nil)
|
22
|
-
|
22
|
+
@client.raw("get", "/content/pages", options)
|
23
23
|
end
|
24
24
|
|
25
25
|
# === Get bundles.
|
@@ -28,7 +28,7 @@ module Pages
|
|
28
28
|
# ==== Example
|
29
29
|
# @data = @mints_user.get_pages
|
30
30
|
def get_bundles(options = nil)
|
31
|
-
|
31
|
+
@client.raw("get", "/content/pages", options)
|
32
32
|
end
|
33
33
|
|
34
34
|
# === Get page.
|
@@ -40,7 +40,7 @@ module Pages
|
|
40
40
|
# ==== Example
|
41
41
|
# @data = @mints_user.get_page(1)
|
42
42
|
def get_page(id)
|
43
|
-
|
43
|
+
@client.raw("get", "/content/pages/#{id}")
|
44
44
|
end
|
45
45
|
|
46
46
|
# === Create page.
|
@@ -57,7 +57,7 @@ module Pages
|
|
57
57
|
# }
|
58
58
|
# @data = @mints_user.create_page(data)
|
59
59
|
def create_page(data)
|
60
|
-
|
60
|
+
@client.raw("post", "/content/pages", nil, data_transform(data))
|
61
61
|
end
|
62
62
|
|
63
63
|
# === Update page.
|
@@ -73,7 +73,7 @@ module Pages
|
|
73
73
|
# }
|
74
74
|
# @data = @mints_user.update_page(5, data.to_json)
|
75
75
|
def update_page(id, data)
|
76
|
-
|
76
|
+
@client.raw("put", "/content/pages/#{id}", nil, data)
|
77
77
|
end
|
78
78
|
|
79
79
|
# === Delete page.
|
@@ -85,6 +85,6 @@ module Pages
|
|
85
85
|
# ==== Example
|
86
86
|
# @mints_user.@mints_user.delete_page(3)
|
87
87
|
def delete_page(id)
|
88
|
-
|
88
|
+
@client.raw("delete", "/content/pages/#{id}")
|
89
89
|
end
|
90
90
|
end
|
data/lib/user/content/stories.rb
CHANGED
@@ -12,7 +12,7 @@ module Stories
|
|
12
12
|
# }
|
13
13
|
# @data = @mints_user.duplicate_story(1, data.to_json)
|
14
14
|
def duplicate_story(id, data)
|
15
|
-
|
15
|
+
@client.raw("post", "/content/stories/#{id}/duplicate", nil, data)
|
16
16
|
end
|
17
17
|
|
18
18
|
# === Get stories.
|
@@ -37,7 +37,7 @@ module Stories
|
|
37
37
|
# }
|
38
38
|
# @data = @mints_user.get_stories(options, true)
|
39
39
|
def get_stories(options = nil, use_post = true)
|
40
|
-
|
40
|
+
get_query_results("/content/stories", options, use_post)
|
41
41
|
end
|
42
42
|
|
43
43
|
# === Get story.
|
@@ -56,7 +56,7 @@ module Stories
|
|
56
56
|
# }
|
57
57
|
# @data = @mints_user.get_story(1, options)
|
58
58
|
def get_story(id, options = nil)
|
59
|
-
|
59
|
+
@client.raw("get", "/content/stories/#{id}", options)
|
60
60
|
end
|
61
61
|
|
62
62
|
# === Create story.
|
@@ -73,7 +73,7 @@ module Stories
|
|
73
73
|
# }
|
74
74
|
# @data = @mints_user.create_story(data)
|
75
75
|
def create_story(data)
|
76
|
-
|
76
|
+
@client.raw("post", "/content/stories", nil, data_transform(data))
|
77
77
|
end
|
78
78
|
|
79
79
|
# === Update story.
|
@@ -90,7 +90,7 @@ module Stories
|
|
90
90
|
# }
|
91
91
|
# @data = @mints_user.update_story(5, data)
|
92
92
|
def update_story(id, data)
|
93
|
-
|
93
|
+
@client.raw("put", "/content/stories/#{id}", nil, data_transform(data))
|
94
94
|
end
|
95
95
|
|
96
96
|
# === Delete story.
|
@@ -102,6 +102,6 @@ module Stories
|
|
102
102
|
# ==== Example
|
103
103
|
# @data = @mints_user.delete_story(6)
|
104
104
|
def delete_story(id)
|
105
|
-
|
105
|
+
@client.raw("delete", "/content/stories/#{id}")
|
106
106
|
end
|
107
107
|
end
|
@@ -12,7 +12,7 @@ module StoryTemplates
|
|
12
12
|
# ==== Example
|
13
13
|
# @data = @mints_user.get_story_template_support_data(1)
|
14
14
|
def get_story_template_support_data(id)
|
15
|
-
|
15
|
+
@client.raw("get", "/content/story-templates/support-data/stories/#{id}")
|
16
16
|
end
|
17
17
|
|
18
18
|
# === Get support data of story templates.
|
@@ -21,7 +21,7 @@ module StoryTemplates
|
|
21
21
|
# ==== Example
|
22
22
|
# @data = @mints_user.get_story_templates_support_data
|
23
23
|
def get_story_templates_support_data
|
24
|
-
|
24
|
+
@client.raw("get", "/content/story-templates/support-data")
|
25
25
|
end
|
26
26
|
|
27
27
|
# === Get story templates.
|
@@ -39,7 +39,7 @@ module StoryTemplates
|
|
39
39
|
# }
|
40
40
|
# @data = @mints_user.get_story_templates(options)
|
41
41
|
def get_story_templates(options = nil)
|
42
|
-
|
42
|
+
@client.raw("get", "/content/story-templates", options)
|
43
43
|
end
|
44
44
|
|
45
45
|
# === Get story template.
|
@@ -58,7 +58,7 @@ module StoryTemplates
|
|
58
58
|
# }
|
59
59
|
# @data = @mints_user.get_story_template(1, options)
|
60
60
|
def get_story_template(id, options = nil)
|
61
|
-
|
61
|
+
@client.raw("get", "/content/story-templates/#{id}", options)
|
62
62
|
end
|
63
63
|
|
64
64
|
# === Create story template.
|
@@ -74,7 +74,7 @@ module StoryTemplates
|
|
74
74
|
# }
|
75
75
|
# @data = @mints_user.create_story_template(data)
|
76
76
|
def create_story_template(data)
|
77
|
-
|
77
|
+
@client.raw("post", "/content/story-templates", nil, data_transform(data))
|
78
78
|
end
|
79
79
|
|
80
80
|
# === Update story template.
|
@@ -90,6 +90,6 @@ module StoryTemplates
|
|
90
90
|
# }
|
91
91
|
# @data = @mints_user.update_story_template(3, data)
|
92
92
|
def update_story_template(id, data)
|
93
|
-
|
93
|
+
@client.raw("put", "/content/story-templates/#{id}", nil, data_transform(data))
|
94
94
|
end
|
95
95
|
end
|
@@ -40,7 +40,7 @@ module StoryVersions
|
|
40
40
|
# }
|
41
41
|
# @data = @mints_user.get_story_version(1, options)
|
42
42
|
def get_story_version(id, options = nil)
|
43
|
-
|
43
|
+
@client.raw("get", "/content/story-versions/#{id}", options)
|
44
44
|
end
|
45
45
|
|
46
46
|
# === Create story version.
|
@@ -57,7 +57,7 @@ module StoryVersions
|
|
57
57
|
# }
|
58
58
|
# @data = @mints_user.create_story_version(data)
|
59
59
|
def create_story_version(data, options = nil)
|
60
|
-
|
60
|
+
@client.raw("post", "/content/story-versions", options, data_transform(data))
|
61
61
|
end
|
62
62
|
|
63
63
|
# === Update story version.
|
@@ -74,7 +74,7 @@ module StoryVersions
|
|
74
74
|
# }
|
75
75
|
# @data = @mints_user.update_story_version(5, data)
|
76
76
|
def update_story_version(id, data, options = nil)
|
77
|
-
|
77
|
+
@client.raw("put", "/content/story-versions/#{id}", options, data_transform(data))
|
78
78
|
end
|
79
79
|
|
80
80
|
# === Delete story version.
|
@@ -86,7 +86,7 @@ module StoryVersions
|
|
86
86
|
# ==== Example
|
87
87
|
# @data = @mints_user.delete_story_version(6)
|
88
88
|
def delete_story_version(id)
|
89
|
-
|
89
|
+
@client.raw("delete", "/content/story-versions/#{id}")
|
90
90
|
end
|
91
91
|
|
92
92
|
# === Duplicate story version.
|
@@ -102,7 +102,7 @@ module StoryVersions
|
|
102
102
|
# }
|
103
103
|
# @data = @mints_user.duplicate_story_version(1, data.to_json)
|
104
104
|
def duplicate_story_version(id, data)
|
105
|
-
|
105
|
+
@client.raw("post", "/content/story-versions/#{id}/duplicate", nil, data)
|
106
106
|
end
|
107
107
|
|
108
108
|
# === Publish story version.
|
@@ -119,6 +119,6 @@ module StoryVersions
|
|
119
119
|
# }
|
120
120
|
# @data = @mints_user.publish_story_version(1, data.to_json)
|
121
121
|
def publish_story_version(id, data)
|
122
|
-
|
122
|
+
@client.raw("put", "/content/story-versions/#{id}/publish", nil, data)
|
123
123
|
end
|
124
124
|
end
|
data/lib/user/crm/companies.rb
CHANGED
@@ -10,7 +10,7 @@ module Companies
|
|
10
10
|
# ==== Example
|
11
11
|
# @data = @mints_user.get_companies_support_data
|
12
12
|
def get_companies_support_data
|
13
|
-
|
13
|
+
@client.raw("get", "/crm/companies/support-data")
|
14
14
|
end
|
15
15
|
|
16
16
|
# === Get companies.
|
@@ -48,7 +48,7 @@ module Companies
|
|
48
48
|
# options = { "fields": "id, title" }
|
49
49
|
# @data = @mints_user.get_company(21, options)
|
50
50
|
def get_company(id, options = nil)
|
51
|
-
|
51
|
+
@client.raw("get", "/crm/companies/#{id}", options)
|
52
52
|
end
|
53
53
|
|
54
54
|
# === Create company.
|
@@ -71,7 +71,7 @@ module Companies
|
|
71
71
|
# }
|
72
72
|
# @data = @mints_user.create_company(data)
|
73
73
|
def create_company(data, options = nil)
|
74
|
-
|
74
|
+
@client.raw("post", "/crm/companies/", options, data_transform(data))
|
75
75
|
end
|
76
76
|
|
77
77
|
# === Update company.
|
@@ -87,7 +87,7 @@ module Companies
|
|
87
87
|
# }
|
88
88
|
# @data = @mints_user.update_company(23, data)
|
89
89
|
def update_company(id, data, options = nil)
|
90
|
-
|
90
|
+
@client.raw("put", "/crm/companies/#{id}", options, data_transform(data))
|
91
91
|
end
|
92
92
|
|
93
93
|
##
|
@@ -106,6 +106,6 @@ module Companies
|
|
106
106
|
# }
|
107
107
|
# @data = @mints_user.delete_companies(data)
|
108
108
|
def delete_companies(data)
|
109
|
-
|
109
|
+
@client.raw("delete", "/crm/companies/delete", nil, data_transform(data))
|
110
110
|
end
|
111
111
|
end
|
data/lib/user/crm/contacts.rb
CHANGED
@@ -9,7 +9,7 @@ module Contacts
|
|
9
9
|
# ==== Example
|
10
10
|
# @data = @mints_user.get_contacts_support_data
|
11
11
|
def get_contacts_support_data
|
12
|
-
|
12
|
+
@client.raw("get", "/crm/contacts/support-data")
|
13
13
|
end
|
14
14
|
|
15
15
|
##
|
@@ -22,7 +22,7 @@ module Contacts
|
|
22
22
|
# ==== Example
|
23
23
|
# @data = @mints_user.get_online_activity(5)
|
24
24
|
def get_online_activity(id)
|
25
|
-
|
25
|
+
@client.raw("get", "/crm/contacts/#{id}/online-activity")
|
26
26
|
end
|
27
27
|
|
28
28
|
##
|
@@ -71,7 +71,7 @@ module Contacts
|
|
71
71
|
# }
|
72
72
|
# @data = @mints_user.get_contact(5, options)
|
73
73
|
def get_contact(id, options = nil)
|
74
|
-
|
74
|
+
@client.raw("get", "/crm/contacts/#{id}", options)
|
75
75
|
end
|
76
76
|
|
77
77
|
##
|
@@ -90,7 +90,7 @@ module Contacts
|
|
90
90
|
# }
|
91
91
|
# @data = @mints_user.create_contact(data)
|
92
92
|
def create_contact(data, options = nil)
|
93
|
-
|
93
|
+
@client.raw("post", "/crm/contacts", options, data_transform(data))
|
94
94
|
end
|
95
95
|
|
96
96
|
##
|
@@ -108,7 +108,7 @@ module Contacts
|
|
108
108
|
# }
|
109
109
|
# @data = @mints_user.update_contact(65, data)
|
110
110
|
def update_contact(id, data, options = nil)
|
111
|
-
|
111
|
+
@client.raw("put", "/crm/contacts/#{id}", options, data_transform(data))
|
112
112
|
end
|
113
113
|
|
114
114
|
##
|
@@ -121,7 +121,7 @@ module Contacts
|
|
121
121
|
# ==== Example
|
122
122
|
# @data = @mints_user.get_contact_deal(5)
|
123
123
|
def get_contact_deal(contact_id)
|
124
|
-
|
124
|
+
@client.raw("get", "/crm/contacts/#{contact_id}/deals")
|
125
125
|
end
|
126
126
|
|
127
127
|
##
|
@@ -138,7 +138,7 @@ module Contacts
|
|
138
138
|
# }
|
139
139
|
# @data = @mints_user.create_contact_deal(5, data.to_json)
|
140
140
|
def create_contact_deal(contact_id, data)
|
141
|
-
|
141
|
+
@client.raw("post", "/crm/contacts/#{contact_id}/deals", nil, data)
|
142
142
|
end
|
143
143
|
|
144
144
|
##
|
@@ -152,7 +152,7 @@ module Contacts
|
|
152
152
|
# ==== Example
|
153
153
|
# @data = @mints_user.delete_contact_deal(5, 100)
|
154
154
|
def delete_contact_deal(contact_id, deal_id)
|
155
|
-
|
155
|
+
@client.raw("delete", "/crm/contacts/#{contact_id}/deals/#{deal_id}")
|
156
156
|
end
|
157
157
|
|
158
158
|
##
|
@@ -167,7 +167,7 @@ module Contacts
|
|
167
167
|
# ==== Example
|
168
168
|
# @data = @mints_user.get_contact_user(66)
|
169
169
|
def get_contact_user(contact_id)
|
170
|
-
|
170
|
+
@client.raw("get", "/crm/contacts/#{contact_id}/users")
|
171
171
|
end
|
172
172
|
|
173
173
|
##
|
@@ -184,7 +184,7 @@ module Contacts
|
|
184
184
|
# }
|
185
185
|
# @data = @mints_user.create_contact_user(66, data.to_json)
|
186
186
|
def create_contact_user(contact_id, data)
|
187
|
-
|
187
|
+
@client.raw("post", "/crm/contacts/#{contact_id}/users", nil, data)
|
188
188
|
end
|
189
189
|
|
190
190
|
##
|
@@ -198,7 +198,7 @@ module Contacts
|
|
198
198
|
# ==== Example
|
199
199
|
# @data = @mints_user.delete_contact_user(153, 9)
|
200
200
|
def delete_contact_user(contact_id, id)
|
201
|
-
|
201
|
+
@client.raw("delete", "/crm/contacts/#{contact_id}/users/#{id}")
|
202
202
|
end
|
203
203
|
|
204
204
|
##
|
@@ -211,7 +211,7 @@ module Contacts
|
|
211
211
|
# ==== Example
|
212
212
|
# @data = @mints_user.get_contact_segments(1)
|
213
213
|
def get_contact_segments(contact_id)
|
214
|
-
|
214
|
+
@client.raw("get", "/crm/contacts/#{contact_id}/segments")
|
215
215
|
end
|
216
216
|
|
217
217
|
##
|
@@ -224,7 +224,7 @@ module Contacts
|
|
224
224
|
# ==== Example
|
225
225
|
# @data = @mints_user.get_contact_submissions(146)
|
226
226
|
def get_contact_submissions(contact_id)
|
227
|
-
|
227
|
+
@client.raw("get", "/crm/contacts/#{contact_id}/submissions")
|
228
228
|
end
|
229
229
|
|
230
230
|
##
|
@@ -237,7 +237,7 @@ module Contacts
|
|
237
237
|
# ==== Example
|
238
238
|
# @data = @mints_user.get_contact_tags(1)
|
239
239
|
def get_contact_tags(contact_id)
|
240
|
-
|
240
|
+
@client.raw("get", "/crm/contacts/#{contact_id}/tags")
|
241
241
|
end
|
242
242
|
|
243
243
|
##
|
@@ -250,7 +250,7 @@ module Contacts
|
|
250
250
|
# ==== Example
|
251
251
|
# @data = @mints_user.get_contact_magic_links(150)
|
252
252
|
def get_contact_magic_links(contact_id)
|
253
|
-
|
253
|
+
@client.raw("get", "/crm/contacts/#{contact_id}/magic-links")
|
254
254
|
end
|
255
255
|
|
256
256
|
##
|
@@ -267,7 +267,7 @@ module Contacts
|
|
267
267
|
# }
|
268
268
|
# @data = @mints_user.merge_contacts(151, data)
|
269
269
|
def merge_contacts(id, data)
|
270
|
-
|
270
|
+
@client.raw("post", "/crm/contacts/#{id}/merge", nil, data_transform(data))
|
271
271
|
end
|
272
272
|
|
273
273
|
##
|
@@ -287,7 +287,7 @@ module Contacts
|
|
287
287
|
# }
|
288
288
|
# @data = @mints_user.send_magic_links(data)
|
289
289
|
def send_magic_links(data)
|
290
|
-
|
290
|
+
@client.raw("post", "/crm/contacts/send-magic-link", nil, data_transform(data))
|
291
291
|
end
|
292
292
|
|
293
293
|
##
|
@@ -307,6 +307,6 @@ module Contacts
|
|
307
307
|
# }
|
308
308
|
# @data = @mints_user.delete_contacts(data)
|
309
309
|
def delete_contacts(data) #TODO: ContactController.delete need a success output
|
310
|
-
|
310
|
+
@client.raw("delete", "/crm/contacts/delete", nil, data_transform(data))
|
311
311
|
end
|
312
312
|
end
|
data/lib/user/crm/deals.rb
CHANGED
@@ -13,7 +13,7 @@ module Deals
|
|
13
13
|
# ==== Example
|
14
14
|
# @data = @mints_user.get_deal_permits(7)
|
15
15
|
def get_deal_permits(id)
|
16
|
-
|
16
|
+
@client.raw("get", "/crm/deals/#{id}/permits")
|
17
17
|
end
|
18
18
|
|
19
19
|
##
|
@@ -23,7 +23,7 @@ module Deals
|
|
23
23
|
# ==== Example
|
24
24
|
# @data = @mints_user.get_deal_support_data
|
25
25
|
def get_deal_support_data
|
26
|
-
|
26
|
+
@client.raw("get", "/crm/deals/support-data")
|
27
27
|
end
|
28
28
|
|
29
29
|
##
|
@@ -33,7 +33,7 @@ module Deals
|
|
33
33
|
# ==== Example
|
34
34
|
# @data = @mints_user.get_deal_currencies
|
35
35
|
def get_deal_currencies
|
36
|
-
|
36
|
+
@client.raw("get", "/crm/deal/currencies")
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Get deals.
|
@@ -71,7 +71,7 @@ module Deals
|
|
71
71
|
# options = { "fields": "id, title" }
|
72
72
|
# @data = @mints_user.get_deal(1, options)
|
73
73
|
def get_deal(id, options = nil)
|
74
|
-
|
74
|
+
@client.raw("get", "/crm/deals/#{id}", options)
|
75
75
|
end
|
76
76
|
|
77
77
|
# === Create deal.
|
@@ -90,7 +90,7 @@ module Deals
|
|
90
90
|
# }
|
91
91
|
# @data = @mints_user.create_deal(data.to_json)
|
92
92
|
def create_deal(data, options = nil)
|
93
|
-
|
93
|
+
@client.raw("post", "/crm/deals", options, data)
|
94
94
|
end
|
95
95
|
|
96
96
|
# === Update deal.
|
@@ -106,6 +106,6 @@ module Deals
|
|
106
106
|
# }
|
107
107
|
# @data = @mints_user.update_deal(102, data.to_json)
|
108
108
|
def update_deal(id, data, options = nil)
|
109
|
-
|
109
|
+
@client.raw("put", "/crm/deals/#{id}", options, data)
|
110
110
|
end
|
111
111
|
end
|
data/lib/user/crm/favorites.rb
CHANGED
@@ -4,14 +4,14 @@ module Favorites
|
|
4
4
|
#
|
5
5
|
|
6
6
|
def update_multiple_favorites(data)
|
7
|
-
|
7
|
+
@client.raw("put", "/crm/favorites", nil, data)
|
8
8
|
end
|
9
9
|
|
10
10
|
def get_favorites(options = nil)
|
11
|
-
|
11
|
+
@client.raw("get", "/crm/favorites", options)
|
12
12
|
end
|
13
13
|
|
14
14
|
def update_favorites(id, data)
|
15
|
-
|
15
|
+
@client.raw("put", "/crm/favorites/#{id}", nil, data)
|
16
16
|
end
|
17
17
|
end
|
data/lib/user/crm/segments.rb
CHANGED
@@ -9,7 +9,7 @@ module Segments
|
|
9
9
|
# ==== Example
|
10
10
|
# @data = @mints_user.get_segments_support_data
|
11
11
|
def get_segments_support_data
|
12
|
-
|
12
|
+
@client.raw("get", "/crm/segments/support-data")
|
13
13
|
end
|
14
14
|
|
15
15
|
# === Get segments attributes.
|
@@ -22,7 +22,7 @@ module Segments
|
|
22
22
|
# options = { "object_type": "contacts" }
|
23
23
|
# @data = @mints_user.get_segments_attributes(options)
|
24
24
|
def get_segments_attributes(options = nil)
|
25
|
-
|
25
|
+
@client.raw("get", "/crm/segments/attributes", options)
|
26
26
|
end
|
27
27
|
|
28
28
|
# === Get segment group.
|
@@ -34,7 +34,7 @@ module Segments
|
|
34
34
|
# ==== Example
|
35
35
|
# @data = @mints_user.get_segment_group("users")
|
36
36
|
def get_segment_group(groupId)
|
37
|
-
|
37
|
+
@client.raw("get", "/crm/segments/groups/#{groupId}")
|
38
38
|
end
|
39
39
|
|
40
40
|
# === Duplicate segment.
|
@@ -50,7 +50,7 @@ module Segments
|
|
50
50
|
# }
|
51
51
|
# @data = @mints_user.duplicate_segment(107, data)
|
52
52
|
def duplicate_segment(id, data)
|
53
|
-
|
53
|
+
@client.raw("post", "/crm/segments/#{id}/duplicate", nil, data)
|
54
54
|
end
|
55
55
|
|
56
56
|
# === Get segments.
|
@@ -66,7 +66,7 @@ module Segments
|
|
66
66
|
# options = { "fields": "id", "sort": "-id" }
|
67
67
|
# @data = @mints_user.get_segments(options)
|
68
68
|
def get_segments(options = nil)
|
69
|
-
|
69
|
+
@client.raw("get", "/crm/segments", options)
|
70
70
|
end
|
71
71
|
|
72
72
|
# === Get segment.
|
@@ -83,7 +83,7 @@ module Segments
|
|
83
83
|
# options = { "fields": "id, title" }
|
84
84
|
# @data = @mints_user.get_segment(1, options)
|
85
85
|
def get_segment(id, options = nil)
|
86
|
-
|
86
|
+
@client.raw("get", "/crm/segments/#{id}", options)
|
87
87
|
end
|
88
88
|
|
89
89
|
# === Create segment.
|
@@ -99,7 +99,7 @@ module Segments
|
|
99
99
|
# }
|
100
100
|
# @data = @mints_user.create_segment(data)
|
101
101
|
def create_segment(data)
|
102
|
-
|
102
|
+
@client.raw("post", "/crm/segments", nil, data_transform(data))
|
103
103
|
end
|
104
104
|
|
105
105
|
# === Update segment.
|
@@ -115,7 +115,7 @@ module Segments
|
|
115
115
|
# }
|
116
116
|
# @data = @mints_user.update_segment(118, data)
|
117
117
|
def update_segment(id, data)
|
118
|
-
|
118
|
+
@client.raw("put", "/crm/segments/#{id}", nil, data_transform(data))
|
119
119
|
end
|
120
120
|
|
121
121
|
# === Delete segment.
|
@@ -127,6 +127,6 @@ module Segments
|
|
127
127
|
# ==== Example
|
128
128
|
# @mints_user.delete_segment(113)
|
129
129
|
def delete_segment(id)
|
130
|
-
|
130
|
+
@client.raw("delete", "/crm/segments/#{id}")
|
131
131
|
end
|
132
132
|
end
|
data/lib/user/crm/users.rb
CHANGED
@@ -16,7 +16,7 @@ module WorkflowStepObjects
|
|
16
16
|
# options = { "fields": "id" }
|
17
17
|
# @data = @mints_user.get_step_objects(options)
|
18
18
|
def get_step_objects(options = nil)
|
19
|
-
|
19
|
+
@client.raw("get", "/crm/step-objects", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Get workflow step object.
|
@@ -33,7 +33,7 @@ module WorkflowStepObjects
|
|
33
33
|
# options = { "fields": "id, step_id" }
|
34
34
|
# @data = @mints_user.get_step_object(1, options)
|
35
35
|
def get_step_object(id, options = nil)
|
36
|
-
|
36
|
+
@client.raw("get", "/crm/step-objects/#{id}", options)
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Create workflow step object.
|
@@ -50,7 +50,7 @@ module WorkflowStepObjects
|
|
50
50
|
# }
|
51
51
|
# @data = @mints_user.create_step_object(data)
|
52
52
|
def create_step_object(data)
|
53
|
-
|
53
|
+
@client.raw("post", "/crm/step-objects/", nil, data_transform(data))
|
54
54
|
end
|
55
55
|
|
56
56
|
# === Update workflow step object.
|
@@ -66,7 +66,7 @@ module WorkflowStepObjects
|
|
66
66
|
# }
|
67
67
|
# @data = @mints_user.update_step_object(128, data.to_json)
|
68
68
|
def update_step_object(id, data)
|
69
|
-
|
69
|
+
@client.raw("put", "/crm/step-objects/#{id}", nil, data)
|
70
70
|
end
|
71
71
|
|
72
72
|
# === Get workflow step object by object type.
|
@@ -84,6 +84,6 @@ module WorkflowStepObjects
|
|
84
84
|
# options = { "fields": "id, object_id" }
|
85
85
|
# @data = @mints_user.get_step_object_by_object_type("deals", 1, options)
|
86
86
|
def get_step_object_by_object_type(objectType, objectId, options = nil)
|
87
|
-
|
87
|
+
@client.raw("get", "/crm/step-objects/#{objectType}/#{objectId}", options)
|
88
88
|
end
|
89
89
|
end
|