MailchimpMarketing 3.0.2 → 3.0.9

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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/MailchimpMarketing.gemspec +2 -2
  4. data/README.md +55 -46
  5. data/lib/MailchimpMarketing.rb +5 -6
  6. data/lib/MailchimpMarketing/api/activity_feed_api.rb +12 -73
  7. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +19 -119
  8. data/lib/MailchimpMarketing/api/automations_api.rb +129 -723
  9. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +32 -192
  10. data/lib/MailchimpMarketing/api/batches_api.rb +25 -154
  11. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +32 -192
  12. data/lib/MailchimpMarketing/api/campaigns_api.rb +143 -847
  13. data/lib/MailchimpMarketing/api/connected_sites_api.rb +31 -189
  14. data/lib/MailchimpMarketing/api/conversations_api.rb +35 -215
  15. data/lib/MailchimpMarketing/api/dashboard_api.rb +31 -233
  16. data/lib/MailchimpMarketing/api/ecommerce_api.rb +446 -2430
  17. data/lib/MailchimpMarketing/api/external_auths_api.rb +19 -119
  18. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +15 -87
  19. data/lib/MailchimpMarketing/api/file_manager_api.rb +70 -435
  20. data/lib/MailchimpMarketing/api/landing_pages_api.rb +50 -302
  21. data/lib/MailchimpMarketing/api/lists_api.rb +746 -3034
  22. data/lib/MailchimpMarketing/api/ping_api.rb +6 -35
  23. data/lib/MailchimpMarketing/api/postcards_api.rb +8 -43
  24. data/lib/MailchimpMarketing/api/reporting_api.rb +40 -249
  25. data/lib/MailchimpMarketing/api/reports_api.rb +152 -947
  26. data/lib/MailchimpMarketing/api/root_api.rb +6 -39
  27. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +7 -41
  28. data/lib/MailchimpMarketing/api/search_members_api.rb +7 -43
  29. data/lib/MailchimpMarketing/api/template_folders_api.rb +32 -192
  30. data/lib/MailchimpMarketing/api/templates_api.rb +39 -246
  31. data/lib/MailchimpMarketing/api/verified_domains_api.rb +31 -180
  32. data/lib/MailchimpMarketing/api_client.rb +34 -157
  33. data/lib/MailchimpMarketing/api_error.rb +1 -1
  34. data/lib/MailchimpMarketing/configuration.rb +1 -1
  35. data/lib/MailchimpMarketing/version.rb +2 -2
  36. metadata +5 -11
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.2
6
+ OpenAPI spec version: 3.0.9
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -19,298 +19,96 @@ module MailchimpMarketing
19
19
  def initialize(api_client)
20
20
  @api_client = api_client
21
21
  end
22
- # Dashboard Onboarding Ads
23
- # Get all the onboarding ads info for the mobile dashboard
24
- # @param [Hash] opts the optional parameters
25
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
26
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
27
- # @option opts [String] :platform Restrict results to ads compatible with the given platform. Default is ios
28
- # @option opts [Integer] :num Restrict results to this number of ads (if we have that many. Default is 3.
29
- # @return [OnboardingAds]
30
- def ads(opts = {})
31
- data, _status_code, _headers = ads_with_http_info(opts)
32
- data
33
- end
34
22
 
35
- # Dashboard Onboarding Ads
36
- # Get all the onboarding ads info for the mobile dashboard
37
- # @param [Hash] opts the optional parameters
38
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
39
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
40
- # @option opts [String] :platform Restrict results to ads compatible with the given platform. Default is ios
41
- # @option opts [Integer] :num Restrict results to this number of ads (if we have that many. Default is 3.
42
- # @return [Array<(OnboardingAds, Fixnum, Hash)>] OnboardingAds data, response status code and response headers
43
- def ads_with_http_info(opts = {})
44
- # resource path
45
- local_var_path = '/dashboard/ads'
23
+ # List dashboard ads
24
+ def ads(opts = {})
46
25
 
47
- # query parameters
48
26
  query_params = {}
49
27
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
50
28
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
51
29
  query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
52
30
  query_params[:'num'] = opts[:'num'] if !opts[:'num'].nil?
53
-
54
- # header parameters
55
- header_params = {}
56
- # HTTP header 'Accept' (if needed)
57
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
58
- # HTTP header 'Content-Type'
59
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
60
-
61
- # form parameters
62
- form_params = {}
63
-
64
- # http body (model)
65
31
  post_body = nil
66
- auth_names = ['basicAuth']
32
+
33
+ local_var_path = '/dashboard/ads'
67
34
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
68
- :header_params => header_params,
69
35
  :query_params => query_params,
70
- :form_params => form_params,
71
- :body => post_body,
72
- :auth_names => auth_names,
73
- :return_type => 'OnboardingAds')
36
+ :body => post_body)
74
37
  return data, status_code, headers
75
38
  end
76
- # Dashboard Audiences
77
- # Get all the audiences info for the mobile dashboard
78
- # @param [Hash] opts the optional parameters
79
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
80
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
81
- # @return [Audiences]
82
- def audiences(opts = {})
83
- data, _status_code, _headers = audiences_with_http_info(opts)
84
- data
85
- end
86
39
 
87
- # Dashboard Audiences
88
- # Get all the audiences info for the mobile dashboard
89
- # @param [Hash] opts the optional parameters
90
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
91
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
92
- # @return [Array<(Audiences, Fixnum, Hash)>] Audiences data, response status code and response headers
93
- def audiences_with_http_info(opts = {})
94
- # resource path
95
- local_var_path = '/dashboard/audiences'
40
+ # List dashboard audiences
41
+ def audiences(opts = {})
96
42
 
97
- # query parameters
98
43
  query_params = {}
99
44
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
100
45
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
101
-
102
- # header parameters
103
- header_params = {}
104
- # HTTP header 'Accept' (if needed)
105
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
106
- # HTTP header 'Content-Type'
107
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
108
-
109
- # form parameters
110
- form_params = {}
111
-
112
- # http body (model)
113
46
  post_body = nil
114
- auth_names = ['basicAuth']
47
+
48
+ local_var_path = '/dashboard/audiences'
115
49
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
116
- :header_params => header_params,
117
50
  :query_params => query_params,
118
- :form_params => form_params,
119
- :body => post_body,
120
- :auth_names => auth_names,
121
- :return_type => 'Audiences')
51
+ :body => post_body)
122
52
  return data, status_code, headers
123
53
  end
124
- # Dashboard Charts
125
- # Get info about which dashboard charts to show for this user
126
- # @param [Hash] opts the optional parameters
127
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
128
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
129
- # @return [Charts]
130
- def charts(opts = {})
131
- data, _status_code, _headers = charts_with_http_info(opts)
132
- data
133
- end
134
54
 
135
- # Dashboard Charts
136
- # Get info about which dashboard charts to show for this user
137
- # @param [Hash] opts the optional parameters
138
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
139
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
140
- # @return [Array<(Charts, Fixnum, Hash)>] Charts data, response status code and response headers
141
- def charts_with_http_info(opts = {})
142
- # resource path
143
- local_var_path = '/dashboard/charts'
55
+ # List dashboard charts
56
+ def charts(opts = {})
144
57
 
145
- # query parameters
146
58
  query_params = {}
147
59
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
148
60
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
149
-
150
- # header parameters
151
- header_params = {}
152
- # HTTP header 'Accept' (if needed)
153
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
154
- # HTTP header 'Content-Type'
155
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
156
-
157
- # form parameters
158
- form_params = {}
159
-
160
- # http body (model)
161
61
  post_body = nil
162
- auth_names = ['basicAuth']
62
+
63
+ local_var_path = '/dashboard/charts'
163
64
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
164
- :header_params => header_params,
165
65
  :query_params => query_params,
166
- :form_params => form_params,
167
- :body => post_body,
168
- :auth_names => auth_names,
169
- :return_type => 'Charts')
66
+ :body => post_body)
170
67
  return data, status_code, headers
171
68
  end
172
- # Dashboard Ecommerce
173
- # Get all the ecommerce info for the mobile dashboard
174
- # @param [Hash] opts the optional parameters
175
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
176
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
177
- # @return [Ecommerce]
178
- def ecommerce(opts = {})
179
- data, _status_code, _headers = ecommerce_with_http_info(opts)
180
- data
181
- end
182
69
 
183
- # Dashboard Ecommerce
184
- # Get all the ecommerce info for the mobile dashboard
185
- # @param [Hash] opts the optional parameters
186
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
187
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
188
- # @return [Array<(Ecommerce, Fixnum, Hash)>] Ecommerce data, response status code and response headers
189
- def ecommerce_with_http_info(opts = {})
190
- # resource path
191
- local_var_path = '/dashboard/ecommerce'
70
+ # List dashboard ecommerce info
71
+ def ecommerce(opts = {})
192
72
 
193
- # query parameters
194
73
  query_params = {}
195
74
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
196
75
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
197
-
198
- # header parameters
199
- header_params = {}
200
- # HTTP header 'Accept' (if needed)
201
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
202
- # HTTP header 'Content-Type'
203
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
204
-
205
- # form parameters
206
- form_params = {}
207
-
208
- # http body (model)
209
76
  post_body = nil
210
- auth_names = ['basicAuth']
77
+
78
+ local_var_path = '/dashboard/ecommerce'
211
79
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
212
- :header_params => header_params,
213
80
  :query_params => query_params,
214
- :form_params => form_params,
215
- :body => post_body,
216
- :auth_names => auth_names,
217
- :return_type => 'Ecommerce')
81
+ :body => post_body)
218
82
  return data, status_code, headers
219
83
  end
220
- # Dashboard Engagement
221
- # Get all the engagement info for the mobile dashboard
222
- # @param [Hash] opts the optional parameters
223
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
224
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
225
- # @return [DataAboutEngagement]
226
- def engagement(opts = {})
227
- data, _status_code, _headers = engagement_with_http_info(opts)
228
- data
229
- end
230
84
 
231
- # Dashboard Engagement
232
- # Get all the engagement info for the mobile dashboard
233
- # @param [Hash] opts the optional parameters
234
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
235
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
236
- # @return [Array<(DataAboutEngagement, Fixnum, Hash)>] DataAboutEngagement data, response status code and response headers
237
- def engagement_with_http_info(opts = {})
238
- # resource path
239
- local_var_path = '/dashboard/engagement'
85
+ # List dashboard engagement info
86
+ def engagement(opts = {})
240
87
 
241
- # query parameters
242
88
  query_params = {}
243
89
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
244
90
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
245
-
246
- # header parameters
247
- header_params = {}
248
- # HTTP header 'Accept' (if needed)
249
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
250
- # HTTP header 'Content-Type'
251
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
252
-
253
- # form parameters
254
- form_params = {}
255
-
256
- # http body (model)
257
91
  post_body = nil
258
- auth_names = ['basicAuth']
92
+
93
+ local_var_path = '/dashboard/engagement'
259
94
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
260
- :header_params => header_params,
261
95
  :query_params => query_params,
262
- :form_params => form_params,
263
- :body => post_body,
264
- :auth_names => auth_names,
265
- :return_type => 'DataAboutEngagement')
96
+ :body => post_body)
266
97
  return data, status_code, headers
267
98
  end
268
- # Dashboard Homepage
269
- # Get all the metrics for the Homepage
270
- # @param [Hash] opts the optional parameters
271
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
272
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
273
- # @return [DataForHomepage]
274
- def homepage(opts = {})
275
- data, _status_code, _headers = homepage_with_http_info(opts)
276
- data
277
- end
278
99
 
279
- # Dashboard Homepage
280
- # Get all the metrics for the Homepage
281
- # @param [Hash] opts the optional parameters
282
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
283
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
284
- # @return [Array<(DataForHomepage, Fixnum, Hash)>] DataForHomepage data, response status code and response headers
285
- def homepage_with_http_info(opts = {})
286
- # resource path
287
- local_var_path = '/dashboard/homepage'
100
+ # List dashboard homepage metrics
101
+ def homepage(opts = {})
288
102
 
289
- # query parameters
290
103
  query_params = {}
291
104
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
292
105
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
293
-
294
- # header parameters
295
- header_params = {}
296
- # HTTP header 'Accept' (if needed)
297
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
298
- # HTTP header 'Content-Type'
299
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
300
-
301
- # form parameters
302
- form_params = {}
303
-
304
- # http body (model)
305
106
  post_body = nil
306
- auth_names = ['basicAuth']
107
+
108
+ local_var_path = '/dashboard/homepage'
307
109
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
308
- :header_params => header_params,
309
110
  :query_params => query_params,
310
- :form_params => form_params,
311
- :body => post_body,
312
- :auth_names => auth_names,
313
- :return_type => 'DataForHomepage')
111
+ :body => post_body)
314
112
  return data, status_code, headers
315
113
  end
316
114
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.2
6
+ OpenAPI spec version: 3.0.9
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -19,585 +19,193 @@ module MailchimpMarketing
19
19
  def initialize(api_client)
20
20
  @api_client = api_client
21
21
  end
22
- # Delete a store
23
- # Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts.
24
- # @param store_id The store id.
25
- # @param [Hash] opts the optional parameters
26
- # @return [nil]
27
- def delete_store(store_id = {}, opts = {})
28
- delete_store_with_http_info(store_id, opts)
29
- nil
30
- end
31
22
 
32
- # Delete a store
33
- # Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts.
34
- # @param store_id The store id.
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
37
- def delete_store_with_http_info(store_id, opts = {})
38
- # resource path
39
- local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s)
23
+ # Delete store
24
+ def delete_store(store_id, opts = {})
25
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
40
26
 
41
- # query parameters
42
27
  query_params = {}
43
-
44
- # header parameters
45
- header_params = {}
46
- # HTTP header 'Accept' (if needed)
47
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
48
- # HTTP header 'Content-Type'
49
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
50
-
51
- # form parameters
52
- form_params = {}
53
-
54
- # http body (model)
55
28
  post_body = nil
56
- auth_names = ['basicAuth']
29
+
30
+ local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s)
57
31
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
58
- :header_params => header_params,
59
32
  :query_params => query_params,
60
- :form_params => form_params,
61
- :body => post_body,
62
- :auth_names => auth_names)
33
+ :body => post_body)
63
34
  return data, status_code, headers
64
35
  end
65
- # Delete a cart
66
- # Delete a cart.
67
- # @param store_id The store id.
68
- # @param cart_id The id for the cart.
69
- # @param [Hash] opts the optional parameters
70
- # @return [nil]
71
- def delete_store_cart(store_id = {}, cart_id = {}, opts = {})
72
- delete_store_cart_with_http_info(store_id, cart_id, opts)
73
- nil
74
- end
75
36
 
76
- # Delete a cart
77
- # Delete a cart.
78
- # @param store_id The store id.
79
- # @param cart_id The id for the cart.
80
- # @param [Hash] opts the optional parameters
81
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
82
- def delete_store_cart_with_http_info(store_id, cart_id, opts = {})
83
- # resource path
84
- local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
37
+ # Delete cart
38
+ def delete_store_cart(store_id, cart_id, opts = {})
39
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
40
+ fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
85
41
 
86
- # query parameters
87
42
  query_params = {}
88
-
89
- # header parameters
90
- header_params = {}
91
- # HTTP header 'Accept' (if needed)
92
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
93
- # HTTP header 'Content-Type'
94
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
95
-
96
- # form parameters
97
- form_params = {}
98
-
99
- # http body (model)
100
43
  post_body = nil
101
- auth_names = ['basicAuth']
44
+
45
+ local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
102
46
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
103
- :header_params => header_params,
104
47
  :query_params => query_params,
105
- :form_params => form_params,
106
- :body => post_body,
107
- :auth_names => auth_names)
48
+ :body => post_body)
108
49
  return data, status_code, headers
109
50
  end
110
- # Delete a specific cart line item
111
- # Delete a specific cart line item.
112
- # @param store_id The store id.
113
- # @param cart_id The id for the cart.
114
- # @param line_id The id for the line item of a cart.
115
- # @param [Hash] opts the optional parameters
116
- # @return [nil]
117
- def delete_cart_line_item(store_id = {}, cart_id = {}, line_id = {}, opts = {})
118
- delete_cart_line_item_with_http_info(store_id, cart_id, line_id, opts)
119
- nil
120
- end
121
51
 
