mints 0.0.28 → 0.0.30
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 +287 -385
- data/lib/contact/config/appointments.rb +201 -0
- data/lib/contact/config/config.rb +7 -0
- data/lib/contact/content/content.rb +7 -0
- data/lib/contact/content/conversations.rb +121 -0
- data/lib/contact/ecommerce/ecommerce.rb +14 -0
- data/lib/contact/ecommerce/order_items.rb +19 -0
- data/lib/contact/ecommerce/order_items_groups.rb +95 -0
- data/lib/contact/ecommerce/orders.rb +132 -0
- data/lib/contact/ecommerce/vouchers.rb +18 -0
- data/lib/contact.rb +54 -603
- data/lib/errors.rb +4 -2
- data/lib/generators/mints_assets_controller.rb +4 -1
- data/lib/generators/mints_contact_controller.rb +4 -1
- data/lib/generators/mints_files_generator.rb +16 -13
- data/lib/generators/mints_link.rb +7 -4
- data/lib/generators/mints_public_controller.rb +4 -1
- data/lib/generators/mints_user_controller.rb +3 -0
- data/lib/generators/short_link_controller.rb +4 -1
- data/lib/mints/controllers/admin_base_controller.rb +5 -3
- data/lib/mints/controllers/base_api_controller.rb +6 -4
- data/lib/mints/controllers/base_controller.rb +5 -3
- data/lib/mints/controllers/concerns/mints_clients.rb +4 -2
- data/lib/mints/controllers/concerns/read_config_file.rb +3 -1
- data/lib/mints/controllers/contact_api_controller.rb +12 -10
- data/lib/mints/controllers/public_api_controller.rb +10 -8
- data/lib/mints/controllers/user_api_controller.rb +11 -9
- data/lib/mints/helpers/contact_auth_helper.rb +5 -3
- data/lib/mints/helpers/mints_helper.rb +39 -38
- data/lib/mints/helpers/proxy_controllers_methods.rb +24 -24
- data/lib/mints/helpers/user_auth_helper.rb +5 -3
- data/lib/mints.rb +12 -10
- data/lib/pub/config/attributes.rb +13 -0
- data/lib/pub/config/config.rb +15 -0
- data/lib/pub/config/public_folders.rb +51 -0
- data/lib/pub/config/tags.rb +42 -0
- data/lib/pub/config/taxonomies.rb +49 -0
- data/lib/pub/content/assets.rb +16 -0
- data/lib/pub/content/content.rb +22 -0
- data/lib/pub/content/content_bundles.rb +40 -0
- data/lib/pub/content/content_instance_versions.rb +56 -0
- data/lib/pub/content/content_instances.rb +37 -0
- data/lib/pub/content/forms.rb +47 -0
- data/lib/pub/content/stories.rb +44 -0
- data/lib/pub/content/story_versions.rb +46 -0
- data/lib/pub/ecommerce/ecommerce.rb +14 -0
- data/lib/pub/ecommerce/locations.rb +25 -0
- data/lib/pub/ecommerce/orders.rb +31 -0
- data/lib/pub/ecommerce/products.rb +45 -0
- data/lib/pub.rb +22 -461
- data/lib/user/config/api_keys.rb +63 -61
- data/lib/user/config/appointments.rb +217 -215
- data/lib/user/config/attribute_groups.rb +74 -72
- data/lib/user/config/attributes.rb +83 -81
- data/lib/user/config/calendars.rb +88 -86
- data/lib/user/config/config.rb +31 -63
- data/lib/user/config/public_folders.rb +105 -104
- data/lib/user/config/relationships.rb +135 -132
- data/lib/user/config/roles.rb +76 -79
- data/lib/user/config/seeds.rb +52 -51
- data/lib/user/config/system_settings.rb +50 -49
- data/lib/user/config/tags.rb +57 -59
- data/lib/user/config/taxonomies.rb +115 -119
- data/lib/user/config/teams.rb +2 -0
- data/lib/user/config/users.rb +2 -0
- data/lib/user/contacts/contacts.rb +2 -0
- data/lib/user/content/assets.rb +3 -3
- data/lib/user/content/content.rb +224 -223
- data/lib/user/content/content_instances.rb +4 -2
- data/lib/user/content/content_templates.rb +2 -0
- data/lib/user/content/conversations.rb +2 -0
- data/lib/user/content/dam.rb +2 -0
- data/lib/user/content/forms.rb +2 -0
- data/lib/user/content/message_templates.rb +2 -0
- data/lib/user/content/messages.rb +2 -0
- data/lib/user/content/pages.rb +4 -2
- data/lib/user/content/stories.rb +3 -3
- data/lib/user/content/story_templates.rb +5 -3
- data/lib/user/content/story_versions.rb +2 -0
- data/lib/user/crm/companies.rb +3 -1
- data/lib/user/crm/contacts.rb +2 -0
- data/lib/user/crm/crm.rb +2 -0
- data/lib/user/crm/deals.rb +2 -0
- data/lib/user/crm/favorites.rb +2 -0
- data/lib/user/crm/segments.rb +2 -0
- data/lib/user/crm/users.rb +2 -0
- data/lib/user/crm/workflow_step_objects.rb +2 -0
- data/lib/user/crm/workflow_steps.rb +2 -0
- data/lib/user/crm/workflows.rb +2 -0
- data/lib/user/ecommerce/ecommerce.rb +4 -0
- data/lib/user/ecommerce/item_prices.rb +2 -0
- data/lib/user/ecommerce/locations.rb +4 -2
- data/lib/user/ecommerce/order_items_groups.rb +5 -2
- data/lib/user/ecommerce/order_statuses.rb +2 -0
- data/lib/user/ecommerce/orders.rb +4 -1
- data/lib/user/ecommerce/price_lists.rb +2 -0
- data/lib/user/ecommerce/product_templates.rb +3 -1
- data/lib/user/ecommerce/product_variations.rb +2 -0
- data/lib/user/ecommerce/products.rb +3 -1
- data/lib/user/ecommerce/skus.rb +2 -0
- data/lib/user/ecommerce/taxes.rb +2 -0
- data/lib/user/ecommerce/variant_options.rb +2 -0
- data/lib/user/ecommerce/variant_values.rb +2 -0
- data/lib/user/ecommerce/vouchers.rb +90 -0
- data/lib/user/helpers/helpers.rb +2 -0
- data/lib/user/helpers/object_activities.rb +2 -0
- data/lib/user/helpers/object_folders.rb +2 -0
- data/lib/user/helpers/user_folders.rb +2 -0
- data/lib/user/marketing/marketing.rb +2 -0
- data/lib/user/profile/profile.rb +2 -0
- data/lib/user.rb +32 -41
- metadata +42 -16
- data/lib/user/config/importers.rb +0 -184
data/lib/user/content/content.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require_relative './assets'
|
|
2
4
|
require_relative './content_instances'
|
|
3
5
|
require_relative './content_templates'
|
|
@@ -12,226 +14,225 @@ require_relative './story_versions'
|
|
|
12
14
|
require_relative './story_templates'
|
|
13
15
|
|
|
14
16
|
module Content
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
end
|
|
17
|
+
include Assets
|
|
18
|
+
include ContentInstances
|
|
19
|
+
include ContentTemplates
|
|
20
|
+
include Conversations
|
|
21
|
+
include DAM
|
|
22
|
+
include Forms
|
|
23
|
+
include MessageTemplates
|
|
24
|
+
include Messages
|
|
25
|
+
include Pages
|
|
26
|
+
include Stories
|
|
27
|
+
include StoryVersions
|
|
28
|
+
include StoryTemplates
|
|
29
|
+
|
|
30
|
+
# === Get public images url.
|
|
31
|
+
# Get public images url.
|
|
32
|
+
#
|
|
33
|
+
# ==== Example
|
|
34
|
+
# @data = @mints_user.get_public_images_url
|
|
35
|
+
def get_public_images_url
|
|
36
|
+
@client.raw('get', '/content/public-images-url')
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
##
|
|
40
|
+
# == Authors
|
|
41
|
+
#
|
|
42
|
+
|
|
43
|
+
# === Get authors.
|
|
44
|
+
# Get authors.
|
|
45
|
+
#
|
|
46
|
+
# ==== Example
|
|
47
|
+
# @data = @mints_user.get_authors
|
|
48
|
+
def get_authors
|
|
49
|
+
@client.raw('get', '/content/authors')
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# === Get author.
|
|
53
|
+
# Get an author.
|
|
54
|
+
#
|
|
55
|
+
# ==== Parameters
|
|
56
|
+
# id:: (Integer) -- Author id.
|
|
57
|
+
#
|
|
58
|
+
# ==== Example
|
|
59
|
+
# @data = @mints_user.get_author(1)
|
|
60
|
+
def get_author(id)
|
|
61
|
+
@client.raw('get', "/content/authors/#{id}")
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# === Create author.
|
|
65
|
+
# Create an author with data.
|
|
66
|
+
#
|
|
67
|
+
# ==== Parameters
|
|
68
|
+
# data:: (Hash) -- Data to be submitted.
|
|
69
|
+
#
|
|
70
|
+
# ==== Example
|
|
71
|
+
# data = {
|
|
72
|
+
# title: 'Howard Phillips Lovecraft',
|
|
73
|
+
# slug: 'howard-phillips-lovecraft'
|
|
74
|
+
# }
|
|
75
|
+
# @data = @mints_user.create_author(data.to_json)
|
|
76
|
+
def create_author(data)
|
|
77
|
+
@client.raw('post', '/content/authors', nil, data)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# === Update author.
|
|
81
|
+
# Update an author info.
|
|
82
|
+
#
|
|
83
|
+
# ==== Parameters
|
|
84
|
+
# id:: (Integer) -- Author id.
|
|
85
|
+
# data:: (Hash) -- Data to be submitted.
|
|
86
|
+
#
|
|
87
|
+
# ==== Example
|
|
88
|
+
#
|
|
89
|
+
def update_author(id, data)
|
|
90
|
+
# FIXME: Author controller doesnt receive data
|
|
91
|
+
@client.raw('put', "/content/authors/#{id}", nil, data)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
##
|
|
95
|
+
# == Keywords
|
|
96
|
+
#
|
|
97
|
+
|
|
98
|
+
# === Get keywords.
|
|
99
|
+
# Get a collection of keywords.
|
|
100
|
+
#
|
|
101
|
+
# ==== Parameters
|
|
102
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
103
|
+
#
|
|
104
|
+
# ==== First Example
|
|
105
|
+
# @data = @mints_user.get_keywords
|
|
106
|
+
#
|
|
107
|
+
# ==== Second Example
|
|
108
|
+
# options = { fields: 'title' }
|
|
109
|
+
# @data = @mints_user.get_keywords(options)
|
|
110
|
+
def get_keywords(options = nil)
|
|
111
|
+
@client.raw('get', '/content/keywords', options)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# === Get keyword.
|
|
115
|
+
# Get a keyword.
|
|
116
|
+
#
|
|
117
|
+
# ==== Parameters
|
|
118
|
+
# id:: (Integer) -- Keyword id.
|
|
119
|
+
#
|
|
120
|
+
def get_keyword(id)
|
|
121
|
+
@client.raw('get', "/content/keywords/#{id}")
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# === Create keyword.
|
|
125
|
+
# Create a keyword with data.
|
|
126
|
+
#
|
|
127
|
+
# ==== Parameters
|
|
128
|
+
# data:: (Hash) -- Data to be submitted.
|
|
129
|
+
#
|
|
130
|
+
# ==== Example
|
|
131
|
+
# data = {
|
|
132
|
+
# title: 'New Keyword'
|
|
133
|
+
# }
|
|
134
|
+
# @data = @mints_user.create_keyword(data.to_json)
|
|
135
|
+
def create_keyword(data)
|
|
136
|
+
@client.raw('post', '/content/keywords', nil, data)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# === Update keyword.
|
|
140
|
+
# Update a keyword info.
|
|
141
|
+
#
|
|
142
|
+
# ==== Parameters
|
|
143
|
+
# id:: (Integer) -- Keyword id.
|
|
144
|
+
# data:: (Hash) -- Data to be submitted.
|
|
145
|
+
#
|
|
146
|
+
# ==== Example
|
|
147
|
+
#
|
|
148
|
+
def update_keyword(id, data)
|
|
149
|
+
# FIXME: Keyword controller doesnt receive data
|
|
150
|
+
@client.raw('put', "/content/keywords/#{id}", nil, data)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
##
|
|
154
|
+
# == Stages
|
|
155
|
+
#
|
|
156
|
+
|
|
157
|
+
# === Get stages.
|
|
158
|
+
# Get a collection of stages.
|
|
159
|
+
#
|
|
160
|
+
# ==== Parameters
|
|
161
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
162
|
+
#
|
|
163
|
+
# ==== First Example
|
|
164
|
+
# @data = @mints_user.get_stages
|
|
165
|
+
#
|
|
166
|
+
# ==== Second Example
|
|
167
|
+
# options = { fields: 'title' }
|
|
168
|
+
# @data = @mints_user.get_stages(options)
|
|
169
|
+
def get_stages(options = nil)
|
|
170
|
+
@client.raw('get', '/content/stages', options)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# === Get stage.
|
|
174
|
+
# Get a stage.
|
|
175
|
+
#
|
|
176
|
+
# ==== Parameters
|
|
177
|
+
# id:: (Integer) -- Stage id.
|
|
178
|
+
#
|
|
179
|
+
# ==== Example
|
|
180
|
+
# @data = @mints_user.get_stage(1)
|
|
181
|
+
def get_stage(id)
|
|
182
|
+
@client.raw('get', "/content/stages/#{id}")
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# === Create stage.
|
|
186
|
+
# Create a stage with data.
|
|
187
|
+
#
|
|
188
|
+
# ==== Parameters
|
|
189
|
+
# data:: (Hash) -- Data to be submitted.
|
|
190
|
+
#
|
|
191
|
+
# ==== Example
|
|
192
|
+
# config_json = {
|
|
193
|
+
# count: 1
|
|
194
|
+
# }
|
|
195
|
+
# event_json = {
|
|
196
|
+
# rset: 'DTSTART:20190214T000000Z',
|
|
197
|
+
# duration: 1
|
|
198
|
+
# }
|
|
199
|
+
# data = {
|
|
200
|
+
# title: 'New Stage',
|
|
201
|
+
# description: 'New Stage Description',
|
|
202
|
+
# config_json: config_json.to_json,
|
|
203
|
+
# event_json: event_json.to_json
|
|
204
|
+
# }
|
|
205
|
+
# @data = @mints_user.create_stage(data.to_json)
|
|
206
|
+
def create_stage(data)
|
|
207
|
+
@client.raw('post', '/content/stages', nil, data)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# === Update stage.
|
|
211
|
+
# Update a stage info.
|
|
212
|
+
#
|
|
213
|
+
# ==== Parameters
|
|
214
|
+
# id:: (Integer) -- Stage id.
|
|
215
|
+
# data:: (Hash) -- Data to be submitted.
|
|
216
|
+
#
|
|
217
|
+
# ==== Example
|
|
218
|
+
# config_json = {
|
|
219
|
+
# count: 2
|
|
220
|
+
# }
|
|
221
|
+
# event_json = {
|
|
222
|
+
# rset: 'DTSTART:20190214T000000Z',
|
|
223
|
+
# duration: 2
|
|
224
|
+
# }
|
|
225
|
+
# data = {
|
|
226
|
+
# stageProps: {
|
|
227
|
+
# title: 'New Stage Modified',
|
|
228
|
+
# description: 'New Stage Description Modified'
|
|
229
|
+
# },
|
|
230
|
+
# config_json: config_json.to_json,
|
|
231
|
+
# event_json: event_json.to_json
|
|
232
|
+
# }
|
|
233
|
+
# @data = @mints_user.update_stage(3, data.to_json)
|
|
234
|
+
def update_stage(id, data)
|
|
235
|
+
# TODO: Inform StageController.update method has been modified
|
|
236
|
+
@client.raw('put', "/content/stages/#{id}", nil, data)
|
|
237
|
+
end
|
|
238
|
+
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module ContentInstances
|
|
2
4
|
##
|
|
3
5
|
# == Content Instances
|
|
@@ -76,7 +78,7 @@ module ContentInstances
|
|
|
76
78
|
# data:: (Hash) -- Data to be submitted.
|
|
77
79
|
#
|
|
78
80
|
# ==== Example
|
|
79
|
-
# data = {
|
|
81
|
+
# data = {
|
|
80
82
|
# scheduled_at: '2021-09-06T20:29:16+00:00'
|
|
81
83
|
# }
|
|
82
84
|
# @data = @mints_user.schedule_content_instance(1, data)
|
|
@@ -110,7 +112,7 @@ module ContentInstances
|
|
|
110
112
|
# }
|
|
111
113
|
# @data = @mints_user.create_content_instance(data)
|
|
112
114
|
def create_content_instance(data)
|
|
113
|
-
@client.raw('post', '/content/instances',
|
|
115
|
+
@client.raw('post', '/content/instances', nil, data_transform(data))
|
|
114
116
|
end
|
|
115
117
|
|
|
116
118
|
# === Update content instance.
|
data/lib/user/content/dam.rb
CHANGED
data/lib/user/content/forms.rb
CHANGED
data/lib/user/content/pages.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Pages
|
|
2
4
|
##
|
|
3
5
|
# == Content Pages
|
|
@@ -50,7 +52,7 @@ module Pages
|
|
|
50
52
|
# data:: (Hash) -- Data to be submitted.
|
|
51
53
|
#
|
|
52
54
|
# ==== Example
|
|
53
|
-
# data = {
|
|
55
|
+
# data = {
|
|
54
56
|
# title: "New Page",
|
|
55
57
|
# slug: "new-page-slug",
|
|
56
58
|
# description: "New page description"
|
|
@@ -68,7 +70,7 @@ module Pages
|
|
|
68
70
|
# data:: (Hash) -- Data to be submitted.
|
|
69
71
|
#
|
|
70
72
|
# ==== Example
|
|
71
|
-
# data = {
|
|
73
|
+
# data = {
|
|
72
74
|
# title: "New Page Modified"
|
|
73
75
|
# }
|
|
74
76
|
# @data = @mints_user.update_page(5, data.to_json)
|
data/lib/user/content/stories.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Stories
|
|
2
4
|
# === Duplicate story.
|
|
3
5
|
# Duplicate a story.
|
|
@@ -7,9 +9,7 @@ module Stories
|
|
|
7
9
|
# data:: (Hash) -- Data to be submitted.
|
|
8
10
|
#
|
|
9
11
|
# ==== Example
|
|
10
|
-
# data = {
|
|
11
|
-
# options: []
|
|
12
|
-
# }
|
|
12
|
+
# data = { options: [] }
|
|
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)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module StoryTemplates
|
|
2
4
|
##
|
|
3
5
|
# == Story Template
|
|
@@ -21,7 +23,7 @@ module StoryTemplates
|
|
|
21
23
|
# ==== Example
|
|
22
24
|
# @data = @mints_user.get_story_templates_support_data
|
|
23
25
|
def get_story_templates_support_data
|
|
24
|
-
@client.raw('get',
|
|
26
|
+
@client.raw('get', '/content/story-templates/support-data')
|
|
25
27
|
end
|
|
26
28
|
|
|
27
29
|
# === Get story templates.
|
|
@@ -54,7 +56,7 @@ module StoryTemplates
|
|
|
54
56
|
#
|
|
55
57
|
# ==== Second Example
|
|
56
58
|
# options = {
|
|
57
|
-
# fields:
|
|
59
|
+
# fields: 'title'
|
|
58
60
|
# }
|
|
59
61
|
# @data = @mints_user.get_story_template(1, options)
|
|
60
62
|
def get_story_template(id, options = nil)
|
|
@@ -74,7 +76,7 @@ module StoryTemplates
|
|
|
74
76
|
# }
|
|
75
77
|
# @data = @mints_user.create_story_template(data)
|
|
76
78
|
def create_story_template(data)
|
|
77
|
-
@client.raw('post',
|
|
79
|
+
@client.raw('post', '/content/story-templates', nil, data_transform(data))
|
|
78
80
|
end
|
|
79
81
|
|
|
80
82
|
# === Update story template.
|
data/lib/user/crm/companies.rb
CHANGED
data/lib/user/crm/contacts.rb
CHANGED
data/lib/user/crm/crm.rb
CHANGED
data/lib/user/crm/deals.rb
CHANGED
data/lib/user/crm/favorites.rb
CHANGED
data/lib/user/crm/segments.rb
CHANGED