mints 0.0.26 → 0.0.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/client.rb +72 -34
  3. data/lib/contact.rb +46 -46
  4. data/lib/errors.rb +98 -0
  5. data/lib/mints/controllers/admin_base_controller.rb +8 -66
  6. data/lib/mints/controllers/base_api_controller.rb +16 -134
  7. data/lib/mints/controllers/base_controller.rb +20 -106
  8. data/lib/mints/controllers/concerns/mints_clients.rb +74 -0
  9. data/lib/mints/controllers/concerns/read_config_file.rb +28 -0
  10. data/lib/mints/controllers/contact_api_controller.rb +6 -85
  11. data/lib/mints/controllers/public_api_controller.rb +6 -79
  12. data/lib/mints/controllers/user_api_controller.rb +7 -82
  13. data/lib/mints/helpers/contact_auth_helper.rb +67 -0
  14. data/lib/{mints_helper.rb → mints/helpers/mints_helper.rb} +7 -5
  15. data/lib/mints/helpers/proxy_controllers_methods.rb +126 -0
  16. data/lib/mints/helpers/user_auth_helper.rb +53 -0
  17. data/lib/mints.rb +2 -0
  18. data/lib/pub.rb +21 -21
  19. data/lib/user/config/api_keys.rb +4 -4
  20. data/lib/user/config/appointments.rb +13 -13
  21. data/lib/user/config/attribute_groups.rb +5 -5
  22. data/lib/user/config/attributes.rb +6 -6
  23. data/lib/user/config/calendars.rb +5 -5
  24. data/lib/user/config/config.rb +7 -7
  25. data/lib/user/config/importers.rb +13 -13
  26. data/lib/user/config/public_folders.rb +7 -7
  27. data/lib/user/config/relationships.rb +9 -9
  28. data/lib/user/config/roles.rb +6 -6
  29. data/lib/user/config/seeds.rb +3 -3
  30. data/lib/user/config/system_settings.rb +4 -4
  31. data/lib/user/config/tags.rb +4 -4
  32. data/lib/user/config/taxonomies.rb +7 -7
  33. data/lib/user/config/teams.rb +5 -5
  34. data/lib/user/config/users.rb +5 -5
  35. data/lib/user/contacts/contacts.rb +1 -1
  36. data/lib/user/content/assets.rb +17 -17
  37. data/lib/user/content/content.rb +13 -13
  38. data/lib/user/content/content_instances.rb +9 -9
  39. data/lib/user/content/content_templates.rb +7 -7
  40. data/lib/user/content/conversations.rb +13 -13
  41. data/lib/user/content/dam.rb +8 -8
  42. data/lib/user/content/forms.rb +16 -16
  43. data/lib/user/content/message_templates.rb +11 -11
  44. data/lib/user/content/messages.rb +5 -5
  45. data/lib/user/content/pages.rb +7 -7
  46. data/lib/user/content/stories.rb +6 -6
  47. data/lib/user/content/story_templates.rb +6 -6
  48. data/lib/user/content/story_versions.rb +6 -6
  49. data/lib/user/crm/companies.rb +5 -5
  50. data/lib/user/crm/contacts.rb +18 -18
  51. data/lib/user/crm/deals.rb +6 -6
  52. data/lib/user/crm/favorites.rb +3 -3
  53. data/lib/user/crm/segments.rb +9 -9
  54. data/lib/user/crm/users.rb +1 -1
  55. data/lib/user/crm/workflow_step_objects.rb +5 -5
  56. data/lib/user/crm/workflow_steps.rb +3 -3
  57. data/lib/user/crm/workflows.rb +4 -4
  58. data/lib/user/ecommerce/item_prices.rb +5 -5
  59. data/lib/user/ecommerce/locations.rb +10 -10
  60. data/lib/user/ecommerce/order_items_groups.rb +15 -14
  61. data/lib/user/ecommerce/order_statuses.rb +2 -2
  62. data/lib/user/ecommerce/orders.rb +16 -16
  63. data/lib/user/ecommerce/price_lists.rb +3 -3
  64. data/lib/user/ecommerce/product_templates.rb +7 -7
  65. data/lib/user/ecommerce/product_variations.rb +8 -8
  66. data/lib/user/ecommerce/products.rb +10 -10
  67. data/lib/user/ecommerce/skus.rb +5 -5
  68. data/lib/user/ecommerce/taxes.rb +5 -5
  69. data/lib/user/ecommerce/variant_options.rb +4 -4
  70. data/lib/user/ecommerce/variant_values.rb +4 -4
  71. data/lib/user/helpers/helpers.rb +8 -8
  72. data/lib/user/helpers/object_activities.rb +5 -5
  73. data/lib/user/helpers/object_folders.rb +5 -5
  74. data/lib/user/helpers/user_folders.rb +5 -5
  75. data/lib/user/marketing/marketing.rb +8 -8
  76. data/lib/user/profile/profile.rb +8 -8
  77. data/lib/user.rb +1 -1
  78. metadata +10 -4