122
- # Delete a specific cart line item
123
- # Delete a specific cart line item.
124
- # @param store_id The store id.
125
- # @param cart_id The id for the cart.
126
- # @param line_id The id for the line item of a cart.
127
- # @param [Hash] opts the optional parameters
128
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
129
- def delete_cart_line_item_with_http_info(store_id, cart_id, line_id, opts = {})
130
- # resource path
131
- local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
52
+ # Delete cart line item
53
+ def delete_cart_line_item(store_id, cart_id, line_id, opts = {})
54
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
55
+ fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
56
+ fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
132
57
 
133
- # query parameters
134
58
  query_params = {}
135
-
136
- # header parameters
137
- header_params = {}
138
- # HTTP header 'Accept' (if needed)
139
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
140
- # HTTP header 'Content-Type'
141
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
142
-
143
- # form parameters
144
- form_params = {}
145
-
146
- # http body (model)
147
59
  post_body = nil
148
- auth_names = ['basicAuth']
60
+
61
+ local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
149
62
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
150
- :header_params => header_params,
151
63
  :query_params => query_params,
152
- :form_params => form_params,
153
- :body => post_body,
154
- :auth_names => auth_names)
64
+ :body => post_body)
155
65
  return data, status_code, headers
156
66
  end
157
- # Delete a customer
158
- # Delete a customer from a store.
159
- # @param store_id The store id.
160
- # @param customer_id The id for the customer of a store.
161
- # @param [Hash] opts the optional parameters
162
- # @return [nil]
163
- def delete_store_customer(store_id = {}, customer_id = {}, opts = {})
164
- delete_store_customer_with_http_info(store_id, customer_id, opts)
165
- nil
166
- end
167
67
 
168
- # Delete a customer
169
- # Delete a customer from a store.
170
- # @param store_id The store id.
171
- # @param customer_id The id for the customer of a store.
172
- # @param [Hash] opts the optional parameters
173
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
174
- def delete_store_customer_with_http_info(store_id, customer_id, opts = {})
175
- # resource path
176
- local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
68
+ # Delete customer
69
+ def delete_store_customer(store_id, customer_id, opts = {})
70
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
71
+ fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil?
177
72
 
178
- # query parameters
179
73
  query_params = {}
180
-
181
- # header parameters
182
- header_params = {}
183
- # HTTP header 'Accept' (if needed)
184
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
185
- # HTTP header 'Content-Type'
186
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
187
-
188
- # form parameters
189
- form_params = {}
190
-
191
- # http body (model)
192
74
  post_body = nil
193
- auth_names = ['basicAuth']
75
+
76
+ local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
194
77
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
195
- :header_params => header_params,
196
78
  :query_params => query_params,
197
- :form_params => form_params,
198
- :body => post_body,
199
- :auth_names => auth_names)
79
+ :body => post_body)
200
80
  return data, status_code, headers
201
81
  end
202
- # Delete an order
203
- # Delete an order.
204
- # @param store_id The store id.
205
- # @param order_id The id for the order in a store.
206
- # @param [Hash] opts the optional parameters
207
- # @return [nil]
208
- def delete_order(store_id = {}, order_id = {}, opts = {})
209
- delete_order_with_http_info(store_id, order_id, opts)
210
- nil
211
- end
212
82
 
213
- # Delete an order
214
- # Delete an order.
215
- # @param store_id The store id.
216
- # @param order_id The id for the order in a store.
217
- # @param [Hash] opts the optional parameters
218
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
219
- def delete_order_with_http_info(store_id, order_id, opts = {})
220
- # resource path
221
- local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
83
+ # Delete order
84
+ def delete_order(store_id, order_id, opts = {})
85
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
86
+ fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
222
87
 
223
- # query parameters
224
88
  query_params = {}
225
-
226
- # header parameters
227
- header_params = {}
228
- # HTTP header 'Accept' (if needed)
229
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
230
- # HTTP header 'Content-Type'
231
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
232
-
233
- # form parameters
234
- form_params = {}
235
-
236
- # http body (model)
237
89
  post_body = nil
238
- auth_names = ['basicAuth']
90
+
91
+ local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
239
92
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
240
- :header_params => header_params,
241
93
  :query_params => query_params,
242
- :form_params => form_params,
243
- :body => post_body,
244
- :auth_names => auth_names)
94
+ :body => post_body)
245
95
  return data, status_code, headers
246
96
  end
247
- # Delete a specific order line item
248
- # Delete a specific order line item.
249
- # @param store_id The store id.
250
- # @param order_id The id for the order in a store.
251
- # @param line_id The id for the line item of an order.
252
- # @param [Hash] opts the optional parameters
253
- # @return [nil]
254
- def delete_order_line_item(store_id = {}, order_id = {}, line_id = {}, opts = {})
255
- delete_order_line_item_with_http_info(store_id, order_id, line_id, opts)
256
- nil
257
- end
258
97
 
259
- # Delete a specific order line item
260
- # Delete a specific order line item.
261
- # @param store_id The store id.
262
- # @param order_id The id for the order in a store.
263
- # @param line_id The id for the line item of an order.
264
- # @param [Hash] opts the optional parameters
265
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
266
- def delete_order_line_item_with_http_info(store_id, order_id, line_id, opts = {})
267
- # resource path
268
- local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
98
+ # Delete order line item
99
+ def delete_order_line_item(store_id, order_id, line_id, opts = {})
100
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
101
+ fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
102
+ fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
269
103
 
270
- # query parameters
271
104
  query_params = {}
272
-
273
- # header parameters
274
- header_params = {}
275
- # HTTP header 'Accept' (if needed)
276
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
277
- # HTTP header 'Content-Type'
278
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
279
-
280
- # form parameters
281
- form_params = {}
282
-
283
- # http body (model)
284
105
  post_body = nil
285
- auth_names = ['basicAuth']
106
+
107
+ local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
286
108
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
287
- :header_params => header_params,
288
109
  :query_params => query_params,
289
- :form_params => form_params,
290
- :body => post_body,
291
- :auth_names => auth_names)
110
+ :body => post_body)
292
111
  return data, status_code, headers
293
112
  end
294
- # Delete a product
295
- # Delete a product.
296
- # @param store_id The store id.
297
- # @param product_id The id for the product of a store.
298
- # @param [Hash] opts the optional parameters
299
- # @return [nil]
300
- def delete_store_product(store_id = {}, product_id = {}, opts = {})
301
- delete_store_product_with_http_info(store_id, product_id, opts)
302
- nil
303
- end
304
113
 
305
- # Delete a product
306
- # Delete a product.
307
- # @param store_id The store id.
308
- # @param product_id The id for the product of a store.
309
- # @param [Hash] opts the optional parameters
310
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
311
- def delete_store_product_with_http_info(store_id, product_id, opts = {})
312
- # resource path
313
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
114
+ # Delete product
115
+ def delete_store_product(store_id, product_id, opts = {})
116
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
117
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
314
118
 
315
- # query parameters
316
119
  query_params = {}
317
-
318
- # header parameters
319
- header_params = {}
320
- # HTTP header 'Accept' (if needed)
321
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
322
- # HTTP header 'Content-Type'
323
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
324
-
325
- # form parameters
326
- form_params = {}
327
-
328
- # http body (model)
329
120
  post_body = nil
330
- auth_names = ['basicAuth']
121
+
122
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
331
123
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
332
- :header_params => header_params,
333
124
  :query_params => query_params,
334
- :form_params => form_params,
335
- :body => post_body,
336
- :auth_names => auth_names)
125
+ :body => post_body)
337
126
  return data, status_code, headers
338
127
  end
339
- # Delete a product image
340
- # Delete a product image.
341
- # @param store_id The store id.
342
- # @param product_id The id for the product of a store.
343
- # @param image_id The id for the product image.
344
- # @param [Hash] opts the optional parameters
345
- # @return [nil]
346
- def delete_product_image(store_id = {}, product_id = {}, image_id = {}, opts = {})
347
- delete_product_image_with_http_info(store_id, product_id, image_id, opts)
348
- nil
349
- end
350
128
 
351
- # Delete a product image
352
- # Delete a product image.
353
- # @param store_id The store id.
354
- # @param product_id The id for the product of a store.
355
- # @param image_id The id for the product image.
356
- # @param [Hash] opts the optional parameters
357
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
358
- def delete_product_image_with_http_info(store_id, product_id, image_id, opts = {})
359
- # resource path
360
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'image_id' + '}', image_id.to_s)
129
+ # Delete product image
130
+ def delete_product_image(store_id, product_id, image_id, opts = {})
131
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
132
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
133
+ fail ArgumentError, "Missing required param: 'image_id'" if image_id.nil?
361
134
 
362
- # query parameters
363
135
  query_params = {}
364
-
365
- # header parameters
366
- header_params = {}
367
- # HTTP header 'Accept' (if needed)
368
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
369
- # HTTP header 'Content-Type'
370
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
371
-
372
- # form parameters
373
- form_params = {}
374
-
375
- # http body (model)
376
136
  post_body = nil
377
- auth_names = ['basicAuth']
137
+
138
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'image_id' + '}', image_id.to_s)
378
139
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
379
- :header_params => header_params,
380
140
  :query_params => query_params,
381
- :form_params => form_params,
382
- :body => post_body,
383
- :auth_names => auth_names)
141
+ :body => post_body)
384
142
  return data, status_code, headers
385
143
  end
386
- # Delete a product variant
387
- # Delete a product variant.
388
- # @param store_id The store id.
389
- # @param product_id The id for the product of a store.
390
- # @param variant_id The id for the product variant.
391
- # @param [Hash] opts the optional parameters
392
- # @return [nil]
393
- def delete_product_variant(store_id = {}, product_id = {}, variant_id = {}, opts = {})
394
- delete_product_variant_with_http_info(store_id, product_id, variant_id, opts)
395
- nil
396
- end
397
144
 
398
- # Delete a product variant
399
- # Delete a product variant.
400
- # @param store_id The store id.
401
- # @param product_id The id for the product of a store.
402
- # @param variant_id The id for the product variant.
403
- # @param [Hash] opts the optional parameters
404
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
405
- def delete_product_variant_with_http_info(store_id, product_id, variant_id, opts = {})
406
- # resource path
407
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s)
145
+ # Delete product variant
146
+ def delete_product_variant(store_id, product_id, variant_id, opts = {})
147
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
148
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
149
+ fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil?
408
150
 
409
- # query parameters
410
151
  query_params = {}
411
-
412
- # header parameters
413
- header_params = {}
414
- # HTTP header 'Accept' (if needed)
415
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
416
- # HTTP header 'Content-Type'
417
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
418
-
419
- # form parameters
420
- form_params = {}
421
-
422
- # http body (model)
423
152
  post_body = nil
424
- auth_names = ['basicAuth']
153
+
154
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s)
425
155
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
426
- :header_params => header_params,
427
156
  :query_params => query_params,
428
- :form_params => form_params,
429
- :body => post_body,
430
- :auth_names => auth_names)
157
+ :body => post_body)
431
158
  return data, status_code, headers
432
159
  end
433
- # Delete a promo code
434
- # Delete a promo code from a store.
435
- # @param store_id The store id.
436
- # @param promo_rule_id The id for the promo rule of a store.
437
- # @param promo_code_id The id for the promo code of a store.
438
- # @param [Hash] opts the optional parameters
439
- # @return [nil]
440
- def delete_promo_code(store_id = {}, promo_rule_id = {}, promo_code_id = {}, opts = {})
441
- delete_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, opts)
442
- nil
443
- end
444
160
 
445
- # Delete a promo code
446
- # Delete a promo code from a store.
447
- # @param store_id The store id.
448
- # @param promo_rule_id The id for the promo rule of a store.
449
- # @param promo_code_id The id for the promo code of a store.
450
- # @param [Hash] opts the optional parameters
451
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
452
- def delete_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, opts = {})
453
- # resource path
454
- local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'promo_code_id' + '}', promo_code_id.to_s)
161
+ # Delete promo code
162
+ def delete_promo_code(store_id, promo_rule_id, promo_code_id, opts = {})
163
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
164
+ fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
165
+ fail ArgumentError, "Missing required param: 'promo_code_id'" if promo_code_id.nil?
455
166
 
456
- # query parameters
457
167
  query_params = {}
458
-
459
- # header parameters
460
- header_params = {}
461
- # HTTP header 'Accept' (if needed)
462
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
463
- # HTTP header 'Content-Type'
464
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
465
-
466
- # form parameters
467
- form_params = {}
468
-
469
- # http body (model)
470
168
  post_body = nil
471
- auth_names = ['basicAuth']
169
+
170
+ local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'promo_code_id' + '}', promo_code_id.to_s)
472
171
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
473
- :header_params => header_params,
474
172
  :query_params => query_params,
475
- :form_params => form_params,
476
- :body => post_body,
477
- :auth_names => auth_names)
173
+ :body => post_body)
478
174
  return data, status_code, headers
479
175
  end
480
- # Delete a promo rule. Please note that when a promo rule is deleted, all the promo codes that share the deleted promo rule's id will be deleted.
481
- # Delete a promo rule from a store.
482
- # @param store_id The store id.
483
- # @param promo_rule_id The id for the promo rule of a store.
484
- # @param [Hash] opts the optional parameters
485
- # @return [nil]
486
- def delete_promo_rule(store_id = {}, promo_rule_id = {}, opts = {})
487
- delete_promo_rule_with_http_info(store_id, promo_rule_id, opts)
488
- nil
489
- end
490
176
 
491
- # Delete a promo rule. Please note that when a promo rule is deleted, all the promo codes that share the deleted promo rule&#39;s id will be deleted.
492
- # Delete a promo rule from a store.
493
- # @param store_id The store id.
494
- # @param promo_rule_id The id for the promo rule of a store.
495
- # @param [Hash] opts the optional parameters
496
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
497
- def delete_promo_rule_with_http_info(store_id, promo_rule_id, opts = {})
498
- # resource path
499
- local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s)
177
+ # Delete promo rule
178
+ def delete_promo_rule(store_id, promo_rule_id, opts = {})
179
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
180
+ fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
500
181
 
501
- # query parameters
502
182
  query_params = {}
503
-
504
- # header parameters
505
- header_params = {}
506
- # HTTP header 'Accept' (if needed)
507
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
508
- # HTTP header 'Content-Type'
509
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
510
-
511
- # form parameters
512
- form_params = {}
513
-
514
- # http body (model)
515
183
  post_body = nil
516
- auth_names = ['basicAuth']
184
+
185
+ local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s)
517
186
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
518
- :header_params => header_params,
519
187
  :query_params => query_params,
520
- :form_params => form_params,
521
- :body => post_body,
522
- :auth_names => auth_names)
188
+ :body => post_body)
523
189
  return data, status_code, headers
524
190
  end
525
- # Get information about the e-commerce endpoint's resources
526
- # Get information about the e-commerce endpoint's resources.
527
- # @param [Hash] opts the optional parameters
528
- # @return [EcommerceRoot]
529
- def info(opts = {})
530
- data, _status_code, _headers = info_with_http_info(opts)
531
- data
532
- end
533
191
 
534
- # Get information about the e-commerce endpoint&#39;s resources
535
- # Get information about the e-commerce endpoint&#39;s resources.
536
- # @param [Hash] opts the optional parameters
537
- # @return [Array<(EcommerceRoot, Fixnum, Hash)>] EcommerceRoot data, response status code and response headers
538
- def info_with_http_info(opts = {})
539
- # resource path
540
- local_var_path = '/ecommerce'
192
+ # List e commerce api resources
193
+ def info(opts = {})
541
194
 
542
- # query parameters
543
195
  query_params = {}
544
-
545
- # header parameters
546
- header_params = {}
547
- # HTTP header 'Accept' (if needed)
548
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
549
- # HTTP header 'Content-Type'
550
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
551
-
552
- # form parameters
553
- form_params = {}
554
-
555
- # http body (model)
556
196
  post_body = nil
557
- auth_names = ['basicAuth']
197
+
198
+ local_var_path = '/ecommerce'
558
199
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
559
- :header_params => header_params,
560
200
  :query_params => query_params,
