mints 0.0.27 → 0.0.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/lib/client.rb +287 -385
  4. data/lib/contact/config/appointments.rb +201 -0
  5. data/lib/contact/config/config.rb +7 -0
  6. data/lib/contact/content/content.rb +7 -0
  7. data/lib/contact/content/conversations.rb +121 -0
  8. data/lib/contact/ecommerce/ecommerce.rb +12 -0
  9. data/lib/contact/ecommerce/order_items.rb +19 -0
  10. data/lib/contact/ecommerce/order_items_groups.rb +95 -0
  11. data/lib/contact/ecommerce/orders.rb +133 -0
  12. data/lib/contact.rb +57 -607
  13. data/lib/errors.rb +4 -2
  14. data/lib/generators/mints_assets_controller.rb +4 -1
  15. data/lib/generators/mints_config.yml.erb +0 -2
  16. data/lib/generators/mints_contact_controller.rb +4 -1
  17. data/lib/generators/mints_files_generator.rb +16 -13
  18. data/lib/generators/mints_link.rb +9 -6
  19. data/lib/generators/mints_public_controller.rb +4 -1
  20. data/lib/generators/mints_user_controller.rb +3 -0
  21. data/lib/generators/short_link_controller.rb +4 -1
  22. data/lib/mints/controllers/admin_base_controller.rb +5 -3
  23. data/lib/mints/controllers/base_api_controller.rb +6 -4
  24. data/lib/mints/controllers/base_controller.rb +5 -3
  25. data/lib/mints/controllers/concerns/mints_clients.rb +4 -2
  26. data/lib/mints/controllers/concerns/read_config_file.rb +3 -1
  27. data/lib/mints/controllers/contact_api_controller.rb +12 -10
  28. data/lib/mints/controllers/public_api_controller.rb +10 -8
  29. data/lib/mints/controllers/user_api_controller.rb +11 -9
  30. data/lib/mints/helpers/contact_auth_helper.rb +3 -1
  31. data/lib/mints/helpers/mints_helper.rb +39 -38
  32. data/lib/mints/helpers/proxy_controllers_methods.rb +24 -24
  33. data/lib/mints/helpers/user_auth_helper.rb +5 -3
  34. data/lib/mints.rb +12 -10
  35. data/lib/pub.rb +75 -93
  36. data/lib/user/config/api_keys.rb +63 -61
  37. data/lib/user/config/appointments.rb +217 -215
  38. data/lib/user/config/attribute_groups.rb +74 -72
  39. data/lib/user/config/attributes.rb +83 -81
  40. data/lib/user/config/calendars.rb +88 -86
  41. data/lib/user/config/config.rb +31 -63
  42. data/lib/user/config/public_folders.rb +105 -104
  43. data/lib/user/config/relationships.rb +135 -132
  44. data/lib/user/config/roles.rb +76 -79
  45. data/lib/user/config/seeds.rb +52 -51
  46. data/lib/user/config/system_settings.rb +50 -49
  47. data/lib/user/config/tags.rb +57 -59
  48. data/lib/user/config/taxonomies.rb +115 -119
  49. data/lib/user/config/teams.rb +69 -68
  50. data/lib/user/config/users.rb +72 -71
  51. data/lib/user/contacts/contacts.rb +21 -20
  52. data/lib/user/content/assets.rb +275 -280
  53. data/lib/user/content/content.rb +236 -235
  54. data/lib/user/content/content_instances.rb +138 -138
  55. data/lib/user/content/content_templates.rb +105 -103
  56. data/lib/user/content/conversations.rb +195 -193
  57. data/lib/user/content/dam.rb +85 -80
  58. data/lib/user/content/forms.rb +231 -233
  59. data/lib/user/content/message_templates.rb +154 -151
  60. data/lib/user/content/messages.rb +89 -87
  61. data/lib/user/content/pages.rb +84 -82
  62. data/lib/user/content/stories.rb +101 -101
  63. data/lib/user/content/story_templates.rb +90 -88
  64. data/lib/user/content/story_versions.rb +117 -117
  65. data/lib/user/crm/companies.rb +106 -106
  66. data/lib/user/crm/contacts.rb +287 -292
  67. data/lib/user/crm/crm.rb +21 -19
  68. data/lib/user/crm/deals.rb +105 -103
  69. data/lib/user/crm/favorites.rb +16 -13
  70. data/lib/user/crm/segments.rb +123 -123
  71. data/lib/user/crm/users.rb +22 -20
  72. data/lib/user/crm/workflow_step_objects.rb +86 -84
  73. data/lib/user/crm/workflow_steps.rb +47 -45
  74. data/lib/user/crm/workflows.rb +67 -65
  75. data/lib/user/ecommerce/ecommerce.rb +29 -27
  76. data/lib/user/ecommerce/item_prices.rb +84 -81
  77. data/lib/user/ecommerce/locations.rb +162 -160
  78. data/lib/user/ecommerce/order_items_groups.rb +110 -106
  79. data/lib/user/ecommerce/order_statuses.rb +26 -24
  80. data/lib/user/ecommerce/orders.rb +253 -246
  81. data/lib/user/ecommerce/price_lists.rb +70 -68
  82. data/lib/user/ecommerce/product_templates.rb +101 -99
  83. data/lib/user/ecommerce/product_variations.rb +124 -120
  84. data/lib/user/ecommerce/products.rb +162 -159
  85. data/lib/user/ecommerce/skus.rb +87 -85
  86. data/lib/user/ecommerce/taxes.rb +81 -79
  87. data/lib/user/ecommerce/variant_options.rb +68 -66
  88. data/lib/user/ecommerce/variant_values.rb +71 -69
  89. data/lib/user/helpers/helpers.rb +104 -101
  90. data/lib/user/helpers/object_activities.rb +80 -78
  91. data/lib/user/helpers/object_folders.rb +78 -76
  92. data/lib/user/helpers/user_folders.rb +79 -77
  93. data/lib/user/marketing/marketing.rb +116 -113
  94. data/lib/user/profile/profile.rb +96 -103
  95. data/lib/user.rb +32 -41
  96. metadata +50 -43
  97. data/lib/user/config/importers.rb +0 -184
