mints 0.0.27 → 0.0.29
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 +287 -385
- data/lib/contact/config/appointments.rb +201 -0
- data/lib/contact/config/config.rb +7 -0
- data/lib/contact/content/content.rb +7 -0
- data/lib/contact/content/conversations.rb +121 -0
- data/lib/contact/ecommerce/ecommerce.rb +12 -0
- data/lib/contact/ecommerce/order_items.rb +19 -0
- data/lib/contact/ecommerce/order_items_groups.rb +95 -0
- data/lib/contact/ecommerce/orders.rb +133 -0
- data/lib/contact.rb +57 -607
- data/lib/errors.rb +4 -2
- data/lib/generators/mints_assets_controller.rb +4 -1
- data/lib/generators/mints_config.yml.erb +0 -2
- data/lib/generators/mints_contact_controller.rb +4 -1
- data/lib/generators/mints_files_generator.rb +16 -13
- data/lib/generators/mints_link.rb +9 -6
- data/lib/generators/mints_public_controller.rb +4 -1
- data/lib/generators/mints_user_controller.rb +3 -0
- data/lib/generators/short_link_controller.rb +4 -1
- data/lib/mints/controllers/admin_base_controller.rb +5 -3
- data/lib/mints/controllers/base_api_controller.rb +6 -4
- data/lib/mints/controllers/base_controller.rb +5 -3
- data/lib/mints/controllers/concerns/mints_clients.rb +4 -2
- data/lib/mints/controllers/concerns/read_config_file.rb +3 -1
- data/lib/mints/controllers/contact_api_controller.rb +12 -10
- data/lib/mints/controllers/public_api_controller.rb +10 -8
- data/lib/mints/controllers/user_api_controller.rb +11 -9
- data/lib/mints/helpers/contact_auth_helper.rb +3 -1
- data/lib/mints/helpers/mints_helper.rb +39 -38
- data/lib/mints/helpers/proxy_controllers_methods.rb +24 -24
- data/lib/mints/helpers/user_auth_helper.rb +5 -3
- data/lib/mints.rb +12 -10
- data/lib/pub.rb +75 -93
- data/lib/user/config/api_keys.rb +63 -61
- data/lib/user/config/appointments.rb +217 -215
- data/lib/user/config/attribute_groups.rb +74 -72
- data/lib/user/config/attributes.rb +83 -81
- data/lib/user/config/calendars.rb +88 -86
- data/lib/user/config/config.rb +31 -63
- data/lib/user/config/public_folders.rb +105 -104
- data/lib/user/config/relationships.rb +135 -132
- data/lib/user/config/roles.rb +76 -79
- data/lib/user/config/seeds.rb +52 -51
- data/lib/user/config/system_settings.rb +50 -49
- data/lib/user/config/tags.rb +57 -59
- data/lib/user/config/taxonomies.rb +115 -119
- data/lib/user/config/teams.rb +69 -68
- data/lib/user/config/users.rb +72 -71
- data/lib/user/contacts/contacts.rb +21 -20
- data/lib/user/content/assets.rb +275 -280
- data/lib/user/content/content.rb +236 -235
- data/lib/user/content/content_instances.rb +138 -138
- data/lib/user/content/content_templates.rb +105 -103
- data/lib/user/content/conversations.rb +195 -193
- data/lib/user/content/dam.rb +85 -80
- data/lib/user/content/forms.rb +231 -233
- data/lib/user/content/message_templates.rb +154 -151
- data/lib/user/content/messages.rb +89 -87
- data/lib/user/content/pages.rb +84 -82
- data/lib/user/content/stories.rb +101 -101
- data/lib/user/content/story_templates.rb +90 -88
- data/lib/user/content/story_versions.rb +117 -117
- data/lib/user/crm/companies.rb +106 -106
- data/lib/user/crm/contacts.rb +287 -292
- data/lib/user/crm/crm.rb +21 -19
- data/lib/user/crm/deals.rb +105 -103
- data/lib/user/crm/favorites.rb +16 -13
- data/lib/user/crm/segments.rb +123 -123
- data/lib/user/crm/users.rb +22 -20
- data/lib/user/crm/workflow_step_objects.rb +86 -84
- data/lib/user/crm/workflow_steps.rb +47 -45
- data/lib/user/crm/workflows.rb +67 -65
- data/lib/user/ecommerce/ecommerce.rb +29 -27
- data/lib/user/ecommerce/item_prices.rb +84 -81
- data/lib/user/ecommerce/locations.rb +162 -160
- data/lib/user/ecommerce/order_items_groups.rb +110 -106
- data/lib/user/ecommerce/order_statuses.rb +26 -24
- data/lib/user/ecommerce/orders.rb +253 -246
- data/lib/user/ecommerce/price_lists.rb +70 -68
- data/lib/user/ecommerce/product_templates.rb +101 -99
- data/lib/user/ecommerce/product_variations.rb +124 -120
- data/lib/user/ecommerce/products.rb +162 -159
- data/lib/user/ecommerce/skus.rb +87 -85
- data/lib/user/ecommerce/taxes.rb +81 -79
- data/lib/user/ecommerce/variant_options.rb +68 -66
- data/lib/user/ecommerce/variant_values.rb +71 -69
- data/lib/user/helpers/helpers.rb +104 -101
- data/lib/user/helpers/object_activities.rb +80 -78
- data/lib/user/helpers/object_folders.rb +78 -76
- data/lib/user/helpers/user_folders.rb +79 -77
- data/lib/user/marketing/marketing.rb +116 -113
- data/lib/user/profile/profile.rb +96 -103
- data/lib/user.rb +32 -41
- metadata +50 -43
- data/lib/user/config/importers.rb +0 -184
@@ -1,89 +1,91 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module WorkflowStepObjects
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
4
|
+
##
|
5
|
+
# == Workflow Step Objects
|
6
|
+
#
|
7
|
+
|
8
|
+
# === Get workflow step objects.
|
9
|
+
# Get a collection of workflow step objects.
|
10
|
+
#
|
11
|
+
# ==== Parameters
|
12
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
13
|
+
#
|
14
|
+
# ==== First Example
|
15
|
+
# @data = @mints_user.get_step_objects
|
16
|
+
#
|
17
|
+
# ==== Second Example
|
18
|
+
# options = { fields: 'id' }
|
19
|
+
# @data = @mints_user.get_step_objects(options)
|
20
|
+
def get_step_objects(options = nil)
|
21
|
+
@client.raw('get', '/crm/step-objects', options)
|
22
|
+
end
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
24
|
+
# === Get workflow step object.
|
25
|
+
# Get a workflow step object info.
|
26
|
+
#
|
27
|
+
# ==== Parameters
|
28
|
+
# id:: (Integer) -- Workflow step object id.
|
29
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
30
|
+
#
|
31
|
+
# ==== First Example
|
32
|
+
# @data = @mints_user.get_step_object(1)
|
33
|
+
#
|
34
|
+
# ==== Second Example
|
35
|
+
# options = { fields: 'id, step_id' }
|
36
|
+
# @data = @mints_user.get_step_object(1, options)
|
37
|
+
def get_step_object(id, options = nil)
|
38
|
+
@client.raw('get', "/crm/step-objects/#{id}", options)
|
39
|
+
end
|
38
40
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
41
|
+
# === Create workflow step object.
|
42
|
+
# Create a workflow step object with data.
|
43
|
+
#
|
44
|
+
# ==== Parameters
|
45
|
+
# data:: (Hash) -- Data to be submitted.
|
46
|
+
#
|
47
|
+
# ==== Example
|
48
|
+
# data = {
|
49
|
+
# objectType: 'deals',
|
50
|
+
# stepId: 9,
|
51
|
+
# objectId: 1
|
52
|
+
# }
|
53
|
+
# @data = @mints_user.create_step_object(data)
|
54
|
+
def create_step_object(data)
|
55
|
+
@client.raw('post', '/crm/step-objects/', nil, data_transform(data))
|
56
|
+
end
|
55
57
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
58
|
+
# === Update workflow step object.
|
59
|
+
# Update a workflow step object info.
|
60
|
+
#
|
61
|
+
# ==== Parameters
|
62
|
+
# id:: (Integer) -- Workflow step object id.
|
63
|
+
# data:: (Hash) -- Data to be submitted.
|
64
|
+
#
|
65
|
+
# ==== Example
|
66
|
+
# data = {
|
67
|
+
# stepId: 10
|
68
|
+
# }
|
69
|
+
# @data = @mints_user.update_step_object(128, data.to_json)
|
70
|
+
def update_step_object(id, data)
|
71
|
+
@client.raw('put', "/crm/step-objects/#{id}", nil, data)
|
72
|
+
end
|
71
73
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
end
|
74
|
+
# === Get workflow step object by object type.
|
75
|
+
# Get a workflow step object info by an object type.
|
76
|
+
#
|
77
|
+
# ==== Parameters
|
78
|
+
# object_type:: (String) -- Object type.
|
79
|
+
# object_id:: (Integer) -- Workflow step object id.
|
80
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
81
|
+
#
|
82
|
+
# ==== First Example
|
83
|
+
# @data = @mints_user.get_step_object_by_object_type("deals", 1)
|
84
|
+
#
|
85
|
+
# ==== Second Example
|
86
|
+
# options = { fields: 'id, object_id' }
|
87
|
+
# @data = @mints_user.get_step_object_by_object_type('deals', 1, options)
|
88
|
+
def get_step_object_by_object_type(object_type, object_id, options = nil)
|
89
|
+
@client.raw('get', "/crm/step-objects/#{object_type}/#{object_id}", options)
|
90
|
+
end
|
91
|
+
end
|
@@ -1,49 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module WorkFlowSteps
|
2
|
-
|
3
|
-
|
4
|
-
|
4
|
+
##
|
5
|
+
# == Workflow Steps
|
6
|
+
#
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
8
|
+
# === Create workflow step.
|
9
|
+
# Create a workflow step with data.
|
10
|
+
#
|
11
|
+
# ==== Parameters
|
12
|
+
# data:: (Hash) -- Data to be submitted.
|
13
|
+
#
|
14
|
+
# ==== Example
|
15
|
+
# data = {
|
16
|
+
# stepTitle: 'Step Title',
|
17
|
+
# workflowId: 1
|
18
|
+
# }
|
19
|
+
# @data = @mints_user.create_workflow_step(data.to_json)
|
20
|
+
def create_workflow_step(data)
|
21
|
+
@client.raw('post', '/crm/steps', nil, data)
|
22
|
+
end
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
24
|
+
# === Update workflow step.
|
25
|
+
# Update a workflow step info.
|
26
|
+
#
|
27
|
+
# ==== Parameters
|
28
|
+
# id:: (Integer) -- Workflow step id.
|
29
|
+
# data:: (Hash) -- Data to be submitted.
|
30
|
+
#
|
31
|
+
# ==== Example
|
32
|
+
# data = {
|
33
|
+
# stepTitle: 'Step Title Modified'
|
34
|
+
# }
|
35
|
+
# @data = @mints_user.update_workflow_step(23, data)
|
36
|
+
def update_workflow_step(id, data)
|
37
|
+
@client.raw('put', "/crm/steps/#{id}", nil, data)
|
38
|
+
end
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
40
|
+
# === Delete workflow step.
|
41
|
+
# Delete a workflow step.
|
42
|
+
#
|
43
|
+
# ==== Parameters
|
44
|
+
# id:: (Integer) -- Workflow step id.
|
45
|
+
#
|
46
|
+
# ==== Example
|
47
|
+
# @data = @mints_user.delete_workflow_step(51)
|
48
|
+
def delete_workflow_step(id)
|
49
|
+
@client.raw('delete', "/crm/steps/#{id}")
|
50
|
+
end
|
51
|
+
end
|
data/lib/user/crm/workflows.rb
CHANGED
@@ -1,70 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Workflows
|
2
|
-
|
3
|
-
|
4
|
-
|
4
|
+
##
|
5
|
+
# == Workflows
|
6
|
+
#
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
8
|
+
# === Get workflows.
|
9
|
+
# Get a collection of workflows.
|
10
|
+
#
|
11
|
+
# ==== Parameters
|
12
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
13
|
+
#
|
14
|
+
# ==== First Example
|
15
|
+
# @data = @mints_user.get_workflows
|
16
|
+
#
|
17
|
+
# ==== Second Example
|
18
|
+
# options = { sort: 'title', fields: 'title' }
|
19
|
+
# @data = @mints_user.get_workflows(options)
|
20
|
+
def get_workflows(options = nil)
|
21
|
+
@client.raw('get', '/crm/workflows', options)
|
22
|
+
end
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
24
|
+
# === Get workflow.
|
25
|
+
# Get a workflow.
|
26
|
+
#
|
27
|
+
# ==== Parameters
|
28
|
+
# id:: (Integer) -- Workflow id.
|
29
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
30
|
+
#
|
31
|
+
# ==== First Example
|
32
|
+
# @data = @mints_user.get_workflow(1)
|
33
|
+
#
|
34
|
+
# ==== Second Example
|
35
|
+
# options = { fields: 'id, title' }
|
36
|
+
# @data = @mints_user.get_workflow(1, options)
|
37
|
+
def get_workflow(id, options = nil)
|
38
|
+
@client.raw('get', "/crm/workflows/#{id}", options)
|
39
|
+
end
|
38
40
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
41
|
+
# === Create workflow.
|
42
|
+
# Create a workflow with data.
|
43
|
+
#
|
44
|
+
# ==== Parameters
|
45
|
+
# data:: (Hash) -- Data to be submitted.
|
46
|
+
#
|
47
|
+
# ==== Example
|
48
|
+
# data = {
|
49
|
+
# title: 'New Workflow',
|
50
|
+
# object_type: 'deals'
|
51
|
+
# }
|
52
|
+
# @data = @mints_user.create_workflow(data.to_json)
|
53
|
+
def create_workflow(data)
|
54
|
+
@client.raw('post', '/crm/workflows/', nil, data)
|
55
|
+
end
|
54
56
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
end
|
57
|
+
# === Update workflow.
|
58
|
+
# Update a workflow info.
|
59
|
+
#
|
60
|
+
# ==== Parameters
|
61
|
+
# id:: (Integer) -- Workflow id.
|
62
|
+
# data:: (Hash) -- Data to be submitted.
|
63
|
+
#
|
64
|
+
# ==== Example
|
65
|
+
# data = {
|
66
|
+
# title: 'New Workflow Modified'
|
67
|
+
# }
|
68
|
+
# @data = @mints_user.update_workflow(7, data)
|
69
|
+
def update_workflow(id, data)
|
70
|
+
@client.raw('put', "/crm/workflows/#{id}", nil, correct_json(data))
|
71
|
+
end
|
72
|
+
end
|
@@ -1,29 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require_relative './
|
4
|
-
require_relative './
|
5
|
-
require_relative './
|
6
|
-
require_relative './
|
7
|
-
require_relative './
|
8
|
-
require_relative './
|
9
|
-
require_relative './
|
10
|
-
require_relative './
|
11
|
-
require_relative './
|
12
|
-
require_relative './
|
13
|
-
require_relative './
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './item_prices'
|
4
|
+
require_relative './locations'
|
5
|
+
require_relative './order_items_groups'
|
6
|
+
require_relative './order_statuses'
|
7
|
+
require_relative './orders'
|
8
|
+
require_relative './price_lists'
|
9
|
+
require_relative './product_templates'
|
10
|
+
require_relative './product_variations'
|
11
|
+
require_relative './products'
|
12
|
+
require_relative './skus'
|
13
|
+
require_relative './taxes'
|
14
|
+
require_relative './variant_options'
|
15
|
+
require_relative './variant_values'
|
14
16
|
|
15
17
|
module Ecommerce
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
18
|
+
include ItemPrices
|
19
|
+
include Locations
|
20
|
+
include OrderItemsGroups
|
21
|
+
include OrderStatuses
|
22
|
+
include Orders
|
23
|
+
include PriceList
|
24
|
+
include ProductTemplates
|
25
|
+
include ProductVariations
|
26
|
+
include Products
|
27
|
+
include Skus
|
28
|
+
include Taxes
|
29
|
+
include VariantOptions
|
30
|
+
include VariantValues
|
31
|
+
end
|
@@ -1,86 +1,89 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ItemPrices
|
2
|
-
|
3
|
-
|
4
|
-
|
4
|
+
##
|
5
|
+
# == Item Prices
|
6
|
+
#
|
7
|
+
|
8
|
+
# === Get item prices.
|
9
|
+
# Get a collection of item prices.
|
10
|
+
#
|
11
|
+
# ==== Parameters
|
12
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
13
|
+
#
|
14
|
+
# ==== First Example
|
15
|
+
# @data = @mints_user.get_item_prices
|
16
|
+
#
|
17
|
+
# ==== Second Example
|
18
|
+
# options = { fields: 'price_cents' }
|
19
|
+
# @data = @mints_user.get_item_prices(options)
|
20
|
+
def get_item_prices(options = nil)
|
21
|
+
@client.raw('get', '/ecommerce/item-prices', options)
|
22
|
+
end
|
5
23
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
24
|
+
# === Get item price.
|
25
|
+
# Get a item price info.
|
26
|
+
#
|
27
|
+
# ==== Parameters
|
28
|
+
# id:: (Integer) -- Item price id.
|
29
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
30
|
+
#
|
31
|
+
# ==== First Example
|
32
|
+
# @data = @mints_user.get_item_price(1)
|
33
|
+
#
|
34
|
+
# ==== Second Example
|
35
|
+
# options = { fields: 'price_cents' }
|
36
|
+
# @data = @mints_user.get_item_price(1, options)
|
37
|
+
def get_item_price(id, options = nil)
|
38
|
+
@client.raw('get', "/ecommerce/item-prices/#{id}", options)
|
39
|
+
end
|
21
40
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
41
|
+
# === Create item price.
|
42
|
+
# Create a item price with data.
|
43
|
+
#
|
44
|
+
# ==== Parameters
|
45
|
+
# data:: (Hash) -- Data to be submitted.
|
46
|
+
#
|
47
|
+
# ==== Example
|
48
|
+
# data = {
|
49
|
+
# price_list: [
|
50
|
+
# { id: 1 },
|
51
|
+
# { id: 2 }
|
52
|
+
# ],
|
53
|
+
# price_list_id: 1,
|
54
|
+
# title: 'New Item Price'
|
55
|
+
# }
|
56
|
+
# @data = @mints_user.create_item_price(data)
|
57
|
+
def create_item_price(data)
|
58
|
+
# FIXME: Api send sku_id as null and DB doesnt allow that.
|
59
|
+
@client.raw('post', '/ecommerce/item-prices', nil, data_transform(data))
|
60
|
+
end
|
38
61
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
# @data = @mints_user.create_item_price(data)
|
55
|
-
def create_item_price(data) #FIXME: Api send sku_id as null and DB doesnt allow that.
|
56
|
-
@client.raw("post", "/ecommerce/item-prices", nil, data_transform(data))
|
57
|
-
end
|
62
|
+
# === Update item price.
|
63
|
+
# Update a item price info.
|
64
|
+
#
|
65
|
+
# ==== Parameters
|
66
|
+
# id:: (Integer) -- Order item price id.
|
67
|
+
# data:: (Hash) -- Data to be submitted.
|
68
|
+
#
|
69
|
+
# ==== Example
|
70
|
+
# data = {
|
71
|
+
# price: 12345
|
72
|
+
# }
|
73
|
+
# @data = @mints_user.update_item_price(1, data)
|
74
|
+
def update_item_price(id, data)
|
75
|
+
@client.raw('put', "/ecommerce/item-prices/#{id}", nil, data_transform(data))
|
76
|
+
end
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
def update_item_price(id, data)
|
72
|
-
@client.raw("put", "/ecommerce/item-prices/#{id}", nil, data_transform(data))
|
73
|
-
end
|
74
|
-
|
75
|
-
# === Delete item price.
|
76
|
-
# Delete a item price.
|
77
|
-
#
|
78
|
-
# ==== Parameters
|
79
|
-
# id:: (Integer) -- Item price id.
|
80
|
-
#
|
81
|
-
# ==== Example
|
82
|
-
# @data = @mints_user.delete_item_price(803)
|
83
|
-
def delete_item_price(id)
|
84
|
-
@client.raw("delete", "/ecommerce/item-prices/#{id}")
|
85
|
-
end
|
86
|
-
end
|
78
|
+
# === Delete item price.
|
79
|
+
# Delete a item price.
|
80
|
+
#
|
81
|
+
# ==== Parameters
|
82
|
+
# id:: (Integer) -- Item price id.
|
83
|
+
#
|
84
|
+
# ==== Example
|
85
|
+
# @data = @mints_user.delete_item_price(803)
|
86
|
+
def delete_item_price(id)
|
87
|
+
@client.raw('delete', "/ecommerce/item-prices/#{id}")
|
88
|
+
end
|
89
|
+
end
|