mints 0.0.27 → 0.0.28
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/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
data/lib/user/content/pages.rb
CHANGED
@@ -1,90 +1,90 @@
|
|
1
1
|
module Pages
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# == Content Pages
|
4
|
+
#
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
###
|
7
|
+
# === Get page groups.
|
8
|
+
# Get content page groups.
|
9
|
+
#
|
10
|
+
# ==== Example
|
11
|
+
# @data = @mints_user.get_page_groups
|
12
|
+
def get_page_groups
|
13
|
+
@client.raw('get', '/content/pages/groups')
|
14
|
+
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
# === Get pages.
|
17
|
+
# Get a collection of content pages.
|
18
|
+
#
|
19
|
+
# ==== Example
|
20
|
+
# @data = @mints_user.get_pages
|
21
|
+
def get_pages(options = nil)
|
22
|
+
@client.raw('get', '/content/pages', options)
|
23
|
+
end
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
25
|
+
# === Get bundles.
|
26
|
+
# Get a collection of content pages.
|
27
|
+
#
|
28
|
+
# ==== Example
|
29
|
+
# @data = @mints_user.get_pages
|
30
|
+
def get_bundles(options = nil)
|
31
|
+
@client.raw('get', '/content/pages', options)
|
32
|
+
end
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
34
|
+
# === Get page.
|
35
|
+
# Get a content page.
|
36
|
+
#
|
37
|
+
# ==== Parameters
|
38
|
+
# id:: (Integer) -- Page id.
|
39
|
+
#
|
40
|
+
# ==== Example
|
41
|
+
# @data = @mints_user.get_page(1)
|
42
|
+
def get_page(id)
|
43
|
+
@client.raw('get', "/content/pages/#{id}")
|
44
|
+
end
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
46
|
+
# === Create page.
|
47
|
+
# Create a content page with data.
|
48
|
+
#
|
49
|
+
# ==== Parameters
|
50
|
+
# data:: (Hash) -- Data to be submitted.
|
51
|
+
#
|
52
|
+
# ==== Example
|
53
|
+
# data = {
|
54
|
+
# title: "New Page",
|
55
|
+
# slug: "new-page-slug",
|
56
|
+
# description: "New page description"
|
57
|
+
# }
|
58
|
+
# @data = @mints_user.create_page(data)
|
59
|
+
def create_page(data)
|
60
|
+
@client.raw('post', '/content/pages', nil, data_transform(data))
|
61
|
+
end
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
63
|
+
# === Update page.
|
64
|
+
# Update a content page info.
|
65
|
+
#
|
66
|
+
# ==== Parameters
|
67
|
+
# id:: (Integer) -- Page id.
|
68
|
+
# data:: (Hash) -- Data to be submitted.
|
69
|
+
#
|
70
|
+
# ==== Example
|
71
|
+
# data = {
|
72
|
+
# title: "New Page Modified"
|
73
|
+
# }
|
74
|
+
# @data = @mints_user.update_page(5, data.to_json)
|
75
|
+
def update_page(id, data)
|
76
|
+
@client.raw('put', "/content/pages/#{id}", nil, data)
|
77
|
+
end
|
78
78
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
end
|
79
|
+
# === Delete page.
|
80
|
+
# Delete a content page.
|
81
|
+
#
|
82
|
+
# ==== Parameters
|
83
|
+
# id:: (Integer) -- Page id.
|
84
|
+
#
|
85
|
+
# ==== Example
|
86
|
+
# @mints_user.@mints_user.delete_page(3)
|
87
|
+
def delete_page(id)
|
88
|
+
@client.raw('delete', "/content/pages/#{id}")
|
89
|
+
end
|
90
|
+
end
|
data/lib/user/content/stories.rb
CHANGED
@@ -1,107 +1,107 @@
|
|
1
1
|
module Stories
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
2
|
+
# === Duplicate story.
|
3
|
+
# Duplicate a story.
|
4
|
+
#
|
5
|
+
# ==== Parameters
|
6
|
+
# id:: (Integer) -- Story id.
|
7
|
+
# data:: (Hash) -- Data to be submitted.
|
8
|
+
#
|
9
|
+
# ==== Example
|
10
|
+
# data = {
|
11
|
+
# options: []
|
12
|
+
# }
|
13
|
+
# @data = @mints_user.duplicate_story(1, data.to_json)
|
14
|
+
def duplicate_story(id, data)
|
15
|
+
@client.raw('post', "/content/stories/#{id}/duplicate", nil, data)
|
16
|
+
end
|
17
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
|
-
|
18
|
+
# === Get stories.
|
19
|
+
# Get a collection of stories.
|
20
|
+
#
|
21
|
+
# ==== Parameters
|
22
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
23
|
+
# use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
|
24
|
+
#
|
25
|
+
# ==== First Example
|
26
|
+
# @data = @mints_user.get_stories
|
27
|
+
#
|
28
|
+
# ==== Second Example
|
29
|
+
# options = {
|
30
|
+
# fields: 'id, slug'
|
31
|
+
# }
|
32
|
+
# @data = @mints_user.get_stories(options)
|
33
|
+
#
|
34
|
+
# ==== Third Example
|
35
|
+
# options = {
|
36
|
+
# fields: 'id, slug'
|
37
|
+
# }
|
38
|
+
# @data = @mints_user.get_stories(options, true)
|
39
|
+
def get_stories(options = nil, use_post = true)
|
40
|
+
get_query_results('/content/stories', options, use_post)
|
41
|
+
end
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
43
|
+
# === Get story.
|
44
|
+
# Get a story info.
|
45
|
+
#
|
46
|
+
# ==== Parameters
|
47
|
+
# id:: (Integer) -- Story id.
|
48
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
49
|
+
#
|
50
|
+
# ==== First Example
|
51
|
+
# @data = @mints_user.get_story(1)
|
52
|
+
#
|
53
|
+
# ==== Second Example
|
54
|
+
# options = {
|
55
|
+
# fields: 'id, slug'
|
56
|
+
# }
|
57
|
+
# @data = @mints_user.get_story(1, options)
|
58
|
+
def get_story(id, options = nil)
|
59
|
+
@client.raw('get', "/content/stories/#{id}", options)
|
60
|
+
end
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
62
|
+
# === Create story.
|
63
|
+
# Create a story with data.
|
64
|
+
#
|
65
|
+
# ==== Parameters
|
66
|
+
# data:: (Hash) -- Data to be submitted.
|
67
|
+
#
|
68
|
+
# ==== Example
|
69
|
+
# data = {
|
70
|
+
# user_id: 1,
|
71
|
+
# slug: "new-story",
|
72
|
+
# story_template_id: 1
|
73
|
+
# }
|
74
|
+
# @data = @mints_user.create_story(data)
|
75
|
+
def create_story(data)
|
76
|
+
@client.raw('post', '/content/stories', nil, data_transform(data))
|
77
|
+
end
|
78
78
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
79
|
+
# === Update story.
|
80
|
+
# Update a story info.
|
81
|
+
#
|
82
|
+
# ==== Parameters
|
83
|
+
# id:: (Integer) -- Story id.
|
84
|
+
# data:: (Hash) -- Data to be submitted.
|
85
|
+
#
|
86
|
+
# ==== Example
|
87
|
+
# data = {
|
88
|
+
# user_id: 1,
|
89
|
+
# slug: 'new-story'
|
90
|
+
# }
|
91
|
+
# @data = @mints_user.update_story(5, data)
|
92
|
+
def update_story(id, data)
|
93
|
+
@client.raw('put', "/content/stories/#{id}", nil, data_transform(data))
|
94
|
+
end
|
95
95
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
end
|
96
|
+
# === Delete story.
|
97
|
+
# Delete a story.
|
98
|
+
#
|
99
|
+
# ==== Parameters
|
100
|
+
# id:: (Integer) -- Story id.
|
101
|
+
#
|
102
|
+
# ==== Example
|
103
|
+
# @data = @mints_user.delete_story(6)
|
104
|
+
def delete_story(id)
|
105
|
+
@client.raw('delete', "/content/stories/#{id}")
|
106
|
+
end
|
107
|
+
end
|
@@ -1,95 +1,95 @@
|
|
1
1
|
module StoryTemplates
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# == Story Template
|
4
|
+
#
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
6
|
+
# === Get support data of story template.
|
7
|
+
# Get support data used in a story template.
|
8
|
+
#
|
9
|
+
# ==== Parameters
|
10
|
+
# id:: (Integer) -- Story template id.
|
11
|
+
#
|
12
|
+
# ==== Example
|
13
|
+
# @data = @mints_user.get_story_template_support_data(1)
|
14
|
+
def get_story_template_support_data(id)
|
15
|
+
@client.raw('get', "/content/story-templates/support-data/stories/#{id}")
|
16
|
+
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
18
|
+
# === Get support data of story templates.
|
19
|
+
# Get support data used in story templates.
|
20
|
+
#
|
21
|
+
# ==== Example
|
22
|
+
# @data = @mints_user.get_story_templates_support_data
|
23
|
+
def get_story_templates_support_data
|
24
|
+
@client.raw('get', "/content/story-templates/support-data")
|
25
|
+
end
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
27
|
+
# === Get story templates.
|
28
|
+
# Get a collection of story templates.
|
29
|
+
#
|
30
|
+
# ==== Parameters
|
31
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
32
|
+
#
|
33
|
+
# ==== First Example
|
34
|
+
# @data = @mints_user.get_story_templates
|
35
|
+
#
|
36
|
+
# ==== Second Example
|
37
|
+
# options = {
|
38
|
+
# fields: 'id, title'
|
39
|
+
# }
|
40
|
+
# @data = @mints_user.get_story_templates(options)
|
41
|
+
def get_story_templates(options = nil)
|
42
|
+
@client.raw('get', '/content/story-templates', options)
|
43
|
+
end
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
45
|
+
# === Get story template.
|
46
|
+
# Get a story template info.
|
47
|
+
#
|
48
|
+
# ==== Parameters
|
49
|
+
# id:: (Integer) -- Story template id.
|
50
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
51
|
+
#
|
52
|
+
# ==== First Example
|
53
|
+
# @data = @mints_user.get_story_template(2)
|
54
|
+
#
|
55
|
+
# ==== Second Example
|
56
|
+
# options = {
|
57
|
+
# fields: "title"
|
58
|
+
# }
|
59
|
+
# @data = @mints_user.get_story_template(1, options)
|
60
|
+
def get_story_template(id, options = nil)
|
61
|
+
@client.raw('get', "/content/story-templates/#{id}", options)
|
62
|
+
end
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
64
|
+
# === Create story template.
|
65
|
+
# Create a story template with data.
|
66
|
+
#
|
67
|
+
# ==== Parameters
|
68
|
+
# data:: (Hash) -- Data to be submitted.
|
69
|
+
#
|
70
|
+
# ==== Example
|
71
|
+
# data = {
|
72
|
+
# title: 'New Story Template',
|
73
|
+
# slug: 'new-story-template-slug'
|
74
|
+
# }
|
75
|
+
# @data = @mints_user.create_story_template(data)
|
76
|
+
def create_story_template(data)
|
77
|
+
@client.raw('post', "/content/story-templates", nil, data_transform(data))
|
78
|
+
end
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
end
|
80
|
+
# === Update story template.
|
81
|
+
# Update a story template info.
|
82
|
+
#
|
83
|
+
# ==== Parameters
|
84
|
+
# id:: (Integer) -- Story template id.
|
85
|
+
# data:: (Hash) -- Data to be submitted.
|
86
|
+
#
|
87
|
+
# ==== Example
|
88
|
+
# data = {
|
89
|
+
# title: 'New Story Template Modified'
|
90
|
+
# }
|
91
|
+
# @data = @mints_user.update_story_template(3, data)
|
92
|
+
def update_story_template(id, data)
|
93
|
+
@client.raw('put', "/content/story-templates/#{id}", nil, data_transform(data))
|
94
|
+
end
|
95
|
+
end
|