561
- :form_params => form_params,
562
- :body => post_body,
563
- :auth_names => auth_names,
564
- :return_type => 'EcommerceRoot')
201
+ :body => post_body)
565
202
  return data, status_code, headers
566
203
  end
567
- # Get information about an account's orders
568
- # Get information about an account's orders.
569
- # @param [Hash] opts the optional parameters
570
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
571
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
572
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
573
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
574
- # @option opts [String] :campaign_id Restrict results to orders with a specific &#x60;campaign_id&#x60; value.
575
- # @option opts [String] :outreach_id Restrict results to orders with a specific &#x60;outreach_id&#x60; value.
576
- # @option opts [String] :customer_id Restrict results to orders made by a specific customer.
577
- # @option opts [BOOLEAN] :has_outreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.
578
- # @return [Orders1]
579
- def orders(opts = {})
580
- data, _status_code, _headers = orders_with_http_info(opts)
581
- data
582
- end
583
204
 
584
- # Get information about an account&#39;s orders
585
- # Get information about an account&#39;s orders.
586
- # @param [Hash] opts the optional parameters
587
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
588
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
589
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
590
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
591
- # @option opts [String] :campaign_id Restrict results to orders with a specific &#x60;campaign_id&#x60; value.
592
- # @option opts [String] :outreach_id Restrict results to orders with a specific &#x60;outreach_id&#x60; value.
593
- # @option opts [String] :customer_id Restrict results to orders made by a specific customer.
594
- # @option opts [BOOLEAN] :has_outreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.
595
- # @return [Array<(Orders1, Fixnum, Hash)>] Orders1 data, response status code and response headers
596
- def orders_with_http_info(opts = {})
597
- # resource path
598
- local_var_path = '/ecommerce/orders'
205
+ # List account orders
206
+ def orders(opts = {})
207
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
599
208
 
600
- # query parameters
601
209
  query_params = {}
602
210
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
603
211
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -607,500 +215,165 @@ module MailchimpMarketing
607
215
  query_params[:'outreach_id'] = opts[:'outreach_id'] if !opts[:'outreach_id'].nil?
608
216
  query_params[:'customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
609
217
  query_params[:'has_outreach'] = opts[:'has_outreach'] if !opts[:'has_outreach'].nil?
610
-
611
- # header parameters
612
- header_params = {}
613
- # HTTP header 'Accept' (if needed)
614
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
615
- # HTTP header 'Content-Type'
616
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
617
-
618
- # form parameters
619
- form_params = {}
620
-
621
- # http body (model)
622
218
  post_body = nil
623
- auth_names = ['basicAuth']
219
+
220
+ local_var_path = '/ecommerce/orders'
624
221
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
625
- :header_params => header_params,
626
222
  :query_params => query_params,
627
- :form_params => form_params,
628
- :body => post_body,
629
- :auth_names => auth_names,
630
- :return_type => 'Orders1')
223
+ :body => post_body)
631
224
  return data, status_code, headers
632
225
  end
633
- # Get information about all stores
634
- # Get information about all stores in the account.
635
- # @param [Hash] opts the optional parameters
636
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
637
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
638
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
639
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
640
- # @return [EcommerceStores]
641
- def stores(opts = {})
642
- data, _status_code, _headers = stores_with_http_info(opts)
643
- data
644
- end
645
226
 
646
- # Get information about all stores
647
- # Get information about all stores in the account.
648
- # @param [Hash] opts the optional parameters
649
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
650
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
651
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
652
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
653
- # @return [Array<(EcommerceStores, Fixnum, Hash)>] EcommerceStores data, response status code and response headers
654
- def stores_with_http_info(opts = {})
655
- # resource path
656
- local_var_path = '/ecommerce/stores'
227
+ # List stores
228
+ def stores(opts = {})
229
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
657
230
 
658
- # query parameters
659
231
  query_params = {}
660
232
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
661
233
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
662
234
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
663
235
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
664
-
665
- # header parameters
666
- header_params = {}
667
- # HTTP header 'Accept' (if needed)
668
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
669
- # HTTP header 'Content-Type'
670
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
671
-
672
- # form parameters
673
- form_params = {}
674
-
675
- # http body (model)
676
236
  post_body = nil
677
- auth_names = ['basicAuth']
237
+
238
+ local_var_path = '/ecommerce/stores'
678
239
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
679
- :header_params => header_params,
680
240
  :query_params => query_params,
681
- :form_params => form_params,
682
- :body => post_body,
683
- :auth_names => auth_names,
684
- :return_type => 'EcommerceStores')
241
+ :body => post_body)
685
242
  return data, status_code, headers
686
243
  end
687
- # Get information about a specific store
688
- # Get information about a specific store.
689
- # @param store_id The store id.
690
- # @param [Hash] opts the optional parameters
691
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
692
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
693
- # @return [EcommerceStore]
694
- def get_store(store_id = {}, opts = {})
695
- data, _status_code, _headers = get_store_with_http_info(store_id, opts)
696
- data
697
- end
698
244
 
699
- # Get information about a specific store
700
- # Get information about a specific store.
701
- # @param store_id The store id.
702
- # @param [Hash] opts the optional parameters
703
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
704
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
705
- # @return [Array<(EcommerceStore, Fixnum, Hash)>] EcommerceStore data, response status code and response headers
706
- def get_store_with_http_info(store_id, opts = {})
707
- # resource path
708
- local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s)
245
+ # Get store info
246
+ def get_store(store_id, opts = {})
247
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
709
248
 
710
- # query parameters
711
249
  query_params = {}
712
250
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
713
251
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
714
-
715
- # header parameters
716
- header_params = {}
717
- # HTTP header 'Accept' (if needed)
718
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
719
- # HTTP header 'Content-Type'
720
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
721
-
722
- # form parameters
723
- form_params = {}
724
-
725
- # http body (model)
726
252
  post_body = nil
727
- auth_names = ['basicAuth']
253
+
254
+ local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s)
728
255
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
729
- :header_params => header_params,
730
256
  :query_params => query_params,
731
- :form_params => form_params,
732
- :body => post_body,
733
- :auth_names => auth_names,
734
- :return_type => 'EcommerceStore')
257
+ :body => post_body)
735
258
  return data, status_code, headers
736
259
  end
737
- # Get information about a store's carts
738
- # Get information about a store's carts.
739
- # @param store_id The store id.
740
- # @param [Hash] opts the optional parameters
741
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
742
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
743
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
744
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
745
- # @return [Carts2]
746
- def get_store_carts(store_id = {}, opts = {})
747
- data, _status_code, _headers = get_store_carts_with_http_info(store_id, opts)
748
- data
749
- end
750
260
 
751
- # Get information about a store&#39;s carts
752
- # Get information about a store&#39;s carts.
753
- # @param store_id The store id.
754
- # @param [Hash] opts the optional parameters
755
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
756
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
757
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
758
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
759
- # @return [Array<(Carts2, Fixnum, Hash)>] Carts2 data, response status code and response headers
760
- def get_store_carts_with_http_info(store_id, opts = {})
761
- # resource path
762
- local_var_path = '/ecommerce/stores/{store_id}/carts'.sub('{' + 'store_id' + '}', store_id.to_s)
261
+ # List carts
262
+ def get_store_carts(store_id, opts = {})
263
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
264
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
763
265
 
764
- # query parameters
765
266
  query_params = {}
766
267
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
767
268
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
768
269
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
769
270
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
770
-
771
- # header parameters
772
- header_params = {}
773
- # HTTP header 'Accept' (if needed)
774
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
775
- # HTTP header 'Content-Type'
776
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
777
-
778
- # form parameters
779
- form_params = {}
780
-
781
- # http body (model)
782
271
  post_body = nil
783
- auth_names = ['basicAuth']
272
+
273
+ local_var_path = '/ecommerce/stores/{store_id}/carts'.sub('{' + 'store_id' + '}', store_id.to_s)
784
274
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
785
- :header_params => header_params,
786
275
  :query_params => query_params,
787
- :form_params => form_params,
788
- :body => post_body,
789
- :auth_names => auth_names,
790
- :return_type => 'Carts2')
276
+ :body => post_body)
791
277
  return data, status_code, headers
792
278
  end
793
- # Get information about a specific cart
794
- # Get information about a specific cart.
795
- # @param store_id The store id.
796
- # @param cart_id The id for the cart.
797
- # @param [Hash] opts the optional parameters
798
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
799
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
800
- # @return [EcommerceCart]
801
- def get_store_cart(store_id = {}, cart_id = {}, opts = {})
802
- data, _status_code, _headers = get_store_cart_with_http_info(store_id, cart_id, opts)
803
- data
804
- end
805
279
 
806
- # Get information about a specific cart
807
- # Get information about a specific cart.
808
- # @param store_id The store id.
809
- # @param cart_id The id for the cart.
810
- # @param [Hash] opts the optional parameters
811
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
812
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
813
- # @return [Array<(EcommerceCart, Fixnum, Hash)>] EcommerceCart data, response status code and response headers
814
- def get_store_cart_with_http_info(store_id, cart_id, opts = {})
815
- # resource path
816
- local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
280
+ # Get cart info
281
+ def get_store_cart(store_id, cart_id, opts = {})
282
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
283
+ fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
817
284
 
818
- # query parameters
819
285
  query_params = {}
820
286
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
821
287
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
822
-
823
- # header parameters
824
- header_params = {}
825
- # HTTP header 'Accept' (if needed)
826
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
827
- # HTTP header 'Content-Type'
828
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
829
-
830
- # form parameters
831
- form_params = {}
832
-
833
- # http body (model)
834
288
  post_body = nil
835
- auth_names = ['basicAuth']
289
+
290
+ local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
836
291
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
837
- :header_params => header_params,
838
292
  :query_params => query_params,
839
- :form_params => form_params,
840
- :body => post_body,
841
- :auth_names => auth_names,
842
- :return_type => 'EcommerceCart')
293
+ :body => post_body)
843
294
  return data, status_code, headers
844
295
  end
845
- # Get information about a cart's line items
846
- # Get information about a cart's line items.
847
- # @param store_id The store id.
848
- # @param cart_id The id for the cart.
849
- # @param [Hash] opts the optional parameters
850
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
851
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
852
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
853
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
854
- # @return [CartLines]
855
- def get_all_cart_line_items(store_id = {}, cart_id = {}, opts = {})
856
- data, _status_code, _headers = get_all_cart_line_items_with_http_info(store_id, cart_id, opts)
857
- data
858
- end
859
296
 
860
- # Get information about a cart&#39;s line items
861
- # Get information about a cart&#39;s line items.
862
- # @param store_id The store id.
863
- # @param cart_id The id for the cart.
864
- # @param [Hash] opts the optional parameters
865
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
866
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
867
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
868
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
869
- # @return [Array<(CartLines, Fixnum, Hash)>] CartLines data, response status code and response headers
870
- def get_all_cart_line_items_with_http_info(store_id, cart_id, opts = {})
871
- # resource path
872
- local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
297
+ # List cart line items
298
+ def get_all_cart_line_items(store_id, cart_id, opts = {})
299
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
300
+ fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
301
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
873
302
 
874
- # query parameters
875
303
  query_params = {}
876
304
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
877
305
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
878
306
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
879
307
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
880
-
881
- # header parameters
882
- header_params = {}
883
- # HTTP header 'Accept' (if needed)
884
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
885
- # HTTP header 'Content-Type'
886
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
887
-
888
- # form parameters
889
- form_params = {}
890
-
891
- # http body (model)
892
308
  post_body = nil
893
- auth_names = ['basicAuth']
309
+
310
+ local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
894
311
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
895
- :header_params => header_params,
896
312
  :query_params => query_params,
897
- :form_params => form_params,
898
- :body => post_body,
899
- :auth_names => auth_names,
900
- :return_type => 'CartLines')
313
+ :body => post_body)
901
314
  return data, status_code, headers
902
315
  end
903
- # Get information about a specific cart line item
904
- # Get information about a specific cart line item.
905
- # @param store_id The store id.
906
- # @param cart_id The id for the cart.
907
- # @param line_id The id for the line item of a cart.
908
- # @param [Hash] opts the optional parameters
909
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
910
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
911
- # @return [EcommerceCartLineItem]
912
- def get_cart_line_item(store_id = {}, cart_id = {}, line_id = {}, opts = {})
913
- data, _status_code, _headers = get_cart_line_item_with_http_info(store_id, cart_id, line_id, opts)
914
- data
915
- end
916
316
 
917
- # Get information about a specific cart line item
918
- # Get information about a specific cart line item.
919
- # @param store_id The store id.
920
- # @param cart_id The id for the cart.
921
- # @param line_id The id for the line item of a cart.
922
- # @param [Hash] opts the optional parameters
923
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
924
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
925
- # @return [Array<(EcommerceCartLineItem, Fixnum, Hash)>] EcommerceCartLineItem data, response status code and response headers
926
- def get_cart_line_item_with_http_info(store_id, cart_id, line_id, opts = {})
927
- # resource path
928
- local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
317
+ # Get cart line item
318
+ def get_cart_line_item(store_id, cart_id, line_id, opts = {})
319
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
320
+ fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
321
+ fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
929
322
 
930
- # query parameters
931
323
  query_params = {}
932
324
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
933
325
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
934
-
935
- # header parameters
936
- header_params = {}
937
- # HTTP header 'Accept' (if needed)
938
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
939
- # HTTP header 'Content-Type'
940
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
941
-
942
- # form parameters
943
- form_params = {}
944
-
945
- # http body (model)
946
326
  post_body = nil
947
- auth_names = ['basicAuth']
327
+
328
+ local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
948
329
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
949
- :header_params => header_params,
950
330
  :query_params => query_params,
951
- :form_params => form_params,
952
- :body => post_body,
953
- :auth_names => auth_names,
954
- :return_type => 'EcommerceCartLineItem')
331
+ :body => post_body)
955
332
  return data, status_code, headers
956
333
  end
957
- # Get information about a store's customers
958
- # Get information about a store's customers.
959
- # @param store_id The store id.
960
- # @param [Hash] opts the optional parameters
961
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
962
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
963
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
964
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
965
- # @option opts [String] :email_address Restrict the response to customers with the email address.
966
- # @return [Customers]
967
- def get_all_store_customers(store_id = {}, opts = {})
968
- data, _status_code, _headers = get_all_store_customers_with_http_info(store_id, opts)
969
- data
970
- end
971
334
 
972
- # Get information about a store&#39;s customers
973
- # Get information about a store&#39;s customers.
974
- # @param store_id The store id.
975
- # @param [Hash] opts the optional parameters
976
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
977
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
978
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
979
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
980
- # @option opts [String] :email_address Restrict the response to customers with the email address.
981
- # @return [Array<(Customers, Fixnum, Hash)>] Customers data, response status code and response headers
982
- def get_all_store_customers_with_http_info(store_id, opts = {})
983
- # resource path
984
- local_var_path = '/ecommerce/stores/{store_id}/customers'.sub('{' + 'store_id' + '}', store_id.to_s)
335
+ # List customers
336
+ def get_all_store_customers(store_id, opts = {})
337
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
338
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
985
339
 
986
- # query parameters
987
340
  query_params = {}
988
341
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
989
342
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
990
343
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
991
344
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
992
345
  query_params[:'email_address'] = opts[:'email_address'] if !opts[:'email_address'].nil?
993
-
994
- # header parameters
995
- header_params = {}
996
- # HTTP header 'Accept' (if needed)
997
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
998
- # HTTP header 'Content-Type'
999
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1000
-
1001
- # form parameters
1002
- form_params = {}
1003
-
1004
- # http body (model)
1005
346
  post_body = nil
1006
- auth_names = ['basicAuth']
347
+
348
+ local_var_path = '/ecommerce/stores/{store_id}/customers'.sub('{' + 'store_id' + '}', store_id.to_s)
1007
349
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1008
- :header_params => header_params,
1009
350
  :query_params => query_params,
1010
- :form_params => form_params,
1011
- :body => post_body,
1012
- :auth_names => auth_names,
1013
- :return_type => 'Customers')
351
+ :body => post_body)
1014
352
  return data, status_code, headers
1015
353
  end
