mints 0.0.17 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/lib/client.rb +96 -37
  4. data/lib/contact.rb +659 -94
  5. data/lib/generators/mints_files_generator.rb +6 -0
  6. data/lib/generators/mints_link.rb +61 -0
  7. data/lib/generators/short_link_controller.rb +41 -0
  8. data/lib/mints/controllers/admin_base_controller.rb +2 -2
  9. data/lib/mints/controllers/base_api_controller.rb +12 -11
  10. data/lib/mints/controllers/base_controller.rb +38 -9
  11. data/lib/mints_helper.rb +47 -0
  12. data/lib/pub.rb +258 -139
  13. data/lib/user/config/api_keys.rb +65 -0
  14. data/lib/user/config/appointments.rb +221 -0
  15. data/lib/user/config/attribute_groups.rb +77 -0
  16. data/lib/user/config/attributes.rb +86 -0
  17. data/lib/user/config/calendars.rb +89 -0
  18. data/lib/user/config/config.rb +65 -0
  19. data/lib/user/config/importers.rb +184 -0
  20. data/lib/user/config/public_folders.rb +108 -0
  21. data/lib/user/config/relationships.rb +138 -0
  22. data/lib/user/config/roles.rb +84 -0
  23. data/lib/user/config/seeds.rb +14 -0
  24. data/lib/user/config/system_settings.rb +53 -0
  25. data/lib/user/config/tags.rb +63 -0
  26. data/lib/user/config/taxonomies.rb +124 -0
  27. data/lib/user/config/teams.rb +70 -0
  28. data/lib/user/config/users.rb +76 -0
  29. data/lib/user/contacts/contacts.rb +21 -0
  30. data/lib/user/content/assets.rb +260 -0
  31. data/lib/user/content/content.rb +235 -0
  32. data/lib/user/content/content_instances.rb +147 -0
  33. data/lib/user/content/content_templates.rb +111 -0
  34. data/lib/user/content/conversations.rb +174 -0
  35. data/lib/user/content/dam.rb +88 -0
  36. data/lib/user/content/forms.rb +168 -0
  37. data/lib/user/content/message_templates.rb +162 -0
  38. data/lib/user/content/messages.rb +90 -0
  39. data/lib/user/content/pages.rb +81 -0
  40. data/lib/user/content/stories.rb +164 -0
  41. data/lib/user/content/story_templates.rb +95 -0
  42. data/lib/user/crm/companies.rb +111 -0
  43. data/lib/user/crm/contacts.rb +312 -0
  44. data/lib/user/crm/crm.rb +21 -0
  45. data/lib/user/crm/deals.rb +111 -0
  46. data/lib/user/crm/favorites.rb +17 -0
  47. data/lib/user/crm/segments.rb +132 -0
  48. data/lib/user/crm/users.rb +22 -0
  49. data/lib/user/crm/workflow_step_objects.rb +89 -0
  50. data/lib/user/crm/workflow_steps.rb +49 -0
  51. data/lib/user/crm/workflows.rb +70 -0
  52. data/lib/user/ecommerce/ecommerce.rb +29 -0
  53. data/lib/user/ecommerce/item_prices.rb +86 -0
  54. data/lib/user/ecommerce/locations.rb +166 -0
  55. data/lib/user/ecommerce/order_items_groups.rb +109 -0
  56. data/lib/user/ecommerce/order_statuses.rb +26 -0
  57. data/lib/user/ecommerce/orders.rb +258 -0
  58. data/lib/user/ecommerce/price_lists.rb +73 -0
  59. data/lib/user/ecommerce/product_templates.rb +104 -0
  60. data/lib/user/ecommerce/product_variations.rb +129 -0
  61. data/lib/user/ecommerce/products.rb +169 -0
  62. data/lib/user/ecommerce/skus.rb +88 -0
  63. data/lib/user/ecommerce/taxes.rb +82 -0
  64. data/lib/user/ecommerce/variant_options.rb +69 -0
  65. data/lib/user/ecommerce/variant_values.rb +72 -0
  66. data/lib/user/helpers/helpers.rb +113 -0
  67. data/lib/user/helpers/object_activities.rb +83 -0
  68. data/lib/user/helpers/object_folders.rb +82 -0
  69. data/lib/user/helpers/user_folders.rb +83 -0
  70. data/lib/user/marketing/marketing.rb +120 -0
  71. data/lib/user/profile/profile.rb +111 -0
  72. data/lib/user.rb +24 -368
  73. metadata +64 -2