@@ -1,169 +1,171 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Locations
2
- ##
3
- # == Locations
4
- #
4
+ ##
5
+ # == Locations
6
+ #
7
+
8
+ # === Get locations.
9
+ # Get a collection of locations.
10
+ #
11
+ # ==== Parameters
12
+ # use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
13
+ #
14
+ # ==== First Example
15
+ # @data = @mints_user.get_locations
16
+ #
17
+ # ==== Second Example
18
+ # options = {
19
+ # fields: 'id, title'
20
+ # }
21
+ # @data = @mints_user.get_locations(options)
22
+ def get_locations(options = nil, use_post = true)
23
+ get_query_results('/ecommerce/locations', options, use_post)
24
+ end
25
+
26
+ # === Get location.
27
+ # Get a location info.
28
+ #
29
+ # ==== Parameters
30
+ # id:: (Integer) -- Location id.
31
+ #
32
+ # ==== Example
33
+ # @data = @mints_user.get_location(2)
34
+ def get_location(id)
35
+ @client.raw('get', "/ecommerce/locations/#{id}")
36
+ end
37
+
38
+ # === Create location.
39
+ # Create a location with data.
40
+ #
41
+ # ==== Parameters
42
+ # data:: (Hash) -- Data to be submitted.
43
+ #
44
+ # ==== Example
45
+ # data = {
46
+ # title: 'New Location',
47
+ # location_template_id: 1
48
+ # }
49
+ # @data = @mints_user.create_location(data)
50
+ def create_location(data, options = nil)
51
+ @client.raw('post', '/ecommerce/locations', options, data_transform(data))
52
+ end
53
+
54
+ # === Update location.
55
+ # Update a location info.
56
+ #
57
+ # ==== Parameters
58
+ # id:: (Integer) -- Location id.
59
+ # data:: (Hash) -- Data to be submitted.
60
+ #
61
+ # ==== Example
62
+ # data = {
63
+ # title: 'New Location Modified'
64
+ # }
65
+ # @data = @mints_user.update_location(5, data.to_json)
66
+ def update_location(id, data, options = nil)
67
+ @client.raw('put', "/ecommerce/locations/#{id}", options, data)
68
+ end
5
69
 