1016
- # Get information about a specific customer
1017
- # Get information about a specific customer.
1018
- # @param store_id The store id.
1019
- # @param customer_id The id for the customer of a store.
1020
- # @param [Hash] opts the optional parameters
1021
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1022
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1023
- # @return [EcommerceCustomer]
1024
- def get_store_customer(store_id = {}, customer_id = {}, opts = {})
1025
- data, _status_code, _headers = get_store_customer_with_http_info(store_id, customer_id, opts)
1026
- data
1027
- end
1028
354
 
1029
- # Get information about a specific customer
1030
- # Get information about a specific customer.
1031
- # @param store_id The store id.
1032
- # @param customer_id The id for the customer of a store.
1033
- # @param [Hash] opts the optional parameters
1034
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1035
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1036
- # @return [Array<(EcommerceCustomer, Fixnum, Hash)>] EcommerceCustomer data, response status code and response headers
1037
- def get_store_customer_with_http_info(store_id, customer_id, opts = {})
1038
- # resource path
1039
- local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
355
+ # Get customer info
356
+ def get_store_customer(store_id, customer_id, opts = {})
357
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
358
+ fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil?
1040
359
 
1041
- # query parameters
1042
360
  query_params = {}
1043
361
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1044
362
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1045
-
1046
- # header parameters
1047
- header_params = {}
1048
- # HTTP header 'Accept' (if needed)
1049
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1050
- # HTTP header 'Content-Type'
1051
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1052
-
1053
- # form parameters
1054
- form_params = {}
1055
-
1056
- # http body (model)
1057
363
  post_body = nil
1058
- auth_names = ['basicAuth']
364
+
365
+ local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
1059
366
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1060
- :header_params => header_params,
1061
367
  :query_params => query_params,
1062
- :form_params => form_params,
1063
- :body => post_body,
1064
- :auth_names => auth_names,
1065
- :return_type => 'EcommerceCustomer')
368
+ :body => post_body)
1066
369
  return data, status_code, headers
1067
370
  end
1068
- # Get information about a store's orders
1069
- # Get information about a store's orders.
1070
- # @param store_id The store id.
1071
- # @param [Hash] opts the optional parameters
1072
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1073
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1074
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
1075
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
1076
- # @option opts [String] :customer_id Restrict results to orders made by a specific customer.
1077
- # @option opts [BOOLEAN] :has_outreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.
1078
- # @option opts [String] :campaign_id Restrict results to orders with a specific &#x60;campaign_id&#x60; value.
1079
- # @option opts [String] :outreach_id Restrict results to orders with a specific &#x60;outreach_id&#x60; value.
1080
- # @return [Orders2]
1081
- def get_store_orders(store_id = {}, opts = {})
1082
- data, _status_code, _headers = get_store_orders_with_http_info(store_id, opts)
1083
- data
1084
- end
1085
371
 
1086
- # Get information about a store&#39;s orders
1087
- # Get information about a store&#39;s orders.
1088
- # @param store_id The store id.
1089
- # @param [Hash] opts the optional parameters
1090
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1091
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1092
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
1093
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
1094
- # @option opts [String] :customer_id Restrict results to orders made by a specific customer.
1095
- # @option opts [BOOLEAN] :has_outreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.
1096
- # @option opts [String] :campaign_id Restrict results to orders with a specific &#x60;campaign_id&#x60; value.
1097
- # @option opts [String] :outreach_id Restrict results to orders with a specific &#x60;outreach_id&#x60; value.
1098
- # @return [Array<(Orders2, Fixnum, Hash)>] Orders2 data, response status code and response headers
1099
- def get_store_orders_with_http_info(store_id, opts = {})
1100
- # resource path
1101
- local_var_path = '/ecommerce/stores/{store_id}/orders'.sub('{' + 'store_id' + '}', store_id.to_s)
372
+ # List orders
373
+ def get_store_orders(store_id, opts = {})
374
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
375
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1102
376
 
1103
- # query parameters
1104
377
  query_params = {}
1105
378
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1106
379
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -1110,1894 +383,637 @@ module MailchimpMarketing
1110
383
  query_params[:'has_outreach'] = opts[:'has_outreach'] if !opts[:'has_outreach'].nil?
1111
384
  query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
1112
385
  query_params[:'outreach_id'] = opts[:'outreach_id'] if !opts[:'outreach_id'].nil?
1113
-
1114
- # header parameters
1115
- header_params = {}
1116
- # HTTP header 'Accept' (if needed)
1117
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1118
- # HTTP header 'Content-Type'
1119
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1120
-
1121
- # form parameters
1122
- form_params = {}
1123
-
1124
- # http body (model)
1125
386
  post_body = nil
1126
- auth_names = ['basicAuth']
387
+
388
+ local_var_path = '/ecommerce/stores/{store_id}/orders'.sub('{' + 'store_id' + '}', store_id.to_s)
1127
389
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1128
- :header_params => header_params,
1129
390
  :query_params => query_params,
1130
- :form_params => form_params,
1131
- :body => post_body,
1132
- :auth_names => auth_names,
1133
- :return_type => 'Orders2')
391
+ :body => post_body)
1134
392
  return data, status_code, headers
1135
393
  end
1136
- # Get information about a specific order
1137
- # Get information about a specific order.
1138
- # @param store_id The store id.
1139
- # @param order_id The id for the order in a store.
1140
- # @param [Hash] opts the optional parameters
1141
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1142
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1143
- # @return [EcommerceOrder]
1144
- def get_order(store_id = {}, order_id = {}, opts = {})
1145
- data, _status_code, _headers = get_order_with_http_info(store_id, order_id, opts)
1146
- data
1147
- end
1148
394
 
1149
- # Get information about a specific order
1150
- # Get information about a specific order.
1151
- # @param store_id The store id.
1152
- # @param order_id The id for the order in a store.
1153
- # @param [Hash] opts the optional parameters
1154
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1155
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1156
- # @return [Array<(EcommerceOrder, Fixnum, Hash)>] EcommerceOrder data, response status code and response headers
1157
- def get_order_with_http_info(store_id, order_id, opts = {})
1158
- # resource path
1159
- local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
395
+ # Get order info
396
+ def get_order(store_id, order_id, opts = {})
397
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
398
+ fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
1160
399
 
1161
- # query parameters
1162
400
  query_params = {}
1163
401
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1164
402
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1165
-
1166
- # header parameters
1167
- header_params = {}
1168
- # HTTP header 'Accept' (if needed)
1169
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1170
- # HTTP header 'Content-Type'
1171
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1172
-
1173
- # form parameters
1174
- form_params = {}
1175
-
1176
- # http body (model)
1177
403
  post_body = nil
1178
- auth_names = ['basicAuth']
404
+
405
+ local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
1179
406
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1180
- :header_params => header_params,
1181
407
  :query_params => query_params,
1182
- :form_params => form_params,
1183
- :body => post_body,
1184
- :auth_names => auth_names,
1185
- :return_type => 'EcommerceOrder')
408
+ :body => post_body)
1186
409
  return data, status_code, headers
1187
410
  end
1188
- # Get information about an order's line items.
1189
- # Get information about an order's line items.
1190
- # @param store_id The store id.
1191
- # @param order_id The id for the order in a store.
1192
- # @param [Hash] opts the optional parameters
1193
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1194
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1195
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
1196
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
1197
- # @return [OrderLines]
1198
- def get_all_order_line_items(store_id = {}, order_id = {}, opts = {})
1199
- data, _status_code, _headers = get_all_order_line_items_with_http_info(store_id, order_id, opts)
1200
- data
1201
- end
1202
411
 
1203
- # Get information about an order&#39;s line items.
1204
- # Get information about an order&#39;s line items.
1205
- # @param store_id The store id.
1206
- # @param order_id The id for the order in a store.
1207
- # @param [Hash] opts the optional parameters
1208
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1209
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1210
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
1211
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
1212
- # @return [Array<(OrderLines, Fixnum, Hash)>] OrderLines data, response status code and response headers
1213
- def get_all_order_line_items_with_http_info(store_id, order_id, opts = {})
1214
- # resource path
1215
- local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
412
+ # List order line items
413
+ def get_all_order_line_items(store_id, order_id, opts = {})
414
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
415
+ fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
416
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1216
417
 
1217
- # query parameters
1218
418
  query_params = {}
1219
419
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1220
420
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1221
421
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1222
422
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1223
-
1224
- # header parameters
1225
- header_params = {}
1226
- # HTTP header 'Accept' (if needed)
1227
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1228
- # HTTP header 'Content-Type'
1229
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1230
-
1231
- # form parameters
1232
- form_params = {}
1233
-
1234
- # http body (model)
1235
423
  post_body = nil
1236
- auth_names = ['basicAuth']
424
+
425
+ local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
1237
426
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1238
- :header_params => header_params,
1239
427
  :query_params => query_params,
1240
- :form_params => form_params,
1241
- :body => post_body,
1242
- :auth_names => auth_names,
1243
- :return_type => 'OrderLines')
428
+ :body => post_body)
1244
429
  return data, status_code, headers
1245
430
  end
1246
- # Get information about a specific order line item
1247
- # Get information about a specific order line item.
1248
- # @param store_id The store id.
1249
- # @param order_id The id for the order in a store.
1250
- # @param line_id The id for the line item of an order.
1251
- # @param [Hash] opts the optional parameters
1252
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1253
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1254
- # @return [EcommerceOrderLineItem]
1255
- def get_order_line_item(store_id = {}, order_id = {}, line_id = {}, opts = {})
1256
- data, _status_code, _headers = get_order_line_item_with_http_info(store_id, order_id, line_id, opts)
1257
- data
1258
- end
1259
431
 
1260
- # Get information about a specific order line item
1261
- # Get information about a specific order line item.
1262
- # @param store_id The store id.
1263
- # @param order_id The id for the order in a store.
1264
- # @param line_id The id for the line item of an order.
1265
- # @param [Hash] opts the optional parameters
1266
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1267
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1268
- # @return [Array<(EcommerceOrderLineItem, Fixnum, Hash)>] EcommerceOrderLineItem data, response status code and response headers
1269
- def get_order_line_item_with_http_info(store_id, order_id, line_id, opts = {})
1270
- # resource path
1271
- local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
432
+ # Get order line item
433
+ def get_order_line_item(store_id, order_id, line_id, opts = {})
434
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
435
+ fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
436
+ fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
1272
437
 
1273
- # query parameters
1274
438
  query_params = {}
1275
439
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1276
440
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1277
-
1278
- # header parameters
1279
- header_params = {}
1280
- # HTTP header 'Accept' (if needed)
1281
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1282
- # HTTP header 'Content-Type'
1283
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1284
-
1285
- # form parameters
1286
- form_params = {}
1287
-
1288
- # http body (model)
1289
441
  post_body = nil
1290
- auth_names = ['basicAuth']
442
+
443
+ local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
1291
444
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1292
- :header_params => header_params,
1293
445
  :query_params => query_params,
1294
- :form_params => form_params,
1295
- :body => post_body,
1296
- :auth_names => auth_names,
1297
- :return_type => 'EcommerceOrderLineItem')
446
+ :body => post_body)
1298
447
  return data, status_code, headers
1299
448
  end
1300
- # Get information about a store's products.
1301
- # Get information about a store's products.
1302
- # @param store_id The store id.
1303
- # @param [Hash] opts the optional parameters
1304
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1305
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1306
- # @option opts [String] :sort_field Returns products sorted by the specified field.
1307
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
1308
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
1309
- # @return [Products]
1310
- def get_all_store_products(store_id = {}, opts = {})
1311
- data, _status_code, _headers = get_all_store_products_with_http_info(store_id, opts)
1312
- data
1313
- end
1314
449
 
1315
- # Get information about a store&#39;s products.
1316
- # Get information about a store&#39;s products.
1317
- # @param store_id The store id.
1318
- # @param [Hash] opts the optional parameters
1319
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1320
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1321
- # @option opts [String] :sort_field Returns products sorted by the specified field.
1322
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
1323
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
1324
- # @return [Array<(Products, Fixnum, Hash)>] Products data, response status code and response headers
1325
- def get_all_store_products_with_http_info(store_id, opts = {})
1326
- # resource path
1327
- local_var_path = '/ecommerce/stores/{store_id}/products'.sub('{' + 'store_id' + '}', store_id.to_s)
450
+ # List product
451
+ def get_all_store_products(store_id, opts = {})
452
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
453
+ fail ArgumentError, 'invalid value for "sort_field", must be one of title, created_at, price' if opts[:'sort_field'] && !['title', 'created_at', 'price'].include?(opts[:'sort_field'])
454
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1328
455
 
1329
- # query parameters
1330
456
  query_params = {}
1331
457
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1332
458
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1333
459
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
1334
460
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1335
461
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1336
-
1337
- # header parameters
1338
- header_params = {}
1339
- # HTTP header 'Accept' (if needed)
1340
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1341
- # HTTP header 'Content-Type'
1342
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1343
-
1344
- # form parameters
1345
- form_params = {}
1346
-
1347
- # http body (model)
1348
462
  post_body = nil
1349
- auth_names = ['basicAuth']
463
+
464
+ local_var_path = '/ecommerce/stores/{store_id}/products'.sub('{' + 'store_id' + '}', store_id.to_s)
1350
465
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1351
- :header_params => header_params,
1352
466
  :query_params => query_params,
1353
- :form_params => form_params,
1354
- :body => post_body,
1355
- :auth_names => auth_names,
1356
- :return_type => 'Products')
467
+ :body => post_body)
1357
468
  return data, status_code, headers
1358
469
  end
1359
- # Get information about a specific product
1360
- # Get information about a specific product.
1361
- # @param store_id The store id.
1362
- # @param product_id The id for the product of a store.
1363
- # @param [Hash] opts the optional parameters
1364
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1365
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1366
- # @return [EcommerceProduct]
1367
- def get_store_product(store_id = {}, product_id = {}, opts = {})
1368
- data, _status_code, _headers = get_store_product_with_http_info(store_id, product_id, opts)
1369
- data
1370
- end
1371
470
 
1372
- # Get information about a specific product
1373
- # Get information about a specific product.
1374
- # @param store_id The store id.
1375
- # @param product_id The id for the product of a store.
1376
- # @param [Hash] opts the optional parameters
1377
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1378
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1379
- # @return [Array<(EcommerceProduct, Fixnum, Hash)>] EcommerceProduct data, response status code and response headers
1380
- def get_store_product_with_http_info(store_id, product_id, opts = {})
1381
- # resource path
1382
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
471
+ # Get product info
472
+ def get_store_product(store_id, product_id, opts = {})
473
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
474
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
1383
475
 
1384
- # query parameters
1385
476
  query_params = {}
1386
477
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1387
478
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1388
-
1389
- # header parameters
1390
- header_params = {}
1391
- # HTTP header 'Accept' (if needed)
1392
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1393
- # HTTP header 'Content-Type'
1394
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1395
-
1396
- # form parameters
1397
- form_params = {}
1398
-
1399
- # http body (model)
1400
479
  post_body = nil
1401
- auth_names = ['basicAuth']
480
+
481
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
1402
482
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1403
- :header_params => header_params,
1404
483
  :query_params => query_params,
1405
- :form_params => form_params,
1406
- :body => post_body,
1407
- :auth_names => auth_names,
1408
- :return_type => 'EcommerceProduct')
484
+ :body => post_body)
1409
485
  return data, status_code, headers
1410
486
  end
1411
- # Get information about a product's images.
1412
- # Get information about a product's images.
1413
- # @param store_id The store id.
1414
- # @param product_id The id for the product of a store.
1415
- # @param [Hash] opts the optional parameters
1416
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1417
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1418
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
1419
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
1420
- # @return [EcommerceProductImages]
1421
- def get_product_images(store_id = {}, product_id = {}, opts = {})
1422
- data, _status_code, _headers = get_product_images_with_http_info(store_id, product_id, opts)
1423
- data
1424
- end
1425
487
 
1426
- # Get information about a product&#39;s images.
1427
- # Get information about a product&#39;s images.
1428
- # @param store_id The store id.
1429
- # @param product_id The id for the product of a store.
1430
- # @param [Hash] opts the optional parameters
1431
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1432
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1433
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
1434
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
1435
- # @return [Array<(EcommerceProductImages, Fixnum, Hash)>] EcommerceProductImages data, response status code and response headers
1436
- def get_product_images_with_http_info(store_id, product_id, opts = {})
1437
- # resource path
1438
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
488
+ # List product images
489
+ def get_product_images(store_id, product_id, opts = {})
490
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
491
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
492
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1439
493
 