@@ -31,7 +31,7 @@ module Content
31
31
  # ==== Example
32
32
  # @data = @mints_user.get_public_images_url
33
33
  def get_public_images_url
34
- return @client.raw("get", "/content/public-images-url")
34
+ @client.raw("get", "/content/public-images-url")
35
35
  end
36
36
 
37
37
  ##
@@ -44,7 +44,7 @@ module Content
44
44
  # ==== Example
45
45
  # @data = @mints_user.get_authors
46
46
  def get_authors
47
- return @client.raw("get", "/content/authors")
47
+ @client.raw("get", "/content/authors")
48
48
  end
49
49
 
50
50
 
@@ -57,7 +57,7 @@ module Content
57
57
  # ==== Example
58
58
  # @data = @mints_user.get_author(1)
59
59
  def get_author(id)
60
- return @client.raw("get", "/content/authors/#{id}")
60
+ @client.raw("get", "/content/authors/#{id}")
61
61
  end
62
62
 
63
63
  # === Create author.
@@ -73,7 +73,7 @@ module Content
73
73
  # }
74
74
  # @data = @mints_user.create_author(data.to_json)
75
75
  def create_author(data)
76
- return @client.raw("post", "/content/authors", nil, data)
76
+ @client.raw("post", "/content/authors", nil, data)
77
77
  end
78
78
 
79
79
  # === Update author.
@@ -87,7 +87,7 @@ module Content
87
87
  #
88
88
  def update_author(id, data)
89
89
  #FIXME: Author controller doesnt receive data
90
- return @client.raw("put", "/content/authors/#{id}", nil, data)
90
+ @client.raw("put", "/content/authors/#{id}", nil, data)
91
91
  end
92
92
 
93
93
  ##
@@ -107,7 +107,7 @@ module Content
107
107
  # options = { "fields": "title" }
108
108
  # @data = @mints_user.get_keywords(options)
109
109
  def get_keywords(options = nil)
110
- return @client.raw("get", "/content/keywords", options)
110
+ @client.raw("get", "/content/keywords", options)
111
111
  end
112
112
 
113
113
  # === Get keyword.
@@ -117,7 +117,7 @@ module Content
117
117
  # id:: (Integer) -- Keyword id.
118
118
  #
119
119
  def get_keyword(id)
120
- return @client.raw("get", "/content/keywords/#{id}")
120
+ @client.raw("get", "/content/keywords/#{id}")
121
121
  end
122
122
 
123
123
  # === Create keyword.
@@ -132,7 +132,7 @@ module Content
132
132
  # }
133
133
  # @data = @mints_user.create_keyword(data.to_json)
134
134
  def create_keyword(data)
135
- return @client.raw("post", "/content/keywords", nil, data)
135
+ @client.raw("post", "/content/keywords", nil, data)
136
136
  end
137
137
 
138
138
  # === Update keyword.
@@ -146,7 +146,7 @@ module Content
146
146
  #
147
147
  def update_keyword(id, data)
148
148
  #FIXME: Keyword controller doesnt receive data
149
- return @client.raw("put", "/content/keywords/#{id}", nil, data)
149
+ @client.raw("put", "/content/keywords/#{id}", nil, data)
150
150
  end
151
151
 
152
152
  ##
@@ -166,7 +166,7 @@ module Content
166
166
  # options = { "fields": "title" }
167
167
  # @data = @mints_user.get_stages(options)
168
168
  def get_stages(options = nil)
169
- return @client.raw("get", "/content/stages", options)
169
+ @client.raw("get", "/content/stages", options)
170
170
  end
171
171
 
172
172
  # === Get stage.
@@ -178,7 +178,7 @@ module Content
178
178
  # ==== Example
179
179
  # @data = @mints_user.get_stage(1)
180
180
  def get_stage(id)
181
- return @client.raw("get", "/content/stages/#{id}")
181
+ @client.raw("get", "/content/stages/#{id}")
182
182
  end
183
183
 
184
184
  # === Create stage.
@@ -203,7 +203,7 @@ module Content
203
203
  # }
204
204
  # @data = @mints_user.create_stage(data.to_json)
205
205
  def create_stage(data)