6
- # === Get locations.
7
- # Get a collection of locations.
8
- #
9
- # ==== Parameters
10
- # use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
11
- #
12
- # ==== First Example
13
- # @data = @mints_user.get_locations
14
- #
15
- # ==== Second Example
16
- # options = {
17
- # "fields": "id, title"
18
- # }
19
- # @data = @mints_user.get_locations(options)
20
- def get_locations(options = nil, use_post = true)
21
- return get_query_results("/ecommerce/locations", options, use_post)
22
- end
23
-
24
- # === Get location.
25
- # Get a location info.
26
- #
27
- # ==== Parameters
28
- # id:: (Integer) -- Location id.
29
- #
30
- # ==== Example
31
- # @data = @mints_user.get_location(2)
32
- def get_location(id)
33
- @client.raw("get", "/ecommerce/locations/#{id}")
34
- end
70
+ # === Delete location.
71
+ # Delete a location.
72
+ #
73
+ # ==== Parameters
74
+ # id:: (Integer) -- Location id.
75
+ #
76
+ # ==== Example
77
+ # @data = @mints_user.delete_location(5)
78
+ def delete_location(id)
79
+ @client.raw('delete', "/ecommerce/locations/#{id}")
80
+ end
35
81
 
36
- # === Create location.
37
- # Create a location with data.
38
- #
39
- # ==== Parameters
40
- # data:: (Hash) -- Data to be submitted.
41
- #
42
- # ==== Example
43
- # data = {
44
- # "title": "New Location",
45
- # "location_template_id": 1
46
- # }
47
- # @data = @mints_user.create_location(data)
48
- def create_location(data, options = nil)
49
- @client.raw("post", "/ecommerce/locations", options, data_transform(data))
50
- end
82
+ ##
83
+ # == Locations Templates
84
+ #
51
85
 
52
- # === Update location.
53
- # Update a location info.
54
- #
55
- # ==== Parameters
56
- # id:: (Integer) -- Location id.
57
- # data:: (Hash) -- Data to be submitted.
58
- #
59
- # ==== Example
60
- # data = {
61
- # "title": "New Location Modified"
62
- # }
63
- # @data = @mints_user.update_location(5, data.to_json)
64
- def update_location(id, data, options = nil)
65
- @client.raw("put", "/ecommerce/locations/#{id}", options, data)
66
- end
86
+ # === Get location template support data.
87
+ # Get support data used in a location template.
88
+ #
89
+ # ==== Parameters
90
+ # id:: (Integer) -- Location template id.
91
+ #
92
+ # ==== Example
93
+ # @data = @mints_user.get_location_template_support_data(1)
94
+ def get_location_template_support_data(id)
95
+ @client.raw('get', "/ecommerce/location-templates/#{id}/support-data")
96
+ end
67
97
 
68
- # === Delete location.
69
- # Delete a location.
70
- #
71
- # ==== Parameters
72
- # id:: (Integer) -- Location id.
73
- #
74
- # ==== Example
75
- # @data = @mints_user.delete_location(5)
76
- def delete_location(id)
77
- @client.raw("delete", "/ecommerce/locations/#{id}")
78
- end
98
+ # === Get location templates support data.
99
+ # Get support data used in location templates.
100
+ #
101
+ # ==== Example
102
+ # @data = @mints_user.get_location_templates_support_data
103
+ def get_location_templates_support_data
104
+ @client.raw('get', '/ecommerce/location-templates/support-data')
105
+ end
79
106
 
80
- ##
81
- # == Locations Templates
82
- #
107
+ # === Get location templates.
108
+ # Get a collection of location templates.
109
+ #
110
+ # ==== Parameters
111
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
112
+ #
113
+ # ==== First Example
114
+ # @data = @mints_user.get_location_templates
115
+ #
116
+ # ==== Second Example
117
+ # options = { fields: 'title' }
118
+ # @data = @mints_user.get_location_templates(options)
119
+ def get_location_templates(options = nil)
120
+ @client.raw('get', '/ecommerce/location-templates', options)
121
+ end
83
122
 