1440
- # query parameters
1441
494
  query_params = {}
1442
495
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1443
496
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1444
497
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1445
498
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1446
-
1447
- # header parameters
1448
- header_params = {}
1449
- # HTTP header 'Accept' (if needed)
1450
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1451
- # HTTP header 'Content-Type'
1452
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1453
-
1454
- # form parameters
1455
- form_params = {}
1456
-
1457
- # http body (model)
1458
499
  post_body = nil
1459
- auth_names = ['basicAuth']
500
+
501
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
1460
502
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1461
- :header_params => header_params,
1462
503
  :query_params => query_params,
1463
- :form_params => form_params,
1464
- :body => post_body,
1465
- :auth_names => auth_names,
1466
- :return_type => 'EcommerceProductImages')
504
+ :body => post_body)
1467
505
  return data, status_code, headers
1468
506
  end
1469
- # Get information about a specific product image
1470
- # Get information about a specific product image.
1471
- # @param store_id The store id.
1472
- # @param product_id The id for the product of a store.
1473
- # @param image_id The id for the product image.
1474
- # @param [Hash] opts the optional parameters
1475
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1476
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1477
- # @return [EcommerceProductImage]
1478
- def get_product_image(store_id = {}, product_id = {}, image_id = {}, opts = {})
1479
- data, _status_code, _headers = get_product_image_with_http_info(store_id, product_id, image_id, opts)
1480
- data
1481
- end
1482
507
 
1483
- # Get information about a specific product image
1484
- # Get information about a specific product image.
1485
- # @param store_id The store id.
1486
- # @param product_id The id for the product of a store.
1487
- # @param image_id The id for the product image.
1488
- # @param [Hash] opts the optional parameters
1489
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1490
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1491
- # @return [Array<(EcommerceProductImage, Fixnum, Hash)>] EcommerceProductImage data, response status code and response headers
1492
- def get_product_image_with_http_info(store_id, product_id, image_id, opts = {})
1493
- # resource path
1494
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'image_id' + '}', image_id.to_s)
508
+ # Get product image info
509
+ def get_product_image(store_id, product_id, image_id, opts = {})
510
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
511
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
512
+ fail ArgumentError, "Missing required param: 'image_id'" if image_id.nil?
1495
513
 
1496
- # query parameters
1497
514
  query_params = {}
1498
515
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1499
516
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1500
-
1501
- # header parameters
1502
- header_params = {}
1503
- # HTTP header 'Accept' (if needed)
1504
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1505
- # HTTP header 'Content-Type'
1506
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1507
-
1508
- # form parameters
1509
- form_params = {}
1510
-
1511
- # http body (model)
1512
517
  post_body = nil
1513
- auth_names = ['basicAuth']
518
+
519
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'image_id' + '}', image_id.to_s)
1514
520
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1515
- :header_params => header_params,
1516
521
  :query_params => query_params,
1517
- :form_params => form_params,
1518
- :body => post_body,
1519
- :auth_names => auth_names,
1520
- :return_type => 'EcommerceProductImage')
522
+ :body => post_body)
1521
523
  return data, status_code, headers
1522
524
  end
1523
- # Get information about a product's variants.
1524
- # Get information about a product's variants.
1525
- # @param store_id The store id.
1526
- # @param product_id The id for the product of a store.
1527
- # @param [Hash] opts the optional parameters
1528
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1529
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1530
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
1531
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
1532
- # @return [EcommerceProductVariants]
1533
- def get_product_variants(store_id = {}, product_id = {}, opts = {})
1534
- data, _status_code, _headers = get_product_variants_with_http_info(store_id, product_id, opts)
1535
- data
1536
- end
1537
525
 
1538
- # Get information about a product&#39;s variants.
1539
- # Get information about a product&#39;s variants.
1540
- # @param store_id The store id.
1541
- # @param product_id The id for the product of a store.
1542
- # @param [Hash] opts the optional parameters
1543
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1544
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1545
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
1546
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
1547
- # @return [Array<(EcommerceProductVariants, Fixnum, Hash)>] EcommerceProductVariants data, response status code and response headers
1548
- def get_product_variants_with_http_info(store_id, product_id, opts = {})
1549
- # resource path
1550
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
526
+ # List product variants
527
+ def get_product_variants(store_id, product_id, opts = {})
528
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
529
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
530
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1551
531
 
1552
- # query parameters
1553
532
  query_params = {}
1554
533
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1555
534
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1556
535
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1557
536
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1558
-
1559
- # header parameters
1560
- header_params = {}
1561
- # HTTP header 'Accept' (if needed)
1562
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1563
- # HTTP header 'Content-Type'
1564
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1565
-
1566
- # form parameters
1567
- form_params = {}
1568
-
1569
- # http body (model)
1570
537
  post_body = nil
1571
- auth_names = ['basicAuth']
538
+
539
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
1572
540
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1573
- :header_params => header_params,
1574
541
  :query_params => query_params,
1575
- :form_params => form_params,
1576
- :body => post_body,
1577
- :auth_names => auth_names,
1578
- :return_type => 'EcommerceProductVariants')
542
+ :body => post_body)
1579
543
  return data, status_code, headers
1580
544
  end
1581
- # Get information about a specific product variant
1582
- # Get information about a specific product variant.
1583
- # @param store_id The store id.
1584
- # @param product_id The id for the product of a store.
1585
- # @param variant_id The id for the product variant.
1586
- # @param [Hash] opts the optional parameters
1587
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1588
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1589
- # @return [EcommerceProductVariant]
1590
- def get_product_variant(store_id = {}, product_id = {}, variant_id = {}, opts = {})
1591
- data, _status_code, _headers = get_product_variant_with_http_info(store_id, product_id, variant_id, opts)
1592
- data
1593
- end
1594
545
 
1595
- # Get information about a specific product variant
1596
- # Get information about a specific product variant.
1597
- # @param store_id The store id.
1598
- # @param product_id The id for the product of a store.
1599
- # @param variant_id The id for the product variant.
1600
- # @param [Hash] opts the optional parameters
1601
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1602
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1603
- # @return [Array<(EcommerceProductVariant, Fixnum, Hash)>] EcommerceProductVariant data, response status code and response headers
1604
- def get_product_variant_with_http_info(store_id, product_id, variant_id, opts = {})
1605
- # resource path
1606
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s)
546
+ # Get product variant info
547
+ def get_product_variant(store_id, product_id, variant_id, opts = {})
548
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
549
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
550
+ fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil?
1607
551
 
1608
- # query parameters
1609
552
  query_params = {}
1610
553
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1611
554
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1612
-
1613
- # header parameters
1614
- header_params = {}
1615
- # HTTP header 'Accept' (if needed)
1616
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1617
- # HTTP header 'Content-Type'
1618
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1619
-
1620
- # form parameters
1621
- form_params = {}
1622
-
1623
- # http body (model)
1624
555
  post_body = nil
1625
- auth_names = ['basicAuth']
556
+
557
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s)
1626
558
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1627
- :header_params => header_params,
1628
559
  :query_params => query_params,
1629
- :form_params => form_params,
1630
- :body => post_body,
1631
- :auth_names => auth_names,
1632
- :return_type => 'EcommerceProductVariant')
560
+ :body => post_body)
1633
561
  return data, status_code, headers
1634
562
  end
1635
- # Get information about a store's promo codes
1636
- # Get information about a store's promo codes.
1637
- # @param promo_rule_id The id for the promo rule of a store.
1638
- # @param store_id The store id.
1639
- # @param [Hash] opts the optional parameters
1640
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1641
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1642
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
1643
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
1644
- # @return [PromoCodes]
1645
- def get_promo_codes(promo_rule_id = {}, store_id = {}, opts = {})
1646
- data, _status_code, _headers = get_promo_codes_with_http_info(promo_rule_id, store_id, opts)
1647
- data
1648
- end
1649
563
 
1650
- # Get information about a store&#39;s promo codes
1651
- # Get information about a store&#39;s promo codes.
1652
- # @param promo_rule_id The id for the promo rule of a store.
1653
- # @param store_id The store id.
1654
- # @param [Hash] opts the optional parameters
1655
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1656
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1657
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
1658
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
1659
- # @return [Array<(PromoCodes, Fixnum, Hash)>] PromoCodes data, response status code and response headers
1660
- def get_promo_codes_with_http_info(promo_rule_id, store_id, opts = {})
1661
- # resource path
1662
- local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes'.sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'store_id' + '}', store_id.to_s)
564
+ # List promo codes
565
+ def get_promo_codes(promo_rule_id, store_id, opts = {})
566
+ fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
567
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
568
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1663
569
 
1664
- # query parameters
1665
570
  query_params = {}
1666
571
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1667
572
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1668
573
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1669
574
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1670
-
1671
- # header parameters
1672
- header_params = {}
1673
- # HTTP header 'Accept' (if needed)
1674
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1675
- # HTTP header 'Content-Type'
1676
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1677
-
1678
- # form parameters
1679
- form_params = {}
1680
-
1681
- # http body (model)
1682
575
  post_body = nil
1683
- auth_names = ['basicAuth']
576
+
577
+ local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes'.sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'store_id' + '}', store_id.to_s)
1684
578
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1685
- :header_params => header_params,
1686
579
  :query_params => query_params,
1687
- :form_params => form_params,
1688
- :body => post_body,
1689
- :auth_names => auth_names,
1690
- :return_type => 'PromoCodes')
580
+ :body => post_body)
1691
581
  return data, status_code, headers
1692
582
  end
1693
- # Get information about a specific promo code
1694
- # Get information about a specific promo code.
1695
- # @param store_id The store id.
1696
- # @param promo_rule_id The id for the promo rule of a store.
1697
- # @param promo_code_id The id for the promo code of a store.
1698
- # @param [Hash] opts the optional parameters
1699
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1700
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1701
- # @return [EcommercePromoCode]
1702
- def get_promo_code(store_id = {}, promo_rule_id = {}, promo_code_id = {}, opts = {})
1703
- data, _status_code, _headers = get_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, opts)
1704
- data
1705
- end
1706
583
 
1707
- # Get information about a specific promo code
1708
- # Get information about a specific promo code.
1709
- # @param store_id The store id.
1710
- # @param promo_rule_id The id for the promo rule of a store.
1711
- # @param promo_code_id The id for the promo code of a store.
1712
- # @param [Hash] opts the optional parameters
1713
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1714
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1715
- # @return [Array<(EcommercePromoCode, Fixnum, Hash)>] EcommercePromoCode data, response status code and response headers
1716
- def get_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, opts = {})
1717
- # resource path
1718
- local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'promo_code_id' + '}', promo_code_id.to_s)
584
+ # Get promo code
585
+ def get_promo_code(store_id, promo_rule_id, promo_code_id, opts = {})
586
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
587
+ fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
588
+ fail ArgumentError, "Missing required param: 'promo_code_id'" if promo_code_id.nil?
1719
589
 
1720
- # query parameters
1721
590
  query_params = {}
1722
591
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1723
592
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1724
-
1725
- # header parameters
1726
- header_params = {}
1727
- # HTTP header 'Accept' (if needed)
1728
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1729
- # HTTP header 'Content-Type'
1730
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1731
-
1732
- # form parameters
1733
- form_params = {}
1734
-
1735
- # http body (model)
1736
593
  post_body = nil
1737
- auth_names = ['basicAuth']
594
+
595
+ local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'promo_code_id' + '}', promo_code_id.to_s)
1738
596
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1739
- :header_params => header_params,
1740
597
  :query_params => query_params,
1741
- :form_params => form_params,
1742
- :body => post_body,
1743
- :auth_names => auth_names,
1744
- :return_type => 'EcommercePromoCode')
598
+ :body => post_body)
1745
599
  return data, status_code, headers
1746
600
  end
1747
- # Get information about a store's promo rules
1748
- # Get information about a store's promo rules.
1749
- # @param store_id The store id.
1750
- # @param [Hash] opts the optional parameters
1751
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1752
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1753
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
1754
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
1755
- # @return [PromoRules]
1756
- def list_promo_rules(store_id = {}, opts = {})
1757
- data, _status_code, _headers = list_promo_rules_with_http_info(store_id, opts)
1758
- data
1759
- end
1760
601
 
1761
- # Get information about a store&#39;s promo rules
1762
- # Get information about a store&#39;s promo rules.
1763
- # @param store_id The store id.
1764
- # @param [Hash] opts the optional parameters
1765
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1766
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1767
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
1768
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
1769
- # @return [Array<(PromoRules, Fixnum, Hash)>] PromoRules data, response status code and response headers
1770
- def list_promo_rules_with_http_info(store_id, opts = {})
1771
- # resource path
1772
- local_var_path = '/ecommerce/stores/{store_id}/promo-rules'.sub('{' + 'store_id' + '}', store_id.to_s)
602
+ # List promo rules
603
+ def list_promo_rules(store_id, opts = {})
604
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
605
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1773
606
 
1774
- # query parameters
1775
607
  query_params = {}
1776
608
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1777
609
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1778
610
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1779
611
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1780
-
1781
- # header parameters
1782
- header_params = {}
1783
- # HTTP header 'Accept' (if needed)
1784
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1785
- # HTTP header 'Content-Type'
1786
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1787
-
1788
- # form parameters
1789
- form_params = {}
1790
-
1791
- # http body (model)
1792
612
  post_body = nil
1793
- auth_names = ['basicAuth']
613
+
614
+ local_var_path = '/ecommerce/stores/{store_id}/promo-rules'.sub('{' + 'store_id' + '}', store_id.to_s)
1794
615
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1795
- :header_params => header_params,
1796
616
  :query_params => query_params,
1797
- :form_params => form_params,
1798
- :body => post_body,
1799
- :auth_names => auth_names,
1800
- :return_type => 'PromoRules')
617
+ :body => post_body)
1801
618
  return data, status_code, headers
1802
619
  end
1803
- # Get information about a specific promo rule
1804
- # Get information about a specific promo rule.
1805
- # @param store_id The store id.
1806
- # @param promo_rule_id The id for the promo rule of a store.
1807
- # @param [Hash] opts the optional parameters
1808
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1809
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1810
- # @return [EcommercePromoRule]
1811
- def get_promo_rule(store_id = {}, promo_rule_id = {}, opts = {})
1812
- data, _status_code, _headers = get_promo_rule_with_http_info(store_id, promo_rule_id, opts)
1813
- data
1814
- end
1815
620
 
1816
- # Get information about a specific promo rule
1817
- # Get information about a specific promo rule.
1818
- # @param store_id The store id.
1819
- # @param promo_rule_id The id for the promo rule of a store.
1820
- # @param [Hash] opts the optional parameters
1821
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1822
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1823
- # @return [Array<(EcommercePromoRule, Fixnum, Hash)>] EcommercePromoRule data, response status code and response headers
1824
- def get_promo_rule_with_http_info(store_id, promo_rule_id, opts = {})
1825
- # resource path
1826
- local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s)
621
+ # Get promo rule
622
+ def get_promo_rule(store_id, promo_rule_id, opts = {})
623
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
624
+ fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
1827
625
 
1828
- # query parameters
1829
626
  query_params = {}
1830
627
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1831
628
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1832
-
1833
- # header parameters
1834
- header_params = {}
1835
- # HTTP header 'Accept' (if needed)
1836
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1837
- # HTTP header 'Content-Type'
1838
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1839
-
1840
- # form parameters
1841
- form_params = {}
1842
-
1843
- # http body (model)
1844
629
  post_body = nil
1845
- auth_names = ['basicAuth']
630
+
631
+ local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s)
1846
632
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1847
- :header_params => header_params,
1848
633
  :query_params => query_params,
1849
- :form_params => form_params,
1850
- :body => post_body,
1851
- :auth_names => auth_names,
1852
- :return_type => 'EcommercePromoRule')
634
+ :body => post_body)
1853
635
  return data, status_code, headers
1854
636
  end