206
- return @client.raw("post", "/content/stages", nil, data)
206
+ @client.raw("post", "/content/stages", nil, data)
207
207
  end
208
208
 
209
209
  # === Update stage.
@@ -232,6 +232,6 @@ module Content
232
232
  # @data = @mints_user.update_stage(3, data.to_json)
233
233
  def update_stage(id, data)
234
234
  #TODO: Inform StageController.update method has been modified
235
- return @client.raw("put", "/content/stages/#{id}", nil, data)
235
+ @client.raw("put", "/content/stages/#{id}", nil, data)
236
236
  end
237
237
  end
@@ -16,7 +16,7 @@ module ContentInstances
16
16
  # options = { "fields": "id" }
17
17
  # @data = @mints_user.get_content_instances(options)
18
18
  def get_content_instances(options = nil)
19
- return @client.raw("get", "/content/instances", options)
19
+ @client.raw("get", "/content/instances", options)
20
20
  end
21
21
 
22
22
  # === Duplicate content instance.
@@ -32,7 +32,7 @@ module ContentInstances
32
32
  # }
33
33
  # @data = @mints_user.duplicate_content_instance(1, data.to_json)
34
34
  def duplicate_content_instance(id, data)
35
- return @client.raw("post", "/content/instances/#{id}/duplicate", nil, data)
35
+ @client.raw("post", "/content/instances/#{id}/duplicate", nil, data)
36
36
  end
37
37
 
38
38
  # === Get content instance.
@@ -49,7 +49,7 @@ module ContentInstances
49
49
  # options = { "fields": "id, title" }
50
50
  # @data = @mints_user.get_content_instance(1, options)
51
51
  def get_content_instance(id, options = nil)
52
- return @client.raw("get", "/content/instances/#{id}", options)
52
+ @client.raw("get", "/content/instances/#{id}", options)
53
53
  end
54
54
 
55
55
  # === Publish content instance.
@@ -67,7 +67,7 @@ module ContentInstances
67
67
  # }
68
68
  # @data = @mints_user.publish_content_instance(2, data)
69
69
  def publish_content_instance(id, data)
70
- return @client.raw("put", "/content/instances/#{id}/publish", nil, data_transform(data))
70
+ @client.raw("put", "/content/instances/#{id}/publish", nil, data_transform(data))
71
71
  end
72
72
 
73
73
  # === Schedule content instance.
@@ -83,7 +83,7 @@ module ContentInstances
83
83
  # }
84
84
  # @data = @mints_user.schedule_content_instance(1, data)
85
85
  def schedule_content_instance(id, data)
86
- return @client.raw("put", "/content/instances/#{id}/schedule", nil, data_transform(data))
86
+ @client.raw("put", "/content/instances/#{id}/schedule", nil, data_transform(data))
87
87
  end
88
88
 
89
89
  # === Revert published content instance.
@@ -95,7 +95,7 @@ module ContentInstances
95
95
  # ==== Example
96
96
  # @data = @mints_user.revert_published_content_instance(1)
97
97
  def revert_published_content_instance(id)
98
- return @client.raw("get", "/content/instances/#{id}/revert-published-data")
98
+ @client.raw("get", "/content/instances/#{id}/revert-published-data")
99
99
  end
100
100
 
101
101
  # === Create content instance.
@@ -112,7 +112,7 @@ module ContentInstances
112
112
  # }
113
113
  # @data = @mints_user.create_content_instance(data)
114
114
  def create_content_instance(data)
115
- return @client.raw("post", "/content/instances", nil, data_transform(data))
115
+ @client.raw("post", "/content/instances", nil, data_transform(data))
116
116
  end
117
117
 
118
118
  # === Update content instance.
@@ -130,7 +130,7 @@ module ContentInstances
130
130
  # }
131
131
  # @data = @mints_user.update_content_instance(18, data)
132
132
  def update_content_instance(id, data)
133
- return @client.raw("put", "/content/instances/#{id}", nil, data_transform(data))
133
+ @client.raw("put", "/content/instances/#{id}", nil, data_transform(data))
134
134
  end
135
135
 
136
136
  # === Delete content instance.
@@ -142,6 +142,6 @@ module ContentInstances
142
142
  # ==== Example
143
143
  # @data = @mints_user.delete_content_instance(20)
144
144
  def delete_content_instance(id)
145
- return @client.raw("delete", "/content/instances/#{id}")
145
+ @client.raw("delete", "/content/instances/#{id}")
146
146
  end
147
147
  end
@@ -12,7 +12,7 @@ module ContentTemplates
12
12
  # ==== Example