@@ -0,0 +1,235 @@
1
+ require_relative './assets.rb'
2
+ require_relative './content_instances.rb'
3
+ require_relative './content_templates.rb'
4
+ require_relative './conversations.rb'
5
+ require_relative './dam.rb'
6
+ require_relative './forms.rb'
7
+ require_relative './message_templates.rb'
8
+ require_relative './messages.rb'
9
+ require_relative './pages.rb'
10
+ require_relative './stories.rb'
11
+ require_relative './story_templates.rb'
12
+
13
+ module Content
14
+ include Assets
15
+ include ContentInstances
16
+ include ContentTemplates
17
+ include Conversations
18
+ include DAM
19
+ include Forms
20
+ include MessageTemplates
21
+ include Messages
22
+ include Pages
23
+ include Stories
24
+ include StoryTemplates
25
+
26
+ # === Get public images url.
27
+ # Get public images url.
28
+ #
29
+ # ==== Example
30
+ # @data = @mints_user.get_public_images_url
31
+ def get_public_images_url
32
+ return @client.raw("get", "/content/public-images-url")
33
+ end
34
+
35
+ ##
36
+ # == Authors
37
+ #
38
+
39
+ # === Get authors.
40
+ # Get authors.
41
+ #
42
+ # ==== Example
43
+ # @data = @mints_user.get_authors
44
+ def get_authors
45
+ return @client.raw("get", "/content/authors")
46
+ end
47
+
48
+
49
+ # === Get author.
50
+ # Get an author.
51
+ #
52
+ # ==== Parameters
53
+ # id:: (Integer) -- Author id.
54
+ #
55
+ # ==== Example
56
+ # @data = @mints_user.get_author(1)
57
+ def get_author(id)
58
+ return @client.raw("get", "/content/authors/#{id}")
59
+ end
60
+
61
+ # === Create author.
62
+ # Create an author with data.
63
+ #
64
+ # ==== Parameters
65
+ # data:: (Hash) -- Data to be submited.
66
+ #
67
+ # ==== Example
68
+ # data = {
69
+ # "title": "Howard Phillips Lovecraft",
70
+ # "slug": "howard-phillips-lovecraft"
71
+ # }
72
+ # @data = @mints_user.create_author(data.to_json)
73
+ def create_author(data)
74
+ return @client.raw("post", "/content/authors", nil, data)
75
+ end
76
+
77
+ # === Update author.
78
+ # Update an author info.
79
+ #
80
+ # ==== Parameters
81
+ # id:: (Integer) -- Author id.
82
+ # data:: (Hash) -- Data to be submited.
83
+ #
84
+ # ==== Example
85
+ #
86
+ def update_author(id, data)
87
+ #FIXME: Author controller doesnt receive data
88
+ return @client.raw("put", "/content/authors/#{id}", nil, data)
89
+ end
90
+
91
+ ##
92
+ # == Keywords
93
+ #
94
+
95
+ # === Get keywords.
96
+ # Get a collection of keywords.
97
+ #
98
+ # ==== Parameters
99
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
100
+ #
101
+ # ==== First Example
102
+ # @data = @mints_user.get_keywords
103
+ #
104
+ # ==== Second Example
105
+ # options = { "fields": "title" }
106
+ # @data = @mints_user.get_keywords(options)
107
+ def get_keywords(options = nil)
108
+ return @client.raw("get", "/content/keywords", options)
109
+ end
110
+
111
+ # === Get keyword.
112
+ # Get a keyword.
113
+ #
114
+ # ==== Parameters
115
+ # id:: (Integer) -- Keyword id.
116
+ #
117
+ def get_keyword(id)
118
+ return @client.raw("get", "/content/keywords/#{id}")
119
+ end
120
+
121
+ # === Create keyword.
122
+ # Create a keyword with data.
123
+ #
124
+ # ==== Parameters
125
+ # data:: (Hash) -- Data to be submited.
126
+ #
127
+ # ==== Example
128
+ # data = {
129
+ # "title": "New Keyword"
130
+ # }
131
+ # @data = @mints_user.create_keyword(data.to_json)
132
+ def create_keyword(data)
133
+ return @client.raw("post", "/content/keywords", nil, data)
134
+ end
135
+
136
+ # === Update keyword.
137
+ # Update a keyword info.
138
+ #
139
+ # ==== Parameters
140
+ # id:: (Integer) -- Keyword id.
141
+ # data:: (Hash) -- Data to be submited.
142
+ #
143
+ # ==== Example
144
+ #
145
+ def update_keyword(id, data)
146
+ #FIXME: Keyword controller doesnt receive data
147
+ return @client.raw("put", "/content/keywords/#{id}", nil, data)
148
+ end
149
+
150
+ ##
151
+ # == Stages
152
+ #
153
+
154
+ # === Get stages.
155
+ # Get a collection of stages.
156
+ #
157
+ # ==== Parameters
158
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
159
+ #
160
+ # ==== First Example
161
+ # @data = @mints_user.get_stages
162
+ #
163
+ # ==== Second Example
164
+ # options = { "fields": "title" }
165
+ # @data = @mints_user.get_stages(options)
166
+ def get_stages(options = nil)
167
+ return @client.raw("get", "/content/stages", options)
168
+ end
169
+
170
+ # === Get stage.
171
+ # Get a stage.
172
+ #
173
+ # ==== Parameters
174
+ # id:: (Integer) -- Stage id.
175
+ #
176
+ # ==== Example
177
+ # @data = @mints_user.get_stage(1)
178
+ def get_stage(id)
179
+ return @client.raw("get", "/content/stages/#{id}")
180
+ end
181
+
182
+ # === Create stage.
183
+ # Create a stage with data.
184
+ #
185
+ # ==== Parameters
186
+ # data:: (Hash) -- Data to be submited.
187
+ #
188
+ # ==== Example
189
+ # config_json = {
190
+ # "count": 1
191
+ # }
192
+ # event_json = {
193
+ # "rset": "DTSTART:20190214T000000Z",
194
+ # "duration": 1
195
+ # }
196
+ # data = {
197
+ # "title": "New Stage",
198
+ # "description": "New Stage Description",
199
+ # "config_json": config_json.to_json,
200
+ # "event_json": event_json.to_json
201
+ # }
202
+ # @data = @mints_user.create_stage(data.to_json)
203
+ def create_stage(data)
204
+ return @client.raw("post", "/content/stages", nil, data)
205
+ end
206
+
207
+ # === Update stage.
208
+ # Update a stage info.
209
+ #
210
+ # ==== Parameters
211
+ # id:: (Integer) -- Stage id.
212
+ # data:: (Hash) -- Data to be submited.
213
+ #
214
+ # ==== Example
215
+ # config_json = {
216
+ # "count": 2
217
+ # }
218
+ # event_json = {
219
+ # "rset": "DTSTART:20190214T000000Z",
220
+ # "duration": 2
221
+ # }
222
+ # data = {
223
+ # "stageProps": {
224
+ # "title": "New Stage Modified",
225
+ # "description": "New Stage Description Modified"
226
+ # },
227
+ # "config_json": config_json.to_json,
228
+ # "event_json": event_json.to_json
229
+ # }
230
+ # @data = @mints_user.update_stage(3, data.to_json)
231
+ def update_stage(id, data)
232
+ #TODO: Inform StageController.update method has been modified
233
+ return @client.raw("put", "/content/stages/#{id}", nil, data)
234
+ end
235
+ end
@@ -0,0 +1,147 @@
1
+ module ContentInstances
2
+ ##
3
+ # == Content Instances
4
+ #
5
+
6
+ # === Get content instances.
7
+ # Get a collection of content instances.
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_content_instances
14
+ #
15
+ # ==== Second Example
16
+ # options = { "fields": "id" }
17
+ # @data = @mints_user.get_content_instances(options)
18
+ def get_content_instances(options = nil)
19
+ return @client.raw("get", "/content/instances", options)
20
+ end
21
+
22
+ # === Duplicate content instance.
23
+ # Duplicate a content instance.
24
+ #
25
+ # ==== Parameters
26
+ # id:: (Integer) -- Content instance id.
27
+ # data:: (Hash) -- Data to be submited.
28
+ #
29
+ # ==== Example
30
+ # data = {
31
+ # "options": []
32
+ # }
33
+ # @data = @mints_user.duplicate_content_instance(1, data.to_json)
34
+ def duplicate_content_instance(id, data)
35
+ return @client.raw("post", "/content/instances/#{id}/duplicate", nil, data)
36
+ end
37
+
38
+ # === Get content instance.
39
+ # Get a content instance info.
40
+ #
41
+ # ==== Parameters
42
+ # id:: (Integer) -- Content instance id.
43
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
44
+ #
45
+ # ==== First Example
46
+ # @data = @mints_user.get_content_instance(1)
47
+ #
48
+ # ==== Second Example
49
+ # options = { "fields": "id, title" }
50
+ # @data = @mints_user.get_content_instance(1, options)
51
+ def get_content_instance(id, options = nil)
52
+ return @client.raw("get", "/content/instances/#{id}", options)
53
+ end
54
+
55
+ # === Publish content instance.
56
+ # Publish a content instance.
57
+ #
58
+ # ==== Parameters
59
+ # id:: (Integer) -- Content instance id.
60
+ # data:: (Hash) -- Data to be submited.
61
+ #
62
+ # ==== Example
63
+ # data = {
64
+ # "title": "New publish",
65
+ # "slug": "new-publish",
66
+ # "content_template_id": 1
67
+ # }
68
+ # @data = @mints_user.publish_content_instance(2, data)
69
+ def publish_content_instance(id, data)
70
+ return @client.raw("put", "/content/instances/#{id}/publish", nil, data_transform(data))
71
+ end
72
+
73
+ # === Schedule content instance.
74
+ # Schedule a content instance in a specified date.
75
+ #
76
+ # ==== Parameters
77
+ # id:: (Integer) -- Content instance id.
78
+ # data:: (Hash) -- Data to be submited.
79
+ #
80
+ # ==== Example
81
+ # data = {
82
+ # "scheduled_at": "2021-09-06T20:29:16+00:00"
83
+ # }
84
+ # @data = @mints_user.schedule_content_instance(1, data)
85
+ def schedule_content_instance(id, data)
86
+ return @client.raw("put", "/content/instances/#{id}/schedule", nil, data_transform(data))
87
+ end
88
+
89
+ # === Revert published content instance.
90
+ # Revert a published content instance.
91
+ #
92
+ # ==== Parameters
93
+ # id:: (Integer) -- Content instance id.
94
+ #
95
+ # ==== Example
96
+ # @data = @mints_user.revert_published_content_instance(1)
97
+ def revert_published_content_instance(id)
98
+ return @client.raw("get", "/content/instances/#{id}/revert-published-data")
99
+ end
100
+
101
+ # === Create content instance.
102
+ # Create a content instance with data.
103
+ #
104
+ # ==== Parameters
105
+ # data:: (Hash) -- Data to be submited.
106
+ #
107
+ # ==== Example
108
+ # data = {
109
+ # "title": "New Content Instance",
110
+ # "content_template_id": 1,
111
+ # "slug": "new-content-instance-slug"
112
+ # }
113
+ # @data = @mints_user.create_content_instance(data)
114
+ def create_content_instance(data)
115
+ return @client.raw("post", "/content/instances", nil, data_transform(data))
116
+ end
117
+
118
+ # === Update content instance.
119
+ # Update a content instance info.
120
+ #
121
+ # ==== Parameters
122
+ # id:: (Integer) -- Content instance id.
123
+ # data:: (Hash) -- Data to be submited.
124
+ #
125
+ # ==== Example
126
+ # data = {
127
+ # "title": "New Content Instance Modified",
128
+ # "content_template_id": 1,
129
+ # "slug": "new-content-instance-slug"
130
+ # }
131
+ # @data = @mints_user.update_content_instance(18, data)
132
+ def update_content_instance(id, data)
133
+ return @client.raw("put", "/content/instances/#{id}", nil, data_transform(data))
134
+ end
135
+
136
+ # === Delete content instance.
137
+ # Delete a content instance.
138
+ #
139
+ # ==== Parameters
140
+ # id:: (Integer) -- Content instance id.
141
+ #
142
+ # ==== Example
143
+ # @data = @mints_user.delete_content_instance(20)
144
+ def delete_content_instance(id)
145
+ return @client.raw("delete", "/content/instances/#{id}")
146
+ end
147
+ end
@@ -0,0 +1,111 @@
1
+ module ContentTemplates
2
+ ##
3
+ # == Content templates
4
+ #
5
+
6
+ # === Get content template instances.
7
+ # Get instances of a content template.
8
+ #
9
+ # ==== Parameters
10
+ # templateId:: (Integer) -- Template id.
11
+ #
12
+ # ==== Example
13
+ # @data = @mints_user.get_content_template_instances(1)
14
+ def get_content_template_instances(templateId)
15
+ return @client.raw("get", "/content/templates/#{templateId}/instances")
16
+ end
17
+
18
+ # === Duplicate content template.
19
+ # Duplicate a content template.
20
+ #
21
+ # ==== Parameters
22
+ # id:: (Integer) -- Content template id.
23
+ #
24
+ # ==== Example
25
+ # @data = @mints_user.get_content_template(1)
26
+ def duplicate_content_template(id)
27
+ return @client.raw("post", "/content/templates/#{id}/duplicate/")
28
+ end
29
+
30
+ # === Get content templates.
31
+ # Get a collection of content templates.
32
+ #
33
+ # ==== Parameters
34
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
35
+ #
36
+ # ==== First Example
37
+ # @data = @mints_user.get_content_templates
38
+ #
39
+ # ==== Second Example
40
+ # options = { "sort": "title" }
41
+ # @data = @mints_user.get_content_templates(options)
42
+ def get_content_templates(options = nil)
43
+ return @client.raw("get", "/content/templates", options)
44
+ end
45
+
46
+ # === Get content template.
47
+ # Get a content template.
48
+ #
49
+ # ==== Parameters
50
+ # id:: (Integer) -- Content template id.
51
+ #
52
+ # ==== Example
53
+ # @data = @mints_user.get_content_template(1)
54
+ def get_content_template(id)
55
+ return @client.raw("get", "/content/templates/#{id}")
56
+ end
57
+
58
+ # === Create content template.
59
+ # Create a content template with data.
60
+ #
61
+ # ==== Parameters
62
+ # data:: (Hash) -- Data to be submited.
63
+ #
64
+ # ==== Example
65
+ # data = {
66
+ # "template": {
67
+ # "title": "New Content Template",
68
+ # "slug": "new-content-template-slug",
69
+ # "description": "New Content Template Description"
70
+ # }
71
+ # }
72
+ # @data = @mints_user.create_content_template(data.to_json)
73
+ def create_content_template(data)
74
+ #TODO: Inform ContentTemplateController.store method has been modified
75
+ return @client.raw("post", "/content/templates", nil, data)
76
+ end
77
+
78
+ # === Update content template.
79
+ # Update a content template info.
80
+ #
81
+ # ==== Parameters
82
+ # id:: (Integer) -- Content template id.
83
+ # data:: (Hash) -- Data to be submited.
84
+ #
85
+ # ==== Example
86
+ # data = {
87
+ # "template": {
88
+ # "title": "New Content Template Modified",
89
+ # "slug": "new-content-template-slug",
90
+ # "description": "New Content Template Description"
91
+ # }
92
+ # }
93
+ # @data = @mints_user.update_content_template(7, data.to_json)
94
+ def update_content_template(id, data)
95
+ #TODO: Inform ContentTemplateController.update method has been modified
96
+ return @client.raw("put", "/content/templates/#{id}", nil, data)
97
+ end
98
+
99
+ # === Delete content template.
100
+ # Delete a content template.
101
+ #
102
+ # ==== Parameters
103
+ # id:: (Integer) -- Content template id.
104
+ #
105
+ # ==== Example
106
+ # @data = @mints_user.delete_content_template(1)
107
+ def delete_content_template(id)
108
+ #TODO: Inform ContentTemplateController.destroy method has been modified
109
+ return @client.raw("delete", "/content/templates/#{id}")
110
+ end
111
+ end
@@ -0,0 +1,174 @@
1
+ module Conversations
2
+ ##
3
+ # == Conversations
4
+ #
5
+
6
+ ###
7
+ # === Get conversations.
8
+ # Get a collection of conversations.
9
+ #
10
+ # ==== Parameters
11
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
12
+ #
13
+ # ==== First Example
14
+ # @data = @mints_user.get_conversations
15
+ #
16
+ # ==== Second Example
17
+ # options = { "fields": "title" }
18
+ # @data = @mints_user.get_conversations(options)
19
+ def get_conversations(options = nil)
20
+ return @client.raw("get", "/content/conversations", options)
21
+ end
22
+
23
+ # === Get conversation.
24
+ # Get a conversation info.
25
+ #
26
+ # ==== Parameters
27
+ # id:: (Integer) -- Conversation id.
28
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
29
+ #
30
+ # ==== First Example
31
+ # @data = @mints_user.get_conversation(1)
32
+ #
33
+ # ==== Second Example
34
+ # options = { "fields": "title" }
35
+ # @data = @mints_user.get_conversation(1, options)
36
+ def get_conversation(id, options = nil)
37
+ return @client.raw("get", "/content/conversations/#{id}", options)
38
+ end
39
+
40
+ # === Create conversation.
41
+ # Create a conversation with data.
42
+ #
43
+ # ==== Parameters
44
+ # data:: (Hash) -- Data to be submited.
45
+ #
46
+ # ==== Example
47
+ # data = {
48
+ # "title": "New Conversation"
49
+ # }
50
+ # @data = @mints_user.create_conversation(data)
51
+ def create_conversation(data)
52
+ return @client.raw("post", "/content/conversations", nil, data_transform(data))
53
+ end
54
+
55
+ # === Update conversation.
56
+ # Update a conversation info.
57
+ #
58
+ # ==== Parameters
59
+ # id:: (Integer) -- Conversation id.
60
+ # data:: (Hash) -- Data to be submited.
61
+ #
62
+ # ==== Example
63
+ # data = {
64
+ # "title": "New Conversation Modified"
65
+ # }
66
+ # @data = @mints_user.update_conversation(13, data)
67
+ def update_conversation(id, data)
68
+ return @client.raw("put", "/content/conversations/#{id}", nil, data_transform(data))
69
+ end
70
+
71
+ # === Delete conversation.
72
+ # Delete a conversation.
73
+ #
74
+ # ==== Parameters
75
+ # id:: (Integer) -- Conversation id.
76
+ #
77
+ # ==== Example
78
+ # @data = @mints_user.delete_conversation(11)
79
+ def delete_conversation(id)
80
+ return @client.raw("delete", "/content/conversations/#{id}")
81
+ end
82
+
83
+ # === Update conversation status.
84
+ # Update a conversation status.
85
+ #
86
+ # ==== Parameters
87
+ # id:: (Integer) -- Conversation id.
88
+ # data:: (Hash) -- Data to be submited.
89
+ #
90
+ # ==== Example
91
+ # data = {
92
+ # "status": "read"
93
+ # }
94
+ # @data = @mints_user.update_conversation_status(13, data)
95
+ def update_conversation_status(id, data)
96
+ return @client.raw("put", "/content/conversations/#{id}/status", nil, data_transform(data))
97
+ end
98
+
99
+ # === Get conversation participants.
100
+ # Get participants in a conversation.
101
+ #
102
+ # ==== Parameters
103
+ # id:: (Integer) -- Conversation id.
104
+ #
105
+ # ==== Example
106
+ # @data = @mints_user.get_conversation_participants(1)
107
+ def get_conversation_participants(id)
108
+ return @client.raw("get", "/content/conversations/#{id}/participants")
109
+ end
110
+
111
+ # === Attach user in conversation.
112
+ # Attach an user in a conversation.
113
+ #
114
+ # ==== Parameters
115
+ # id:: (Integer) -- Conversation id.
116
+ # data:: (Hash) -- Data to be submited.
117
+ #
118
+ # ==== Example
119
+ # data = {
120
+ # "user_id": 2
121
+ # }
122
+ # @data = @mints_user.attach_user_in_conversation(13, data)
123
+ def attach_user_in_conversation(id, data)
124
+ return @client.raw("post", "/content/conversations/#{id}/attach-user", nil, data_transform(data))
125
+ end
126
+
127
+ # === Detach user in conversation.
128
+ # Detach an user in a conversation.
129
+ #
130
+ # ==== Parameters
131
+ # id:: (Integer) -- Conversation id.
132
+ # data:: (Hash) -- Data to be submited.
133
+ #
134
+ # ==== Example
135
+ # data = {
136
+ # "user_id": 2
137
+ # }
138
+ # @data = @mints_user.detach_user_in_conversation(13, data)
139
+ def detach_user_in_conversation(id, data)
140
+ return @client.raw("post", "/content/conversations/#{id}/detach-user", nil, data_transform(data))
141
+ end
142
+
143
+ # === Attach contact in conversation.
144
+ # Attach a contact in a conversation.
145
+ #
146
+ # ==== Parameters
147
+ # id:: (Integer) -- Conversation id.
148
+ # data:: (Hash) -- Data to be submited.
149
+ #
150
+ # ==== Example
151
+ # data = {
152
+ # "contact_id": 2
153
+ # }
154
+ # @data = @mints_user.attach_contact_in_conversation(1, data)
155
+ def attach_contact_in_conversation(id, data)
156
+ return @client.raw("post", "/content/conversations/#{id}/attach-contact", nil, data_transform(data))
157
+ end
158
+
159
+ # === Detach contact in conversation.
160
+ # Detach a contact in a conversation.
161
+ #
162
+ # ==== Parameters
163
+ # id:: (Integer) -- Contact id.
164
+ # data:: (Hash) -- Data to be submited.
165
+ #
166
+ # ==== Example
167
+ # data = {
168
+ # "contact_id": 2
169
+ # }
170
+ # @data = @mints_user.detach_contact_in_conversation(1, data)
171
+ def detach_contact_in_conversation(id, data)
172
+ return @client.raw("post", "/content/conversations/#{id}/detach-contact", nil, data_transform(data))
173
+ end
174
+ end