1855
- # Update a store
1856
- # Update a store.
1857
- # @param store_id The store id.
1858
- # @param body
1859
- # @param [Hash] opts the optional parameters
1860
- # @return [EcommerceStore]
1861
- def update_store(store_id = {}, body = {}, opts = {})
1862
- data, _status_code, _headers = update_store_with_http_info(store_id, body, opts)
1863
- data
1864
- end
1865
637
 
1866
- # Update a store
1867
- # Update a store.
1868
- # @param store_id The store id.
1869
- # @param body
1870
- # @param [Hash] opts the optional parameters
1871
- # @return [Array<(EcommerceStore, Fixnum, Hash)>] EcommerceStore data, response status code and response headers
1872
- def update_store_with_http_info(store_id, body, opts = {})
1873
- # resource path
1874
- local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s)
638
+ # Update store
639
+ def update_store(store_id, body, opts = {})
640
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
641
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
1875
642
 
1876
- # query parameters
1877
643
  query_params = {}
1878
-
1879
- # header parameters
1880
- header_params = {}
1881
- # HTTP header 'Accept' (if needed)
1882
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1883
- # HTTP header 'Content-Type'
1884
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1885
-
1886
- # form parameters
1887
- form_params = {}
1888
-
1889
- # http body (model)
1890
644
  post_body = @api_client.object_to_http_body(body)
1891
- auth_names = ['basicAuth']
645
+
646
+ local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s)
1892
647
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
1893
- :header_params => header_params,
1894
648
  :query_params => query_params,
1895
- :form_params => form_params,
1896
- :body => post_body,
1897
- :auth_names => auth_names,
1898
- :return_type => 'EcommerceStore')
649
+ :body => post_body)
1899
650
  return data, status_code, headers
1900
651
  end
1901
- # Update a specific cart
1902
- # Update a specific cart.
1903
- # @param store_id The store id.
1904
- # @param cart_id The id for the cart.
1905
- # @param body
1906
- # @param [Hash] opts the optional parameters
1907
- # @return [EcommerceCart]
1908
- def update_store_cart(store_id = {}, cart_id = {}, body = {}, opts = {})
1909
- data, _status_code, _headers = update_store_cart_with_http_info(store_id, cart_id, body, opts)
1910
- data
1911
- end
1912
652
 
1913
- # Update a specific cart
1914
- # Update a specific cart.
1915
- # @param store_id The store id.
1916
- # @param cart_id The id for the cart.
1917
- # @param body
1918
- # @param [Hash] opts the optional parameters
1919
- # @return [Array<(EcommerceCart, Fixnum, Hash)>] EcommerceCart data, response status code and response headers
1920
- def update_store_cart_with_http_info(store_id, cart_id, body, opts = {})
1921
- # resource path
1922
- local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
653
+ # Update cart
654
+ def update_store_cart(store_id, cart_id, body, opts = {})
655
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
656
+ fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
657
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
1923
658
 
1924
- # query parameters
1925
659
  query_params = {}
1926
-
1927
- # header parameters
1928
- header_params = {}
1929
- # HTTP header 'Accept' (if needed)
1930
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1931
- # HTTP header 'Content-Type'
1932
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1933
-
1934
- # form parameters
1935
- form_params = {}
1936
-
1937
- # http body (model)
1938
660
  post_body = @api_client.object_to_http_body(body)
1939
- auth_names = ['basicAuth']
661
+
662
+ local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
1940
663
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
1941
- :header_params => header_params,
1942
664
  :query_params => query_params,
1943
- :form_params => form_params,
1944
- :body => post_body,
1945
- :auth_names => auth_names,
1946
- :return_type => 'EcommerceCart')
665
+ :body => post_body)
1947
666
  return data, status_code, headers
1948
667
  end
1949
- # Update a specific cart line item
1950
- # Update a specific cart line item.
1951
- # @param store_id The store id.
1952
- # @param cart_id The id for the cart.
1953
- # @param line_id The id for the line item of a cart.
1954
- # @param body
1955
- # @param [Hash] opts the optional parameters
1956
- # @return [EcommerceCartLineItem]
1957
- def update_cart_line_item(store_id = {}, cart_id = {}, line_id = {}, body = {}, opts = {})
1958
- data, _status_code, _headers = update_cart_line_item_with_http_info(store_id, cart_id, line_id, body, opts)
1959
- data
1960
- end
1961
668
 
1962
- # Update a specific cart line item
1963
- # Update a specific cart line item.
1964
- # @param store_id The store id.
1965
- # @param cart_id The id for the cart.
1966
- # @param line_id The id for the line item of a cart.
1967
- # @param body
1968
- # @param [Hash] opts the optional parameters
1969
- # @return [Array<(EcommerceCartLineItem, Fixnum, Hash)>] EcommerceCartLineItem data, response status code and response headers
1970
- def update_cart_line_item_with_http_info(store_id, cart_id, line_id, body, opts = {})
1971
- # resource path
1972
- local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
669
+ # Update cart line item
670
+ def update_cart_line_item(store_id, cart_id, line_id, body, opts = {})
671
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
672
+ fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
673
+ fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
674
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
1973
675
 
1974
- # query parameters
1975
676
  query_params = {}
1976
-
1977
- # header parameters
1978
- header_params = {}
1979
- # HTTP header 'Accept' (if needed)
1980
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1981
- # HTTP header 'Content-Type'
1982
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1983
-
1984
- # form parameters
1985
- form_params = {}
1986
-
1987
- # http body (model)
1988
677
  post_body = @api_client.object_to_http_body(body)
1989
- auth_names = ['basicAuth']
678
+
679
+ local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
1990
680
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
1991
- :header_params => header_params,
1992
681
  :query_params => query_params,
1993
- :form_params => form_params,
1994
- :body => post_body,
1995
- :auth_names => auth_names,
1996
- :return_type => 'EcommerceCartLineItem')
682
+ :body => post_body)
1997
683
  return data, status_code, headers
1998
684
  end
1999
- # Update a customer
2000
- # Update a customer.
2001
- # @param store_id The store id.
2002
- # @param customer_id The id for the customer of a store.
2003
- # @param body
2004
- # @param [Hash] opts the optional parameters
2005
- # @return [EcommerceCustomer]
2006
- def update_store_customer(store_id = {}, customer_id = {}, body = {}, opts = {})
2007
- data, _status_code, _headers = update_store_customer_with_http_info(store_id, customer_id, body, opts)
2008
- data
2009
- end
2010
685
 
2011
- # Update a customer
2012
- # Update a customer.
2013
- # @param store_id The store id.
2014
- # @param customer_id The id for the customer of a store.
2015
- # @param body
2016
- # @param [Hash] opts the optional parameters
2017
- # @return [Array<(EcommerceCustomer, Fixnum, Hash)>] EcommerceCustomer data, response status code and response headers
2018
- def update_store_customer_with_http_info(store_id, customer_id, body, opts = {})
2019
- # resource path
2020
- local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
686
+ # Update customer
687
+ def update_store_customer(store_id, customer_id, body, opts = {})
688
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
689
+ fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil?
690
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2021
691
 
2022
- # query parameters
2023
692
  query_params = {}
2024
-
2025
- # header parameters
2026
- header_params = {}
2027
- # HTTP header 'Accept' (if needed)
2028
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2029
- # HTTP header 'Content-Type'
2030
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2031
-
2032
- # form parameters
2033
- form_params = {}
2034
-
2035
- # http body (model)
2036
693
  post_body = @api_client.object_to_http_body(body)
2037
- auth_names = ['basicAuth']
694
+
695
+ local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
2038
696
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2039
- :header_params => header_params,
2040
697
  :query_params => query_params,
2041
- :form_params => form_params,
2042
- :body => post_body,
2043
- :auth_names => auth_names,
2044
- :return_type => 'EcommerceCustomer')
698
+ :body => post_body)
2045
699
  return data, status_code, headers
2046
700
  end
2047
- # Update a specific order
2048
- # Update a specific order.
2049
- # @param store_id The store id.
2050
- # @param order_id The id for the order in a store.
2051
- # @param body
2052
- # @param [Hash] opts the optional parameters
2053
- # @return [EcommerceOrder]
2054
- def update_order(store_id = {}, order_id = {}, body = {}, opts = {})
2055
- data, _status_code, _headers = update_order_with_http_info(store_id, order_id, body, opts)
2056
- data
2057
- end
2058
701
 
2059
- # Update a specific order
2060
- # Update a specific order.
2061
- # @param store_id The store id.
2062
- # @param order_id The id for the order in a store.
2063
- # @param body
2064
- # @param [Hash] opts the optional parameters
2065
- # @return [Array<(EcommerceOrder, Fixnum, Hash)>] EcommerceOrder data, response status code and response headers
2066
- def update_order_with_http_info(store_id, order_id, body, opts = {})
2067
- # resource path
2068
- local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
702
+ # Update order
703
+ def update_order(store_id, order_id, body, opts = {})
704
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
705
+ fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
706
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2069
707
 
2070
- # query parameters
2071
708
  query_params = {}
2072
-
2073
- # header parameters
2074
- header_params = {}
2075
- # HTTP header 'Accept' (if needed)
2076
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2077
- # HTTP header 'Content-Type'
2078
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2079
-
2080
- # form parameters
2081
- form_params = {}
2082
-
2083
- # http body (model)
2084
709
  post_body = @api_client.object_to_http_body(body)
2085
- auth_names = ['basicAuth']
710
+
711
+ local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
2086
712
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2087
- :header_params => header_params,
2088
713
  :query_params => query_params,
2089
- :form_params => form_params,
2090
- :body => post_body,
2091
- :auth_names => auth_names,
2092
- :return_type => 'EcommerceOrder')
714
+ :body => post_body)
2093
715
  return data, status_code, headers
2094
716
  end
2095
- # Update a specific order line item
2096
- # Update a specific order line item.
2097
- # @param store_id The store id.
2098
- # @param order_id The id for the order in a store.
2099
- # @param line_id The id for the line item of an order.
2100
- # @param body
2101
- # @param [Hash] opts the optional parameters
2102
- # @return [EcommerceOrderLineItem]
2103
- def update_order_line_item(store_id = {}, order_id = {}, line_id = {}, body = {}, opts = {})
2104
- data, _status_code, _headers = update_order_line_item_with_http_info(store_id, order_id, line_id, body, opts)
2105
- data
2106
- end
2107
717
 
2108
- # Update a specific order line item
2109
- # Update a specific order line item.
2110
- # @param store_id The store id.
2111
- # @param order_id The id for the order in a store.
2112
- # @param line_id The id for the line item of an order.
2113
- # @param body
2114
- # @param [Hash] opts the optional parameters
2115
- # @return [Array<(EcommerceOrderLineItem, Fixnum, Hash)>] EcommerceOrderLineItem data, response status code and response headers
2116
- def update_order_line_item_with_http_info(store_id, order_id, line_id, body, opts = {})
2117
- # resource path
2118
- local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
718
+ # Update order line item
719
+ def update_order_line_item(store_id, order_id, line_id, body, opts = {})
720
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
721
+ fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
722
+ fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
723
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2119
724
 
2120
- # query parameters
2121
725
  query_params = {}
2122
-
2123
- # header parameters
2124
- header_params = {}
2125
- # HTTP header 'Accept' (if needed)
2126
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2127
- # HTTP header 'Content-Type'
2128
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2129
-
2130
- # form parameters
2131
- form_params = {}
2132
-
2133
- # http body (model)
2134
726
  post_body = @api_client.object_to_http_body(body)
2135
- auth_names = ['basicAuth']
727
+
728
+ local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s)
2136
729
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2137
- :header_params => header_params,
2138
730
  :query_params => query_params,
2139
- :form_params => form_params,
2140
- :body => post_body,
2141
- :auth_names => auth_names,
2142
- :return_type => 'EcommerceOrderLineItem')
731
+ :body => post_body)
2143
732
  return data, status_code, headers
2144
733
  end
2145
- # Update a specific product
2146
- # Update a specific product.
2147
- # @param store_id The store id.
2148
- # @param product_id The id for the product of a store.
2149
- # @param body
2150
- # @param [Hash] opts the optional parameters
2151
- # @return [EcommerceProduct]
2152
- def update_store_product(store_id = {}, product_id = {}, body = {}, opts = {})
2153
- data, _status_code, _headers = update_store_product_with_http_info(store_id, product_id, body, opts)
2154
- data
2155
- end
2156
734
 
2157
- # Update a specific product
2158
- # Update a specific product.
2159
- # @param store_id The store id.
2160
- # @param product_id The id for the product of a store.
2161
- # @param body
2162
- # @param [Hash] opts the optional parameters
2163
- # @return [Array<(EcommerceProduct, Fixnum, Hash)>] EcommerceProduct data, response status code and response headers
2164
- def update_store_product_with_http_info(store_id, product_id, body, opts = {})
2165
- # resource path
2166
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
735
+ # Update product
736
+ def update_store_product(store_id, product_id, body, opts = {})
737
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
738
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
739
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2167
740
 
2168
- # query parameters
2169
741
  query_params = {}
2170
-
2171
- # header parameters
2172
- header_params = {}
2173
- # HTTP header 'Accept' (if needed)
2174
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2175
- # HTTP header 'Content-Type'
2176
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2177
-
2178
- # form parameters
2179
- form_params = {}
2180
-
2181
- # http body (model)
2182
742
  post_body = @api_client.object_to_http_body(body)
2183
- auth_names = ['basicAuth']
743
+
744
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
2184
745
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2185
- :header_params => header_params,
2186
746
  :query_params => query_params,
2187
- :form_params => form_params,
2188
- :body => post_body,
2189
- :auth_names => auth_names,
2190
- :return_type => 'EcommerceProduct')
747
+ :body => post_body)
2191
748
  return data, status_code, headers
2192
749
  end
2193
- # Update a product image
2194
- # Update a product image.
2195
- # @param store_id The store id.
2196
- # @param product_id The id for the product of a store.
2197
- # @param image_id The id for the product image.
2198
- # @param body
2199
- # @param [Hash] opts the optional parameters
2200
- # @return [EcommerceProductImage]
2201
- def update_product_image(store_id = {}, product_id = {}, image_id = {}, body = {}, opts = {})
2202
- data, _status_code, _headers = update_product_image_with_http_info(store_id, product_id, image_id, body, opts)
2203
- data
2204
- end
2205
750
 
2206
- # Update a product image
2207
- # Update a product image.
2208
- # @param store_id The store id.
2209
- # @param product_id The id for the product of a store.
2210
- # @param image_id The id for the product image.
2211
- # @param body
2212
- # @param [Hash] opts the optional parameters
2213
- # @return [Array<(EcommerceProductImage, Fixnum, Hash)>] EcommerceProductImage data, response status code and response headers
2214
- def update_product_image_with_http_info(store_id, product_id, image_id, body, opts = {})
2215
- # resource path
2216
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'image_id' + '}', image_id.to_s)
751
+ # Update product image
752
+ def update_product_image(store_id, product_id, image_id, body, opts = {})
753
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
754
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
755
+ fail ArgumentError, "Missing required param: 'image_id'" if image_id.nil?
756
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2217
757
 
2218
- # query parameters
2219
758
  query_params = {}
2220
-
2221
- # header parameters
2222
- header_params = {}
2223
- # HTTP header 'Accept' (if needed)
2224
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2225
- # HTTP header 'Content-Type'
2226
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2227
-
2228
- # form parameters
2229
- form_params = {}
2230
-
2231
- # http body (model)
2232
759
  post_body = @api_client.object_to_http_body(body)
2233
- auth_names = ['basicAuth']
760
+
761
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'image_id' + '}', image_id.to_s)
2234
762
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2235
- :header_params => header_params,
2236
763
  :query_params => query_params,
2237
- :form_params => form_params,
2238
- :body => post_body,
2239
- :auth_names => auth_names,
2240
- :return_type => 'EcommerceProductImage')
764
+ :body => post_body)
2241
765
  return data, status_code, headers
2242
766
  end
2243
- # Update a product variant
2244
- # Update a product variant.
2245
- # @param store_id The store id.
2246
- # @param product_id The id for the product of a store.
2247
- # @param variant_id The id for the product variant.
2248
- # @param body
2249
- # @param [Hash] opts the optional parameters
2250
- # @return [EcommerceProductVariant]
2251
- def update_product_variant(store_id = {}, product_id = {}, variant_id = {}, body = {}, opts = {})
2252
- data, _status_code, _headers = update_product_variant_with_http_info(store_id, product_id, variant_id, body, opts)
2253
- data
2254
- end
2255
767
 