13
13
  # @data = @mints_user.get_content_template_instances(1)
14
14
  def get_content_template_instances(templateId)
15
- return @client.raw("get", "/content/templates/#{templateId}/instances")
15
+ @client.raw("get", "/content/templates/#{templateId}/instances")
16
16
  end
17
17
 
18
18
  # === Duplicate content template.
@@ -24,7 +24,7 @@ module ContentTemplates
24
24
  # ==== Example
25
25
  # @data = @mints_user.get_content_template(1)
26
26
  def duplicate_content_template(id)
27
- return @client.raw("post", "/content/templates/#{id}/duplicate/")
27
+ @client.raw("post", "/content/templates/#{id}/duplicate/")
28
28
  end
29
29
 
30
30
  # === Get content templates.
@@ -40,7 +40,7 @@ module ContentTemplates
40
40
  # options = { "sort": "title" }
41
41
  # @data = @mints_user.get_content_templates(options)
42
42
  def get_content_templates(options = nil)
43
- return @client.raw("get", "/content/templates", options)
43
+ @client.raw("get", "/content/templates", options)
44
44
  end
45
45
 
46
46
  # === Get content template.
@@ -52,7 +52,7 @@ module ContentTemplates
52
52
  # ==== Example
53
53
  # @data = @mints_user.get_content_template(1)
54
54
  def get_content_template(id)
55
- return @client.raw("get", "/content/templates/#{id}")
55
+ @client.raw("get", "/content/templates/#{id}")
56
56
  end
57
57
 
58
58
  # === Create content template.
@@ -72,7 +72,7 @@ module ContentTemplates
72
72
  # @data = @mints_user.create_content_template(data.to_json)
73
73
  def create_content_template(data)
74
74
  #TODO: Inform ContentTemplateController.store method has been modified
75
- return @client.raw("post", "/content/templates", nil, data)
75
+ @client.raw("post", "/content/templates", nil, data)
76
76
  end
77
77
 
78
78
  # === Update content template.
@@ -93,7 +93,7 @@ module ContentTemplates
93
93
  # @data = @mints_user.update_content_template(7, data.to_json)
94
94
  def update_content_template(id, data)
95
95
  #TODO: Inform ContentTemplateController.update method has been modified
96
- return @client.raw("put", "/content/templates/#{id}", nil, data)
96
+ @client.raw("put", "/content/templates/#{id}", nil, data)
97
97
  end
98
98
 
99
99
  # === Delete content template.
@@ -106,6 +106,6 @@ module ContentTemplates
106
106
  # @data = @mints_user.delete_content_template(1)
107
107
  def delete_content_template(id)
108
108
  #TODO: Inform ContentTemplateController.destroy method has been modified
109
- return @client.raw("delete", "/content/templates/#{id}")
109
+ @client.raw("delete", "/content/templates/#{id}")
110
110
  end
111
111
  end
@@ -17,7 +17,7 @@ module Conversations
17
17
  # options = { "fields": "title" }
18
18
  # @data = @mints_user.get_conversations(options)
19
19
  def get_conversations(options = nil)
20
- return @client.raw("get", "/content/conversations", options)
20
+ @client.raw("get", "/content/conversations", options)
21
21
  end
22
22
 
23
23
  # === Get conversation.
@@ -34,7 +34,7 @@ module Conversations
34
34
  # options = { "fields": "title" }
35
35
  # @data = @mints_user.get_conversation(1, options)
36
36
  def get_conversation(id, options = nil)
37
- return @client.raw("get", "/content/conversations/#{id}", options)
37
+ @client.raw("get", "/content/conversations/#{id}", options)
38
38
  end
39
39
 
40
40
  # === Create conversation.
@@ -49,7 +49,7 @@ module Conversations
49
49
  # }
50
50
  # @data = @mints_user.create_conversation(data)
51
51
  def create_conversation(data, options = nil)
52
- return @client.raw("post", "/content/conversations", options, data_transform(data))
52
+ @client.raw("post", "/content/conversations", options, data_transform(data))
53
53
  end
54
54
 
55
55
  # === Update conversation.
@@ -65,7 +65,7 @@ module Conversations
65
65
  # }
66
66
  # @data = @mints_user.update_conversation(13, data)
67
67
  def update_conversation(id, data, options = nil)
68
- return @client.raw("put", "/content/conversations/#{id}", options, data_transform(data))
68
+ @client.raw("put", "/content/conversations/#{id}", options, data_transform(data))
69
69
  end
70
70
 
71
71
  # === Delete conversation.
@@ -77,7 +77,7 @@ module Conversations
77
77
  # ==== Example
