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,89 +1,89 @@
|
|
1
1
|
module WorkflowStepObjects
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
# === Get workflow step objects.
|
7
|
-
# Get a collection of workflow step objects.
|
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_step_objects
|
14
|
-
#
|
15
|
-
# ==== Second Example
|
16
|
-
# options = { "fields": "id" }
|
17
|
-
# @data = @mints_user.get_step_objects(options)
|
18
|
-
def get_step_objects(options = nil)
|
19
|
-
return @client.raw("get", "/crm/step-objects", options)
|
20
|
-
end
|
2
|
+
##
|
3
|
+
# == Workflow Step Objects
|
4
|
+
#
|
21
5
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
end
|
6
|
+
# === Get workflow step objects.
|
7
|
+
# Get a collection of workflow step objects.
|
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_step_objects
|
14
|
+
#
|
15
|
+
# ==== Second Example
|
16
|
+
# options = { fields: 'id' }
|
17
|
+
# @data = @mints_user.get_step_objects(options)
|
18
|
+
def get_step_objects(options = nil)
|
19
|
+
@client.raw('get', '/crm/step-objects', options)
|
20
|
+
end
|
38
21
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
22
|
+
# === Get workflow step object.
|
23
|
+
# Get a workflow step object info.
|
24
|
+
#
|
25
|
+
# ==== Parameters
|
26
|
+
# id:: (Integer) -- Workflow step object 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_step_object(1)
|
31
|
+
#
|
32
|
+
# ==== Second Example
|
33
|
+
# options = { fields: 'id, step_id' }
|
34
|
+
# @data = @mints_user.get_step_object(1, options)
|
35
|
+
def get_step_object(id, options = nil)
|
36
|
+
@client.raw('get', "/crm/step-objects/#{id}", options)
|
37
|
+
end
|
55
38
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
39
|
+
# === Create workflow step object.
|
40
|
+
# Create a workflow step object with data.
|
41
|
+
#
|
42
|
+
# ==== Parameters
|
43
|
+
# data:: (Hash) -- Data to be submitted.
|
44
|
+
#
|
45
|
+
# ==== Example
|
46
|
+
# data = {
|
47
|
+
# objectType: 'deals',
|
48
|
+
# stepId: 9,
|
49
|
+
# objectId: 1
|
50
|
+
# }
|
51
|
+
# @data = @mints_user.create_step_object(data)
|
52
|
+
def create_step_object(data)
|
53
|
+
@client.raw('post', '/crm/step-objects/', nil, data_transform(data))
|
54
|
+
end
|
71
55
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
56
|
+
# === Update workflow step object.
|
57
|
+
# Update a workflow step object info.
|
58
|
+
#
|
59
|
+
# ==== Parameters
|
60
|
+
# id:: (Integer) -- Workflow step object id.
|
61
|
+
# data:: (Hash) -- Data to be submitted.
|
62
|
+
#
|
63
|
+
# ==== Example
|
64
|
+
# data = {
|
65
|
+
# stepId: 10
|
66
|
+
# }
|
67
|
+
# @data = @mints_user.update_step_object(128, data.to_json)
|
68
|
+
def update_step_object(id, data)
|
69
|
+
@client.raw('put', "/crm/step-objects/#{id}", nil, data)
|
70
|
+
end
|
71
|
+
|
72
|
+
# === Get workflow step object by object type.
|
73
|
+
# Get a workflow step object info by an object type.
|
74
|
+
#
|
75
|
+
# ==== Parameters
|
76
|
+
# object_type:: (String) -- Object type.
|
77
|
+
# object_id:: (Integer) -- Workflow step object id.
|
78
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
79
|
+
#
|
80
|
+
# ==== First Example
|
81
|
+
# @data = @mints_user.get_step_object_by_object_type("deals", 1)
|
82
|
+
#
|
83
|
+
# ==== Second Example
|
84
|
+
# options = { fields: 'id, object_id' }
|
85
|
+
# @data = @mints_user.get_step_object_by_object_type('deals', 1, options)
|
86
|
+
def get_step_object_by_object_type(object_type, object_id, options = nil)
|
87
|
+
@client.raw('get', "/crm/step-objects/#{object_type}/#{object_id}", options)
|
88
|
+
end
|
89
|
+
end
|
@@ -1,49 +1,49 @@
|
|
1
1
|
module WorkFlowSteps
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# == Workflow Steps
|
4
|
+
#
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
6
|
+
# === Create workflow step.
|
7
|
+
# Create a workflow step with data.
|
8
|
+
#
|
9
|
+
# ==== Parameters
|
10
|
+
# data:: (Hash) -- Data to be submitted.
|
11
|
+
#
|
12
|
+
# ==== Example
|
13
|
+
# data = {
|
14
|
+
# stepTitle: 'Step Title',
|
15
|
+
# workflowId: 1
|
16
|
+
# }
|
17
|
+
# @data = @mints_user.create_workflow_step(data.to_json)
|
18
|
+
def create_workflow_step(data)
|
19
|
+
@client.raw('post', '/crm/steps', nil, data)
|
20
|
+
end
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
22
|
+
# === Update workflow step.
|
23
|
+
# Update a workflow step info.
|
24
|
+
#
|
25
|
+
# ==== Parameters
|
26
|
+
# id:: (Integer) -- Workflow step id.
|
27
|
+
# data:: (Hash) -- Data to be submitted.
|
28
|
+
#
|
29
|
+
# ==== Example
|
30
|
+
# data = {
|
31
|
+
# stepTitle: 'Step Title Modified'
|
32
|
+
# }
|
33
|
+
# @data = @mints_user.update_workflow_step(23, data)
|
34
|
+
def update_workflow_step(id, data)
|
35
|
+
@client.raw('put', "/crm/steps/#{id}", nil, data)
|
36
|
+
end
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
38
|
+
# === Delete workflow step.
|
39
|
+
# Delete a workflow step.
|
40
|
+
#
|
41
|
+
# ==== Parameters
|
42
|
+
# id:: (Integer) -- Workflow step id.
|
43
|
+
#
|
44
|
+
# ==== Example
|
45
|
+
# @data = @mints_user.delete_workflow_step(51)
|
46
|
+
def delete_workflow_step(id)
|
47
|
+
@client.raw('delete', "/crm/steps/#{id}")
|
48
|
+
end
|
49
|
+
end
|
data/lib/user/crm/workflows.rb
CHANGED
@@ -1,70 +1,70 @@
|
|
1
1
|
module Workflows
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# == Workflows
|
4
|
+
#
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
6
|
+
# === Get workflows.
|
7
|
+
# Get a collection of workflows.
|
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_workflows
|
14
|
+
#
|
15
|
+
# ==== Second Example
|
16
|
+
# options = { sort: 'title', fields: 'title' }
|
17
|
+
# @data = @mints_user.get_workflows(options)
|
18
|
+
def get_workflows(options = nil)
|
19
|
+
@client.raw('get', '/crm/workflows', options)
|
20
|
+
end
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
22
|
+
# === Get workflow.
|
23
|
+
# Get a workflow.
|
24
|
+
#
|
25
|
+
# ==== Parameters
|
26
|
+
# id:: (Integer) -- Workflow 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_workflow(1)
|
31
|
+
#
|
32
|
+
# ==== Second Example
|
33
|
+
# options = { fields: 'id, title' }
|
34
|
+
# @data = @mints_user.get_workflow(1, options)
|
35
|
+
def get_workflow(id, options = nil)
|
36
|
+
@client.raw('get', "/crm/workflows/#{id}", options)
|
37
|
+
end
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
39
|
+
# === Create workflow.
|
40
|
+
# Create a workflow with data.
|
41
|
+
#
|
42
|
+
# ==== Parameters
|
43
|
+
# data:: (Hash) -- Data to be submitted.
|
44
|
+
#
|
45
|
+
# ==== Example
|
46
|
+
# data = {
|
47
|
+
# title: 'New Workflow',
|
48
|
+
# object_type: 'deals'
|
49
|
+
# }
|
50
|
+
# @data = @mints_user.create_workflow(data.to_json)
|
51
|
+
def create_workflow(data)
|
52
|
+
@client.raw('post', '/crm/workflows/', nil, data)
|
53
|
+
end
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
end
|
55
|
+
# === Update workflow.
|
56
|
+
# Update a workflow info.
|
57
|
+
#
|
58
|
+
# ==== Parameters
|
59
|
+
# id:: (Integer) -- Workflow id.
|
60
|
+
# data:: (Hash) -- Data to be submitted.
|
61
|
+
#
|
62
|
+
# ==== Example
|
63
|
+
# data = {
|
64
|
+
# title: 'New Workflow Modified'
|
65
|
+
# }
|
66
|
+
# @data = @mints_user.update_workflow(7, data)
|
67
|
+
def update_workflow(id, data)
|
68
|
+
@client.raw('put', "/crm/workflows/#{id}", nil, correct_json(data))
|
69
|
+
end
|
70
|
+
end
|
@@ -1,29 +1,29 @@
|
|
1
|
-
require_relative './item_prices
|
2
|
-
require_relative './locations
|
3
|
-
require_relative './order_items_groups
|
4
|
-
require_relative './order_statuses
|
5
|
-
require_relative './orders
|
6
|
-
require_relative './price_lists
|
7
|
-
require_relative './product_templates
|
8
|
-
require_relative './product_variations
|
9
|
-
require_relative './products
|
10
|
-
require_relative './skus
|
11
|
-
require_relative './taxes
|
12
|
-
require_relative './variant_options
|
13
|
-
require_relative './variant_values
|
1
|
+
require_relative './item_prices'
|
2
|
+
require_relative './locations'
|
3
|
+
require_relative './order_items_groups'
|
4
|
+
require_relative './order_statuses'
|
5
|
+
require_relative './orders'
|
6
|
+
require_relative './price_lists'
|
7
|
+
require_relative './product_templates'
|
8
|
+
require_relative './product_variations'
|
9
|
+
require_relative './products'
|
10
|
+
require_relative './skus'
|
11
|
+
require_relative './taxes'
|
12
|
+
require_relative './variant_options'
|
13
|
+
require_relative './variant_values'
|
14
14
|
|
15
15
|
module Ecommerce
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
16
|
+
include ItemPrices
|
17
|
+
include Locations
|
18
|
+
include OrderItemsGroups
|
19
|
+
include OrderStatuses
|
20
|
+
include Orders
|
21
|
+
include PriceList
|
22
|
+
include ProductTemplates
|
23
|
+
include ProductVariations
|
24
|
+
include Products
|
25
|
+
include Skus
|
26
|
+
include Taxes
|
27
|
+
include VariantOptions
|
28
|
+
include VariantValues
|
29
|
+
end
|
@@ -1,86 +1,87 @@
|
|
1
1
|
module ItemPrices
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# == Item Prices
|
4
|
+
#
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
6
|
+
# === Get item prices.
|
7
|
+
# Get a collection of item prices.
|
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_item_prices
|
14
|
+
#
|
15
|
+
# ==== Second Example
|
16
|
+
# options = { fields: 'price_cents' }
|
17
|
+
# @data = @mints_user.get_item_prices(options)
|
18
|
+
def get_item_prices(options = nil)
|
19
|
+
@client.raw('get', '/ecommerce/item-prices', options)
|
20
|
+
end
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
22
|
+
# === Get item price.
|
23
|
+
# Get a item price info.
|
24
|
+
#
|
25
|
+
# ==== Parameters
|
26
|
+
# id:: (Integer) -- Item price 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_item_price(1)
|
31
|
+
#
|
32
|
+
# ==== Second Example
|
33
|
+
# options = { fields: 'price_cents' }
|
34
|
+
# @data = @mints_user.get_item_price(1, options)
|
35
|
+
def get_item_price(id, options = nil)
|
36
|
+
@client.raw('get', "/ecommerce/item-prices/#{id}", options)
|
37
|
+
end
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
39
|
+
# === Create item price.
|
40
|
+
# Create a item price with data.
|
41
|
+
#
|
42
|
+
# ==== Parameters
|
43
|
+
# data:: (Hash) -- Data to be submitted.
|
44
|
+
#
|
45
|
+
# ==== Example
|
46
|
+
# data = {
|
47
|
+
# price_list: [
|
48
|
+
# { id: 1 },
|
49
|
+
# { id: 2 }
|
50
|
+
# ],
|
51
|
+
# price_list_id: 1,
|
52
|
+
# title: 'New Item Price'
|
53
|
+
# }
|
54
|
+
# @data = @mints_user.create_item_price(data)
|
55
|
+
def create_item_price(data)
|
56
|
+
# FIXME: Api send sku_id as null and DB doesnt allow that.
|
57
|
+
@client.raw('post', '/ecommerce/item-prices', nil, data_transform(data))
|
58
|
+
end
|
58
59
|
|
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
|
-
end
|
60
|
+
# === Update item price.
|
61
|
+
# Update a item price info.
|
62
|
+
#
|
63
|
+
# ==== Parameters
|
64
|
+
# id:: (Integer) -- Order item price id.
|
65
|
+
# data:: (Hash) -- Data to be submitted.
|
66
|
+
#
|
67
|
+
# ==== Example
|
68
|
+
# data = {
|
69
|
+
# price: 12345
|
70
|
+
# }
|
71
|
+
# @data = @mints_user.update_item_price(1, data)
|
72
|
+
def update_item_price(id, data)
|
73
|
+
@client.raw('put', "/ecommerce/item-prices/#{id}", nil, data_transform(data))
|
74
|
+
end
|
75
|
+
|
76
|
+
# === Delete item price.
|
77
|
+
# Delete a item price.
|
78
|
+
#
|
79
|
+
# ==== Parameters
|
80
|
+
# id:: (Integer) -- Item price id.
|
81
|
+
#
|
82
|
+
# ==== Example
|
83
|
+
# @data = @mints_user.delete_item_price(803)
|
84
|
+
def delete_item_price(id)
|
85
|
+
@client.raw('delete', "/ecommerce/item-prices/#{id}")
|
86
|
+
end
|
87
|
+
end
|