mints 0.0.26 → 0.0.27
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/lib/client.rb +72 -34
- data/lib/contact.rb +46 -46
- data/lib/errors.rb +98 -0
- 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 +21 -21
- data/lib/user/config/api_keys.rb +4 -4
- data/lib/user/config/appointments.rb +13 -13
- data/lib/user/config/attribute_groups.rb +5 -5
- data/lib/user/config/attributes.rb +6 -6
- data/lib/user/config/calendars.rb +5 -5
- data/lib/user/config/config.rb +7 -7
- data/lib/user/config/importers.rb +13 -13
- data/lib/user/config/public_folders.rb +7 -7
- data/lib/user/config/relationships.rb +9 -9
- data/lib/user/config/roles.rb +6 -6
- data/lib/user/config/seeds.rb +3 -3
- data/lib/user/config/system_settings.rb +4 -4
- data/lib/user/config/tags.rb +4 -4
- data/lib/user/config/taxonomies.rb +7 -7
- data/lib/user/config/teams.rb +5 -5
- data/lib/user/config/users.rb +5 -5
- data/lib/user/contacts/contacts.rb +1 -1
- data/lib/user/content/assets.rb +17 -17
- data/lib/user/content/content.rb +13 -13
- data/lib/user/content/content_instances.rb +9 -9
- data/lib/user/content/content_templates.rb +7 -7
- data/lib/user/content/conversations.rb +13 -13
- data/lib/user/content/dam.rb +8 -8
- data/lib/user/content/forms.rb +16 -16
- data/lib/user/content/message_templates.rb +11 -11
- data/lib/user/content/messages.rb +5 -5
- data/lib/user/content/pages.rb +7 -7
- data/lib/user/content/stories.rb +6 -6
- data/lib/user/content/story_templates.rb +6 -6
- data/lib/user/content/story_versions.rb +6 -6
- data/lib/user/crm/companies.rb +5 -5
- data/lib/user/crm/contacts.rb +18 -18
- data/lib/user/crm/deals.rb +6 -6
- data/lib/user/crm/favorites.rb +3 -3
- data/lib/user/crm/segments.rb +9 -9
- data/lib/user/crm/users.rb +1 -1
- data/lib/user/crm/workflow_step_objects.rb +5 -5
- data/lib/user/crm/workflow_steps.rb +3 -3
- data/lib/user/crm/workflows.rb +4 -4
- data/lib/user/ecommerce/item_prices.rb +5 -5
- data/lib/user/ecommerce/locations.rb +10 -10
- data/lib/user/ecommerce/order_items_groups.rb +15 -14
- data/lib/user/ecommerce/order_statuses.rb +2 -2
- data/lib/user/ecommerce/orders.rb +16 -16
- data/lib/user/ecommerce/price_lists.rb +3 -3
- data/lib/user/ecommerce/product_templates.rb +7 -7
- data/lib/user/ecommerce/product_variations.rb +8 -8
- data/lib/user/ecommerce/products.rb +10 -10
- data/lib/user/ecommerce/skus.rb +5 -5
- data/lib/user/ecommerce/taxes.rb +5 -5
- data/lib/user/ecommerce/variant_options.rb +4 -4
- data/lib/user/ecommerce/variant_values.rb +4 -4
- data/lib/user/helpers/helpers.rb +8 -8
- data/lib/user/helpers/object_activities.rb +5 -5
- data/lib/user/helpers/object_folders.rb +5 -5
- data/lib/user/helpers/user_folders.rb +5 -5
- data/lib/user/marketing/marketing.rb +8 -8
- data/lib/user/profile/profile.rb +8 -8
- data/lib/user.rb +1 -1
- metadata +10 -4
@@ -16,7 +16,7 @@ module WorkFlowSteps
|
|
16
16
|
# }
|
17
17
|
# @data = @mints_user.create_workflow_step(data.to_json)
|
18
18
|
def create_workflow_step(data)
|
19
|
-
|
19
|
+
@client.raw("post", "/crm/steps", nil, data)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Update workflow step.
|
@@ -32,7 +32,7 @@ module WorkFlowSteps
|
|
32
32
|
# }
|
33
33
|
# @data = @mints_user.update_workflow_step(23, data)
|
34
34
|
def update_workflow_step(id, data)
|
35
|
-
|
35
|
+
@client.raw("put", "/crm/steps/#{id}", nil, data)
|
36
36
|
end
|
37
37
|
|
38
38
|
# === Delete workflow step.
|
@@ -44,6 +44,6 @@ module WorkFlowSteps
|
|
44
44
|
# ==== Example
|
45
45
|
# @data = @mints_user.delete_workflow_step(51)
|
46
46
|
def delete_workflow_step(id)
|
47
|
-
|
47
|
+
@client.raw("delete", "/crm/steps/#{id}")
|
48
48
|
end
|
49
49
|
end
|
data/lib/user/crm/workflows.rb
CHANGED
@@ -16,7 +16,7 @@ module Workflows
|
|
16
16
|
# options = { "sort": "title", "fields": "title" }
|
17
17
|
# @data = @mints_user.get_workflows(options)
|
18
18
|
def get_workflows(options = nil)
|
19
|
-
|
19
|
+
@client.raw("get", "/crm/workflows", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Get workflow.
|
@@ -33,7 +33,7 @@ module Workflows
|
|
33
33
|
# options = { "fields": "id, title" }
|
34
34
|
# @data = @mints_user.get_workflow(1, options)
|
35
35
|
def get_workflow(id, options = nil)
|
36
|
-
|
36
|
+
@client.raw("get", "/crm/workflows/#{id}", options)
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Create workflow.
|
@@ -49,7 +49,7 @@ module Workflows
|
|
49
49
|
# }
|
50
50
|
# @data = @mints_user.create_workflow(data.to_json)
|
51
51
|
def create_workflow(data)
|
52
|
-
|
52
|
+
@client.raw("post", "/crm/workflows/", nil, data)
|
53
53
|
end
|
54
54
|
|
55
55
|
# === Update workflow.
|
@@ -65,6 +65,6 @@ module Workflows
|
|
65
65
|
# }
|
66
66
|
# @data = @mints_user.update_workflow(7, data)
|
67
67
|
def update_workflow(id, data)
|
68
|
-
|
68
|
+
@client.raw("put", "/crm/workflows/#{id}", nil, correct_json(data))
|
69
69
|
end
|
70
70
|
end
|
@@ -16,7 +16,7 @@ module ItemPrices
|
|
16
16
|
# options = { "fields": "price_cents" }
|
17
17
|
# @data = @mints_user.get_item_prices(options)
|
18
18
|
def get_item_prices(options = nil)
|
19
|
-
|
19
|
+
@client.raw("get", "/ecommerce/item-prices", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Get item price.
|
@@ -33,7 +33,7 @@ module ItemPrices
|
|
33
33
|
# options = { "fields": "price_cents" }
|
34
34
|
# @data = @mints_user.get_item_price(1, options)
|
35
35
|
def get_item_price(id, options = nil)
|
36
|
-
|
36
|
+
@client.raw("get", "/ecommerce/item-prices/#{id}", options)
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Create item price.
|
@@ -53,7 +53,7 @@ module ItemPrices
|
|
53
53
|
# }
|
54
54
|
# @data = @mints_user.create_item_price(data)
|
55
55
|
def create_item_price(data) #FIXME: Api send sku_id as null and DB doesnt allow that.
|
56
|
-
|
56
|
+
@client.raw("post", "/ecommerce/item-prices", nil, data_transform(data))
|
57
57
|
end
|
58
58
|
|
59
59
|
# === Update item price.
|
@@ -69,7 +69,7 @@ module ItemPrices
|
|
69
69
|
# }
|
70
70
|
# @data = @mints_user.update_item_price(1, data)
|
71
71
|
def update_item_price(id, data)
|
72
|
-
|
72
|
+
@client.raw("put", "/ecommerce/item-prices/#{id}", nil, data_transform(data))
|
73
73
|
end
|
74
74
|
|
75
75
|
# === Delete item price.
|
@@ -81,6 +81,6 @@ module ItemPrices
|
|
81
81
|
# ==== Example
|
82
82
|
# @data = @mints_user.delete_item_price(803)
|
83
83
|
def delete_item_price(id)
|
84
|
-
|
84
|
+
@client.raw("delete", "/ecommerce/item-prices/#{id}")
|
85
85
|
end
|
86
86
|
end
|
@@ -30,7 +30,7 @@ module Locations
|
|
30
30
|
# ==== Example
|
31
31
|
# @data = @mints_user.get_location(2)
|
32
32
|
def get_location(id)
|
33
|
-
|
33
|
+
@client.raw("get", "/ecommerce/locations/#{id}")
|
34
34
|
end
|
35
35
|
|
36
36
|
# === Create location.
|
@@ -46,7 +46,7 @@ module Locations
|
|
46
46
|
# }
|
47
47
|
# @data = @mints_user.create_location(data)
|
48
48
|
def create_location(data, options = nil)
|
49
|
-
|
49
|
+
@client.raw("post", "/ecommerce/locations", options, data_transform(data))
|
50
50
|
end
|
51
51
|
|
52
52
|
# === Update location.
|
@@ -62,7 +62,7 @@ module Locations
|
|
62
62
|
# }
|
63
63
|
# @data = @mints_user.update_location(5, data.to_json)
|
64
64
|
def update_location(id, data, options = nil)
|
65
|
-
|
65
|
+
@client.raw("put", "/ecommerce/locations/#{id}", options, data)
|
66
66
|
end
|
67
67
|
|
68
68
|
# === Delete location.
|
@@ -74,7 +74,7 @@ module Locations
|
|
74
74
|
# ==== Example
|
75
75
|
# @data = @mints_user.delete_location(5)
|
76
76
|
def delete_location(id)
|
77
|
-
|
77
|
+
@client.raw("delete", "/ecommerce/locations/#{id}")
|
78
78
|
end
|
79
79
|
|
80
80
|
##
|
@@ -90,7 +90,7 @@ module Locations
|
|
90
90
|
# ==== Example
|
91
91
|
# @data = @mints_user.get_location_template_support_data(1)
|
92
92
|
def get_location_template_support_data(id)
|
93
|
-
|
93
|
+
@client.raw("get", "/ecommerce/location-templates/#{id}/support-data")
|
94
94
|
end
|
95
95
|
|
96
96
|
# === Get location templates support data.
|
@@ -99,7 +99,7 @@ module Locations
|
|
99
99
|
# ==== Example
|
100
100
|
# @data = @mints_user.get_location_templates_support_data
|
101
101
|
def get_location_templates_support_data
|
102
|
-
|
102
|
+
@client.raw("get", "/ecommerce/location-templates/support-data")
|
103
103
|
end
|
104
104
|
|
105
105
|
# === Get location templates.
|
@@ -115,7 +115,7 @@ module Locations
|
|
115
115
|
# options = { "fields": "title" }
|
116
116
|
# @data = @mints_user.get_location_templates(options)
|
117
117
|
def get_location_templates(options = nil)
|
118
|
-
|
118
|
+
@client.raw("get", "/ecommerce/location-templates", options)
|
119
119
|
end
|
120
120
|
|
121
121
|
# === Get location template.
|
@@ -132,7 +132,7 @@ module Locations
|
|
132
132
|
# options = { "fields": "title" }
|
133
133
|
# @data = @mints_user.get_location_template(1, options)
|
134
134
|
def get_location_template(id, options = nil)
|
135
|
-
|
135
|
+
@client.raw("get", "/ecommerce/location-templates/#{id}", options)
|
136
136
|
end
|
137
137
|
|
138
138
|
# === Create location template.
|
@@ -148,7 +148,7 @@ module Locations
|
|
148
148
|
# }
|
149
149
|
# @data = @mints_user.create_location_template(data)
|
150
150
|
def create_location_template(data)
|
151
|
-
|
151
|
+
@client.raw("post", "/ecommerce/location-templates", nil, data_transform(data))
|
152
152
|
end
|
153
153
|
|
154
154
|
# === Update location template.
|
@@ -164,6 +164,6 @@ module Locations
|
|
164
164
|
# }
|
165
165
|
# @data = @mints_user.update_location_template(3, data)
|
166
166
|
def update_location_template(id, data)
|
167
|
-
|
167
|
+
@client.raw("put", "/ecommerce/location-templates/#{id}", nil, data_transform(data))
|
168
168
|
end
|
169
169
|
end
|
@@ -7,25 +7,25 @@ module OrderItemsGroups
|
|
7
7
|
# Get a pending order template from an order item group.
|
8
8
|
#
|
9
9
|
# ==== Parameters
|
10
|
-
#
|
11
|
-
#
|
10
|
+
# parent_order_id:: (Integer) -- Order items group id.
|
11
|
+
# order_template_id:: (Integer) -- Order template id.
|
12
12
|
#
|
13
13
|
# ==== Example
|
14
14
|
# @data = @mints_user.get_pending_order_template_from_order_item_group(1, 1)
|
15
|
-
def get_pending_order_template_from_order_item_group(
|
16
|
-
|
15
|
+
def get_pending_order_template_from_order_item_group(parent_order_id, order_template_id)
|
16
|
+
@client.raw("get", "/ecommerce/order-items-groups/#{parent_order_id}/pending-items/order-template/#{order_template_id}")
|
17
17
|
end
|
18
18
|
|
19
19
|
# === Get order item group support data by order id.
|
20
20
|
# Get support data of an order item group by an order id.
|
21
21
|
#
|
22
22
|
# ==== Parameters
|
23
|
-
#
|
23
|
+
# order_id:: (Integer) -- Order id.
|
24
24
|
#
|
25
25
|
# ==== Example
|
26
26
|
# @data = @mints_user.get_order_item_group_support_data_by_order_id(1)
|
27
|
-
def get_order_item_group_support_data_by_order_id(
|
28
|
-
|
27
|
+
def get_order_item_group_support_data_by_order_id(order_id) #FIXME: Return in OrderItemsGroupController.getTemplateSupportDataByOrderId method doesnt create data variable.
|
28
|
+
@client.raw("get", "/ecommerce/order-items-groups/support-data/#{order_id}")
|
29
29
|
end
|
30
30
|
|
31
31
|
# === Get order item groups.
|
@@ -41,7 +41,7 @@ module OrderItemsGroups
|
|
41
41
|
# options = { "fields": "name" }
|
42
42
|
# @data = @mints_user.get_order_item_groups(options)
|
43
43
|
def get_order_item_groups(options = nil)
|
44
|
-
|
44
|
+
@client.raw("get", "/ecommerce/order-items-groups", options)
|
45
45
|
end
|
46
46
|
|
47
47
|
# === Get order item group.
|
@@ -58,7 +58,7 @@ module OrderItemsGroups
|
|
58
58
|
# options = { "fields": "name" }
|
59
59
|
# @data = @mints_user.get_order_item_group(1, options)
|
60
60
|
def get_order_item_group(id, options = nil)
|
61
|
-
|
61
|
+
@client.raw("get", "/ecommerce/order-items-groups/#{id}", options)
|
62
62
|
end
|
63
63
|
|
64
64
|
# === Create order item group.
|
@@ -74,9 +74,10 @@ module OrderItemsGroups
|
|
74
74
|
# "quantity": 1,
|
75
75
|
# "sale_price": 200
|
76
76
|
# }
|
77
|
-
#
|
78
|
-
|
79
|
-
|
77
|
+
# options = { "include": "orderItems" }
|
78
|
+
# @data = @mints_user.create_order_item_group(data, options)
|
79
|
+
def create_order_item_group(data, options = nil)
|
80
|
+
@client.raw("post", "/ecommerce/order-items-groups", options, data_transform(data))
|
80
81
|
end
|
81
82
|
|
82
83
|
# === Update order item group.
|
@@ -92,7 +93,7 @@ module OrderItemsGroups
|
|
92
93
|
# }
|
93
94
|
# @data = @mints_user.update_order_item_group(147, data)
|
94
95
|
def update_order_item_group(id, data)
|
95
|
-
|
96
|
+
@client.raw("put", "/ecommerce/order-items-groups/#{id}", nil, data_transform(data))
|
96
97
|
end
|
97
98
|
|
98
99
|
# === Delete order item group.
|
@@ -104,6 +105,6 @@ module OrderItemsGroups
|
|
104
105
|
# ==== Example
|
105
106
|
# @data = @mints_user.delete_order_item_group(147)
|
106
107
|
def delete_order_item_group(id)
|
107
|
-
|
108
|
+
@client.raw("delete", "/ecommerce/order-items-groups/#{id}")
|
108
109
|
end
|
109
110
|
end
|
@@ -9,7 +9,7 @@ module OrderStatuses
|
|
9
9
|
# ==== First Example
|
10
10
|
# @data = @mints_user.get_order_statuses
|
11
11
|
def get_order_statuses
|
12
|
-
|
12
|
+
@client.raw("get", "/ecommerce/order-statuses")
|
13
13
|
end
|
14
14
|
|
15
15
|
# === Get order status.
|
@@ -21,6 +21,6 @@ module OrderStatuses
|
|
21
21
|
# ==== First Example
|
22
22
|
# @data = @mints_user.get_order_status(1)
|
23
23
|
def get_order_status(id)
|
24
|
-
|
24
|
+
@client.raw("get", "/ecommerce/order-statuses/#{id}")
|
25
25
|
end
|
26
26
|
end
|
@@ -11,7 +11,7 @@ module Orders
|
|
11
11
|
# data:: (Hash) -- Data to be submitted.
|
12
12
|
#
|
13
13
|
def duplicate_order(orderId, data) #FIXME: Doesnt read options from data and sale_price_cents column doesnt have to be null
|
14
|
-
|
14
|
+
@client.raw("post", "/ecommerce/orders/duplicate/#{orderId}", nil, data)
|
15
15
|
end
|
16
16
|
|
17
17
|
# === Delete orders.
|
@@ -26,7 +26,7 @@ module Orders
|
|
26
26
|
# }
|
27
27
|
# @data = @mints_user.delete_orders(data)
|
28
28
|
def delete_orders(data) #TODO: Inform method should return another response like 'success'
|
29
|
-
|
29
|
+
@client.raw("delete", "/ecommerce/orders/delete", nil, data_transform(data))
|
30
30
|
end
|
31
31
|
|
32
32
|
# === Get orders support data.
|
@@ -35,7 +35,7 @@ module Orders
|
|
35
35
|
# ==== Example
|
36
36
|
# @data = @mints_user.get_orders_support_data
|
37
37
|
def get_orders_support_data
|
38
|
-
|
38
|
+
@client.raw("get", "/ecommerce/orders/support-data")
|
39
39
|
end
|
40
40
|
|
41
41
|
# === Get orders.
|
@@ -73,7 +73,7 @@ module Orders
|
|
73
73
|
# options = { "fields": "title" }
|
74
74
|
# @data = @mints_user.get_order(1, options)
|
75
75
|
def get_order(id, options = nil)
|
76
|
-
|
76
|
+
@client.raw("get", "/ecommerce/orders/#{id}", options)
|
77
77
|
end
|
78
78
|
|
79
79
|
# === Create order.
|
@@ -89,7 +89,7 @@ module Orders
|
|
89
89
|
# }
|
90
90
|
# @data = @mints_user.create_order(data)
|
91
91
|
def create_order(data, options = nil)
|
92
|
-
|
92
|
+
@client.raw("post", "/ecommerce/orders", options, data_transform(data))
|
93
93
|
end
|
94
94
|
|
95
95
|
# === Update order.
|
@@ -105,7 +105,7 @@ module Orders
|
|
105
105
|
# }
|
106
106
|
# @data = @mints_user.update_order(26, data)
|
107
107
|
def update_order(id, data, options = nil)
|
108
|
-
|
108
|
+
@client.raw("put", "/ecommerce/orders/#{id}", options, data_transform(data))
|
109
109
|
end
|
110
110
|
|
111
111
|
##
|
@@ -121,7 +121,7 @@ module Orders
|
|
121
121
|
# ==== Example
|
122
122
|
# @data = @mints_user.get_order_template_support_data(1)
|
123
123
|
def get_order_template_support_data(id)
|
124
|
-
|
124
|
+
@client.raw("get", "/ecommerce/order-templates/support-data/#{id}")
|
125
125
|
end
|
126
126
|
|
127
127
|
# === Get order templates.
|
@@ -137,7 +137,7 @@ module Orders
|
|
137
137
|
# options = { "fields": "title" }
|
138
138
|
# @data = @mints_user.get_order_templates(options)
|
139
139
|
def get_order_templates(options = nil)
|
140
|
-
|
140
|
+
@client.raw("get", "/ecommerce/order-templates", options)
|
141
141
|
end
|
142
142
|
|
143
143
|
# === Get order template.
|
@@ -154,7 +154,7 @@ module Orders
|
|
154
154
|
# options = { "fields": "title" }
|
155
155
|
# @data = @mints_user.get_order_template(1, options)
|
156
156
|
def get_order_template(id, options = nil)
|
157
|
-
|
157
|
+
@client.raw("get", "/ecommerce/order-templates/#{id}", options)
|
158
158
|
end
|
159
159
|
|
160
160
|
# === Update order template.
|
@@ -170,7 +170,7 @@ module Orders
|
|
170
170
|
# }
|
171
171
|
# @data = @mints_user.update_order_template(12, data)
|
172
172
|
def update_order_template(id, data)
|
173
|
-
|
173
|
+
@client.raw("put", "/ecommerce/order-templates/#{id}", nil, data_transform(data))
|
174
174
|
end
|
175
175
|
|
176
176
|
##
|
@@ -183,7 +183,7 @@ module Orders
|
|
183
183
|
# ==== Example
|
184
184
|
# @data = @mints_user.get_order_items_support_data
|
185
185
|
def get_order_items_support_data
|
186
|
-
|
186
|
+
@client.raw("get", "/ecommerce/order-items/support-data")
|
187
187
|
end
|
188
188
|
|
189
189
|
#TODO: The following two methods receive objects instead integer variable. Research use and test it.
|
@@ -195,7 +195,7 @@ module Orders
|
|
195
195
|
# groupId:: (Integer) -- Order items group id.
|
196
196
|
#
|
197
197
|
def detach_order_item_from_order_item_group(orderItemId, groupId) #TODO: Research use
|
198
|
-
|
198
|
+
@client.raw("put", "/ecommerce/order-items/detach/#{orderItemId}/order-items-groups/#{groupId}")
|
199
199
|
end
|
200
200
|
|
201
201
|
# === Update order item from order item group.
|
@@ -206,7 +206,7 @@ module Orders
|
|
206
206
|
# groupId:: (Integer) -- Order items group id.
|
207
207
|
#
|
208
208
|
def update_order_item_from_order_item_group(orderItemId, groupId, data) #TODO: Research use
|
209
|
-
|
209
|
+
@client.raw("put", "/ecommerce/order-items/update/#{orderItemId}/order-items-groups/#{groupId}", nil, data_transform(data))
|
210
210
|
end
|
211
211
|
|
212
212
|
# === Get order items.
|
@@ -222,7 +222,7 @@ module Orders
|
|
222
222
|
# options = { "fields": "id" }
|
223
223
|
# @data = @mints_user.get_order_items(options)
|
224
224
|
def get_order_items(options = nil) #FIXME: CaliRouter POST method not supported.
|
225
|
-
|
225
|
+
@client.raw("get", "/ecommerce/order-items", options)
|
226
226
|
end
|
227
227
|
|
228
228
|
# === Get order item.
|
@@ -239,7 +239,7 @@ module Orders
|
|
239
239
|
# options = { "fields": "id" }
|
240
240
|
# @data = @mints_user.get_order_item(1, options)
|
241
241
|
def get_order_item(id, options = nil)
|
242
|
-
|
242
|
+
@client.raw("get", "/ecommerce/order-items/#{id}", options)
|
243
243
|
end
|
244
244
|
|
245
245
|
# === Update order item.
|
@@ -253,6 +253,6 @@ module Orders
|
|
253
253
|
# data = { "title": "No title in order items" }
|
254
254
|
# @data = @mints_user.update_order_item(1, data)
|
255
255
|
def update_order_item(id, data) #TODO: Research what can update
|
256
|
-
|
256
|
+
@client.raw("put", "/ecommerce/order-items/#{id}", nil, data_transform(data))
|
257
257
|
end
|
258
258
|
end
|
@@ -37,7 +37,7 @@ module PriceList
|
|
37
37
|
# }
|
38
38
|
# @data = @mints_user.get_price_list(1, options)
|
39
39
|
def get_price_list(id, options = nil)
|
40
|
-
|
40
|
+
@client.raw("get", "/ecommerce/price-list/#{id}", options)
|
41
41
|
end
|
42
42
|
|
43
43
|
# === Create price list.
|
@@ -52,7 +52,7 @@ module PriceList
|
|
52
52
|
# }
|
53
53
|
# @data = @mints_user.create_price_list(data)
|
54
54
|
def create_price_list(data)
|
55
|
-
|
55
|
+
@client.raw("post", "/ecommerce/price-list", nil, data_transform(data))
|
56
56
|
end
|
57
57
|
|
58
58
|
# === Update price list.
|
@@ -68,6 +68,6 @@ module PriceList
|
|
68
68
|
# }
|
69
69
|
# @data = @mints_user.update_price_list(8, data)
|
70
70
|
def update_price_list(id, data)
|
71
|
-
|
71
|
+
@client.raw("put", "/ecommerce/price-list/#{id}", nil, data_transform(data))
|
72
72
|
end
|
73
73
|
end
|
@@ -12,7 +12,7 @@ module ProductTemplates
|
|
12
12
|
# ==== Example
|
13
13
|
# @data = @mints_user.get_product_templates_support_data_from_product(1)
|
14
14
|
def get_product_templates_support_data_from_product(id)
|
15
|
-
|
15
|
+
@client.raw("get", "/ecommerce/product-templates/support-data/products/#{id}")
|
16
16
|
end
|
17
17
|
|
18
18
|
# === Get product templates support data from order items group.
|
@@ -24,7 +24,7 @@ module ProductTemplates
|
|
24
24
|
# ==== Example
|
25
25
|
# @data = @mints_user.get_product_templates_support_data_from_order_items_group(1)
|
26
26
|
def get_product_templates_support_data_from_order_items_group(id)
|
27
|
-
|
27
|
+
@client.raw("get", "/ecommerce/product-templates/support-data/order-items-groups/#{id}")
|
28
28
|
end
|
29
29
|
|
30
30
|
# === Get product templates support data.
|
@@ -33,7 +33,7 @@ module ProductTemplates
|
|
33
33
|
# ==== Example
|
34
34
|
# @data = @mints_user.get_product_templates_support_data
|
35
35
|
def get_product_templates_support_data
|
36
|
-
|
36
|
+
@client.raw("get", "/ecommerce/product-templates/support-data")
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Get product templates.
|
@@ -49,7 +49,7 @@ module ProductTemplates
|
|
49
49
|
# options = { "fields": "title" }
|
50
50
|
# @data = @mints_user.get_product_templates(options)
|
51
51
|
def get_product_templates(options = nil)
|
52
|
-
|
52
|
+
@client.raw("get", "/ecommerce/product-templates", options)
|
53
53
|
end
|
54
54
|
|
55
55
|
# === Get product template.
|
@@ -66,7 +66,7 @@ module ProductTemplates
|
|
66
66
|
# options = { "fields": "title" }
|
67
67
|
# @data = @mints_user.get_product_template(1, options)
|
68
68
|
def get_product_template(id, options = nil)
|
69
|
-
|
69
|
+
@client.raw("get", "/ecommerce/product-templates/#{id}", options)
|
70
70
|
end
|
71
71
|
|
72
72
|
# === Create product template.
|
@@ -82,7 +82,7 @@ module ProductTemplates
|
|
82
82
|
# }
|
83
83
|
# @data = @mints_user.create_product_template(data)
|
84
84
|
def create_product_template(data)
|
85
|
-
|
85
|
+
@client.raw("post", "/ecommerce/product-templates/", nil, data_transform(data))
|
86
86
|
end
|
87
87
|
|
88
88
|
# === Update product template.
|
@@ -99,6 +99,6 @@ module ProductTemplates
|
|
99
99
|
# }
|
100
100
|
# @data = @mints_user.update_product_template(3, data)
|
101
101
|
def update_product_template(id, data)
|
102
|
-
|
102
|
+
@client.raw("put", "/ecommerce/product-templates/#{id}", nil, data_transform(data))
|
103
103
|
end
|
104
104
|
end
|
@@ -12,7 +12,7 @@ module ProductVariations
|
|
12
12
|
#
|
13
13
|
def generate_product_variation(productId, data) #TODO: Research use
|
14
14
|
#TODO: Notify line 247 had a '/' before Exception
|
15
|
-
|
15
|
+
@client.raw("post", "/ecommerce/product-variations/generate/#{productId}", nil, data_transform(data))
|
16
16
|
end
|
17
17
|
|
18
18
|
# === Set prices to product variations.
|
@@ -35,7 +35,7 @@ module ProductVariations
|
|
35
35
|
# }
|
36
36
|
# @data = @mints_user.set_prices_to_product_variations(data)
|
37
37
|
def set_prices_to_product_variations(data)
|
38
|
-
|
38
|
+
@client.raw("post", "/ecommerce/product-variations/set-prices", nil, data_transform(data))
|
39
39
|
end
|
40
40
|
|
41
41
|
# === Get product from product variation.
|
@@ -47,7 +47,7 @@ module ProductVariations
|
|
47
47
|
# ==== Example
|
48
48
|
# @data = @mints_user.get_product_from_product_variation(1)
|
49
49
|
def get_product_from_product_variation(productId)
|
50
|
-
|
50
|
+
@client.raw("get", "/ecommerce/product-variations/product/#{productId}")
|
51
51
|
end
|
52
52
|
|
53
53
|
# === Get product variations.
|
@@ -59,7 +59,7 @@ module ProductVariations
|
|
59
59
|
# ==== Example
|
60
60
|
# @data = @mints_user.get_product_variations
|
61
61
|
def get_product_variations
|
62
|
-
|
62
|
+
@client.raw("get", "/ecommerce/product-variations")
|
63
63
|
end
|
64
64
|
|
65
65
|
# === Get product variation.
|
@@ -71,7 +71,7 @@ module ProductVariations
|
|
71
71
|
# ==== Example
|
72
72
|
# @data = @mints_user.get_product_variation(100)
|
73
73
|
def get_product_variation(id)
|
74
|
-
|
74
|
+
@client.raw("get", "/ecommerce/product-variations/#{id}")
|
75
75
|
end
|
76
76
|
|
77
77
|
# === Create product variation.
|
@@ -92,7 +92,7 @@ module ProductVariations
|
|
92
92
|
# }
|
93
93
|
# @data = @mints_user.create_product_variation(data)
|
94
94
|
def create_product_variation(data)
|
95
|
-
|
95
|
+
@client.raw("post", "/ecommerce/product-variations", nil, data_transform(data))
|
96
96
|
end
|
97
97
|
|
98
98
|
# === Update product variation.
|
@@ -112,7 +112,7 @@ module ProductVariations
|
|
112
112
|
# }
|
113
113
|
# @data = @mints_user.update_product_variation(528, data)
|
114
114
|
def update_product_variation(id, data)
|
115
|
-
|
115
|
+
@client.raw("put", "/ecommerce/product-variations/#{id}", nil, data_transform(data))
|
116
116
|
end
|
117
117
|
|
118
118
|
# === Delete product variation.
|
@@ -124,6 +124,6 @@ module ProductVariations
|
|
124
124
|
# ==== Example
|
125
125
|
# @data = @mints_user.delete_product_variation(528)
|
126
126
|
def delete_product_variation(id)
|
127
|
-
|
127
|
+
@client.raw("delete", "/ecommerce/product-variations/#{id}")
|
128
128
|
end
|
129
129
|
end
|