78
78
  # @data = @mints_user.delete_conversation(11)
79
79
  def delete_conversation(id)
80
- return @client.raw("delete", "/content/conversations/#{id}")
80
+ @client.raw("delete", "/content/conversations/#{id}")
81
81
  end
82
82
 
83
83
  # === Update conversation status.
@@ -93,7 +93,7 @@ module Conversations
93
93
  # }
94
94
  # @data = @mints_user.update_conversation_status(13, data)
95
95
  def update_conversation_status(id, data)
96
- return @client.raw("put", "/content/conversations/#{id}/status", nil, data_transform(data))
96
+ @client.raw("put", "/content/conversations/#{id}/status", nil, data_transform(data))
97
97
  end
98
98
 
99
99
  # === Get conversation participants.
@@ -105,7 +105,7 @@ module Conversations
105
105
  # ==== Example
106
106
  # @data = @mints_user.get_conversation_participants(1)
107
107
  def get_conversation_participants(id)
108
- return @client.raw("get", "/content/conversations/#{id}/participants")
108
+ @client.raw("get", "/content/conversations/#{id}/participants")
109
109
  end
110
110
 
111
111
  # === Attach user in conversation.
@@ -121,7 +121,7 @@ module Conversations
121
121
  # }
122
122
  # @data = @mints_user.attach_user_in_conversation(13, data)
123
123
  def attach_user_in_conversation(id, data)
124
- return @client.raw("post", "/content/conversations/#{id}/attach-user", nil, data_transform(data))
124
+ @client.raw("post", "/content/conversations/#{id}/attach-user", nil, data_transform(data))
125
125
  end
126
126
 
127
127
  # === Detach user in conversation.
@@ -137,7 +137,7 @@ module Conversations
137
137
  # }
138
138
  # @data = @mints_user.detach_user_in_conversation(13, data)
139
139
  def detach_user_in_conversation(id, data)
140
- return @client.raw("post", "/content/conversations/#{id}/detach-user", nil, data_transform(data))
140
+ @client.raw("post", "/content/conversations/#{id}/detach-user", nil, data_transform(data))
141
141
  end
142
142
 
143
143
  # === Attach contact in conversation.
@@ -153,7 +153,7 @@ module Conversations
153
153
  # }
154
154
  # @data = @mints_user.attach_contact_in_conversation(1, data)
155
155
  def attach_contact_in_conversation(id, data)
156
- return @client.raw("post", "/content/conversations/#{id}/attach-contact", nil, data_transform(data))
156
+ @client.raw("post", "/content/conversations/#{id}/attach-contact", nil, data_transform(data))
157
157
  end
158
158
 
159
159
  # === Detach contact in conversation.
@@ -169,7 +169,7 @@ module Conversations
169
169
  # }
170
170
  # @data = @mints_user.detach_contact_in_conversation(1, data)
171
171
  def detach_contact_in_conversation(id, data)
172
- return @client.raw("post", "/content/conversations/#{id}/detach-contact", nil, data_transform(data))
172
+ @client.raw("post", "/content/conversations/#{id}/detach-contact", nil, data_transform(data))
173
173
  end
174
174
 
175
175
  # === Attach form in conversation.
@@ -185,7 +185,7 @@ module Conversations
185
185
  # }
186
186
  # @data = @mints_user.attach_form_in_conversation(1, data)
187
187
  def attach_form_in_conversation(id, data)
188
- return @client.raw("post", "/content/conversations/#{id}/attach-form", nil, data_transform(data))
188
+ @client.raw("post", "/content/conversations/#{id}/attach-form", nil, data_transform(data))
189
189
  end
190
190
 
191
191
  # === Detach form in conversation.
@@ -201,6 +201,6 @@ module Conversations
201
201
  # }
202
202
  # @data = @mints_user.detach_form_in_conversation(1, data)
203
203
  def detach_form_in_conversation(id, data)
204
- return @client.raw("post", "/content/conversations/#{id}/detach-form", nil, data_transform(data))
204
+ @client.raw("post", "/content/conversations/#{id}/detach-form", nil, data_transform(data))
205
205
  end
206
206
  end
@@ -9,7 +9,7 @@ module DAM
9
9
  # ==== Example
10
10
  # @data = @mints_user.get_dam_loadtree
11
11
  def get_dam_loadtree
12
- return @client.raw("get", "/content/dam/loadtree")
12
+ @client.raw("get", "/content/dam/loadtree")
13
13
  end
14
14
 
15
15
  # === Get dam asset locations.
@@ -21,11 +21,11 @@ module DAM
21
21
  # ==== Example
