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,124 +1,122 @@
|
|
1
1
|
module StoryVersions
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
2
|
+
# === Get story versions.
|
3
|
+
# Get a collection of story versions.
|
4
|
+
#
|
5
|
+
# ==== Parameters
|
6
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
7
|
+
# use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
|
8
|
+
#
|
9
|
+
# ==== First Example
|
10
|
+
# @data = @mints_user.get_story_versions
|
11
|
+
#
|
12
|
+
# ==== Second Example
|
13
|
+
# options = {
|
14
|
+
# fields: 'id, title'
|
15
|
+
# }
|
16
|
+
# @data = @mints_user.get_story_versions(options)
|
17
|
+
#
|
18
|
+
# ==== Third Example
|
19
|
+
# options = {
|
20
|
+
# fields: 'id, title'
|
21
|
+
# }
|
22
|
+
# @data = @mints_user.get_story_versions(options, true)
|
23
|
+
def get_story_versions(options = nil, use_post = true)
|
24
|
+
get_query_results('/content/story-versions', options, use_post)
|
25
|
+
end
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
27
|
+
# === Get story version.
|
28
|
+
# Get a story version info.
|
29
|
+
#
|
30
|
+
# ==== Parameters
|
31
|
+
# id:: (Integer) -- Story version id.
|
32
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
33
|
+
#
|
34
|
+
# ==== First Example
|
35
|
+
# @data = @mints_user.get_story_version(1)
|
36
|
+
#
|
37
|
+
# ==== Second Example
|
38
|
+
# options = {
|
39
|
+
# fields: 'id, title'
|
40
|
+
# }
|
41
|
+
# @data = @mints_user.get_story_version(1, options)
|
42
|
+
def get_story_version(id, options = nil)
|
43
|
+
@client.raw('get', "/content/story-versions/#{id}", options)
|
44
|
+
end
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
46
|
+
# === Create story version.
|
47
|
+
# Create a story version with data.
|
48
|
+
#
|
49
|
+
# ==== Parameters
|
50
|
+
# data:: (Hash) -- Data to be submitted.
|
51
|
+
#
|
52
|
+
# ==== Example
|
53
|
+
# data = {
|
54
|
+
# title: 'New Story',
|
55
|
+
# slug: 'new-story',
|
56
|
+
# social_metadata: 'social metadata'
|
57
|
+
# }
|
58
|
+
# @data = @mints_user.create_story_version(data)
|
59
|
+
def create_story_version(data, options = nil)
|
60
|
+
@client.raw('post', '/content/story-versions', options, data_transform(data))
|
61
|
+
end
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
63
|
+
# === Update story version.
|
64
|
+
# Update a story version info.
|
65
|
+
#
|
66
|
+
# ==== Parameters
|
67
|
+
# id:: (Integer) -- Story version id.
|
68
|
+
# data:: (Hash) -- Data to be submitted.
|
69
|
+
#
|
70
|
+
# ==== Example
|
71
|
+
# data = {
|
72
|
+
# title: 'New Story Modified',
|
73
|
+
# slug: 'new-story'
|
74
|
+
# }
|
75
|
+
# @data = @mints_user.update_story_version(5, data)
|
76
|
+
def update_story_version(id, data, options = nil)
|
77
|
+
@client.raw('put', "/content/story-versions/#{id}", options, data_transform(data))
|
78
|
+
end
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
80
|
+
# === Delete story version.
|
81
|
+
# Delete a story version.
|
82
|
+
#
|
83
|
+
# ==== Parameters
|
84
|
+
# id:: (Integer) -- Story version id.
|
85
|
+
#
|
86
|
+
# ==== Example
|
87
|
+
# @data = @mints_user.delete_story_version(6)
|
88
|
+
def delete_story_version(id)
|
89
|
+
@client.raw('delete', "/content/story-versions/#{id}")
|
90
|
+
end
|
91
91
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
@client.raw("post", "/content/story-versions/#{id}/duplicate", nil, data)
|
106
|
-
end
|
92
|
+
# === Duplicate story version.
|
93
|
+
# Duplicate a story version.
|
94
|
+
#
|
95
|
+
# ==== Parameters
|
96
|
+
# id:: (Integer) -- Story version id.
|
97
|
+
# data:: (Hash) -- Data to be submitted.
|
98
|
+
#
|
99
|
+
# ==== Example
|
100
|
+
# data = { options: [] }
|
101
|
+
# @data = @mints_user.duplicate_story_version(1, data.to_json)
|
102
|
+
def duplicate_story_version(id, data)
|
103
|
+
@client.raw('post', "/content/story-versions/#{id}/duplicate", nil, data)
|
104
|
+
end
|
107
105
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
end
|
106
|
+
# === Publish story version.
|
107
|
+
# Publish a story version.
|
108
|
+
#
|
109
|
+
# ==== Parameters
|
110
|
+
# id:: (Integer) -- Story version id.
|
111
|
+
# data:: (Hash) -- Data to be submitted.
|
112
|
+
#
|
113
|
+
# ==== Example
|
114
|
+
# data = {
|
115
|
+
# title: 'New Story Modified',
|
116
|
+
# slug: 'new-story'
|
117
|
+
# }
|
118
|
+
# @data = @mints_user.publish_story_version(1, data.to_json)
|
119
|
+
def publish_story_version(id, data)
|
120
|
+
@client.raw('put', "/content/story-versions/#{id}/publish", nil, data)
|
121
|
+
end
|
122
|
+
end
|
data/lib/user/crm/companies.rb
CHANGED
@@ -1,111 +1,109 @@
|
|
1
1
|
module Companies
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# == Companies
|
4
|
+
#
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
# === Get companies.
|
17
|
-
# Get a collection of companies.
|
18
|
-
#
|
19
|
-
# ==== Parameters
|
20
|
-
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
21
|
-
# use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
|
22
|
-
#
|
23
|
-
# ==== First Example
|
24
|
-
# @data = @mints_user.get_companies
|
25
|
-
#
|
26
|
-
# ==== Second Example
|
27
|
-
# options = { "fields": "id, title", "sort": "-id" }
|
28
|
-
# @data = @mints_user.get_companies(options)
|
29
|
-
#
|
30
|
-
# ==== Third Example
|
31
|
-
# options = { "fields": "id, title", "sort": "-id" }
|
32
|
-
# @data = @mints_user.get_companies(options, false)
|
33
|
-
def get_companies(options = nil, use_post = true)
|
34
|
-
return get_query_results("/crm/companies", options, use_post)
|
35
|
-
end
|
36
|
-
|
37
|
-
# === Get company.
|
38
|
-
# Get a company info.
|
39
|
-
#
|
40
|
-
# ==== Parameters
|
41
|
-
# id:: (Integer) -- Company id.
|
42
|
-
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
43
|
-
#
|
44
|
-
# ==== First Example
|
45
|
-
# @data = @mints_user.get_company(21)
|
46
|
-
#
|
47
|
-
# ==== Second Example
|
48
|
-
# options = { "fields": "id, title" }
|
49
|
-
# @data = @mints_user.get_company(21, options)
|
50
|
-
def get_company(id, options = nil)
|
51
|
-
@client.raw("get", "/crm/companies/#{id}", options)
|
52
|
-
end
|
53
|
-
|
54
|
-
# === Create company.
|
55
|
-
# Create a company with data.
|
56
|
-
#
|
57
|
-
# ==== Parameters
|
58
|
-
# data:: (Hash) -- Data to be submitted.
|
59
|
-
#
|
60
|
-
# ==== Example
|
61
|
-
# data = {
|
62
|
-
# "title": "Company Title",
|
63
|
-
# "alias": "Alias",
|
64
|
-
# "website": "www.company.example.com",
|
65
|
-
# "street1": "Company St",
|
66
|
-
# "city": "Company City",
|
67
|
-
# "region": "Company Region",
|
68
|
-
# "postal_code": "12345",
|
69
|
-
# "country_id": 144,
|
70
|
-
# "tax_identifier": nil
|
71
|
-
# }
|
72
|
-
# @data = @mints_user.create_company(data)
|
73
|
-
def create_company(data, options = nil)
|
74
|
-
@client.raw("post", "/crm/companies/", options, data_transform(data))
|
75
|
-
end
|
6
|
+
##
|
7
|
+
# === Get companies support data.
|
8
|
+
# Get support data of companies.
|
9
|
+
#
|
10
|
+
# ==== Example
|
11
|
+
# @data = @mints_user.get_companies_support_data
|
12
|
+
def get_companies_support_data
|
13
|
+
@client.raw('get', '/crm/companies/support-data')
|
14
|
+
end
|
76
15
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
16
|
+
# === Get companies.
|
17
|
+
# Get a collection of companies.
|
18
|
+
#
|
19
|
+
# ==== Parameters
|
20
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
21
|
+
# use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
|
22
|
+
#
|
23
|
+
# ==== First Example
|
24
|
+
# @data = @mints_user.get_companies
|
25
|
+
#
|
26
|
+
# ==== Second Example
|
27
|
+
# options = { fields: 'id, title', sort: '-id' }
|
28
|
+
# @data = @mints_user.get_companies(options)
|
29
|
+
#
|
30
|
+
# ==== Third Example
|
31
|
+
# options = { fields: 'id, title', sort: '-id' }
|
32
|
+
# @data = @mints_user.get_companies(options, false)
|
33
|
+
def get_companies(options = nil, use_post = true)
|
34
|
+
get_query_results('/crm/companies', options, use_post)
|
35
|
+
end
|
92
36
|
|
93
|
-
|
94
|
-
|
95
|
-
|
37
|
+
# === Get company.
|
38
|
+
# Get a company info.
|
39
|
+
#
|
40
|
+
# ==== Parameters
|
41
|
+
# id:: (Integer) -- Company id.
|
42
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
43
|
+
#
|
44
|
+
# ==== First Example
|
45
|
+
# @data = @mints_user.get_company(21)
|
46
|
+
#
|
47
|
+
# ==== Second Example
|
48
|
+
# options = { fields: 'id, title' }
|
49
|
+
# @data = @mints_user.get_company(21, options)
|
50
|
+
def get_company(id, options = nil)
|
51
|
+
@client.raw('get', "/crm/companies/#{id}", options)
|
52
|
+
end
|
96
53
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
54
|
+
# === Create company.
|
55
|
+
# Create a company with data.
|
56
|
+
#
|
57
|
+
# ==== Parameters
|
58
|
+
# data:: (Hash) -- Data to be submitted.
|
59
|
+
#
|
60
|
+
# ==== Example
|
61
|
+
# data = {
|
62
|
+
# title: 'Company Title',
|
63
|
+
# alias: 'Alias',
|
64
|
+
# website: 'www.company.example.com',
|
65
|
+
# street1: 'Company St',
|
66
|
+
# city: 'Company City',
|
67
|
+
# region: 'Company Region',
|
68
|
+
# postal_code: '12345',
|
69
|
+
# country_id: 144,
|
70
|
+
# tax_identifier: nil
|
71
|
+
# }
|
72
|
+
# @data = @mints_user.create_company(data)
|
73
|
+
def create_company(data, options = nil)
|
74
|
+
@client.raw('post', '/crm/companies/', options, data_transform(data))
|
75
|
+
end
|
76
|
+
|
77
|
+
# === Update company.
|
78
|
+
# Update a company info.
|
79
|
+
#
|
80
|
+
# ==== Parameters
|
81
|
+
# id:: (Integer) -- Company id.
|
82
|
+
# data:: (Hash) -- Data to be submitted.
|
83
|
+
#
|
84
|
+
# ==== Example
|
85
|
+
# data = {
|
86
|
+
# title: 'Company Title Modified'
|
87
|
+
# }
|
88
|
+
# @data = @mints_user.update_company(23, data)
|
89
|
+
def update_company(id, data, options = nil)
|
90
|
+
@client.raw('put', "/crm/companies/#{id}", options, data_transform(data))
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# == Companies Bulk Actions
|
95
|
+
#
|
96
|
+
|
97
|
+
# === Delete Companies.
|
98
|
+
# Delete a group of companies.
|
99
|
+
#
|
100
|
+
# ==== Parameters
|
101
|
+
# data:: (Hash) -- Data to be submitted.
|
102
|
+
#
|
103
|
+
# ==== Example
|
104
|
+
# data = { ids: %w[21 22] }
|
105
|
+
# @data = @mints_user.delete_companies(data)
|
106
|
+
def delete_companies(data)
|
107
|
+
@client.raw('delete', '/crm/companies/delete', nil, data_transform(data))
|
108
|
+
end
|
111
109
|
end
|