2256
- # Update a product variant
2257
- # Update a product variant.
2258
- # @param store_id The store id.
2259
- # @param product_id The id for the product of a store.
2260
- # @param variant_id The id for the product variant.
2261
- # @param body
2262
- # @param [Hash] opts the optional parameters
2263
- # @return [Array<(EcommerceProductVariant, Fixnum, Hash)>] EcommerceProductVariant data, response status code and response headers
2264
- def update_product_variant_with_http_info(store_id, product_id, variant_id, body, opts = {})
2265
- # resource path
2266
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s)
768
+ # Update product variant
769
+ def update_product_variant(store_id, product_id, variant_id, body, opts = {})
770
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
771
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
772
+ fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil?
773
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2267
774
 
2268
- # query parameters
2269
775
  query_params = {}
2270
-
2271
- # header parameters
2272
- header_params = {}
2273
- # HTTP header 'Accept' (if needed)
2274
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2275
- # HTTP header 'Content-Type'
2276
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2277
-
2278
- # form parameters
2279
- form_params = {}
2280
-
2281
- # http body (model)
2282
776
  post_body = @api_client.object_to_http_body(body)
2283
- auth_names = ['basicAuth']
777
+
778
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s)
2284
779
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2285
- :header_params => header_params,
2286
780
  :query_params => query_params,
2287
- :form_params => form_params,
2288
- :body => post_body,
2289
- :auth_names => auth_names,
2290
- :return_type => 'EcommerceProductVariant')
781
+ :body => post_body)
2291
782
  return data, status_code, headers
2292
783
  end
2293
- # Update a promo code
2294
- # Update a promo code.
2295
- # @param store_id The store id.
2296
- # @param promo_rule_id The id for the promo rule of a store.
2297
- # @param promo_code_id The id for the promo code of a store.
2298
- # @param body
2299
- # @param [Hash] opts the optional parameters
2300
- # @return [EcommercePromoCode]
2301
- def update_promo_code(store_id = {}, promo_rule_id = {}, promo_code_id = {}, body = {}, opts = {})
2302
- data, _status_code, _headers = update_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, body, opts)
2303
- data
2304
- end
2305
784
 
2306
- # Update a promo code
2307
- # Update a promo code.
2308
- # @param store_id The store id.
2309
- # @param promo_rule_id The id for the promo rule of a store.
2310
- # @param promo_code_id The id for the promo code of a store.
2311
- # @param body
2312
- # @param [Hash] opts the optional parameters
2313
- # @return [Array<(EcommercePromoCode, Fixnum, Hash)>] EcommercePromoCode data, response status code and response headers
2314
- def update_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, body, opts = {})
2315
- # resource path
2316
- local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'promo_code_id' + '}', promo_code_id.to_s)
785
+ # Update promo code
786
+ def update_promo_code(store_id, promo_rule_id, promo_code_id, body, opts = {})
787
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
788
+ fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
789
+ fail ArgumentError, "Missing required param: 'promo_code_id'" if promo_code_id.nil?
790
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2317
791
 
2318
- # query parameters
2319
792
  query_params = {}
2320
-
2321
- # header parameters
2322
- header_params = {}
2323
- # HTTP header 'Accept' (if needed)
2324
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2325
- # HTTP header 'Content-Type'
2326
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2327
-
2328
- # form parameters
2329
- form_params = {}
2330
-
2331
- # http body (model)
2332
793
  post_body = @api_client.object_to_http_body(body)
2333
- auth_names = ['basicAuth']
794
+
795
+ local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'promo_code_id' + '}', promo_code_id.to_s)
2334
796
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2335
- :header_params => header_params,
2336
797
  :query_params => query_params,
2337
- :form_params => form_params,
2338
- :body => post_body,
2339
- :auth_names => auth_names,
2340
- :return_type => 'EcommercePromoCode')
798
+ :body => post_body)
2341
799
  return data, status_code, headers
2342
800
  end
2343
- # Update a promo rule. Please note, when a promo rule is updated, the new property/properties will apply to all the promo codes that share this promo_rule_id.
2344
- # Update a promo rule.
2345
- # @param store_id The store id.
2346
- # @param promo_rule_id The id for the promo rule of a store.
2347
- # @param body
2348
- # @param [Hash] opts the optional parameters
2349
- # @return [EcommercePromoRule]
2350
- def update_promo_rule(store_id = {}, promo_rule_id = {}, body = {}, opts = {})
2351
- data, _status_code, _headers = update_promo_rule_with_http_info(store_id, promo_rule_id, body, opts)
2352
- data
2353
- end
2354
801
 
2355
- # Update a promo rule. Please note, when a promo rule is updated, the new property/properties will apply to all the promo codes that share this promo_rule_id.
2356
- # Update a promo rule.
2357
- # @param store_id The store id.
2358
- # @param promo_rule_id The id for the promo rule of a store.
2359
- # @param body
2360
- # @param [Hash] opts the optional parameters
2361
- # @return [Array<(EcommercePromoRule, Fixnum, Hash)>] EcommercePromoRule data, response status code and response headers
2362
- def update_promo_rule_with_http_info(store_id, promo_rule_id, body, opts = {})
2363
- # resource path
2364
- local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s)
802
+ # Update promo rule
803
+ def update_promo_rule(store_id, promo_rule_id, body, opts = {})
804
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
805
+ fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
806
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2365
807
 
2366
- # query parameters
2367
808
  query_params = {}
2368
-
2369
- # header parameters
2370
- header_params = {}
2371
- # HTTP header 'Accept' (if needed)
2372
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2373
- # HTTP header 'Content-Type'
2374
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2375
-
2376
- # form parameters
2377
- form_params = {}
2378
-
2379
- # http body (model)
2380
809
  post_body = @api_client.object_to_http_body(body)
2381
- auth_names = ['basicAuth']
810
+
811
+ local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s)
2382
812
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2383
- :header_params => header_params,
2384
813
  :query_params => query_params,
2385
- :form_params => form_params,
2386
- :body => post_body,
2387
- :auth_names => auth_names,
2388
- :return_type => 'EcommercePromoRule')
814
+ :body => post_body)
2389
815
  return data, status_code, headers
2390
816
  end
2391
- # Add a new store
2392
- # Add a new store to your Mailchimp account.
2393
- # @param body
2394
- # @param [Hash] opts the optional parameters
2395
- # @return [EcommerceStore]
2396
- def add_store(body = {}, opts = {})
2397
- data, _status_code, _headers = add_store_with_http_info(body, opts)
2398
- data
2399
- end
2400
817
 
2401
- # Add a new store
2402
- # Add a new store to your Mailchimp account.
2403
- # @param body
2404
- # @param [Hash] opts the optional parameters
2405
- # @return [Array<(EcommerceStore, Fixnum, Hash)>] EcommerceStore data, response status code and response headers
2406
- def add_store_with_http_info(body, opts = {})
2407
- # resource path
2408
- local_var_path = '/ecommerce/stores'
818
+ # Add store
819
+ def add_store(body, opts = {})
820
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2409
821
 
2410
- # query parameters
2411
822
  query_params = {}
2412
-
2413
- # header parameters
2414
- header_params = {}
2415
- # HTTP header 'Accept' (if needed)
2416
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2417
- # HTTP header 'Content-Type'
2418
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2419
-
2420
- # form parameters
2421
- form_params = {}
2422
-
2423
- # http body (model)
2424
823
  post_body = @api_client.object_to_http_body(body)
2425
- auth_names = ['basicAuth']
824
+
825
+ local_var_path = '/ecommerce/stores'
2426
826
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2427
- :header_params => header_params,
2428
827
  :query_params => query_params,
2429
- :form_params => form_params,
2430
- :body => post_body,
2431
- :auth_names => auth_names,
2432
- :return_type => 'EcommerceStore')
828
+ :body => post_body)
2433
829
  return data, status_code, headers
2434
830
  end
2435
- # Add a new cart to a store
2436
- # Add a new cart to a store.
2437
- # @param store_id The store id.
2438
- # @param body
2439
- # @param [Hash] opts the optional parameters
2440
- # @return [EcommerceCart]
2441
- def add_store_cart(store_id = {}, body = {}, opts = {})
2442
- data, _status_code, _headers = add_store_cart_with_http_info(store_id, body, opts)
2443
- data
2444
- end
2445
831
 
2446
- # Add a new cart to a store
2447
- # Add a new cart to a store.
2448
- # @param store_id The store id.
2449
- # @param body
2450
- # @param [Hash] opts the optional parameters
2451
- # @return [Array<(EcommerceCart, Fixnum, Hash)>] EcommerceCart data, response status code and response headers
2452
- def add_store_cart_with_http_info(store_id, body, opts = {})
2453
- # resource path
2454
- local_var_path = '/ecommerce/stores/{store_id}/carts'.sub('{' + 'store_id' + '}', store_id.to_s)
832
+ # Add cart
833
+ def add_store_cart(store_id, body, opts = {})
834
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
835
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2455
836
 
2456
- # query parameters
2457
837
  query_params = {}
2458
-
2459
- # header parameters
2460
- header_params = {}
2461
- # HTTP header 'Accept' (if needed)
2462
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2463
- # HTTP header 'Content-Type'
2464
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2465
-
2466
- # form parameters
2467
- form_params = {}
2468
-
2469
- # http body (model)
2470
838
  post_body = @api_client.object_to_http_body(body)
2471
- auth_names = ['basicAuth']
839
+
840
+ local_var_path = '/ecommerce/stores/{store_id}/carts'.sub('{' + 'store_id' + '}', store_id.to_s)
2472
841
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2473
- :header_params => header_params,
2474
842
  :query_params => query_params,
2475
- :form_params => form_params,
2476
- :body => post_body,
2477
- :auth_names => auth_names,
2478
- :return_type => 'EcommerceCart')
843
+ :body => post_body)
2479
844
  return data, status_code, headers
2480
845
  end
2481
- # Add a new line item to an existing cart
2482
- # Add a new line item to an existing cart.
2483
- # @param store_id The store id.
2484
- # @param cart_id The id for the cart.
2485
- # @param body
2486
- # @param [Hash] opts the optional parameters
2487
- # @return [EcommerceCartLineItem]
2488
- def add_cart_line_item(store_id = {}, cart_id = {}, body = {}, opts = {})
2489
- data, _status_code, _headers = add_cart_line_item_with_http_info(store_id, cart_id, body, opts)
2490
- data
2491
- end
2492
846
 
2493
- # Add a new line item to an existing cart
2494
- # Add a new line item to an existing cart.
2495
- # @param store_id The store id.
2496
- # @param cart_id The id for the cart.
2497
- # @param body
2498
- # @param [Hash] opts the optional parameters
2499
- # @return [Array<(EcommerceCartLineItem, Fixnum, Hash)>] EcommerceCartLineItem data, response status code and response headers
2500
- def add_cart_line_item_with_http_info(store_id, cart_id, body, opts = {})
2501
- # resource path
2502
- local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
847
+ # Add cart line item
848
+ def add_cart_line_item(store_id, cart_id, body, opts = {})
849
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
850
+ fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
851
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2503
852
 
2504
- # query parameters
2505
853
  query_params = {}
2506
-
2507
- # header parameters
2508
- header_params = {}
2509
- # HTTP header 'Accept' (if needed)
2510
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2511
- # HTTP header 'Content-Type'
2512
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2513
-
2514
- # form parameters
2515
- form_params = {}
2516
-
2517
- # http body (model)
2518
854
  post_body = @api_client.object_to_http_body(body)
2519
- auth_names = ['basicAuth']
855
+
856
+ local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
2520
857
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2521
- :header_params => header_params,
2522
858
  :query_params => query_params,
2523
- :form_params => form_params,
2524
- :body => post_body,
2525
- :auth_names => auth_names,
2526
- :return_type => 'EcommerceCartLineItem')
859
+ :body => post_body)
2527
860
  return data, status_code, headers
2528
861
  end
2529
- # Add a new customer to a store
2530
- # Add a new customer to a store.
2531
- # @param store_id The store id.
2532
- # @param body
2533
- # @param [Hash] opts the optional parameters
2534
- # @return [EcommerceCustomer]
2535
- def add_store_customer(store_id = {}, body = {}, opts = {})
2536
- data, _status_code, _headers = add_store_customer_with_http_info(store_id, body, opts)
2537
- data
2538
- end
2539
862
 
2540
- # Add a new customer to a store
2541
- # Add a new customer to a store.
2542
- # @param store_id The store id.
2543
- # @param body
2544
- # @param [Hash] opts the optional parameters
2545
- # @return [Array<(EcommerceCustomer, Fixnum, Hash)>] EcommerceCustomer data, response status code and response headers
2546
- def add_store_customer_with_http_info(store_id, body, opts = {})
2547
- # resource path
2548
- local_var_path = '/ecommerce/stores/{store_id}/customers'.sub('{' + 'store_id' + '}', store_id.to_s)
863
+ # Add customer
864
+ def add_store_customer(store_id, body, opts = {})
865
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
866
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2549
867
 
2550
- # query parameters
2551
868
  query_params = {}
2552
-
2553
- # header parameters
2554
- header_params = {}
2555
- # HTTP header 'Accept' (if needed)
2556
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2557
- # HTTP header 'Content-Type'
2558
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2559
-
2560
- # form parameters
2561
- form_params = {}
2562
-
2563
- # http body (model)
2564
869
  post_body = @api_client.object_to_http_body(body)
2565
- auth_names = ['basicAuth']
870
+
871
+ local_var_path = '/ecommerce/stores/{store_id}/customers'.sub('{' + 'store_id' + '}', store_id.to_s)
2566
872
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2567
- :header_params => header_params,
2568
873
  :query_params => query_params,
2569
- :form_params => form_params,
2570
- :body => post_body,
2571
- :auth_names => auth_names,
2572
- :return_type => 'EcommerceCustomer')
874
+ :body => post_body)
2573
875
  return data, status_code, headers
2574
876
  end
2575
- # Add a new order to a store
2576
- # Add a new order to a store.
2577
- # @param store_id The store id.
2578
- # @param body
2579
- # @param [Hash] opts the optional parameters
2580
- # @return [EcommerceOrder]
2581
- def add_store_order(store_id = {}, body = {}, opts = {})
2582
- data, _status_code, _headers = add_store_order_with_http_info(store_id, body, opts)
2583
- data
2584
- end
2585
877
 
2586
- # Add a new order to a store
2587
- # Add a new order to a store.
2588
- # @param store_id The store id.
2589
- # @param body
2590
- # @param [Hash] opts the optional parameters
2591
- # @return [Array<(EcommerceOrder, Fixnum, Hash)>] EcommerceOrder data, response status code and response headers
2592
- def add_store_order_with_http_info(store_id, body, opts = {})
2593
- # resource path
2594
- local_var_path = '/ecommerce/stores/{store_id}/orders'.sub('{' + 'store_id' + '}', store_id.to_s)
878
+ # Add order
879
+ def add_store_order(store_id, body, opts = {})
880
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
881
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2595
882
 
2596
- # query parameters
2597
883
  query_params = {}
2598
-
2599
- # header parameters
2600
- header_params = {}
2601
- # HTTP header 'Accept' (if needed)
2602
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2603
- # HTTP header 'Content-Type'
2604
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2605
-
2606
- # form parameters
2607
- form_params = {}
2608
-
2609
- # http body (model)
2610
884
  post_body = @api_client.object_to_http_body(body)
2611
- auth_names = ['basicAuth']
885
+
886
+ local_var_path = '/ecommerce/stores/{store_id}/orders'.sub('{' + 'store_id' + '}', store_id.to_s)
2612
887
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2613
- :header_params => header_params,
2614
888
  :query_params => query_params,
2615
- :form_params => form_params,
2616
- :body => post_body,
2617
- :auth_names => auth_names,
2618
- :return_type => 'EcommerceOrder')
889
+ :body => post_body)
2619
890
  return data, status_code, headers
2620
891
  end