22
22
  # @data = @mints_user.get_dam_asset_locations(options)
23
23
  def get_dam_asset_locations(options)
24
- return @client.raw("get", "/content/dam/asset-locations", options)
24
+ @client.raw("get", "/content/dam/asset-locations", options)
25
25
  end
26
26
 
27
27
  def paste_dam(data) #FIXME: Controller detect object array like a single array.
28
- return @client.raw("post", "/content/dam/paste", nil, data)
28
+ @client.raw("post", "/content/dam/paste", nil, data)
29
29
  end
30
30
 
31
31
  # === Rename dam.
@@ -44,7 +44,7 @@ module DAM
44
44
  # }
45
45
  # @data = @mints_user.rename_dam(data.to_json)
46
46
  def rename_dam(data)
47
- return @client.raw("post", "/content/dam/rename", nil, data)
47
+ @client.raw("post", "/content/dam/rename", nil, data)
48
48
  end
49
49
 
50
50
  # === Search dam.
@@ -59,15 +59,15 @@ module DAM
59
59
  # }
60
60
  # @data = @mints_user.search_dam(data.to_json)
61
61
  def search_dam(data)
62
- return @client.raw("post", "/content/dam/search", nil, data)
62
+ @client.raw("post", "/content/dam/search", nil, data)
63
63
  end
64
64
 
65
65
  def send_to_trash_dam(data) #FIXME: Invalid argument supplied for foreach()
66
- return @client.raw("post", "/content/dam/sendToTrash", nil, data)
66
+ @client.raw("post", "/content/dam/sendToTrash", nil, data)
67
67
  end
68
68
 
69
69
  def delete_dam(data) #FIXME: Invalid argument supplied for foreach()
70
- return @client.raw("post", "/content/dam/delete", nil, data)
70
+ @client.raw("post", "/content/dam/delete", nil, data)
71
71
  end
72
72
 
73
73
  # === Create dam folder.
@@ -83,6 +83,6 @@ module DAM
83
83
  # }
84
84
  # @data = @mints_user.create_dam_folder(data.to_json)
85
85
  def create_dam_folder(data)
86
- return @client.raw("post", "/content/folders/create", nil, data)
86
+ @client.raw("post", "/content/folders/create", nil, data)
87
87
  end
88
88
  end
@@ -16,7 +16,7 @@ module Forms
16
16
  # options = { "sort": "id", "fields": "title" }
17
17
  # @data = @mints_user.get_forms(options)
18
18
  def get_forms(options = nil)
19
- return @client.raw("get", "/content/forms", options)
19
+ @client.raw("get", "/content/forms", options)
20
20
  end
21
21
 
22
22
  # === Publish form.
@@ -34,7 +34,7 @@ module Forms
34
34
  # }
35
35
  # @data = @mints_user.publish_form(1, data.to_json)
36
36
  def publish_form(id, data) #FIXME: Output cannot be processed. response cannot be converted to json.
37
- return @client.raw("put", "/content/forms/#{id}/publish", nil, data)
37
+ @client.raw("put", "/content/forms/#{id}/publish", nil, data)
38
38
  end
39
39
 
40
40
  # === Schedule form.
@@ -52,7 +52,7 @@ module Forms
52
52
  # }
53
53
  # @data = @mints_user.schedule_form(1, data.to_json)
54
54
  def schedule_form(id, data) #FIXME: Output cannot be processed. response cannot be converted to json.
55
- return @client.raw("put", "/content/forms/#{id}/schedule", nil, data)
55
+ @client.raw("put", "/content/forms/#{id}/schedule", nil, data)
56
56
  end
57
57
 
58
58
  # === Revert published form.
@@ -64,7 +64,7 @@ module Forms
64
64
  # ==== Example
65
65
  # @data = @mints_user.revert_published_form(1)
66
66
  def revert_published_form(id)
67
- return @client.raw("get", "/content/forms/#{id}/revert-published-data")
67
+ @client.raw("get", "/content/forms/#{id}/revert-published-data")
68
68
  end
69
69
 
70
70
  # === Duplicate form.
@@ -76,7 +76,7 @@ module Forms
76
76
  # ==== Example
77
77
  # @data = @mints_user.duplicate_form(3)
78
78
  def duplicate_form(id)
79
- return @client.raw("post", "/content/forms/#{id}/duplicate")
79
+ @client.raw("post", "/content/forms/#{id}/duplicate")
80
80
  end
81
81
 
82
82
  # === Get activation words form.
@@ -88,7 +88,7 @@ module Forms
88
88
  # ==== Example
