mints 0.0.26 → 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 +75 -37
- data/lib/contact.rb +61 -62
- data/lib/errors.rb +98 -0
- data/lib/generators/mints_config.yml.erb +0 -2
- data/lib/generators/mints_link.rb +3 -3
- data/lib/mints/controllers/admin_base_controller.rb +8 -66
- data/lib/mints/controllers/base_api_controller.rb +16 -134
- data/lib/mints/controllers/base_controller.rb +20 -106
- data/lib/mints/controllers/concerns/mints_clients.rb +74 -0
- data/lib/mints/controllers/concerns/read_config_file.rb +28 -0
- data/lib/mints/controllers/contact_api_controller.rb +6 -85
- data/lib/mints/controllers/public_api_controller.rb +6 -79
- data/lib/mints/controllers/user_api_controller.rb +7 -82
- data/lib/mints/helpers/contact_auth_helper.rb +67 -0
- data/lib/{mints_helper.rb → mints/helpers/mints_helper.rb} +7 -5
- data/lib/mints/helpers/proxy_controllers_methods.rb +126 -0
- data/lib/mints/helpers/user_auth_helper.rb +53 -0
- data/lib/mints.rb +2 -0
- data/lib/pub.rb +56 -56
- 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 -105
- 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 +4 -4
- metadata +41 -35
@@ -1,69 +1,69 @@
|
|
1
1
|
module VariantOptions
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# == Variant Options
|
4
|
+
#
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
6
|
+
# === Get variant options.
|
7
|
+
# Get a collection of variant options.
|
8
|
+
#
|
9
|
+
# ==== Parameters
|
10
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
11
|
+
#
|
12
|
+
# ==== First Example
|
13
|
+
# @data = @mints_user.get_variant_options
|
14
|
+
#
|
15
|
+
# ==== Second Example
|
16
|
+
# options = { fields: 'id, title' }
|
17
|
+
# @data = @mints_user.get_variant_options(options)
|
18
|
+
def get_variant_options(options = nil)
|
19
|
+
@client.raw('get', '/ecommerce/variant-options', options)
|
20
|
+
end
|
21
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
|
-
end
|
22
|
+
# === Get variant option.
|
23
|
+
# Get a variant options info.
|
24
|
+
#
|
25
|
+
# ==== Parameters
|
26
|
+
# id:: (Integer) -- Variant option id.
|
27
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
28
|
+
#
|
29
|
+
# ==== First Example
|
30
|
+
# @data = @mints_user.get_variant_option(1)
|
31
|
+
#
|
32
|
+
# ==== Second Example
|
33
|
+
# options = { fields: 'id, title' }
|
34
|
+
# @data = @mints_user.get_variant_option(1, options)
|
35
|
+
def get_variant_option(id, options = nil)
|
36
|
+
@client.raw('get', "/ecommerce/variant-options/#{id}", options)
|
37
|
+
end
|
38
|
+
|
39
|
+
# === Create variant option.
|
40
|
+
# Create a variant option with data.
|
41
|
+
#
|
42
|
+
# ==== Parameters
|
43
|
+
# data:: (Hash) -- Data to be submitted.
|
44
|
+
#
|
45
|
+
# ==== Example
|
46
|
+
# data = {
|
47
|
+
# title: 'New Variant Option'
|
48
|
+
# }
|
49
|
+
# @data = @mints_user.create_variant_option(data)
|
50
|
+
def create_variant_option(data)
|
51
|
+
@client.raw('post', '/ecommerce/variant-options', nil, data_transform(data))
|
52
|
+
end
|
53
|
+
|
54
|
+
# === Update variant option.
|
55
|
+
# Update a variant option info.
|
56
|
+
#
|
57
|
+
# ==== Parameters
|
58
|
+
# id:: (Integer) -- Variant option id.
|
59
|
+
# data:: (Hash) -- Data to be submitted.
|
60
|
+
#
|
61
|
+
# ==== Example
|
62
|
+
# data = {
|
63
|
+
# title: 'New Variant Option Modified'
|
64
|
+
# }
|
65
|
+
# @data = @mints_user.update_variant_option(6, data)
|
66
|
+
def update_variant_option(id, data)
|
67
|
+
@client.raw('put', "/ecommerce/variant-options/#{id}", nil, data_transform(data))
|
68
|
+
end
|
69
|
+
end
|
@@ -1,72 +1,72 @@
|
|
1
1
|
module VariantValues
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
# === Get variant values.
|
7
|
-
# Get a collection of variant values.
|
8
|
-
#
|
9
|
-
# ==== Parameters
|
10
|
-
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
11
|
-
#
|
12
|
-
# ==== First Example
|
13
|
-
# @data = @mints_user.get_variant_values
|
14
|
-
#
|
15
|
-
# ==== Second Example
|
16
|
-
# options = { "sort": "-id"}
|
17
|
-
# @data = @mints_user.get_variant_values(options)
|
18
|
-
def get_variant_values(options = nil)
|
19
|
-
return @client.raw("get", "/ecommerce/variant-values", options)
|
20
|
-
end
|
21
|
-
|
22
|
-
# === Get variant value.
|
23
|
-
# Get a variant value info.
|
24
|
-
#
|
25
|
-
# ==== Parameters
|
26
|
-
# id:: (Integer) -- Variant value id.
|
27
|
-
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
28
|
-
#
|
29
|
-
# ==== First Example
|
30
|
-
# @data = @mints_user.get_variant_value(5)
|
31
|
-
#
|
32
|
-
# ==== Second Example
|
33
|
-
# options = { "fields": "id"}
|
34
|
-
# @data = @mints_user.get_variant_value(5, options)
|
35
|
-
def get_variant_value(id, options = nil)
|
36
|
-
return @client.raw("get", "/ecommerce/variant-values/#{id}", options)
|
37
|
-
end
|
2
|
+
##
|
3
|
+
# == Variant Values
|
4
|
+
#
|
38
5
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
return @client.raw("post", "/ecommerce/variant-values", nil, data_transform(data))
|
55
|
-
end
|
6
|
+
# === Get variant values.
|
7
|
+
# Get a collection of variant values.
|
8
|
+
#
|
9
|
+
# ==== Parameters
|
10
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
11
|
+
#
|
12
|
+
# ==== First Example
|
13
|
+
# @data = @mints_user.get_variant_values
|
14
|
+
#
|
15
|
+
# ==== Second Example
|
16
|
+
# options = { sort: '-id'}
|
17
|
+
# @data = @mints_user.get_variant_values(options)
|
18
|
+
def get_variant_values(options = nil)
|
19
|
+
@client.raw('get', '/ecommerce/variant-values', options)
|
20
|
+
end
|
56
21
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
end
|
22
|
+
# === Get variant value.
|
23
|
+
# Get a variant value info.
|
24
|
+
#
|
25
|
+
# ==== Parameters
|
26
|
+
# id:: (Integer) -- Variant value id.
|
27
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
28
|
+
#
|
29
|
+
# ==== First Example
|
30
|
+
# @data = @mints_user.get_variant_value(5)
|
31
|
+
#
|
32
|
+
# ==== Second Example
|
33
|
+
# options = { fields: 'id'}
|
34
|
+
# @data = @mints_user.get_variant_value(5, options)
|
35
|
+
def get_variant_value(id, options = nil)
|
36
|
+
@client.raw('get', "/ecommerce/variant-values/#{id}", options)
|
37
|
+
end
|
38
|
+
|
39
|
+
# === Create variant value.
|
40
|
+
# Create a variant value with data.
|
41
|
+
#
|
42
|
+
# ==== Parameters
|
43
|
+
# data:: (Hash) -- Data to be submitted.
|
44
|
+
#
|
45
|
+
# ==== Example
|
46
|
+
# data = {
|
47
|
+
# value: 'New Variant Value',
|
48
|
+
# variant_option_id: 1,
|
49
|
+
# display_order: 1,
|
50
|
+
# sku_code: 'new-variant-value-sku'
|
51
|
+
# }
|
52
|
+
# @data = @mints_user.create_variant_value(data)
|
53
|
+
def create_variant_value(data)
|
54
|
+
@client.raw('post', '/ecommerce/variant-values', nil, data_transform(data))
|
55
|
+
end
|
56
|
+
|
57
|
+
# === Update variant value.
|
58
|
+
# Update a variant value info.
|
59
|
+
#
|
60
|
+
# ==== Parameters
|
61
|
+
# id:: (Integer) -- Variant value id.
|
62
|
+
# data:: (Hash) -- Data to be submitted.
|
63
|
+
#
|
64
|
+
# ==== Example
|
65
|
+
# data = {
|
66
|
+
# value: 'New Variant Value Modified'
|
67
|
+
# }
|
68
|
+
# @data = @mints_user.update_variant_value(22, data)
|
69
|
+
def update_variant_value(id, data)
|
70
|
+
@client.raw('put', "/ecommerce/variant-values/#{id}", nil, data_transform(data))
|
71
|
+
end
|
72
|
+
end
|
data/lib/user/helpers/helpers.rb
CHANGED
@@ -1,113 +1,114 @@
|
|
1
|
-
require_relative './object_activities
|
2
|
-
require_relative './object_folders
|
3
|
-
require_relative './user_folders
|
1
|
+
require_relative './object_activities'
|
2
|
+
require_relative './object_folders'
|
3
|
+
require_relative './user_folders'
|
4
4
|
|
5
5
|
module Helpers
|
6
|
+
include ObjectActivities
|
7
|
+
include ObjectFolders
|
8
|
+
include UserFolders
|
6
9
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
+
##
|
11
|
+
# == Helpers
|
12
|
+
#
|
10
13
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
#
|
21
|
-
|
22
|
-
|
23
|
-
def slugify(data) #TODO: Research use of variable polymorphicObjectType
|
24
|
-
return @client.raw("post", "/helpers/slugify", nil, data_transform(data))
|
25
|
-
end
|
26
|
-
|
27
|
-
# === Get available types from usage.
|
28
|
-
# Get available types by usage.
|
29
|
-
#
|
30
|
-
# ==== Parameters
|
31
|
-
# usage:: () -- ...
|
32
|
-
#
|
33
|
-
def get_available_types_from_usage(usage) #TODO: Research use
|
34
|
-
return @client.raw("get", "/helpers/available-types/#{usage}")
|
35
|
-
end
|
14
|
+
# === Slugify.
|
15
|
+
# Slugify a text using an object type.
|
16
|
+
#
|
17
|
+
# ==== Parameters
|
18
|
+
# data:: (Hash) -- Data to be submitted.
|
19
|
+
#
|
20
|
+
# ==== Example
|
21
|
+
#
|
22
|
+
def slugify(data)
|
23
|
+
# TODO: Research use of variable polymorphicObjectType
|
24
|
+
@client.raw('post', '/helpers/slugify', nil, data_transform(data))
|
25
|
+
end
|
36
26
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
27
|
+
# === Get available types from usage.
|
28
|
+
# Get available types by usage.
|
29
|
+
#
|
30
|
+
# ==== Parameters
|
31
|
+
# usage:: () -- ...
|
32
|
+
#
|
33
|
+
def get_available_types_from_usage(usage)
|
34
|
+
# TODO: Research use
|
35
|
+
@client.raw('get', "/helpers/available-types/#{usage}")
|
36
|
+
end
|
45
37
|
|
46
|
-
|
47
|
-
|
48
|
-
|
38
|
+
# === Get magic link config.
|
39
|
+
# Get config used in magic links.
|
40
|
+
#
|
41
|
+
# ==== Example
|
42
|
+
# @data = @mints_user.get_magic_link_config
|
43
|
+
def get_magic_link_config
|
44
|
+
@client.raw('get', '/helpers/magic-link-config')
|
45
|
+
end
|
49
46
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
# ==== Parameters
|
54
|
-
# object_type:: (String) -- Object type.
|
55
|
-
# id:: (Integer) -- Object type id.
|
56
|
-
#
|
57
|
-
# ==== Example
|
58
|
-
# @data = @mints_user.get_activities_by_object_type_and_id("contacts", 1)
|
59
|
-
def get_activities_by_object_type_and_id(object_type, id)
|
60
|
-
return @client.raw("get", "/helpers/activities/#{object_type}/#{id}")
|
61
|
-
end
|
47
|
+
##
|
48
|
+
# == Activities
|
49
|
+
#
|
62
50
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
# "table": "contacts",
|
76
|
-
# "field": "id",
|
77
|
-
# "word": "1"
|
78
|
-
# }
|
79
|
-
# @data = @mints_user.get_dice_coefficient(options)
|
80
|
-
def get_dice_coefficient(options)
|
81
|
-
return @client.raw("get", "/helpers/dice-coefficient", options)
|
82
|
-
end
|
51
|
+
# === Get activities by object type and id.
|
52
|
+
# Get activities using an object type and object type id.
|
53
|
+
#
|
54
|
+
# ==== Parameters
|
55
|
+
# object_type:: (String) -- Object type.
|
56
|
+
# id:: (Integer) -- Object type id.
|
57
|
+
#
|
58
|
+
# ==== Example
|
59
|
+
# @data = @mints_user.get_activities_by_object_type_and_id('contacts', 1)
|
60
|
+
def get_activities_by_object_type_and_id(object_type, id)
|
61
|
+
@client.raw('get', "/helpers/activities/#{object_type}/#{id}")
|
62
|
+
end
|
83
63
|
|
84
|
-
|
85
|
-
|
86
|
-
|
64
|
+
##
|
65
|
+
# == Dice Coefficient
|
66
|
+
#
|
87
67
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
68
|
+
# === Get dice coefficient.
|
69
|
+
# Get dice coefficient.
|
70
|
+
#
|
71
|
+
# ==== Parameters
|
72
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
73
|
+
#
|
74
|
+
# ==== Example
|
75
|
+
# options = {
|
76
|
+
# table: 'contacts',
|
77
|
+
# field: 'id',
|
78
|
+
# word: '1'
|
79
|
+
# }
|
80
|
+
# @data = @mints_user.get_dice_coefficient(options)
|
81
|
+
def get_dice_coefficient(options)
|
82
|
+
@client.raw('get', '/helpers/dice-coefficient', options)
|
83
|
+
end
|
96
84
|
|
97
|
-
|
98
|
-
|
99
|
-
|
85
|
+
##
|
86
|
+
# == Permission
|
87
|
+
#
|
100
88
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
89
|
+
# === Get permission menu.
|
90
|
+
# Get permission menu.
|
91
|
+
#
|
92
|
+
# ==== Example
|
93
|
+
# @data = @mints_user.get_permission_menu
|
94
|
+
def get_permission_menu
|
95
|
+
@client.raw('get', '/helpers/menu')
|
96
|
+
end
|
97
|
+
|
98
|
+
##
|
99
|
+
# == Seed
|
100
|
+
#
|
101
|
+
|
102
|
+
# === Generate seed.
|
103
|
+
# Generate seed using object type and object type id.
|
104
|
+
#
|
105
|
+
# ==== Parameters
|
106
|
+
# objectType:: (String) -- Object type.
|
107
|
+
# id:: (Integer) -- Object type id.
|
108
|
+
#
|
109
|
+
# ==== Example
|
110
|
+
# @data = @mints_user.generate_seed('contacts', 1)
|
111
|
+
def generate_seed(object_type, id)
|
112
|
+
@client.raw('get', "/helpers/seeds/#{object_type}/#{id}")
|
113
|
+
end
|
114
|
+
end
|
@@ -1,83 +1,83 @@
|
|
1
1
|
module ObjectActivities
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# == Object Activities
|
4
|
+
#
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
6
|
+
# === Get object activities.
|
7
|
+
# Get a collection of object activities.
|
8
|
+
#
|
9
|
+
# ==== Parameters
|
10
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
11
|
+
#
|
12
|
+
# ==== First Example
|
13
|
+
# @data = @mints_user.get_object_activities
|
14
|
+
#
|
15
|
+
# ==== Second Example
|
16
|
+
# options = { fields: 'object_type' }
|
17
|
+
# @data = @mints_user.get_object_activities(options)
|
18
|
+
def get_object_activities(options = nil)
|
19
|
+
@client.raw('get', '/helpers/object-activities', options)
|
20
|
+
end
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
22
|
+
# === Get object activity.
|
23
|
+
# Get an object activity.
|
24
|
+
#
|
25
|
+
# ==== Parameters
|
26
|
+
# id:: (Integer) -- Object activity id.
|
27
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
28
|
+
#
|
29
|
+
# ==== First Example
|
30
|
+
# @data = @mints_user.get_object_activity(1)
|
31
|
+
#
|
32
|
+
# ==== Second Example
|
33
|
+
# options = { fields: 'activity_type' }
|
34
|
+
# @data = @mints_user.get_object_activity(1, options)
|
35
|
+
def get_object_activity(id, options = nil)
|
36
|
+
@client.raw('get', "/helpers/object-activities/#{id}", options)
|
37
|
+
end
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
# === Update object activity.
|
57
|
-
# Update an object activity info.
|
58
|
-
#
|
59
|
-
# ==== Parameters
|
60
|
-
# id:: (Integer) -- Object activity id.
|
61
|
-
# data:: (Hash) -- Data to be submitted.
|
62
|
-
#
|
63
|
-
# ==== Example
|
64
|
-
# data = {
|
65
|
-
# "activity_type": "ticket"
|
66
|
-
# }
|
67
|
-
# @data = @mints_user.update_object_activity(573, data)
|
68
|
-
def update_object_activity(id, data)
|
69
|
-
return @client.raw("put", "/helpers/object-activities/#{id}", nil, data_transform(data))
|
70
|
-
end
|
39
|
+
# === Create object activity.
|
40
|
+
# Create an object activity with data.
|
41
|
+
#
|
42
|
+
# ==== Parameters
|
43
|
+
# data:: (Hash) -- Data to be submitted.
|
44
|
+
#
|
45
|
+
# ==== Example
|
46
|
+
# data = {
|
47
|
+
# activity_type: 'note',
|
48
|
+
# object_type: 'contacts',
|
49
|
+
# object_id: 1
|
50
|
+
# }
|
51
|
+
# @data = @mints_user.create_object_activity(data)
|
52
|
+
def create_object_activity(data)
|
53
|
+
@client.raw('post', '/helpers/object-activities', nil, data_transform(data))
|
54
|
+
end
|
71
55
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
56
|
+
# === Update object activity.
|
57
|
+
# Update an object activity info.
|
58
|
+
#
|
59
|
+
# ==== Parameters
|
60
|
+
# id:: (Integer) -- Object activity id.
|
61
|
+
# data:: (Hash) -- Data to be submitted.
|
62
|
+
#
|
63
|
+
# ==== Example
|
64
|
+
# data = {
|
65
|
+
# activity_type: 'ticket'
|
66
|
+
# }
|
67
|
+
# @data = @mints_user.update_object_activity(573, data)
|
68
|
+
def update_object_activity(id, data)
|
69
|
+
@client.raw('put', "/helpers/object-activities/#{id}", nil, data_transform(data))
|
70
|
+
end
|
71
|
+
|
72
|
+
# === Delete object activity.
|
73
|
+
# Delete an object activity.
|
74
|
+
#
|
75
|
+
# ==== Parameters
|
76
|
+
# id:: (Integer) -- Object activity id.
|
77
|
+
#
|
78
|
+
# ==== Example
|
79
|
+
# @data = @mints_user.delete_object_activity(573)
|
80
|
+
def delete_object_activity(id)
|
81
|
+
@client.raw('delete', "/helpers/object-activities/#{id}")
|
82
|
+
end
|
83
|
+
end
|