84
- # === Get location template support data.
85
- # Get support data used in a location template.
86
- #
87
- # ==== Parameters
88
- # id:: (Integer) -- Location template id.
89
- #
90
- # ==== Example
91
- # @data = @mints_user.get_location_template_support_data(1)
92
- def get_location_template_support_data(id)
93
- @client.raw("get", "/ecommerce/location-templates/#{id}/support-data")
94
- end
95
-
96
- # === Get location templates support data.
97
- # Get support data used in location templates.
98
- #
99
- # ==== Example
100
- # @data = @mints_user.get_location_templates_support_data
101
- def get_location_templates_support_data
102
- @client.raw("get", "/ecommerce/location-templates/support-data")
103
- end
123
+ # === Get location template.
124
+ # Get a location template info.
125
+ #
126
+ # ==== Parameters
127
+ # id:: (Integer) -- Location template id.
128
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
129
+ #
130
+ # ==== First Example
131
+ # @data = @mints_user.get_location_template(1)
132
+ #
133
+ # ==== Second Example
134
+ # options = { fields: 'title' }
135
+ # @data = @mints_user.get_location_template(1, options)
136
+ def get_location_template(id, options = nil)
137
+ @client.raw('get', "/ecommerce/location-templates/#{id}", options)
138
+ end
104
139
 
105
- # === Get location templates.
106
- # Get a collection of location templates.
107
- #
108
- # ==== Parameters
109
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
110
- #
111
- # ==== First Example
112
- # @data = @mints_user.get_location_templates
113
- #
114
- # ==== Second Example
115
- # options = { "fields": "title" }
116
- # @data = @mints_user.get_location_templates(options)
117
- def get_location_templates(options = nil)
118
- @client.raw("get", "/ecommerce/location-templates", options)
119
- end
140
+ # === Create location template.
141
+ # Create a location template with data.
142
+ #
143
+ # ==== Parameters
144
+ # data:: (Hash) -- Data to be submitted.
145
+ #
146
+ # ==== Example
147
+ # data = {
148
+ # title: 'New Location Template',
149
+ # slug: 'new-location-template'
150
+ # }
151
+ # @data = @mints_user.create_location_template(data)
152
+ def create_location_template(data)
153
+ @client.raw('post', '/ecommerce/location-templates', nil, data_transform(data))
154
+ end
120
155
 
121
- # === Get location template.
122
- # Get a location template info.
123
- #
124
- # ==== Parameters
125
- # id:: (Integer) -- Location template id.
126
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
127
- #
128
- # ==== First Example
129
- # @data = @mints_user.get_location_template(1)
130
- #
131
- # ==== Second Example
132
- # options = { "fields": "title" }
133
- # @data = @mints_user.get_location_template(1, options)
134
- def get_location_template(id, options = nil)
135
- @client.raw("get", "/ecommerce/location-templates/#{id}", options)
136
- end
137
-
138
- # === Create location template.
139
- # Create a location template with data.
140
- #
141
- # ==== Parameters
142
- # data:: (Hash) -- Data to be submitted.
143
- #
144
- # ==== Example
145
- # data = {
146
- # "title": "New Location Template",
147
- # "slug": "new-location-template"
148
- # }
149
- # @data = @mints_user.create_location_template(data)
150
- def create_location_template(data)
151
- @client.raw("post", "/ecommerce/location-templates", nil, data_transform(data))
152
- end
153
-
154
- # === Update location template.
155
- # Update a location template info.
156
- #
157
- # ==== Parameters
158
- # id:: (Integer) -- Location template id.
159
- # data:: (Hash) -- Data to be submitted.
160
- #
161
- # ==== Example
162
- # data = {
163
- # "title": "New Location Template Modified"
164
- # }
165
- # @data = @mints_user.update_location_template(3, data)
166
- def update_location_template(id, data)
167
- @client.raw("put", "/ecommerce/location-templates/#{id}", nil, data_transform(data))
168
- end
169
- end
156
+ # === Update location template.
157
+ # Update a location template info.
158
+ #
159
+ # ==== Parameters
160
+ # id:: (Integer) -- Location template id.
161
+ # data:: (Hash) -- Data to be submitted.
162
+ #
163
+ # ==== Example
164
+ # data = {
165
+ # title: 'New Location Template Modified'
166
+ # }
167
+ # @data = @mints_user.update_location_template(3, data)
168
+ def update_location_template(id, data)
169
+ @client.raw('put', "/ecommerce/location-templates/#{id}", nil, data_transform(data))
170
+ end
171
+ end
@@ -1,110 +1,114 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OrderItemsGroups
2
- ##
3
- # == Order Items Groups
4
- #
4
+ ##
5
+ # == Order Items Groups
6
+ #
7
+
8
+ # === Get pending order template from order item group.
9
+ # Get a pending order template from an order item group.
10
+ #
11
+ # ==== Parameters
12
+ # parent_order_id:: (Integer) -- Order items group id.
13
+ # order_template_id:: (Integer) -- Order template id.
14
+ #
15
+ # ==== Example
16
+ # @data = @mints_user.get_pending_order_template_from_order_item_group(1, 1)
17
+ def get_pending_order_template_from_order_item_group(parent_order_id, order_template_id)
18
+ url = "/ecommerce/order-items-groups/#{parent_order_id}/pending-items/order-template/#{order_template_id}"
19
+ @client.raw('get', url)
20
+ end
21
+
22
+ # === Get order item group support data by order id.
23
+ # Get support data of an order item group by an order id.
24
+ #
25
+ # ==== Parameters
26
+ # order_id:: (Integer) -- Order id.
27
+ #
28
+ # ==== Example
29
+ # @data = @mints_user.get_order_item_group_support_data_by_order_id(1)
30
+ def get_order_item_group_support_data_by_order_id(order_id)
31
+ # FIXME: Return in OrderItemsGroupController.getTemplateSupportDataByOrderId method doesnt create data variable.
32
+ @client.raw('get', "/ecommerce/order-items-groups/support-data/#{order_id}")
33
+ end
34
+
35
+ # === Get order item groups.
36
+ # Get a collection of order item groups.
37
+ #
38
+ # ==== Parameters
39
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
40
+ #
41
+ # ==== First Example
42
+ # @data = @mints_user.get_order_item_groups
43
+ #
44
+ # ==== Second Example
45
+ # options = { fields: 'name' }
46
+ # @data = @mints_user.get_order_item_groups(options)
47
+ def get_order_item_groups(options = nil)
48
+ @client.raw('get', '/ecommerce/order-items-groups', options)
49
+ end
50
+
51
+ # === Get order item group.
52
+ # Get a order item group info.
53
+ #
54
+ # ==== Parameters
55
+ # id:: (Integer) -- Order item group id.
56
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
57
+ #
58
+ # ==== First Example
59
+ # @data = @mints_user.get_order_item_group(1)
60
+ #
61
+ # ==== Second Example
62
+ # options = { fields: 'name' }
63
+ # @data = @mints_user.get_order_item_group(1, options)
64
+ def get_order_item_group(id, options = nil)
65
+ @client.raw('get', "/ecommerce/order-items-groups/#{id}", options)
66
+ end
5
67
 