89
89
  # @data = @mints_user.get_form_activation_words(3)
90
90
  def get_form_activation_words(id)
91
- return @client.raw("post", "/content/forms/#{id}/activation-words")
91
+ @client.raw("post", "/content/forms/#{id}/activation-words")
92
92
  end
93
93
 
94
94
  # === Get form support data.
@@ -97,7 +97,7 @@ module Forms
97
97
  # ==== Example
98
98
  # @data = @mints_user.get_form_support_data
99
99
  def get_form_support_data
100
- return @client.raw("get", "/content/forms/support-data")
100
+ @client.raw("get", "/content/forms/support-data")
101
101
  end
102
102
 
103
103
  # === Get form submissions.
@@ -113,7 +113,7 @@ module Forms
113
113
  # options = { "fields": "id" }
114
114
  # @data = @mints_user.get_form_submissions(options)
115
115
  def get_form_submissions(options = nil)
116
- return @client.raw("get", "/content/forms/submissions", options)
116
+ @client.raw("get", "/content/forms/submissions", options)
117
117
  end
118
118
 
119
119
  # === Get form submission.
@@ -129,7 +129,7 @@ module Forms
129
129
  # options = { "fields": "id" }
130
130
  # @data = @mints_user.get_form_submissions(options)
131
131
  def get_form_submission(id, options)
132
- return @client.raw("get", "/content/forms/submissions/#{id}", options)
132
+ @client.raw("get", "/content/forms/submissions/#{id}", options)
133
133
  end
134
134
 
135
135
  # === Delete form submission.
@@ -141,7 +141,7 @@ module Forms
141
141
  # ==== Example
142
142
  # @data = @mints_user.delete_form_submission(1)
143
143
  def delete_form_submission(id)
144
- return @client.raw("delete", "/content/forms/submissions/#{id}")
144
+ @client.raw("delete", "/content/forms/submissions/#{id}")
145
145
  end
146
146
 
147
147
  # === Get form.
@@ -158,7 +158,7 @@ module Forms
158
158
  # options = { "sort": "id", "fields": "title" }
159
159
  # @data = @mints_user.get_form(2, options)
160
160
  def get_form(id, options = nil)
161
- return @client.raw("get", "/content/forms/#{id}", options)
161
+ @client.raw("get", "/content/forms/#{id}", options)
162
162
  end
163
163
 
164
164
  # === Create form.
@@ -174,7 +174,7 @@ module Forms
174
174
  # }
175
175
  # @data = @mints_user.create_form(data)
176
176
  def create_form(data)
177
- return @client.raw("post", "/content/forms", nil, data_transform(data))
177
+ @client.raw("post", "/content/forms", nil, data_transform(data))
178
178
  end
179
179
 
180
180
  # === Update form.
@@ -191,7 +191,7 @@ module Forms
191
191
  # }
192
192
  # @data = @mints_user.update_form(3, data)
193
193
  def update_form(id, data)
194
- return @client.raw("put", "/content/forms/#{id}", nil, data_transform(data))
194
+ @client.raw("put", "/content/forms/#{id}", nil, data_transform(data))
195
195
  end
196
196
 
197
197
  # === Delete form.
@@ -203,7 +203,7 @@ module Forms
203
203
  # ==== Example
204
204
  # @data = @mints_user.delete_form(9)
205
205
  def delete_form(id)
206
- return @client.raw("delete", "/content/forms/#{id}")
206
+ @client.raw("delete", "/content/forms/#{id}")
207
207
  end
208
208
 
209
209
  # === Get form aggregates.
@@ -215,7 +215,7 @@ module Forms
215
215
  # ==== First Example
216
216
  # @data = @mints_user.get_form_aggregates(1)
217
217
  def get_form_aggregates(id, object_id)
218
- return @client.raw("get", "/content/forms/#{id}/aggregates?object_id=#{object_id}", options)
218
+ @client.raw("get", "/content/forms/#{id}/aggregates?object_id=#{object_id}", options)
219
219
  end
220
220
 
221
221
  # === Reset aggregates.
@@ -229,6 +229,6 @@ module Forms
229
229
  # }
230
230
  # @data = @mints_user.reset_form_aggregates(data)
231
231
  def reset_form_aggregates(data)
232
- return @client.raw("post", "/content/forms/#{id}/aggregates", nil, data_transform(data))
232
+ @client.raw("post", "/content/forms/#{id}/aggregates", nil, data_transform(data))
233
233
  end
234
234
  end
@@ -12,7 +12,7 @@ module MessageTemplates
12
12
  # ==== Example
13
13
  # @data = @mints_user.get_variables_of_content_page_from_message_templates(2)
