mints 0.0.27 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/lib/client.rb +4 -4
- data/lib/contact.rb +60 -61
- data/lib/errors.rb +1 -1
- data/lib/generators/mints_config.yml.erb +0 -2
- data/lib/generators/mints_link.rb +3 -3
- data/lib/mints/helpers/mints_helper.rb +2 -2
- data/lib/pub.rb +55 -55
- data/lib/user/config/api_keys.rb +7 -7
- data/lib/user/config/appointments.rb +16 -16
- data/lib/user/config/attribute_groups.rb +10 -10
- data/lib/user/config/attributes.rb +10 -10
- data/lib/user/config/calendars.rb +9 -9
- data/lib/user/config/config.rb +7 -7
- data/lib/user/config/importers.rb +15 -15
- data/lib/user/config/public_folders.rb +11 -11
- data/lib/user/config/relationships.rb +11 -11
- data/lib/user/config/roles.rb +9 -9
- data/lib/user/config/seeds.rb +5 -5
- data/lib/user/config/system_settings.rb +5 -5
- data/lib/user/config/tags.rb +5 -5
- data/lib/user/config/taxonomies.rb +15 -15
- data/lib/user/config/teams.rb +67 -68
- data/lib/user/config/users.rb +70 -71
- data/lib/user/contacts/contacts.rb +19 -20
- data/lib/user/content/assets.rb +273 -278
- data/lib/user/content/content.rb +48 -48
- data/lib/user/content/content_instances.rb +136 -138
- data/lib/user/content/content_templates.rb +103 -103
- data/lib/user/content/conversations.rb +193 -193
- data/lib/user/content/dam.rb +83 -80
- data/lib/user/content/forms.rb +229 -233
- data/lib/user/content/message_templates.rb +152 -151
- data/lib/user/content/messages.rb +87 -87
- data/lib/user/content/pages.rb +82 -82
- data/lib/user/content/stories.rb +101 -101
- data/lib/user/content/story_templates.rb +88 -88
- data/lib/user/content/story_versions.rb +115 -117
- data/lib/user/crm/companies.rb +103 -105
- data/lib/user/crm/contacts.rb +285 -292
- data/lib/user/crm/crm.rb +19 -19
- data/lib/user/crm/deals.rb +103 -103
- data/lib/user/crm/favorites.rb +14 -13
- data/lib/user/crm/segments.rb +121 -123
- data/lib/user/crm/users.rb +20 -20
- data/lib/user/crm/workflow_step_objects.rb +84 -84
- data/lib/user/crm/workflow_steps.rb +45 -45
- data/lib/user/crm/workflows.rb +65 -65
- data/lib/user/ecommerce/ecommerce.rb +27 -27
- data/lib/user/ecommerce/item_prices.rb +82 -81
- data/lib/user/ecommerce/locations.rb +160 -160
- data/lib/user/ecommerce/order_items_groups.rb +107 -106
- data/lib/user/ecommerce/order_statuses.rb +24 -24
- data/lib/user/ecommerce/orders.rb +250 -246
- data/lib/user/ecommerce/price_lists.rb +68 -68
- data/lib/user/ecommerce/product_templates.rb +99 -99
- data/lib/user/ecommerce/product_variations.rb +122 -120
- data/lib/user/ecommerce/products.rb +160 -159
- data/lib/user/ecommerce/skus.rb +85 -85
- data/lib/user/ecommerce/taxes.rb +79 -79
- data/lib/user/ecommerce/variant_options.rb +66 -66
- data/lib/user/ecommerce/variant_values.rb +69 -69
- data/lib/user/helpers/helpers.rb +102 -101
- data/lib/user/helpers/object_activities.rb +78 -78
- data/lib/user/helpers/object_folders.rb +76 -76
- data/lib/user/helpers/user_folders.rb +77 -77
- data/lib/user/marketing/marketing.rb +114 -113
- data/lib/user/profile/profile.rb +94 -103
- data/lib/user.rb +3 -3
- metadata +33 -33
@@ -1,111 +1,111 @@
|
|
1
1
|
module ContentTemplates
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# == Content templates
|
4
|
+
#
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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(template_id)
|
15
|
+
@client.raw('get', "/content/templates/#{template_id}/instances")
|
16
|
+
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
+
@client.raw('post', "/content/templates/#{id}/duplicate/")
|
28
|
+
end
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
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
|
+
@client.raw('get', '/content/templates', options)
|
44
|
+
end
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
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
|
+
@client.raw('get', "/content/templates/#{id}")
|
56
|
+
end
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
58
|
+
# === Create content template.
|
59
|
+
# Create a content template with data.
|
60
|
+
#
|
61
|
+
# ==== Parameters
|
62
|
+
# data:: (Hash) -- Data to be submitted.
|
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
|
+
@client.raw('post', '/content/templates', nil, data)
|
76
|
+
end
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
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 submitted.
|
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
|
+
@client.raw('put', "/content/templates/#{id}", nil, data)
|
97
|
+
end
|
98
98
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
end
|
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
|
+
@client.raw('delete', "/content/templates/#{id}")
|
110
|
+
end
|
111
|
+
end
|
@@ -1,206 +1,206 @@
|
|
1
1
|
module Conversations
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# == Conversations
|
4
|
+
#
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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
|
+
@client.raw('get', '/content/conversations', options)
|
21
|
+
end
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|
+
@client.raw('get', "/content/conversations/#{id}", options)
|
38
|
+
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
40
|
+
# === Create conversation.
|
41
|
+
# Create a conversation with data.
|
42
|
+
#
|
43
|
+
# ==== Parameters
|
44
|
+
# data:: (Hash) -- Data to be submitted.
|
45
|
+
#
|
46
|
+
# ==== Example
|
47
|
+
# data = {
|
48
|
+
# title: 'New Conversation'
|
49
|
+
# }
|
50
|
+
# @data = @mints_user.create_conversation(data)
|
51
|
+
def create_conversation(data, options = nil)
|
52
|
+
@client.raw('post', '/content/conversations', options, data_transform(data))
|
53
|
+
end
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
55
|
+
# === Update conversation.
|
56
|
+
# Update a conversation info.
|
57
|
+
#
|
58
|
+
# ==== Parameters
|
59
|
+
# id:: (Integer) -- Conversation id.
|
60
|
+
# data:: (Hash) -- Data to be submitted.
|
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, options = nil)
|
68
|
+
@client.raw('put', "/content/conversations/#{id}", options, data_transform(data))
|
69
|
+
end
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
# === Update conversation status.
|
84
|
-
# Update a conversation status.
|
85
|
-
#
|
86
|
-
# ==== Parameters
|
87
|
-
# id:: (Integer) -- Conversation id.
|
88
|
-
# data:: (Hash) -- Data to be submitted.
|
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
|
-
@client.raw("put", "/content/conversations/#{id}/status", nil, data_transform(data))
|
97
|
-
end
|
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
|
+
@client.raw('delete', "/content/conversations/#{id}")
|
81
|
+
end
|
98
82
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
83
|
+
# === Update conversation status.
|
84
|
+
# Update a conversation status.
|
85
|
+
#
|
86
|
+
# ==== Parameters
|
87
|
+
# id:: (Integer) -- Conversation id.
|
88
|
+
# data:: (Hash) -- Data to be submitted.
|
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
|
+
@client.raw('put', "/content/conversations/#{id}/status", nil, data_transform(data))
|
97
|
+
end
|
110
98
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
# @data = @mints_user.attach_user_in_conversation(13, data)
|
123
|
-
def attach_user_in_conversation(id, data)
|
124
|
-
@client.raw("post", "/content/conversations/#{id}/attach-user", nil, data_transform(data))
|
125
|
-
end
|
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
|
+
@client.raw('get', "/content/conversations/#{id}/participants")
|
109
|
+
end
|
126
110
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
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 submitted.
|
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
|
+
@client.raw('post', "/content/conversations/#{id}/attach-user", nil, data_transform(data))
|
125
|
+
end
|
142
126
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
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 submitted.
|
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
|
+
@client.raw('post', "/content/conversations/#{id}/detach-user", nil, data_transform(data))
|
141
|
+
end
|
158
142
|
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
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 submitted.
|
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
|
+
@client.raw('post', "/content/conversations/#{id}/attach-contact", nil, data_transform(data))
|
157
|
+
end
|
174
158
|
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
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 submitted.
|
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
|
+
@client.raw('post', "/content/conversations/#{id}/detach-contact", nil, data_transform(data))
|
173
|
+
end
|
190
174
|
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
175
|
+
# === Attach form in conversation.
|
176
|
+
# Attach a form in a conversation.
|
177
|
+
#
|
178
|
+
# ==== Parameters
|
179
|
+
# id:: (Integer) -- Conversation id.
|
180
|
+
# data:: (Hash) -- Data to be submitted.
|
181
|
+
#
|
182
|
+
# ==== Example
|
183
|
+
# data = {
|
184
|
+
# form_id: 2
|
185
|
+
# }
|
186
|
+
# @data = @mints_user.attach_form_in_conversation(1, data)
|
187
|
+
def attach_form_in_conversation(id, data)
|
188
|
+
@client.raw('post', "/content/conversations/#{id}/attach-form", nil, data_transform(data))
|
189
|
+
end
|
190
|
+
|
191
|
+
# === Detach form in conversation.
|
192
|
+
# Detach a form in a conversation.
|
193
|
+
#
|
194
|
+
# ==== Parameters
|
195
|
+
# id:: (Integer) -- Contact id.
|
196
|
+
# data:: (Hash) -- Data to be submitted.
|
197
|
+
#
|
198
|
+
# ==== Example
|
199
|
+
# data = {
|
200
|
+
# form_id: 2
|
201
|
+
# }
|
202
|
+
# @data = @mints_user.detach_form_in_conversation(1, data)
|
203
|
+
def detach_form_in_conversation(id, data)
|
204
|
+
@client.raw('post', "/content/conversations/#{id}/detach-form", nil, data_transform(data))
|
205
|
+
end
|
206
|
+
end
|