6
- # === Get pending order template from order item group.
7
- # Get a pending order template from an order item group.
8
- #
9
- # ==== Parameters
10
- # parent_order_id:: (Integer) -- Order items group id.
11
- # order_template_id:: (Integer) -- Order template id.
12
- #
13
- # ==== Example
14
- # @data = @mints_user.get_pending_order_template_from_order_item_group(1, 1)
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
- end
18
-
19
- # === Get order item group support data by order id.
20
- # Get support data of an order item group by an order id.
21
- #
22
- # ==== Parameters
23
- # order_id:: (Integer) -- Order id.
24
- #
25
- # ==== Example
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(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
- end
68
+ # === Create order item group.
69
+ # Create a order item group with data.
70
+ #
71
+ # ==== Parameters
72
+ # data:: (Hash) -- Data to be submitted.
73
+ #
74
+ # ==== Example
75
+ # data = {
76
+ # name: 'New Order Item Group',
77
+ # order_id: 1,
78
+ # quantity: 1,
79
+ # sale_price: 200
80
+ # }
81
+ # options = { include: 'orderItems' }
82
+ # @data = @mints_user.create_order_item_group(data, options)
83
+ def create_order_item_group(data, options = nil)
84
+ @client.raw('post', '/ecommerce/order-items-groups', options, data_transform(data))
85
+ end
30
86
 
31
- # === Get order item groups.
32
- # Get a collection of order item groups.
33
- #
34
- # ==== Parameters
35
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
36
- #
37
- # ==== First Example
38
- # @data = @mints_user.get_order_item_groups
39
- #
40
- # ==== Second Example
41
- # options = { "fields": "name" }
42
- # @data = @mints_user.get_order_item_groups(options)
43
- def get_order_item_groups(options = nil)
44
- @client.raw("get", "/ecommerce/order-items-groups", options)
45
- end
87
+ # === Update order item group.
88
+ # Update a order item group info.
89
+ #
90
+ # ==== Parameters
91
+ # id:: (Integer) -- Order item group id.
92
+ # data:: (Hash) -- Data to be submitted.
93
+ #
94
+ # ==== Example
95
+ # data = {
96
+ # name: 'New Order Item Group Modified'
97
+ # }
98
+ # @data = @mints_user.update_order_item_group(147, data)
99
+ def update_order_item_group(id, data)
100
+ @client.raw('put', "/ecommerce/order-items-groups/#{id}", nil, data_transform(data))
101
+ end
46
102
 
47
- # === Get order item group.
48
- # Get a order item group info.
49
- #
50
- # ==== Parameters
51
- # id:: (Integer) -- Order item group id.
52
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
53
- #
54
- # ==== First Example
55
- # @data = @mints_user.get_order_item_group(1)
56
- #
57
- # ==== Second Example
58
- # options = { "fields": "name" }
59
- # @data = @mints_user.get_order_item_group(1, options)
60
- def get_order_item_group(id, options = nil)
61
- @client.raw("get", "/ecommerce/order-items-groups/#{id}", options)
62
- end
63
-
64
- # === Create order item group.
65
- # Create a order item group with data.
66
- #
67
- # ==== Parameters
68
- # data:: (Hash) -- Data to be submitted.
69
- #
70
- # ==== Example
71
- # data = {
72
- # "name": "New Order Item Group",
73
- # "order_id": 1,
74
- # "quantity": 1,
75
- # "sale_price": 200
76
- # }
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))
81
- end
82
-
83
- # === Update order item group.
84
- # Update a order item group info.
85
- #
86
- # ==== Parameters
87
- # id:: (Integer) -- Order item group id.
88
- # data:: (Hash) -- Data to be submitted.
89
- #
90
- # ==== Example
91
- # data = {
92
- # "name": "New Order Item Group Modified"
93
- # }
94
- # @data = @mints_user.update_order_item_group(147, data)
95
- def update_order_item_group(id, data)
96
- @client.raw("put", "/ecommerce/order-items-groups/#{id}", nil, data_transform(data))
97
- end
98
-
99
- # === Delete order item group.
100
- # Delete a order item group.
101
- #
102
- # ==== Parameters
103
- # id:: (Integer) -- Order item group id.
104
- #
105
- # ==== Example
106
- # @data = @mints_user.delete_order_item_group(147)
107
- def delete_order_item_group(id)
108
- @client.raw("delete", "/ecommerce/order-items-groups/#{id}")
109
- end
110
- end
103
+ # === Delete order item group.
104
+ # Delete a order item group.
105
+ #
106
+ # ==== Parameters
107
+ # id:: (Integer) -- Order item group id.
108
+ #
109
+ # ==== Example
110
+ # @data = @mints_user.delete_order_item_group(147)
111
+ def delete_order_item_group(id)
112
+ @client.raw('delete', "/ecommerce/order-items-groups/#{id}")
113
+ end
114
+ end
@@ -1,26 +1,28 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OrderStatuses
2
- ##
3
- # == Order Statuses
4
- #
4
+ ##
5
+ # == Order Statuses
6
+ #
7
+
8
+ # === Get order statuses.
9
+ # Get order statuses.
10
+ #
11
+ # ==== First Example
12
+ # @data = @mints_user.get_order_statuses
13
+ def get_order_statuses
14
+ @client.raw('get', '/ecommerce/order-statuses')
15
+ end
5
16
 
6
- # === Get order statuses.
7
- # Get order statuses.
8
- #
9
- # ==== First Example
10
- # @data = @mints_user.get_order_statuses
11
- def get_order_statuses
12
- @client.raw("get", "/ecommerce/order-statuses")
13
- end
14
-
15
- # === Get order status.
16
- # Get status of an order.
17
- #
18
- # ==== Parameters
19
- # id:: (Integer) -- Order id.
20
- #
21
- # ==== First Example
22
- # @data = @mints_user.get_order_status(1)
23
- def get_order_status(id)
24
- @client.raw("get", "/ecommerce/order-statuses/#{id}")
25
- end
26
- end
17
+ # === Get order status.
18
+ # Get status of an order.
19
+ #
20
+ # ==== Parameters
21
+ # id:: (Integer) -- Order id.
22
+ #
23
+ # ==== First Example
24
+ # @data = @mints_user.get_order_status(1)
25
+ def get_order_status(id)
26
+ @client.raw('get', "/ecommerce/order-statuses/#{id}")
27
+ end
28
+ end