14
14
  def get_variables_of_content_page_from_message_templates(id)
15
- return @client.raw("get", "/content/message-templates/content-pages/#{id}/variables")
15
+ @client.raw("get", "/content/message-templates/content-pages/#{id}/variables")
16
16
  end
17
17
 
18
18
  # === Get recipient variables.
@@ -21,7 +21,7 @@ module MessageTemplates
21
21
  # ==== Example
22
22
  # @data = @mints_user.get_recipient_variables
23
23
  def get_recipient_variables
24
- return @client.raw("get", "/content/message-templates/recipient-variables")
24
+ @client.raw("get", "/content/message-templates/recipient-variables")
25
25
  end
26
26
 
27
27
  # === Get driver templates.
@@ -30,7 +30,7 @@ module MessageTemplates
30
30
  # ==== Example
31
31
  # @data = @mints_user.get_driver_templates
32
32
  def get_driver_templates
33
- return @client.raw("get", "/content/email-templates/driver/templates")
33
+ @client.raw("get", "/content/email-templates/driver/templates")
34
34
  end
35
35
 
36
36
  # === Preview message template.
@@ -50,7 +50,7 @@ module MessageTemplates
50
50
  # }
51
51
  # @data = @mints_user.preview_message_template(data)
52
52
  def preview_message_template(data)
53
- return @client.raw("post", "/content/message-templates/preview", nil, data_transform(data))
53
+ @client.raw("post", "/content/message-templates/preview", nil, data_transform(data))
54
54
  end
55
55
 
56
56
  # === Send Message Template.
@@ -69,7 +69,7 @@ module MessageTemplates
69
69
  # }
70
70
  # @data = @mints_user.send_message_template(data)
71
71
  def send_message_template(data)
72
- return @client.raw("post", "/content/message-templates/send", nil, data_transform(data))
72
+ @client.raw("post", "/content/message-templates/send", nil, data_transform(data))
73
73
  end
74
74
 
75
75
  # === Duplicate Message Template.
@@ -80,7 +80,7 @@ module MessageTemplates
80
80
  # data:: (Hash) -- Data to be submitted.
81
81
  #
82
82
  def duplicate_message_template(id, data) #FIXME: Error in duplicating
83
- return @client.raw("post", "/content/message-templates/#{id}/duplicate", nil, data_transform(data))
83
+ @client.raw("post", "/content/message-templates/#{id}/duplicate", nil, data_transform(data))
84
84
  end
85
85
 
86
86
  # === Get message templates.
@@ -96,7 +96,7 @@ module MessageTemplates
96
96
  # options = { "fields": "id" }
97
97
  # @data = @mints_user.get_message_templates(options)
98
98
  def get_message_templates(options = nil)
99
- return @client.raw("get", "/content/message-templates", options)
99
+ @client.raw("get", "/content/message-templates", options)
100
100
  end
101
101
 
102
102
  # === Get message template.
@@ -113,7 +113,7 @@ module MessageTemplates
113
113
  # options = { "fields": "id" }
114
114
  # @data = @mints_user.get_message_template(1, options)
115
115
  def get_message_template(id, options = nil)
116
- return @client.raw("get", "/content/message-templates/#{id}", options)
116
+ @client.raw("get", "/content/message-templates/#{id}", options)
117
117
  end
118
118
 
119
119
  # === Create message template.
@@ -129,7 +129,7 @@ module MessageTemplates
129
129
  # }
130
130
  # @data = @mints_user.create_message_template(data)
131
131
  def create_message_template(data)
132
- return @client.raw("post", "/content/message-templates", nil, data_transform(data))
132
+ @client.raw("post", "/content/message-templates", nil, data_transform(data))
133
133
  end
134
134
 
135
135
  # === Update message template.
@@ -145,7 +145,7 @@ module MessageTemplates
145
145
  # }
146
146
  # @data = @mints_user.update_message_template(5, data)
147
147
  def update_message_template(id, data)
148
- return @client.raw("put", "/content/message-templates/#{id}", nil, data_transform(data))
148
+ @client.raw("put", "/content/message-templates/#{id}", nil, data_transform(data))
149
149
  end
150
150
 
151
151
  # === Delete message template.
@@ -157,6 +157,6 @@ module MessageTemplates
157
157
  # ==== Example
158
158
  # @data = @mints_user.delete_message_template(2)
159
159
  def delete_message_template(id)
160
- return @client.raw("delete", "/content/message-templates/#{id}")
160
+ @client.raw("delete", "/content/message-templates/#{id}")
161
161
  end
162
162
  end