2621
- # Add a new line item to an existing order
2622
- # Add a new line item to an existing order.
2623
- # @param store_id The store id.
2624
- # @param order_id The id for the order in a store.
2625
- # @param body
2626
- # @param [Hash] opts the optional parameters
2627
- # @return [EcommerceOrderLineItem]
2628
- def add_order_line_item(store_id = {}, order_id = {}, body = {}, opts = {})
2629
- data, _status_code, _headers = add_order_line_item_with_http_info(store_id, order_id, body, opts)
2630
- data
2631
- end
2632
892
 
2633
- # Add a new line item to an existing order
2634
- # Add a new line item to an existing order.
2635
- # @param store_id The store id.
2636
- # @param order_id The id for the order in a store.
2637
- # @param body
2638
- # @param [Hash] opts the optional parameters
2639
- # @return [Array<(EcommerceOrderLineItem, Fixnum, Hash)>] EcommerceOrderLineItem data, response status code and response headers
2640
- def add_order_line_item_with_http_info(store_id, order_id, body, opts = {})
2641
- # resource path
2642
- local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
893
+ # Add order line item
894
+ def add_order_line_item(store_id, order_id, body, opts = {})
895
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
896
+ fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
897
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2643
898
 
2644
- # query parameters
2645
899
  query_params = {}
2646
-
2647
- # header parameters
2648
- header_params = {}
2649
- # HTTP header 'Accept' (if needed)
2650
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2651
- # HTTP header 'Content-Type'
2652
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2653
-
2654
- # form parameters
2655
- form_params = {}
2656
-
2657
- # http body (model)
2658
900
  post_body = @api_client.object_to_http_body(body)
2659
- auth_names = ['basicAuth']
901
+
902
+ local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
2660
903
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2661
- :header_params => header_params,
2662
904
  :query_params => query_params,
2663
- :form_params => form_params,
2664
- :body => post_body,
2665
- :auth_names => auth_names,
2666
- :return_type => 'EcommerceOrderLineItem')
905
+ :body => post_body)
2667
906
  return data, status_code, headers
2668
907
  end
2669
- # Add a new product to a store
2670
- # Add a new product to a store.
2671
- # @param store_id The store id.
2672
- # @param body
2673
- # @param [Hash] opts the optional parameters
2674
- # @return [EcommerceProduct]
2675
- def add_store_product(store_id = {}, body = {}, opts = {})
2676
- data, _status_code, _headers = add_store_product_with_http_info(store_id, body, opts)
2677
- data
2678
- end
2679
908
 
2680
- # Add a new product to a store
2681
- # Add a new product to a store.
2682
- # @param store_id The store id.
2683
- # @param body
2684
- # @param [Hash] opts the optional parameters
2685
- # @return [Array<(EcommerceProduct, Fixnum, Hash)>] EcommerceProduct data, response status code and response headers
2686
- def add_store_product_with_http_info(store_id, body, opts = {})
2687
- # resource path
2688
- local_var_path = '/ecommerce/stores/{store_id}/products'.sub('{' + 'store_id' + '}', store_id.to_s)
909
+ # Add product
910
+ def add_store_product(store_id, body, opts = {})
911
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
912
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2689
913
 
2690
- # query parameters
2691
914
  query_params = {}
2692
-
2693
- # header parameters
2694
- header_params = {}
2695
- # HTTP header 'Accept' (if needed)
2696
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2697
- # HTTP header 'Content-Type'
2698
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2699
-
2700
- # form parameters
2701
- form_params = {}
2702
-
2703
- # http body (model)
2704
915
  post_body = @api_client.object_to_http_body(body)
2705
- auth_names = ['basicAuth']
916
+
917
+ local_var_path = '/ecommerce/stores/{store_id}/products'.sub('{' + 'store_id' + '}', store_id.to_s)
2706
918
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2707
- :header_params => header_params,
2708
919
  :query_params => query_params,
2709
- :form_params => form_params,
2710
- :body => post_body,
2711
- :auth_names => auth_names,
2712
- :return_type => 'EcommerceProduct')
920
+ :body => post_body)
2713
921
  return data, status_code, headers
2714
922
  end
2715
- # Add a new image to the product.
2716
- # Add a new image to the product.
2717
- # @param store_id The store id.
2718
- # @param product_id The id for the product of a store.
2719
- # @param body
2720
- # @param [Hash] opts the optional parameters
2721
- # @return [EcommerceProductImage]
2722
- def add_product_image(store_id = {}, product_id = {}, body = {}, opts = {})
2723
- data, _status_code, _headers = add_product_image_with_http_info(store_id, product_id, body, opts)
2724
- data
2725
- end
2726
923
 
2727
- # Add a new image to the product.
2728
- # Add a new image to the product.
2729
- # @param store_id The store id.
2730
- # @param product_id The id for the product of a store.
2731
- # @param body
2732
- # @param [Hash] opts the optional parameters
2733
- # @return [Array<(EcommerceProductImage, Fixnum, Hash)>] EcommerceProductImage data, response status code and response headers
2734
- def add_product_image_with_http_info(store_id, product_id, body, opts = {})
2735
- # resource path
2736
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
924
+ # Add product image
925
+ def add_product_image(store_id, product_id, body, opts = {})
926
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
927
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
928
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2737
929
 
2738
- # query parameters
2739
930
  query_params = {}
2740
-
2741
- # header parameters
2742
- header_params = {}
2743
- # HTTP header 'Accept' (if needed)
2744
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2745
- # HTTP header 'Content-Type'
2746
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2747
-
2748
- # form parameters
2749
- form_params = {}
2750
-
2751
- # http body (model)
2752
931
  post_body = @api_client.object_to_http_body(body)
2753
- auth_names = ['basicAuth']
932
+
933
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
2754
934
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2755
- :header_params => header_params,
2756
935
  :query_params => query_params,
2757
- :form_params => form_params,
2758
- :body => post_body,
2759
- :auth_names => auth_names,
2760
- :return_type => 'EcommerceProductImage')
936
+ :body => post_body)
2761
937
  return data, status_code, headers
2762
938
  end
2763
- # Add a new variant to the product.
2764
- # Add a new variant to the product.
2765
- # @param store_id The store id.
2766
- # @param product_id The id for the product of a store.
2767
- # @param body
2768
- # @param [Hash] opts the optional parameters
2769
- # @return [EcommerceProductVariant]
2770
- def add_product_variants(store_id = {}, product_id = {}, body = {}, opts = {})
2771
- data, _status_code, _headers = add_product_variants_with_http_info(store_id, product_id, body, opts)
2772
- data
2773
- end
2774
939
 
2775
- # Add a new variant to the product.
2776
- # Add a new variant to the product.
2777
- # @param store_id The store id.
2778
- # @param product_id The id for the product of a store.
2779
- # @param body
2780
- # @param [Hash] opts the optional parameters
2781
- # @return [Array<(EcommerceProductVariant, Fixnum, Hash)>] EcommerceProductVariant data, response status code and response headers
2782
- def add_product_variants_with_http_info(store_id, product_id, body, opts = {})
2783
- # resource path
2784
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
940
+ # Add product variant
941
+ def add_product_variants(store_id, product_id, body, opts = {})
942
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
943
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
944
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2785
945
 
2786
- # query parameters
2787
946
  query_params = {}
2788
-
2789
- # header parameters
2790
- header_params = {}
2791
- # HTTP header 'Accept' (if needed)
2792
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2793
- # HTTP header 'Content-Type'
2794
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2795
-
2796
- # form parameters
2797
- form_params = {}
2798
-
2799
- # http body (model)
2800
947
  post_body = @api_client.object_to_http_body(body)
2801
- auth_names = ['basicAuth']
948
+
949
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
2802
950
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2803
- :header_params => header_params,
2804
951
  :query_params => query_params,
2805
- :form_params => form_params,
2806
- :body => post_body,
2807
- :auth_names => auth_names,
2808
- :return_type => 'EcommerceProductVariant')
952
+ :body => post_body)
2809
953
  return data, status_code, headers
2810
954
  end
2811
- # Add a new promo code to a store
2812
- # Add a new promo code to a store.
2813
- # @param store_id The store id.
2814
- # @param promo_rule_id The id for the promo rule of a store.
2815
- # @param body
2816
- # @param [Hash] opts the optional parameters
2817
- # @return [EcommercePromoCode]
2818
- def add_promo_code(store_id = {}, promo_rule_id = {}, body = {}, opts = {})
2819
- data, _status_code, _headers = add_promo_code_with_http_info(store_id, promo_rule_id, body, opts)
2820
- data
2821
- end
2822
955
 
2823
- # Add a new promo code to a store
2824
- # Add a new promo code to a store.
2825
- # @param store_id The store id.
2826
- # @param promo_rule_id The id for the promo rule of a store.
2827
- # @param body
2828
- # @param [Hash] opts the optional parameters
2829
- # @return [Array<(EcommercePromoCode, Fixnum, Hash)>] EcommercePromoCode data, response status code and response headers
2830
- def add_promo_code_with_http_info(store_id, promo_rule_id, body, opts = {})
2831
- # resource path
2832
- local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s)
956
+ # Add promo code
957
+ def add_promo_code(store_id, promo_rule_id, body, opts = {})
958
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
959
+ fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
960
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2833
961
 
2834
- # query parameters
2835
962
  query_params = {}
2836
-
2837
- # header parameters
2838
- header_params = {}
2839
- # HTTP header 'Accept' (if needed)
2840
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2841
- # HTTP header 'Content-Type'
2842
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2843
-
2844
- # form parameters
2845
- form_params = {}
2846
-
2847
- # http body (model)
2848
963
  post_body = @api_client.object_to_http_body(body)
2849
- auth_names = ['basicAuth']
964
+
965
+ local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s)
2850
966
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2851
- :header_params => header_params,
2852
967
  :query_params => query_params,
2853
- :form_params => form_params,
2854
- :body => post_body,
2855
- :auth_names => auth_names,
2856
- :return_type => 'EcommercePromoCode')
968
+ :body => post_body)
2857
969
  return data, status_code, headers
2858
970
  end
2859
- # Add a new promo rule to a store
2860
- # Add a new promo rule to a store.
2861
- # @param store_id The store id.
2862
- # @param body
2863
- # @param [Hash] opts the optional parameters
2864
- # @return [EcommercePromoRule]
2865
- def add_promo_rules(store_id = {}, body = {}, opts = {})
2866
- data, _status_code, _headers = add_promo_rules_with_http_info(store_id, body, opts)
2867
- data
2868
- end
2869
971
 
2870
- # Add a new promo rule to a store
2871
- # Add a new promo rule to a store.
2872
- # @param store_id The store id.
2873
- # @param body
2874
- # @param [Hash] opts the optional parameters
2875
- # @return [Array<(EcommercePromoRule, Fixnum, Hash)>] EcommercePromoRule data, response status code and response headers
2876
- def add_promo_rules_with_http_info(store_id, body, opts = {})
2877
- # resource path
2878
- local_var_path = '/ecommerce/stores/{store_id}/promo-rules'.sub('{' + 'store_id' + '}', store_id.to_s)
972
+ # Add promo rule
973
+ def add_promo_rules(store_id, body, opts = {})
974
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
975
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2879
976
 
2880
- # query parameters
2881
977
  query_params = {}
2882
-
2883
- # header parameters
2884
- header_params = {}
2885
- # HTTP header 'Accept' (if needed)
2886
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2887
- # HTTP header 'Content-Type'
2888
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2889
-
2890
- # form parameters
2891
- form_params = {}
2892
-
2893
- # http body (model)
2894
978
  post_body = @api_client.object_to_http_body(body)
2895
- auth_names = ['basicAuth']
979
+
980
+ local_var_path = '/ecommerce/stores/{store_id}/promo-rules'.sub('{' + 'store_id' + '}', store_id.to_s)
2896
981
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2897
- :header_params => header_params,
2898
982
  :query_params => query_params,
2899
- :form_params => form_params,
2900
- :body => post_body,
2901
- :auth_names => auth_names,
2902
- :return_type => 'EcommercePromoRule')
983
+ :body => post_body)
2903
984
  return data, status_code, headers
2904
985
  end
2905
- # Add or update a customer
2906
- # Add or update a customer.
2907
- # @param store_id The store id.
2908
- # @param customer_id The id for the customer of a store.
2909
- # @param body
2910
- # @param [Hash] opts the optional parameters
2911
- # @return [EcommerceCustomer]
2912
- def set_store_customer(store_id = {}, customer_id = {}, body = {}, opts = {})
2913
- data, _status_code, _headers = set_store_customer_with_http_info(store_id, customer_id, body, opts)
2914
- data
2915
- end
2916
986
 
2917
- # Add or update a customer
2918
- # Add or update a customer.
2919
- # @param store_id The store id.
2920
- # @param customer_id The id for the customer of a store.
2921
- # @param body
2922
- # @param [Hash] opts the optional parameters
2923
- # @return [Array<(EcommerceCustomer, Fixnum, Hash)>] EcommerceCustomer data, response status code and response headers
2924
- def set_store_customer_with_http_info(store_id, customer_id, body, opts = {})
2925
- # resource path
2926
- local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
987
+ # Add or update customer
988
+ def set_store_customer(store_id, customer_id, body, opts = {})
989
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
990
+ fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil?
991
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2927
992
 
2928
- # query parameters
2929
993
  query_params = {}
2930
-
2931
- # header parameters
2932
- header_params = {}
2933
- # HTTP header 'Accept' (if needed)
2934
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2935
- # HTTP header 'Content-Type'
2936
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2937
-
2938
- # form parameters
2939
- form_params = {}
2940
-
2941
- # http body (model)
2942
994
  post_body = @api_client.object_to_http_body(body)
2943
- auth_names = ['basicAuth']
995
+
996
+ local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
2944
997
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
2945
- :header_params => header_params,
2946
998
  :query_params => query_params,
2947
- :form_params => form_params,
2948
- :body => post_body,
2949
- :auth_names => auth_names,
2950
- :return_type => 'EcommerceCustomer')
999
+ :body => post_body)
2951
1000
  return data, status_code, headers
2952
1001
  end
2953
- # Add or update a product variant
2954
- # Add or update a product variant.
2955
- # @param store_id The store id.
2956
- # @param product_id The id for the product of a store.
2957
- # @param variant_id The id for the product variant.
2958
- # @param body
2959
- # @param [Hash] opts the optional parameters
2960
- # @return [EcommerceProductVariant]
2961
- def add_product_variant(store_id = {}, product_id = {}, variant_id = {}, body = {}, opts = {})
2962
- data, _status_code, _headers = add_product_variant_with_http_info(store_id, product_id, variant_id, body, opts)
2963
- data
2964
- end
2965
1002
 
2966
- # Add or update a product variant
2967
- # Add or update a product variant.
2968
- # @param store_id The store id.
2969
- # @param product_id The id for the product of a store.
2970
- # @param variant_id The id for the product variant.
2971
- # @param body
2972
- # @param [Hash] opts the optional parameters
2973
- # @return [Array<(EcommerceProductVariant, Fixnum, Hash)>] EcommerceProductVariant data, response status code and response headers
2974
- def add_product_variant_with_http_info(store_id, product_id, variant_id, body, opts = {})
2975
- # resource path
2976
- local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s)
1003
+ # Add or update product variant
1004
+ def add_product_variant(store_id, product_id, variant_id, body, opts = {})
1005
+ fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
1006
+ fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
1007
+ fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil?
1008
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2977
1009
 
2978
- # query parameters
2979
1010
  query_params = {}
2980
-
2981
- # header parameters
2982
- header_params = {}
2983
- # HTTP header 'Accept' (if needed)
2984
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2985
- # HTTP header 'Content-Type'
2986
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2987
-
2988
- # form parameters
2989
- form_params = {}
2990
-
2991
- # http body (model)
2992
1011
  post_body = @api_client.object_to_http_body(body)
2993
- auth_names = ['basicAuth']
1012
+
1013
+ local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s)
2994
1014
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
2995
- :header_params => header_params,
2996
1015
  :query_params => query_params,
2997
- :form_params => form_params,
2998
- :body => post_body,
2999
- :auth_names => auth_names,
3000
- :return_type => 'EcommerceProductVariant')
1016
+ :body => post_body)
3001
1017
  return data, status_code, headers
3002
1018
  end
3003
1019
  end