MailchimpMarketing 3.0.5 → 3.0.6

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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/MailchimpMarketing.gemspec +1 -1
  3. data/README.md +22 -26
  4. data/lib/MailchimpMarketing.rb +1 -1
  5. data/lib/MailchimpMarketing/api/activity_feed_api.rb +11 -67
  6. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +17 -110
  7. data/lib/MailchimpMarketing/api/automations_api.rb +111 -666
  8. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +28 -177
  9. data/lib/MailchimpMarketing/api/batches_api.rb +22 -142
  10. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +28 -177
  11. data/lib/MailchimpMarketing/api/campaigns_api.rb +125 -784
  12. data/lib/MailchimpMarketing/api/connected_sites_api.rb +27 -174
  13. data/lib/MailchimpMarketing/api/conversations_api.rb +31 -200
  14. data/lib/MailchimpMarketing/api/dashboard_api.rb +26 -215
  15. data/lib/MailchimpMarketing/api/ecommerce_api.rb +388 -2253
  16. data/lib/MailchimpMarketing/api/external_auths_api.rb +17 -110
  17. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +14 -81
  18. data/lib/MailchimpMarketing/api/file_manager_api.rb +60 -402
  19. data/lib/MailchimpMarketing/api/landing_pages_api.rb +45 -280
  20. data/lib/MailchimpMarketing/api/lists_api.rb +420 -2575
  21. data/lib/MailchimpMarketing/api/ping_api.rb +6 -32
  22. data/lib/MailchimpMarketing/api/postcards_api.rb +8 -40
  23. data/lib/MailchimpMarketing/api/reporting_api.rb +35 -231
  24. data/lib/MailchimpMarketing/api/reports_api.rb +131 -881
  25. data/lib/MailchimpMarketing/api/root_api.rb +6 -36
  26. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +7 -38
  27. data/lib/MailchimpMarketing/api/search_members_api.rb +7 -40
  28. data/lib/MailchimpMarketing/api/template_folders_api.rb +28 -177
  29. data/lib/MailchimpMarketing/api/templates_api.rb +34 -228
  30. data/lib/MailchimpMarketing/api/verified_domains_api.rb +27 -165
  31. data/lib/MailchimpMarketing/api_client.rb +11 -55
  32. data/lib/MailchimpMarketing/api_error.rb +1 -1
  33. data/lib/MailchimpMarketing/configuration.rb +1 -1
  34. data/lib/MailchimpMarketing/version.rb +2 -2
  35. metadata +2 -2
@@ -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.5
6
+ OpenAPI spec version: 3.0.6
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
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  require 'uri'
14
+ require 'json'
14
15
 
15
16
  module MailchimpMarketing
16
17
  class LandingPagesApi
@@ -19,380 +20,144 @@ module MailchimpMarketing
19
20
  def initialize(api_client)
20
21
  @api_client = api_client
21
22
  end
22
- # Delete landing page
23
- # Delete a landing page.
24
- # @param page_id The unique id for the page.
25
- # @param [Hash] opts the optional parameters
26
- # @return [nil]
27
- def delete_page(page_id = {}, opts = {})
28
- delete_page_with_http_info(page_id, opts)
29
- nil
30
- end
31
23
 
32
24
  # Delete landing page
33
- # Delete a landing page.
34
- # @param page_id The unique id for the page.
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
37
- def delete_page_with_http_info(page_id, opts = {})
38
- # resource path
39
- local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_id.to_s)
25
+ def delete_page(page_id, opts = {})
26
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
40
27
 
41
- # query parameters
42
28
  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
29
  form_params = {}
53
-
54
- # http body (model)
55
30
  post_body = nil
56
- auth_names = ['basicAuth']
31
+
32
+ local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_id.to_s)
57
33
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
58
- :header_params => header_params,
59
34
  :query_params => query_params,
60
35
  :form_params => form_params,
61
- :body => post_body,
62
- :auth_names => auth_names)
36
+ :body => post_body)
63
37
  return data, status_code, headers
64
38
  end
65
- # List landing pages
66
- # Get all landing pages.
67
- # @param [Hash] opts the optional parameters
68
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
69
- # @option opts [String] :sort_field Returns files sorted by the specified field.
70
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
71
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
72
- # @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)
73
- # @return [InlineResponse2006]
74
- def get_all(opts = {})
75
- data, _status_code, _headers = get_all_with_http_info(opts)
76
- data
77
- end
78
39
 
79
40
  # List landing pages
80
- # Get all landing pages.
81
- # @param [Hash] opts the optional parameters
82
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
83
- # @option opts [String] :sort_field Returns files sorted by the specified field.
84
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
85
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
86
- # @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**
87
- # @return [Array<(InlineResponse2006, Fixnum, Hash)>] InlineResponse2006 data, response status code and response headers
88
- def get_all_with_http_info(opts = {})
89
- # resource path
90
- local_var_path = '/landing-pages'
41
+ def get_all(opts = {})
42
+ fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
43
+ fail ArgumentError, 'invalid value for "sort_field", must be one of created_at, updated_at' if opts[:'sort_field'] && !['created_at', 'updated_at'].include?(opts[:'sort_field'])
44
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
91
45
 
92
- # query parameters
93
46
  query_params = {}
94
47
  query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
95
48
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
96
49
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
97
50
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
98
51
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
99
-
100
- # header parameters
101
- header_params = {}
102
- # HTTP header 'Accept' (if needed)
103
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
104
- # HTTP header 'Content-Type'
105
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
106
-
107
- # form parameters
108
52
  form_params = {}
109
-
110
- # http body (model)
111
53
  post_body = nil
112
- auth_names = ['basicAuth']
54
+
55
+ local_var_path = '/landing-pages'
113
56
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
114
- :header_params => header_params,
115
57
  :query_params => query_params,
116
58
  :form_params => form_params,
117
- :body => post_body,
118
- :auth_names => auth_names,
119
- :return_type => 'InlineResponse2006')
59
+ :body => post_body)
120
60
  return data, status_code, headers
121
61
  end
122
- # Get landing page info
123
- # Get information about a specific page.
124
- # @param page_id The unique id for the page.
125
- # @param [Hash] opts the optional parameters
126
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
127
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
128
- # @return [LandingPage]
129
- def get_page(page_id = {}, opts = {})
130
- data, _status_code, _headers = get_page_with_http_info(page_id, opts)
131
- data
132
- end
133
62
 
134
63
  # Get landing page info
135
- # Get information about a specific page.
136
- # @param page_id The unique id for the page.
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<(LandingPage, Fixnum, Hash)>] LandingPage data, response status code and response headers
141
- def get_page_with_http_info(page_id, opts = {})
142
- # resource path
143
- local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_id.to_s)
64
+ def get_page(page_id, opts = {})
65
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
144
66
 
145
- # query parameters
146
67
  query_params = {}
147
68
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
148
69
  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
70
  form_params = {}
159
-
160
- # http body (model)
161
71
  post_body = nil
162
- auth_names = ['basicAuth']
72
+
73
+ local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_id.to_s)
163
74
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
164
- :header_params => header_params,
165
75
  :query_params => query_params,
166
76
  :form_params => form_params,
167
- :body => post_body,
168
- :auth_names => auth_names,
169
- :return_type => 'LandingPage')
77
+ :body => post_body)
170
78
  return data, status_code, headers
171
79
  end
172
- # Get landing page content
173
- # Get the the HTML for your landing page.
174
- # @param page_id The unique id for the page.
175
- # @param [Hash] opts the optional parameters
176
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
177
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
178
- # @return [LandingPageContent]
179
- def get_page_content(page_id = {}, opts = {})
180
- data, _status_code, _headers = get_page_content_with_http_info(page_id, opts)
181
- data
182
- end
183
80
 
184
81
  # Get landing page content
185
- # Get the the HTML for your landing page.
186
- # @param page_id The unique id for the page.
187
- # @param [Hash] opts the optional parameters
188
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
189
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
190
- # @return [Array<(LandingPageContent, Fixnum, Hash)>] LandingPageContent data, response status code and response headers
191
- def get_page_content_with_http_info(page_id, opts = {})
192
- # resource path
193
- local_var_path = '/landing-pages/{page_id}/content'.sub('{' + 'page_id' + '}', page_id.to_s)
82
+ def get_page_content(page_id, opts = {})
83
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
194
84
 
195
- # query parameters
196
85
  query_params = {}
197
86
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
198
87
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
199
-
200
- # header parameters
201
- header_params = {}
202
- # HTTP header 'Accept' (if needed)
203
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
204
- # HTTP header 'Content-Type'
205
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
206
-
207
- # form parameters
208
88
  form_params = {}
209
-
210
- # http body (model)
211
89
  post_body = nil
212
- auth_names = ['basicAuth']
90
+
91
+ local_var_path = '/landing-pages/{page_id}/content'.sub('{' + 'page_id' + '}', page_id.to_s)
213
92
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
214
- :header_params => header_params,
215
93
  :query_params => query_params,
216
94
  :form_params => form_params,
217
- :body => post_body,
218
- :auth_names => auth_names,
219
- :return_type => 'LandingPageContent')
95
+ :body => post_body)
220
96
  return data, status_code, headers
221
97
  end
222
- # Update landing page
223
- # Update a landing page.
224
- # @param page_id The unique id for the page.
225
- # @param body
226
- # @param [Hash] opts the optional parameters
227
- # @return [LandingPage]
228
- def update_page(page_id = {}, body = {}, opts = {})
229
- data, _status_code, _headers = update_page_with_http_info(page_id, body, opts)
230
- data
231
- end
232
98
 
233
99
  # Update landing page
234
- # Update a landing page.
235
- # @param page_id The unique id for the page.
236
- # @param body
237
- # @param [Hash] opts the optional parameters
238
- # @return [Array<(LandingPage, Fixnum, Hash)>] LandingPage data, response status code and response headers
239
- def update_page_with_http_info(page_id, body, opts = {})
240
- # resource path
241
- local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_id.to_s)
100
+ def update_page(page_id, body, opts = {})
101
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
102
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
242
103
 
243
- # query parameters
244
104
  query_params = {}
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
105
  form_params = {}
255
-
256
- # http body (model)
257
106
  post_body = @api_client.object_to_http_body(body)
258
- auth_names = ['basicAuth']
107
+
108
+ local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_id.to_s)
259
109
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
260
- :header_params => header_params,
261
110
  :query_params => query_params,
262
111
  :form_params => form_params,
263
- :body => post_body,
264
- :auth_names => auth_names,
265
- :return_type => 'LandingPage')
112
+ :body => post_body)
266
113
  return data, status_code, headers
267
114
  end
268
- # Add landing page
269
- # Create a new Mailchimp landing page.
270
- # @param body
271
- # @param [Hash] opts the optional parameters
272
- # @return [LandingPage]
273
- def create(body = {}, opts = {})
274
- data, _status_code, _headers = create_with_http_info(body, opts)
275
- data
276
- end
277
115
 
278
116
  # Add landing page
279
- # Create a new Mailchimp landing page.
280
- # @param body
281
- # @param [Hash] opts the optional parameters
282
- # @return [Array<(LandingPage, Fixnum, Hash)>] LandingPage data, response status code and response headers
283
- def create_with_http_info(body, opts = {})
284
- # resource path
285
- local_var_path = '/landing-pages'
117
+ def create(body, opts = {})
118
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
286
119
 
287
- # query parameters
288
120
  query_params = {}
289
-
290
- # header parameters
291
- header_params = {}
292
- # HTTP header 'Accept' (if needed)
293
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
294
- # HTTP header 'Content-Type'
295
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
296
-
297
- # form parameters
298
121
  form_params = {}
299
-
300
- # http body (model)
301
122
  post_body = @api_client.object_to_http_body(body)
302
- auth_names = ['basicAuth']
123
+
124
+ local_var_path = '/landing-pages'
303
125
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
304
- :header_params => header_params,
305
126
  :query_params => query_params,
306
127
  :form_params => form_params,
307
- :body => post_body,
308
- :auth_names => auth_names,
309
- :return_type => 'LandingPage')
128
+ :body => post_body)
310
129
  return data, status_code, headers
311
130
  end
312
- # Publish landing page
313
- # Publish a landing page that is in draft, unpublished, or has been previously published and edited.
314
- # @param page_id The unique id for the page.
315
- # @param [Hash] opts the optional parameters
316
- # @return [nil]
317
- def publish_page(page_id = {}, opts = {})
318
- publish_page_with_http_info(page_id, opts)
319
- nil
320
- end
321
131
 
322
132
  # Publish landing page
323
- # Publish a landing page that is in draft, unpublished, or has been previously published and edited.
324
- # @param page_id The unique id for the page.
325
- # @param [Hash] opts the optional parameters
326
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
327
- def publish_page_with_http_info(page_id, opts = {})
328
- # resource path
329
- local_var_path = '/landing-pages/{page_id}/actions/publish'.sub('{' + 'page_id' + '}', page_id.to_s)
133
+ def publish_page(page_id, opts = {})
134
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
330
135
 
331
- # query parameters
332
136
  query_params = {}
333
-
334
- # header parameters
335
- header_params = {}
336
- # HTTP header 'Accept' (if needed)
337
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
338
- # HTTP header 'Content-Type'
339
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
340
-
341
- # form parameters
342
137
  form_params = {}
343
-
344
- # http body (model)
345
138
  post_body = nil
346
- auth_names = ['basicAuth']
139
+
140
+ local_var_path = '/landing-pages/{page_id}/actions/publish'.sub('{' + 'page_id' + '}', page_id.to_s)
347
141
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
348
- :header_params => header_params,
349
142
  :query_params => query_params,
350
143
  :form_params => form_params,
351
- :body => post_body,
352
- :auth_names => auth_names)
144
+ :body => post_body)
353
145
  return data, status_code, headers
354
146
  end
355
- # Unpublish landing page
356
- # Unpublish a landing page that is in draft or has been published.
357
- # @param page_id The unique id for the page.
358
- # @param [Hash] opts the optional parameters
359
- # @return [nil]
360
- def unpublish_page(page_id = {}, opts = {})
361
- unpublish_page_with_http_info(page_id, opts)
362
- nil
363
- end
364
147
 
365
148
  # Unpublish landing page
366
- # Unpublish a landing page that is in draft or has been published.
367
- # @param page_id The unique id for the page.
368
- # @param [Hash] opts the optional parameters
369
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
370
- def unpublish_page_with_http_info(page_id, opts = {})
371
- # resource path
372
- local_var_path = '/landing-pages/{page_id}/actions/unpublish'.sub('{' + 'page_id' + '}', page_id.to_s)
149
+ def unpublish_page(page_id, opts = {})
150
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
373
151
 
374
- # query parameters
375
152
  query_params = {}
376
-
377
- # header parameters
378
- header_params = {}
379
- # HTTP header 'Accept' (if needed)
380
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
381
- # HTTP header 'Content-Type'
382
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
383
-
384
- # form parameters
385
153
  form_params = {}
386
-
387
- # http body (model)
388
154
  post_body = nil
389
- auth_names = ['basicAuth']
155
+
156
+ local_var_path = '/landing-pages/{page_id}/actions/unpublish'.sub('{' + 'page_id' + '}', page_id.to_s)
390
157
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
391
- :header_params => header_params,
392
158
  :query_params => query_params,
393
159
  :form_params => form_params,
394
- :body => post_body,
395
- :auth_names => auth_names)
160
+ :body => post_body)
396
161
  return data, status_code, headers
397
162
  end
398
163
  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.5
6
+ OpenAPI spec version: 3.0.6
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
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  require 'uri'
14
+ require 'json'
14
15
 
15
16
  module MailchimpMarketing
16
17
  class ListsApi
@@ -19,513 +20,190 @@ module MailchimpMarketing
19
20
  def initialize(api_client)
20
21
  @api_client = api_client
21
22
  end
22
- # Delete list
23
- # Delete a list from your Mailchimp account. If you delete a list, you'll lose the list history—including subscriber activity, unsubscribes, complaints, and bounces. You’ll also lose subscribers’ email addresses, unless you exported and backed up your list.
24
- # @param list_id The unique ID for the list.
25
- # @param [Hash] opts the optional parameters
26
- # @return [nil]
27
- def delete_list(list_id = {}, opts = {})
28
- delete_list_with_http_info(list_id, opts)
29
- nil
30
- end
31
23
 
32
24
  # Delete list
33
- # Delete a list from your Mailchimp account. If you delete a list, you&#39;ll lose the list history—including subscriber activity, unsubscribes, complaints, and bounces. You’ll also lose subscribers’ email addresses, unless you exported and backed up your list.
34
- # @param list_id The unique ID for the list.
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
37
- def delete_list_with_http_info(list_id, opts = {})
38
- # resource path
39
- local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
25
+ def delete_list(list_id, opts = {})
26
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
40
27
 
41
- # query parameters
42
28
  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
29
  form_params = {}
53
-
54
- # http body (model)
55
30
  post_body = nil
56
- auth_names = ['basicAuth']
31
+
32
+ local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
57
33
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
58
- :header_params => header_params,
59
34
  :query_params => query_params,
60
35
  :form_params => form_params,
61
- :body => post_body,
62
- :auth_names => auth_names)
36
+ :body => post_body)
63
37
  return data, status_code, headers
64
38
  end
65
- # Delete interest category
66
- # Delete a specific interest category.
67
- # @param list_id The unique ID for the list.
68
- # @param interest_category_id The unique ID for the interest category.
69
- # @param [Hash] opts the optional parameters
70
- # @return [nil]
71
- def delete_interest_category(list_id = {}, interest_category_id = {}, opts = {})
72
- delete_interest_category_with_http_info(list_id, interest_category_id, opts)
73
- nil
74
- end
75
39
 
76
40
  # Delete interest category
77
- # Delete a specific interest category.
78
- # @param list_id The unique ID for the list.
79
- # @param interest_category_id The unique ID for the interest category.
80
- # @param [Hash] opts the optional parameters
81
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
82
- def delete_interest_category_with_http_info(list_id, interest_category_id, opts = {})
83
- # resource path
84
- local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
41
+ def delete_interest_category(list_id, interest_category_id, opts = {})
42
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
43
+ fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
85
44
 
86
- # query parameters
87
45
  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
46
  form_params = {}
98
-
99
- # http body (model)
100
47
  post_body = nil
101
- auth_names = ['basicAuth']
48
+
49
+ local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
102
50
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
103
- :header_params => header_params,
104
51
  :query_params => query_params,
105
52
  :form_params => form_params,
106
- :body => post_body,
107
- :auth_names => auth_names)
53
+ :body => post_body)
108
54
  return data, status_code, headers
109
55
  end
110
- # Delete interest in category
111
- # Delete interests or group names in a specific category.
112
- # @param list_id The unique ID for the list.
113
- # @param interest_category_id The unique ID for the interest category.
114
- # @param interest_id The specific interest or &#39;group name&#39;.
115
- # @param [Hash] opts the optional parameters
116
- # @return [nil]
117
- def delete_interest_category_interest(list_id = {}, interest_category_id = {}, interest_id = {}, opts = {})
118
- delete_interest_category_interest_with_http_info(list_id, interest_category_id, interest_id, opts)
119
- nil
120
- end
121
56
 
122
57
  # Delete interest in category
123
- # Delete interests or group names in a specific category.
124
- # @param list_id The unique ID for the list.
125
- # @param interest_category_id The unique ID for the interest category.
126
- # @param interest_id The specific interest or &#39;group name&#39;.
127
- # @param [Hash] opts the optional parameters
128
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
129
- def delete_interest_category_interest_with_http_info(list_id, interest_category_id, interest_id, opts = {})
130
- # resource path
131
- local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s)
58
+ def delete_interest_category_interest(list_id, interest_category_id, interest_id, opts = {})
59
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
60
+ fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
61
+ fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil?
132
62
 
133
- # query parameters
134
63
  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
64
  form_params = {}
145
-
146
- # http body (model)
147
65
  post_body = nil
148
- auth_names = ['basicAuth']
66
+
67
+ local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s)
149
68
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
150
- :header_params => header_params,
151
69
  :query_params => query_params,
152
70
  :form_params => form_params,
153
- :body => post_body,
154
- :auth_names => auth_names)
71
+ :body => post_body)
155
72
  return data, status_code, headers
156
73
  end
157
- # Archive list member
158
- # Archive a list member. To permanently delete, use the delete-permanent action.
159
- # @param list_id The unique ID for the list.
160
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
161
- # @param [Hash] opts the optional parameters
162
- # @return [nil]
163
- def delete_list_member(list_id = {}, subscriber_hash = {}, opts = {})
164
- delete_list_member_with_http_info(list_id, subscriber_hash, opts)
165
- nil
166
- end
167
74
 
168
75
  # Archive list member
169
- # Archive a list member. To permanently delete, use the delete-permanent action.
170
- # @param list_id The unique ID for the list.
171
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
172
- # @param [Hash] opts the optional parameters
173
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
174
- def delete_list_member_with_http_info(list_id, subscriber_hash, opts = {})
175
- # resource path
176
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
76
+ def delete_list_member(list_id, subscriber_hash, opts = {})
77
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
78
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
177
79
 
178
- # query parameters
179
80
  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
81
  form_params = {}
190
-
191
- # http body (model)
192
82
  post_body = nil
193
- auth_names = ['basicAuth']
83
+
84
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
194
85
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
195
- :header_params => header_params,
196
86
  :query_params => query_params,
197
87
  :form_params => form_params,
198
- :body => post_body,
199
- :auth_names => auth_names)
88
+ :body => post_body)
200
89
  return data, status_code, headers
201
90
  end
202
- # Delete note
203
- # Delete a specific note for a specific list member.
204
- # @param list_id The unique ID for the list.
205
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
206
- # @param note_id The id for the note.
207
- # @param [Hash] opts the optional parameters
208
- # @return [nil]
209
- def delete_list_member_note(list_id = {}, subscriber_hash = {}, note_id = {}, opts = {})
210
- delete_list_member_note_with_http_info(list_id, subscriber_hash, note_id, opts)
211
- nil
212
- end
213
91
 
214
92
  # Delete note
215
- # Delete a specific note for a specific list member.
216
- # @param list_id The unique ID for the list.
217
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
218
- # @param note_id The id for the note.
219
- # @param [Hash] opts the optional parameters
220
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
221
- def delete_list_member_note_with_http_info(list_id, subscriber_hash, note_id, opts = {})
222
- # resource path
223
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s)
93
+ def delete_list_member_note(list_id, subscriber_hash, note_id, opts = {})
94
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
95
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
96
+ fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil?
224
97
 
225
- # query parameters
226
98
  query_params = {}
227
-
228
- # header parameters
229
- header_params = {}
230
- # HTTP header 'Accept' (if needed)
231
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
232
- # HTTP header 'Content-Type'
233
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
234
-
235
- # form parameters
236
99
  form_params = {}
237
-
238
- # http body (model)
239
100
  post_body = nil
240
- auth_names = ['basicAuth']
101
+
102
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s)
241
103
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
242
- :header_params => header_params,
243
104
  :query_params => query_params,
244
105
  :form_params => form_params,
245
- :body => post_body,
246
- :auth_names => auth_names)
106
+ :body => post_body)
247
107
  return data, status_code, headers
248
108
  end
249
- # Delete merge field
250
- # Delete a specific merge field in a list.
251
- # @param list_id The unique ID for the list.
252
- # @param merge_id The id for the merge field.
253
- # @param [Hash] opts the optional parameters
254
- # @return [nil]
255
- def delete_list_merge_field(list_id = {}, merge_id = {}, opts = {})
256
- delete_list_merge_field_with_http_info(list_id, merge_id, opts)
257
- nil
258
- end
259
109
 
260
110
  # Delete merge field
261
- # Delete a specific merge field in a list.
262
- # @param list_id The unique ID for the list.
263
- # @param merge_id The id for the merge field.
264
- # @param [Hash] opts the optional parameters
265
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
266
- def delete_list_merge_field_with_http_info(list_id, merge_id, opts = {})
267
- # resource path
268
- local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
111
+ def delete_list_merge_field(list_id, merge_id, opts = {})
112
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
113
+ fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil?
269
114
 
270
- # query parameters
271
115
  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
116
  form_params = {}
282
-
283
- # http body (model)
284
117
  post_body = nil
285
- auth_names = ['basicAuth']
118
+
119
+ local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
286
120
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
287
- :header_params => header_params,
288
121
  :query_params => query_params,
289
122
  :form_params => form_params,
290
- :body => post_body,
291
- :auth_names => auth_names)
123
+ :body => post_body)
292
124
  return data, status_code, headers
293
125
  end
294
- # Delete segment
295
- # Delete a specific segment in a list.
296
- # @param list_id The unique ID for the list.
297
- # @param segment_id The unique id for the segment.
298
- # @param [Hash] opts the optional parameters
299
- # @return [nil]
300
- def delete_segment(list_id = {}, segment_id = {}, opts = {})
301
- delete_segment_with_http_info(list_id, segment_id, opts)
302
- nil
303
- end
304
126
 
305
127
  # Delete segment
306
- # Delete a specific segment in a list.
307
- # @param list_id The unique ID for the list.
308
- # @param segment_id The unique id for the segment.
309
- # @param [Hash] opts the optional parameters
310
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
311
- def delete_segment_with_http_info(list_id, segment_id, opts = {})
312
- # resource path
313
- local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
128
+ def delete_segment(list_id, segment_id, opts = {})
129
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
130
+ fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
314
131
 
315
- # query parameters
316
132
  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
133
  form_params = {}
327
-
328
- # http body (model)
329
134
  post_body = nil
330
- auth_names = ['basicAuth']
135
+
136
+ local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
331
137
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
332
- :header_params => header_params,
333
138
  :query_params => query_params,
334
139
  :form_params => form_params,
335
- :body => post_body,
336
- :auth_names => auth_names)
140
+ :body => post_body)
337
141
  return data, status_code, headers
338
142
  end
339
- # Remove list member from segment
340
- # Remove a member from the specified static segment.
341
- # @param list_id The unique ID for the list.
342
- # @param segment_id The unique id for the segment.
343
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
344
- # @param [Hash] opts the optional parameters
345
- # @return [nil]
346
- def remove_segment_member(list_id = {}, segment_id = {}, subscriber_hash = {}, opts = {})
347
- remove_segment_member_with_http_info(list_id, segment_id, subscriber_hash, opts)
348
- nil
349
- end
350
143
 
351
144
  # Remove list member from segment
352
- # Remove a member from the specified static segment.
353
- # @param list_id The unique ID for the list.
354
- # @param segment_id The unique id for the segment.
355
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
356
- # @param [Hash] opts the optional parameters
357
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
358
- def remove_segment_member_with_http_info(list_id, segment_id, subscriber_hash, opts = {})
359
- # resource path
360
- local_var_path = '/lists/{list_id}/segments/{segment_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
145
+ def remove_segment_member(list_id, segment_id, subscriber_hash, opts = {})
146
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
147
+ fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
148
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
361
149
 
362
- # query parameters
363
150
  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
151
  form_params = {}
374
-
375
- # http body (model)
376
152
  post_body = nil
377
- auth_names = ['basicAuth']
153
+
154
+ local_var_path = '/lists/{list_id}/segments/{segment_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
378
155
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
379
- :header_params => header_params,
380
156
  :query_params => query_params,
381
157
  :form_params => form_params,
382
- :body => post_body,
383
- :auth_names => auth_names)
158
+ :body => post_body)
384
159
  return data, status_code, headers
385
160
  end
386
- # Delete webhook
387
- # Delete a specific webhook in a list.
388
- # @param list_id The unique ID for the list.
389
- # @param webhook_id The webhook&#39;s id.
390
- # @param [Hash] opts the optional parameters
391
- # @return [nil]
392
- def delete_list_webhook(list_id = {}, webhook_id = {}, opts = {})
393
- delete_list_webhook_with_http_info(list_id, webhook_id, opts)
394
- nil
395
- end
396
161
 
397
162
  # Delete webhook
398
- # Delete a specific webhook in a list.
399
- # @param list_id The unique ID for the list.
400
- # @param webhook_id The webhook&#39;s id.
401
- # @param [Hash] opts the optional parameters
402
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
403
- def delete_list_webhook_with_http_info(list_id, webhook_id, opts = {})
404
- # resource path
405
- local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
163
+ def delete_list_webhook(list_id, webhook_id, opts = {})
164
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
165
+ fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil?
406
166
 
407
- # query parameters
408
167
  query_params = {}
409
-
410
- # header parameters
411
- header_params = {}
412
- # HTTP header 'Accept' (if needed)
413
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
414
- # HTTP header 'Content-Type'
415
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
416
-
417
- # form parameters
418
168
  form_params = {}
419
-
420
- # http body (model)
421
169
  post_body = nil
422
- auth_names = ['basicAuth']
170
+
171
+ local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
423
172
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
424
- :header_params => header_params,
425
173
  :query_params => query_params,
426
174
  :form_params => form_params,
427
- :body => post_body,
428
- :auth_names => auth_names)
175
+ :body => post_body)
429
176
  return data, status_code, headers
430
177
  end
431
- # List member tags
432
- # Get the tags on a list member.
433
- # @param list_id The unique ID for the list.
434
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
435
- # @param [Hash] opts the optional parameters
436
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
437
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
438
- # @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)
439
- # @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)
440
- # @return [CollectionOfTags]
441
- def get_list_member_tags(list_id = {}, subscriber_hash = {}, opts = {})
442
- data, _status_code, _headers = get_list_member_tags_with_http_info(list_id, subscriber_hash, opts)
443
- data
444
- end
445
178
 
446
179
  # List member tags
447
- # Get the tags on a list member.
448
- # @param list_id The unique ID for the list.
449
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
450
- # @param [Hash] opts the optional parameters
451
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
452
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
453
- # @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**
454
- # @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**.
455
- # @return [Array<(CollectionOfTags, Fixnum, Hash)>] CollectionOfTags data, response status code and response headers
456
- def get_list_member_tags_with_http_info(list_id, subscriber_hash, opts = {})
457
- # resource path
458
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/tags'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
180
+ def get_list_member_tags(list_id, subscriber_hash, opts = {})
181
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
182
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
183
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
459
184
 
460
- # query parameters
461
185
  query_params = {}
462
186
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
463
187
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
464
188
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
465
189
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
466
-
467
- # header parameters
468
- header_params = {}
469
- # HTTP header 'Accept' (if needed)
470
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
471
- # HTTP header 'Content-Type'
472
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
473
-
474
- # form parameters
475
190
  form_params = {}
476
-
477
- # http body (model)
478
191
  post_body = nil
479
- auth_names = ['basicAuth']
192
+
193
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/tags'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
480
194
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
481
- :header_params => header_params,
482
195
  :query_params => query_params,
483
196
  :form_params => form_params,
484
- :body => post_body,
485
- :auth_names => auth_names,
486
- :return_type => 'CollectionOfTags')
197
+ :body => post_body)
487
198
  return data, status_code, headers
488
199
  end
489
- # Get lists info
490
- # Get information about all lists in the account.
491
- # @param [Hash] opts the optional parameters
492
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
493
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
494
- # @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)
495
- # @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)
496
- # @option opts [String] :before_date_created Restrict response to lists created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
497
- # @option opts [String] :since_date_created Restrict results to lists created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
498
- # @option opts [String] :before_campaign_last_sent Restrict results to lists created before the last campaign send date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
499
- # @option opts [String] :since_campaign_last_sent Restrict results to lists created after the last campaign send date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
500
- # @option opts [String] :email Restrict results to lists that include a specific subscriber&#39;s email address.
501
- # @option opts [String] :sort_field Returns files sorted by the specified field.
502
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
503
- # @return [SubscriberLists]
504
- def get_all_lists(opts = {})
505
- data, _status_code, _headers = get_all_lists_with_http_info(opts)
506
- data
507
- end
508
200
 
509
201
  # Get lists info
510
- # Get information about all lists in the account.
511
- # @param [Hash] opts the optional parameters
512
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
513
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
514
- # @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**
515
- # @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**.
516
- # @option opts [String] :before_date_created Restrict response to lists created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
517
- # @option opts [String] :since_date_created Restrict results to lists created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
518
- # @option opts [String] :before_campaign_last_sent Restrict results to lists created before the last campaign send date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
519
- # @option opts [String] :since_campaign_last_sent Restrict results to lists created after the last campaign send date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
520
- # @option opts [String] :email Restrict results to lists that include a specific subscriber&#39;s email address.
521
- # @option opts [String] :sort_field Returns files sorted by the specified field.
522
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
523
- # @return [Array<(SubscriberLists, Fixnum, Hash)>] SubscriberLists data, response status code and response headers
524
- def get_all_lists_with_http_info(opts = {})
525
- # resource path
526
- local_var_path = '/lists'
202
+ def get_all_lists(opts = {})
203
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
204
+ fail ArgumentError, 'invalid value for "sort_field", must be one of date_created' if opts[:'sort_field'] && !['date_created'].include?(opts[:'sort_field'])
205
+ fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
527
206
 
528
- # query parameters
529
207
  query_params = {}
530
208
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
531
209
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -538,375 +216,140 @@ module MailchimpMarketing
538
216
  query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
539
217
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
540
218
  query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
541
-
542
- # header parameters
543
- header_params = {}
544
- # HTTP header 'Accept' (if needed)
545
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
546
- # HTTP header 'Content-Type'
547
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
548
-
549
- # form parameters
550
219
  form_params = {}
551
-
552
- # http body (model)
553
220
  post_body = nil
554
- auth_names = ['basicAuth']
221
+
222
+ local_var_path = '/lists'
555
223
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
556
- :header_params => header_params,
557
224
  :query_params => query_params,
558
225
  :form_params => form_params,
559
- :body => post_body,
560
- :auth_names => auth_names,
561
- :return_type => 'SubscriberLists')
226
+ :body => post_body)
562
227
  return data, status_code, headers
563
228
  end
564
- # Get list info
565
- # Get information about a specific list in your Mailchimp account. Results include list members who have signed up but haven't confirmed their subscription yet and unsubscribed or cleaned.
566
- # @param list_id The unique ID for the list.
567
- # @param [Hash] opts the optional parameters
568
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
569
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
570
- # @return [SubscriberList]
571
- def get_list(list_id = {}, opts = {})
572
- data, _status_code, _headers = get_list_with_http_info(list_id, opts)
573
- data
574
- end
575
229
 
576
230
  # Get list info
577
- # Get information about a specific list in your Mailchimp account. Results include list members who have signed up but haven&#39;t confirmed their subscription yet and unsubscribed or cleaned.
578
- # @param list_id The unique ID for the list.
579
- # @param [Hash] opts the optional parameters
580
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
581
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
582
- # @return [Array<(SubscriberList, Fixnum, Hash)>] SubscriberList data, response status code and response headers
583
- def get_list_with_http_info(list_id, opts = {})
584
- # resource path
585
- local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
231
+ def get_list(list_id, opts = {})
232
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
586
233
 
587
- # query parameters
588
234
  query_params = {}
589
235
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
590
236
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
591
-
592
- # header parameters
593
- header_params = {}
594
- # HTTP header 'Accept' (if needed)
595
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
596
- # HTTP header 'Content-Type'
597
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
598
-
599
- # form parameters
600
237
  form_params = {}
601
-
602
- # http body (model)
603
238
  post_body = nil
604
- auth_names = ['basicAuth']
239
+
240
+ local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
605
241
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
606
- :header_params => header_params,
607
242
  :query_params => query_params,
608
243
  :form_params => form_params,
609
- :body => post_body,
610
- :auth_names => auth_names,
611
- :return_type => 'SubscriberList')
244
+ :body => post_body)
612
245
  return data, status_code, headers
613
246
  end
614
- # List abuse reports
615
- # Get all abuse reports for a specific list.
616
- # @param list_id The unique ID for the list.
617
- # @param [Hash] opts the optional parameters
618
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
619
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
620
- # @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)
621
- # @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)
622
- # @return [AbuseComplaints]
623
- def get_list_abuse_reports(list_id = {}, opts = {})
624
- data, _status_code, _headers = get_list_abuse_reports_with_http_info(list_id, opts)
625
- data
626
- end
627
247
 
628
248
  # List abuse reports
629
- # Get all abuse reports for a specific list.
630
- # @param list_id The unique ID for the list.
631
- # @param [Hash] opts the optional parameters
632
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
633
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
634
- # @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**
635
- # @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**.
636
- # @return [Array<(AbuseComplaints, Fixnum, Hash)>] AbuseComplaints data, response status code and response headers
637
- def get_list_abuse_reports_with_http_info(list_id, opts = {})
638
- # resource path
639
- local_var_path = '/lists/{list_id}/abuse-reports'.sub('{' + 'list_id' + '}', list_id.to_s)
249
+ def get_list_abuse_reports(list_id, opts = {})
250
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
251
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
640
252
 
641
- # query parameters
642
253
  query_params = {}
643
254
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
644
255
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
645
256
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
646
257
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
647
-
648
- # header parameters
649
- header_params = {}
650
- # HTTP header 'Accept' (if needed)
651
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
652
- # HTTP header 'Content-Type'
653
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
654
-
655
- # form parameters
656
258
  form_params = {}
657
-
658
- # http body (model)
659
259
  post_body = nil
660
- auth_names = ['basicAuth']
260
+
261
+ local_var_path = '/lists/{list_id}/abuse-reports'.sub('{' + 'list_id' + '}', list_id.to_s)
661
262
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
662
- :header_params => header_params,
663
263
  :query_params => query_params,
664
264
  :form_params => form_params,
665
- :body => post_body,
666
- :auth_names => auth_names,
667
- :return_type => 'AbuseComplaints')
265
+ :body => post_body)
668
266
  return data, status_code, headers
669
267
  end
670
- # Get abuse report
671
- # Get details about a specific abuse report.
672
- # @param list_id The unique ID for the list.
673
- # @param report_id The id for the abuse report.
674
- # @param [Hash] opts the optional parameters
675
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
676
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
677
- # @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)
678
- # @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)
679
- # @return [AbuseComplaint]
680
- def get_list_abuse_report_details(list_id = {}, report_id = {}, opts = {})
681
- data, _status_code, _headers = get_list_abuse_report_details_with_http_info(list_id, report_id, opts)
682
- data
683
- end
684
268
 
685
269
  # Get abuse report
686
- # Get details about a specific abuse report.
687
- # @param list_id The unique ID for the list.
688
- # @param report_id The id for the abuse report.
689
- # @param [Hash] opts the optional parameters
690
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
691
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
692
- # @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**
693
- # @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**.
694
- # @return [Array<(AbuseComplaint, Fixnum, Hash)>] AbuseComplaint data, response status code and response headers
695
- def get_list_abuse_report_details_with_http_info(list_id, report_id, opts = {})
696
- # resource path
697
- local_var_path = '/lists/{list_id}/abuse-reports/{report_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'report_id' + '}', report_id.to_s)
270
+ def get_list_abuse_report_details(list_id, report_id, opts = {})
271
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
272
+ fail ArgumentError, "Missing required param: 'report_id'" if report_id.nil?
273
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
698
274
 
699
- # query parameters
700
275
  query_params = {}
701
276
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
702
277
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
703
278
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
704
279
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
705
-
706
- # header parameters
707
- header_params = {}
708
- # HTTP header 'Accept' (if needed)
709
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
710
- # HTTP header 'Content-Type'
711
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
712
-
713
- # form parameters
714
280
  form_params = {}
715
-
716
- # http body (model)
717
281
  post_body = nil
718
- auth_names = ['basicAuth']
282
+
283
+ local_var_path = '/lists/{list_id}/abuse-reports/{report_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'report_id' + '}', report_id.to_s)
719
284
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
720
- :header_params => header_params,
721
285
  :query_params => query_params,
722
286
  :form_params => form_params,
723
- :body => post_body,
724
- :auth_names => auth_names,
725
- :return_type => 'AbuseComplaint')
287
+ :body => post_body)
726
288
  return data, status_code, headers
727
289
  end
728
- # List recent activity
729
- # Get up to the previous 180 days of daily detailed aggregated activity stats for a list, not including Automation activity.
730
- # @param list_id The unique ID for the list.
731
- # @param [Hash] opts the optional parameters
732
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
733
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
734
- # @return [ListActivity]
735
- def get_list_recent_activity(list_id = {}, opts = {})
736
- data, _status_code, _headers = get_list_recent_activity_with_http_info(list_id, opts)
737
- data
738
- end
739
290
 
740
291
  # List recent activity
741
- # Get up to the previous 180 days of daily detailed aggregated activity stats for a list, not including Automation activity.
742
- # @param list_id The unique ID for the list.
743
- # @param [Hash] opts the optional parameters
744
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
745
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
746
- # @return [Array<(ListActivity, Fixnum, Hash)>] ListActivity data, response status code and response headers
747
- def get_list_recent_activity_with_http_info(list_id, opts = {})
748
- # resource path
749
- local_var_path = '/lists/{list_id}/activity'.sub('{' + 'list_id' + '}', list_id.to_s)
292
+ def get_list_recent_activity(list_id, opts = {})
293
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
750
294
 
751
- # query parameters
752
295
  query_params = {}
753
296
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
754
297
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
755
-
756
- # header parameters
757
- header_params = {}
758
- # HTTP header 'Accept' (if needed)
759
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
760
- # HTTP header 'Content-Type'
761
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
762
-
763
- # form parameters
764
298
  form_params = {}
765
-
766
- # http body (model)
767
299
  post_body = nil
768
- auth_names = ['basicAuth']
300
+
301
+ local_var_path = '/lists/{list_id}/activity'.sub('{' + 'list_id' + '}', list_id.to_s)
769
302
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
770
- :header_params => header_params,
771
303
  :query_params => query_params,
772
304
  :form_params => form_params,
773
- :body => post_body,
774
- :auth_names => auth_names,
775
- :return_type => 'ListActivity')
305
+ :body => post_body)
776
306
  return data, status_code, headers
777
307
  end
778
- # List top email clients
779
- # Get a list of the top email clients based on user-agent strings.
780
- # @param list_id The unique ID for the list.
781
- # @param [Hash] opts the optional parameters
782
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
783
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
784
- # @return [EmailClients]
785
- def get_list_clients(list_id = {}, opts = {})
786
- data, _status_code, _headers = get_list_clients_with_http_info(list_id, opts)
787
- data
788
- end
789
308
 
790
309
  # List top email clients
791
- # Get a list of the top email clients based on user-agent strings.
792
- # @param list_id The unique ID for the list.
793
- # @param [Hash] opts the optional parameters
794
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
795
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
796
- # @return [Array<(EmailClients, Fixnum, Hash)>] EmailClients data, response status code and response headers
797
- def get_list_clients_with_http_info(list_id, opts = {})
798
- # resource path
799
- local_var_path = '/lists/{list_id}/clients'.sub('{' + 'list_id' + '}', list_id.to_s)
310
+ def get_list_clients(list_id, opts = {})
311
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
800
312
 
801
- # query parameters
802
313
  query_params = {}
803
314
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
804
315
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
805
-
806
- # header parameters
807
- header_params = {}
808
- # HTTP header 'Accept' (if needed)
809
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
810
- # HTTP header 'Content-Type'
811
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
812
-
813
- # form parameters
814
316
  form_params = {}
815
-
816
- # http body (model)
817
317
  post_body = nil
818
- auth_names = ['basicAuth']
318
+
319
+ local_var_path = '/lists/{list_id}/clients'.sub('{' + 'list_id' + '}', list_id.to_s)
819
320
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
820
- :header_params => header_params,
821
321
  :query_params => query_params,
822
322
  :form_params => form_params,
823
- :body => post_body,
824
- :auth_names => auth_names,
825
- :return_type => 'EmailClients')
323
+ :body => post_body)
826
324
  return data, status_code, headers
827
325
  end
828
- # List external i ds
829
- # Get external identifiers created for a Mailchimp list.
830
- # @param list_id The unique ID for the list.
831
- # @param [Hash] opts the optional parameters
832
- # @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)
833
- # @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)
834
- # @return [CollectionOfExternalIdentifiers]
835
- def get_list_external_ids(list_id = {}, opts = {})
836
- data, _status_code, _headers = get_list_external_ids_with_http_info(list_id, opts)
837
- data
838
- end
839
326
 
840
327
  # List external i ds
841
- # Get external identifiers created for a Mailchimp list.
842
- # @param list_id The unique ID for the list.
843
- # @param [Hash] opts the optional parameters
844
- # @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**
845
- # @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**.
846
- # @return [Array<(CollectionOfExternalIdentifiers, Fixnum, Hash)>] CollectionOfExternalIdentifiers data, response status code and response headers
847
- def get_list_external_ids_with_http_info(list_id, opts = {})
848
- # resource path
849
- local_var_path = '/lists/{list_id}/external-ids'.sub('{' + 'list_id' + '}', list_id.to_s)
328
+ def get_list_external_ids(list_id, opts = {})
329
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
330
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
850
331
 
851
- # query parameters
852
332
  query_params = {}
853
333
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
854
334
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
855
-
856
- # header parameters
857
- header_params = {}
858
- # HTTP header 'Accept' (if needed)
859
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
860
- # HTTP header 'Content-Type'
861
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
862
-
863
- # form parameters
864
335
  form_params = {}
865
-
866
- # http body (model)
867
336
  post_body = nil
868
- auth_names = ['basicAuth']
337
+
338
+ local_var_path = '/lists/{list_id}/external-ids'.sub('{' + 'list_id' + '}', list_id.to_s)
869
339
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
870
- :header_params => header_params,
871
340
  :query_params => query_params,
872
341
  :form_params => form_params,
873
- :body => post_body,
874
- :auth_names => auth_names,
875
- :return_type => 'CollectionOfExternalIdentifiers')
342
+ :body => post_body)
876
343
  return data, status_code, headers
877
344
  end
878
- # List growth history data
879
- # Get a month-by-month summary of a specific list's growth activity.
880
- # @param list_id The unique ID for the list.
881
- # @param [Hash] opts the optional parameters
882
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
883
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
884
- # @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)
885
- # @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)
886
- # @option opts [String] :sort_field Returns files sorted by the specified field.
887
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
888
- # @return [GrowthHistory]
889
- def get_list_growth_history(list_id = {}, opts = {})
890
- data, _status_code, _headers = get_list_growth_history_with_http_info(list_id, opts)
891
- data
892
- end
893
345
 
894
346
  # List growth history data
895
- # Get a month-by-month summary of a specific list&#39;s growth activity.
896
- # @param list_id The unique ID for the list.
897
- # @param [Hash] opts the optional parameters
898
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
899
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
900
- # @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**
901
- # @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**.
902
- # @option opts [String] :sort_field Returns files sorted by the specified field.
903
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
904
- # @return [Array<(GrowthHistory, Fixnum, Hash)>] GrowthHistory data, response status code and response headers
905
- def get_list_growth_history_with_http_info(list_id, opts = {})
906
- # resource path
907
- local_var_path = '/lists/{list_id}/growth-history'.sub('{' + 'list_id' + '}', list_id.to_s)
347
+ def get_list_growth_history(list_id, opts = {})
348
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
349
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
350
+ fail ArgumentError, 'invalid value for "sort_field", must be one of month' if opts[:'sort_field'] && !['month'].include?(opts[:'sort_field'])
351
+ fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
908
352
 
909
- # query parameters
910
353
  query_params = {}
911
354
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
912
355
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -914,412 +357,146 @@ module MailchimpMarketing
914
357
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
915
358
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
916
359
  query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
917
-
918
- # header parameters
919
- header_params = {}
920
- # HTTP header 'Accept' (if needed)
921
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
922
- # HTTP header 'Content-Type'
923
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
924
-
925
- # form parameters
926
360
  form_params = {}
927
-
928
- # http body (model)
929
361
  post_body = nil
930
- auth_names = ['basicAuth']
362
+
363
+ local_var_path = '/lists/{list_id}/growth-history'.sub('{' + 'list_id' + '}', list_id.to_s)
931
364
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
932
- :header_params => header_params,
933
365
  :query_params => query_params,
934
366
  :form_params => form_params,
935
- :body => post_body,
936
- :auth_names => auth_names,
937
- :return_type => 'GrowthHistory')
367
+ :body => post_body)
938
368
  return data, status_code, headers
939
369
  end
940
- # Get growth history by month
941
- # Get a summary of a specific list's growth activity for a specific month and year.
942
- # @param list_id The unique ID for the list.
943
- # @param month A specific month of list growth history.
944
- # @param [Hash] opts the optional parameters
945
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
946
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
947
- # @return [GrowthHistory]
948
- def get_list_growth_history_by_month(list_id = {}, month = {}, opts = {})
949
- data, _status_code, _headers = get_list_growth_history_by_month_with_http_info(list_id, month, opts)
950
- data
951
- end
952
370
 
953
371
  # Get growth history by month
954
- # Get a summary of a specific list&#39;s growth activity for a specific month and year.
955
- # @param list_id The unique ID for the list.
956
- # @param month A specific month of list growth history.
957
- # @param [Hash] opts the optional parameters
958
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
959
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
960
- # @return [Array<(GrowthHistory, Fixnum, Hash)>] GrowthHistory data, response status code and response headers
961
- def get_list_growth_history_by_month_with_http_info(list_id, month, opts = {})
962
- # resource path
963
- local_var_path = '/lists/{list_id}/growth-history/{month}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'month' + '}', month.to_s)
372
+ def get_list_growth_history_by_month(list_id, month, opts = {})
373
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
374
+ fail ArgumentError, "Missing required param: 'month'" if month.nil?
964
375
 
965
- # query parameters
966
376
  query_params = {}
967
377
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
968
378
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
969
-
970
- # header parameters
971
- header_params = {}
972
- # HTTP header 'Accept' (if needed)
973
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
974
- # HTTP header 'Content-Type'
975
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
976
-
977
- # form parameters
978
379
  form_params = {}
979
-
980
- # http body (model)
981
380
  post_body = nil
982
- auth_names = ['basicAuth']
381
+
382
+ local_var_path = '/lists/{list_id}/growth-history/{month}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'month' + '}', month.to_s)
983
383
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
984
- :header_params => header_params,
985
384
  :query_params => query_params,
986
385
  :form_params => form_params,
987
- :body => post_body,
988
- :auth_names => auth_names,
989
- :return_type => 'GrowthHistory')
386
+ :body => post_body)
990
387
  return data, status_code, headers
991
388
  end
992
- # List interest categories
993
- # Get information about a list's interest categories.
994
- # @param list_id The unique ID for the list.
995
- # @param [Hash] opts the optional parameters
996
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
997
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
998
- # @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)
999
- # @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)
1000
- # @option opts [String] :type Restrict results a type of interest group
1001
- # @return [InterestGroupings]
1002
- def get_list_interest_categories(list_id = {}, opts = {})
1003
- data, _status_code, _headers = get_list_interest_categories_with_http_info(list_id, opts)
1004
- data
1005
- end
1006
389
 
1007
390
  # List interest categories
1008
- # Get information about a list&#39;s interest categories.
1009
- # @param list_id The unique ID for the list.
1010
- # @param [Hash] opts the optional parameters
1011
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1012
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1013
- # @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**
1014
- # @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**.
1015
- # @option opts [String] :type Restrict results a type of interest group
1016
- # @return [Array<(InterestGroupings, Fixnum, Hash)>] InterestGroupings data, response status code and response headers
1017
- def get_list_interest_categories_with_http_info(list_id, opts = {})
1018
- # resource path
1019
- local_var_path = '/lists/{list_id}/interest-categories'.sub('{' + 'list_id' + '}', list_id.to_s)
391
+ def get_list_interest_categories(list_id, opts = {})
392
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
393
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1020
394
 
1021
- # query parameters
1022
395
  query_params = {}
1023
396
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1024
397
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1025
398
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1026
399
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1027
400
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
1028
-
1029
- # header parameters
1030
- header_params = {}
1031
- # HTTP header 'Accept' (if needed)
1032
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1033
- # HTTP header 'Content-Type'
1034
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1035
-
1036
- # form parameters
1037
401
  form_params = {}
1038
-
1039
- # http body (model)
1040
402
  post_body = nil
1041
- auth_names = ['basicAuth']
403
+
404
+ local_var_path = '/lists/{list_id}/interest-categories'.sub('{' + 'list_id' + '}', list_id.to_s)
1042
405
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1043
- :header_params => header_params,
1044
406
  :query_params => query_params,
1045
407
  :form_params => form_params,
1046
- :body => post_body,
1047
- :auth_names => auth_names,
1048
- :return_type => 'InterestGroupings')
408
+ :body => post_body)
1049
409
  return data, status_code, headers
1050
410
  end
1051
- # Get interest category info
1052
- # Get information about a specific interest category.
1053
- # @param list_id The unique ID for the list.
1054
- # @param interest_category_id The unique ID for the interest category.
1055
- # @param [Hash] opts the optional parameters
1056
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1057
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1058
- # @return [InterestCategory]
1059
- def get_interest_category(list_id = {}, interest_category_id = {}, opts = {})
1060
- data, _status_code, _headers = get_interest_category_with_http_info(list_id, interest_category_id, opts)
1061
- data
1062
- end
1063
411
 
1064
412
  # Get interest category info
1065
- # Get information about a specific interest category.
1066
- # @param list_id The unique ID for the list.
1067
- # @param interest_category_id The unique ID for the interest category.
1068
- # @param [Hash] opts the optional parameters
1069
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1070
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1071
- # @return [Array<(InterestCategory, Fixnum, Hash)>] InterestCategory data, response status code and response headers
1072
- def get_interest_category_with_http_info(list_id, interest_category_id, opts = {})
1073
- # resource path
1074
- local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
413
+ def get_interest_category(list_id, interest_category_id, opts = {})
414
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
415
+ fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
1075
416
 
1076
- # query parameters
1077
417
  query_params = {}
1078
418
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1079
419
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1080
-
1081
- # header parameters
1082
- header_params = {}
1083
- # HTTP header 'Accept' (if needed)
1084
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1085
- # HTTP header 'Content-Type'
1086
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1087
-
1088
- # form parameters
1089
420
  form_params = {}
1090
-
1091
- # http body (model)
1092
421
  post_body = nil
1093
- auth_names = ['basicAuth']
422
+
423
+ local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
1094
424
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1095
- :header_params => header_params,
1096
425
  :query_params => query_params,
1097
426
  :form_params => form_params,
1098
- :body => post_body,
1099
- :auth_names => auth_names,
1100
- :return_type => 'InterestCategory')
427
+ :body => post_body)
1101
428
  return data, status_code, headers
1102
429
  end
1103
- # List interests in category
1104
- # Get a list of this category's interests.
1105
- # @param list_id The unique ID for the list.
1106
- # @param interest_category_id The unique ID for the interest category.
1107
- # @param [Hash] opts the optional parameters
1108
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1109
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1110
- # @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)
1111
- # @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)
1112
- # @return [Interests]
1113
- def list_interest_category_interests(list_id = {}, interest_category_id = {}, opts = {})
1114
- data, _status_code, _headers = list_interest_category_interests_with_http_info(list_id, interest_category_id, opts)
1115
- data
1116
- end
1117
430
 
1118
431
  # List interests in category
1119
- # Get a list of this category&#39;s interests.
1120
- # @param list_id The unique ID for the list.
1121
- # @param interest_category_id The unique ID for the interest category.
1122
- # @param [Hash] opts the optional parameters
1123
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1124
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1125
- # @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**
1126
- # @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**.
1127
- # @return [Array<(Interests, Fixnum, Hash)>] Interests data, response status code and response headers
1128
- def list_interest_category_interests_with_http_info(list_id, interest_category_id, opts = {})
1129
- # resource path
1130
- local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
432
+ def list_interest_category_interests(list_id, interest_category_id, opts = {})
433
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
434
+ fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
435
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1131
436
 
1132
- # query parameters
1133
437
  query_params = {}
1134
438
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1135
439
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1136
440
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1137
441
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1138
-
1139
- # header parameters
1140
- header_params = {}
1141
- # HTTP header 'Accept' (if needed)
1142
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1143
- # HTTP header 'Content-Type'
1144
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1145
-
1146
- # form parameters
1147
442
  form_params = {}
1148
-
1149
- # http body (model)
1150
443
  post_body = nil
1151
- auth_names = ['basicAuth']
444
+
445
+ local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
1152
446
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1153
- :header_params => header_params,
1154
447
  :query_params => query_params,
1155
448
  :form_params => form_params,
1156
- :body => post_body,
1157
- :auth_names => auth_names,
1158
- :return_type => 'Interests')
449
+ :body => post_body)
1159
450
  return data, status_code, headers
1160
451
  end
1161
- # Get interest in category
1162
- # Get interests or 'group names' for a specific category.
1163
- # @param list_id The unique ID for the list.
1164
- # @param interest_category_id The unique ID for the interest category.
1165
- # @param interest_id The specific interest or &#39;group name&#39;.
1166
- # @param [Hash] opts the optional parameters
1167
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1168
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1169
- # @return [Interest]
1170
- def get_interest_category_interest(list_id = {}, interest_category_id = {}, interest_id = {}, opts = {})
1171
- data, _status_code, _headers = get_interest_category_interest_with_http_info(list_id, interest_category_id, interest_id, opts)
1172
- data
1173
- end
1174
452
 
1175
453
  # Get interest in category
1176
- # Get interests or &#39;group names&#39; for a specific category.
1177
- # @param list_id The unique ID for the list.
1178
- # @param interest_category_id The unique ID for the interest category.
1179
- # @param interest_id The specific interest or &#39;group name&#39;.
1180
- # @param [Hash] opts the optional parameters
1181
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1182
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1183
- # @return [Array<(Interest, Fixnum, Hash)>] Interest data, response status code and response headers
1184
- def get_interest_category_interest_with_http_info(list_id, interest_category_id, interest_id, opts = {})
1185
- # resource path
1186
- local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s)
454
+ def get_interest_category_interest(list_id, interest_category_id, interest_id, opts = {})
455
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
456
+ fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
457
+ fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil?
1187
458
 
1188
- # query parameters
1189
459
  query_params = {}
1190
460
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1191
461
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1192
-
1193
- # header parameters
1194
- header_params = {}
1195
- # HTTP header 'Accept' (if needed)
1196
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1197
- # HTTP header 'Content-Type'
1198
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1199
-
1200
- # form parameters
1201
462
  form_params = {}
1202
-
1203
- # http body (model)
1204
463
  post_body = nil
1205
- auth_names = ['basicAuth']
464
+
465
+ local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s)
1206
466
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1207
- :header_params => header_params,
1208
467
  :query_params => query_params,
1209
468
  :form_params => form_params,
1210
- :body => post_body,
1211
- :auth_names => auth_names,
1212
- :return_type => 'Interest')
469
+ :body => post_body)
1213
470
  return data, status_code, headers
1214
471
  end
1215
- # List locations
1216
- # Get the locations (countries) that the list's subscribers have been tagged to based on geocoding their IP address.
1217
- # @param list_id The unique ID for the list.
1218
- # @param [Hash] opts the optional parameters
1219
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1220
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1221
- # @return [ListLocations]
1222
- def get_list_locations(list_id = {}, opts = {})
1223
- data, _status_code, _headers = get_list_locations_with_http_info(list_id, opts)
1224
- data
1225
- end
1226
472
 
1227
473
  # List locations
1228
- # Get the locations (countries) that the list&#39;s subscribers have been tagged to based on geocoding their IP address.
1229
- # @param list_id The unique ID for the list.
1230
- # @param [Hash] opts the optional parameters
1231
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1232
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1233
- # @return [Array<(ListLocations, Fixnum, Hash)>] ListLocations data, response status code and response headers
1234
- def get_list_locations_with_http_info(list_id, opts = {})
1235
- # resource path
1236
- local_var_path = '/lists/{list_id}/locations'.sub('{' + 'list_id' + '}', list_id.to_s)
474
+ def get_list_locations(list_id, opts = {})
475
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1237
476
 
1238
- # query parameters
1239
477
  query_params = {}
1240
478
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1241
479
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1242
-
1243
- # header parameters
1244
- header_params = {}
1245
- # HTTP header 'Accept' (if needed)
1246
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1247
- # HTTP header 'Content-Type'
1248
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1249
-
1250
- # form parameters
1251
480
  form_params = {}
1252
-
1253
- # http body (model)
1254
481
  post_body = nil
1255
- auth_names = ['basicAuth']
482
+
483
+ local_var_path = '/lists/{list_id}/locations'.sub('{' + 'list_id' + '}', list_id.to_s)
1256
484
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1257
- :header_params => header_params,
1258
485
  :query_params => query_params,
1259
486
  :form_params => form_params,
1260
- :body => post_body,
1261
- :auth_names => auth_names,
1262
- :return_type => 'ListLocations')
487
+ :body => post_body)
1263
488
  return data, status_code, headers
1264
489
  end
1265
- # List members info
1266
- # Get information about members in a specific Mailchimp list.
1267
- # @param list_id The unique ID for the list.
1268
- # @param [Hash] opts the optional parameters
1269
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1270
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1271
- # @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)
1272
- # @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)
1273
- # @option opts [String] :email_type The email type.
1274
- # @option opts [String] :status The subscriber&#39;s status.
1275
- # @option opts [String] :since_timestamp_opt Restrict results to subscribers who opted-in after the set timeframe. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
1276
- # @option opts [String] :before_timestamp_opt Restrict results to subscribers who opted-in before the set timeframe. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
1277
- # @option opts [String] :since_last_changed Restrict results to subscribers whose information changed after the set timeframe. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
1278
- # @option opts [String] :before_last_changed Restrict results to subscribers whose information changed before the set timeframe. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
1279
- # @option opts [String] :unique_email_id A unique identifier for the email address across all Mailchimp lists. This parameter can be found in any links with [Ecommerce Tracking](https://mailchimp.com/help/sell-more-stuff-with-mailchimp/) enabled.
1280
- # @option opts [BOOLEAN] :vip_only A filter to return only the list&#39;s VIP members. Passing &#x60;true&#x60; will restrict results to VIP list members, passing &#x60;false&#x60; will return all list members.
1281
- # @option opts [String] :interest_category_id The unique id for the interest category.
1282
- # @option opts [String] :interest_ids Used to filter list members by interests. Must be accompanied by interest_category_id and interest_match. The value must be a comma separated list of interest ids present for any supplied interest categories.
1283
- # @option opts [String] :interest_match Used to filter list members by interests. Must be accompanied by interest_category_id and interest_ids. \&quot;any\&quot; will match a member with any of the interest supplied, \&quot;all\&quot; will only match members with every interest supplied, and \&quot;none\&quot; will match members without any of the interest supplied.
1284
- # @option opts [String] :sort_field Returns files sorted by the specified field.
1285
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
1286
- # @option opts [BOOLEAN] :since_last_campaign Filter subscribers by those subscribed/unsubscribed/pending/cleaned since last email campaign send. Member status is required to use this filter.
1287
- # @option opts [String] :unsubscribed_since Filter subscribers by those unsubscribed since a specific date. Using any status other than unsubscribed with this filter will result in an error.
1288
- # @return [ListMembers2]
1289
- def get_list_members_info(list_id = {}, opts = {})
1290
- data, _status_code, _headers = get_list_members_info_with_http_info(list_id, opts)
1291
- data
1292
- end
1293
490
 
1294
491
  # List members info
1295
- # Get information about members in a specific Mailchimp list.
1296
- # @param list_id The unique ID for the list.
1297
- # @param [Hash] opts the optional parameters
1298
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1299
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1300
- # @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**
1301
- # @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**.
1302
- # @option opts [String] :email_type The email type.
1303
- # @option opts [String] :status The subscriber&#39;s status.
1304
- # @option opts [String] :since_timestamp_opt Restrict results to subscribers who opted-in after the set timeframe. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
1305
- # @option opts [String] :before_timestamp_opt Restrict results to subscribers who opted-in before the set timeframe. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
1306
- # @option opts [String] :since_last_changed Restrict results to subscribers whose information changed after the set timeframe. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
1307
- # @option opts [String] :before_last_changed Restrict results to subscribers whose information changed before the set timeframe. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
1308
- # @option opts [String] :unique_email_id A unique identifier for the email address across all Mailchimp lists. This parameter can be found in any links with [Ecommerce Tracking](https://mailchimp.com/help/sell-more-stuff-with-mailchimp/) enabled.
1309
- # @option opts [BOOLEAN] :vip_only A filter to return only the list&#39;s VIP members. Passing &#x60;true&#x60; will restrict results to VIP list members, passing &#x60;false&#x60; will return all list members.
1310
- # @option opts [String] :interest_category_id The unique id for the interest category.
1311
- # @option opts [String] :interest_ids Used to filter list members by interests. Must be accompanied by interest_category_id and interest_match. The value must be a comma separated list of interest ids present for any supplied interest categories.
1312
- # @option opts [String] :interest_match Used to filter list members by interests. Must be accompanied by interest_category_id and interest_ids. \&quot;any\&quot; will match a member with any of the interest supplied, \&quot;all\&quot; will only match members with every interest supplied, and \&quot;none\&quot; will match members without any of the interest supplied.
1313
- # @option opts [String] :sort_field Returns files sorted by the specified field.
1314
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
1315
- # @option opts [BOOLEAN] :since_last_campaign Filter subscribers by those subscribed/unsubscribed/pending/cleaned since last email campaign send. Member status is required to use this filter.
1316
- # @option opts [String] :unsubscribed_since Filter subscribers by those unsubscribed since a specific date. Using any status other than unsubscribed with this filter will result in an error.
1317
- # @return [Array<(ListMembers2, Fixnum, Hash)>] ListMembers2 data, response status code and response headers
1318
- def get_list_members_info_with_http_info(list_id, opts = {})
1319
- # resource path
1320
- local_var_path = '/lists/{list_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s)
492
+ def get_list_members_info(list_id, opts = {})
493
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
494
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
495
+ fail ArgumentError, 'invalid value for "status", must be one of subscribed, unsubscribed, cleaned, pending, transactional, archived' if opts[:'status'] && !['subscribed', 'unsubscribed', 'cleaned', 'pending', 'transactional', 'archived'].include?(opts[:'status'])
496
+ fail ArgumentError, 'invalid value for "interest_match", must be one of any, all, none' if opts[:'interest_match'] && !['any', 'all', 'none'].include?(opts[:'interest_match'])
497
+ fail ArgumentError, 'invalid value for "sort_field", must be one of timestamp_opt, timestamp_signup, last_changed' if opts[:'sort_field'] && !['timestamp_opt', 'timestamp_signup', 'last_changed'].include?(opts[:'sort_field'])
498
+ fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
1321
499
 
1322
- # query parameters
1323
500
  query_params = {}
1324
501
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1325
502
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -1340,341 +517,128 @@ module MailchimpMarketing
1340
517
  query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
1341
518
  query_params[:'since_last_campaign'] = opts[:'since_last_campaign'] if !opts[:'since_last_campaign'].nil?
1342
519
  query_params[:'unsubscribed_since'] = opts[:'unsubscribed_since'] if !opts[:'unsubscribed_since'].nil?
1343
-
1344
- # header parameters
1345
- header_params = {}
1346
- # HTTP header 'Accept' (if needed)
1347
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1348
- # HTTP header 'Content-Type'
1349
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1350
-
1351
- # form parameters
1352
520
  form_params = {}
1353
-
1354
- # http body (model)
1355
521
  post_body = nil
1356
- auth_names = ['basicAuth']
522
+
523
+ local_var_path = '/lists/{list_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s)
1357
524
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1358
- :header_params => header_params,
1359
525
  :query_params => query_params,
1360
526
  :form_params => form_params,
1361
- :body => post_body,
1362
- :auth_names => auth_names,
1363
- :return_type => 'ListMembers2')
527
+ :body => post_body)
1364
528
  return data, status_code, headers
1365
529
  end
1366
- # Get member info
1367
- # Get information about a specific list member, including a currently subscribed, unsubscribed, or bounced member.
1368
- # @param list_id The unique ID for the list.
1369
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1370
- # @param [Hash] opts the optional parameters
1371
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1372
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1373
- # @return [ListMembers2]
1374
- def get_list_member(list_id = {}, subscriber_hash = {}, opts = {})
1375
- data, _status_code, _headers = get_list_member_with_http_info(list_id, subscriber_hash, opts)
1376
- data
1377
- end
1378
530
 
1379
531
  # Get member info
1380
- # Get information about a specific list member, including a currently subscribed, unsubscribed, or bounced member.
1381
- # @param list_id The unique ID for the list.
1382
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1383
- # @param [Hash] opts the optional parameters
1384
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1385
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1386
- # @return [Array<(ListMembers2, Fixnum, Hash)>] ListMembers2 data, response status code and response headers
1387
- def get_list_member_with_http_info(list_id, subscriber_hash, opts = {})
1388
- # resource path
1389
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
532
+ def get_list_member(list_id, subscriber_hash, opts = {})
533
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
534
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
1390
535
 
1391
- # query parameters
1392
536
  query_params = {}
1393
537
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1394
538
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1395
-
1396
- # header parameters
1397
- header_params = {}
1398
- # HTTP header 'Accept' (if needed)
1399
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1400
- # HTTP header 'Content-Type'
1401
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1402
-
1403
- # form parameters
1404
539
  form_params = {}
1405
-
1406
- # http body (model)
1407
540
  post_body = nil
1408
- auth_names = ['basicAuth']
541
+
542
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1409
543
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1410
- :header_params => header_params,
1411
544
  :query_params => query_params,
1412
545
  :form_params => form_params,
1413
- :body => post_body,
1414
- :auth_names => auth_names,
1415
- :return_type => 'ListMembers2')
546
+ :body => post_body)
1416
547
  return data, status_code, headers
1417
548
  end
1418
- # View recent activity 50
1419
- # Get the last 50 events of a member's activity on a specific list, including opens, clicks, and unsubscribes.
1420
- # @param list_id The unique ID for the list.
1421
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1422
- # @param [Hash] opts the optional parameters
1423
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1424
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1425
- # @option opts [Array<String>] :action A comma seperated list of actions to return.
1426
- # @return [MemberActivityEvents]
1427
- def get_list_member_activity(list_id = {}, subscriber_hash = {}, opts = {})
1428
- data, _status_code, _headers = get_list_member_activity_with_http_info(list_id, subscriber_hash, opts)
1429
- data
1430
- end
1431
549
 
1432
550
  # View recent activity 50
1433
- # Get the last 50 events of a member&#39;s activity on a specific list, including opens, clicks, and unsubscribes.
1434
- # @param list_id The unique ID for the list.
1435
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1436
- # @param [Hash] opts the optional parameters
1437
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1438
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1439
- # @option opts [Array<String>] :action A comma seperated list of actions to return.
1440
- # @return [Array<(MemberActivityEvents, Fixnum, Hash)>] MemberActivityEvents data, response status code and response headers
1441
- def get_list_member_activity_with_http_info(list_id, subscriber_hash, opts = {})
1442
- # resource path
1443
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/activity'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
551
+ def get_list_member_activity(list_id, subscriber_hash, opts = {})
552
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
553
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
1444
554
 
1445
- # query parameters
1446
555
  query_params = {}
1447
556
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1448
557
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1449
558
  query_params[:'action'] = @api_client.build_collection_param(opts[:'action'], :csv) if !opts[:'action'].nil?
1450
-
1451
- # header parameters
1452
- header_params = {}
1453
- # HTTP header 'Accept' (if needed)
1454
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1455
- # HTTP header 'Content-Type'
1456
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1457
-
1458
- # form parameters
1459
559
  form_params = {}
1460
-
1461
- # http body (model)
1462
560
  post_body = nil
1463
- auth_names = ['basicAuth']
561
+
562
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/activity'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1464
563
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1465
- :header_params => header_params,
1466
564
  :query_params => query_params,
1467
565
  :form_params => form_params,
1468
- :body => post_body,
1469
- :auth_names => auth_names,
1470
- :return_type => 'MemberActivityEvents')
566
+ :body => post_body)
1471
567
  return data, status_code, headers
1472
568
  end
1473
- # View recent activity 10
1474
- # Get the last 10 events of a member's activity on a specific list, including opens, clicks, and unsubscribes.
1475
- # @param list_id The unique ID for the list.
1476
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1477
- # @param [Hash] opts the optional parameters
1478
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1479
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1480
- # @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)
1481
- # @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)
1482
- # @option opts [Array<String>] :activity_filters A comma-separated list of activity filters that correspond to a set of activity types, e.g \&quot;?activity_filters&#x3D;open,bounce,click\&quot;.
1483
- # @return [MemberActivityEvents1]
1484
- def get_list_member_activity_feed(list_id = {}, subscriber_hash = {}, opts = {})
1485
- data, _status_code, _headers = get_list_member_activity_feed_with_http_info(list_id, subscriber_hash, opts)
1486
- data
1487
- end
1488
569
 
1489
570
  # View recent activity 10
1490
- # Get the last 10 events of a member&#39;s activity on a specific list, including opens, clicks, and unsubscribes.
1491
- # @param list_id The unique ID for the list.
1492
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1493
- # @param [Hash] opts the optional parameters
1494
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1495
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1496
- # @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**
1497
- # @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**.
1498
- # @option opts [Array<String>] :activity_filters A comma-separated list of activity filters that correspond to a set of activity types, e.g \&quot;?activity_filters&#x3D;open,bounce,click\&quot;.
1499
- # @return [Array<(MemberActivityEvents1, Fixnum, Hash)>] MemberActivityEvents1 data, response status code and response headers
1500
- def get_list_member_activity_feed_with_http_info(list_id, subscriber_hash, opts = {})
1501
- # resource path
1502
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/activity-feed'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
571
+ def get_list_member_activity_feed(list_id, subscriber_hash, opts = {})
572
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
573
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
574
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1503
575
 
1504
- # query parameters
1505
576
  query_params = {}
1506
577
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1507
578
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1508
579
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1509
580
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1510
581
  query_params[:'activity_filters'] = @api_client.build_collection_param(opts[:'activity_filters'], :csv) if !opts[:'activity_filters'].nil?
1511
-
1512
- # header parameters
1513
- header_params = {}
1514
- # HTTP header 'Accept' (if needed)
1515
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1516
- # HTTP header 'Content-Type'
1517
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1518
-
1519
- # form parameters
1520
582
  form_params = {}
1521
-
1522
- # http body (model)
1523
583
  post_body = nil
1524
- auth_names = ['basicAuth']
584
+
585
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/activity-feed'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1525
586
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1526
- :header_params => header_params,
1527
587
  :query_params => query_params,
1528
588
  :form_params => form_params,
1529
- :body => post_body,
1530
- :auth_names => auth_names,
1531
- :return_type => 'MemberActivityEvents1')
589
+ :body => post_body)
1532
590
  return data, status_code, headers
1533
591
  end
1534
- # List member events
1535
- # Get events for a contact.
1536
- # @param list_id The unique ID for the list.
1537
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address. This endpoint also accepts email addresses.
1538
- # @param [Hash] opts the optional parameters
1539
- # @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)
1540
- # @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)
1541
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1542
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1543
- # @return [CollectionOfEvents]
1544
- def get_list_member_events(list_id = {}, subscriber_hash = {}, opts = {})
1545
- data, _status_code, _headers = get_list_member_events_with_http_info(list_id, subscriber_hash, opts)
1546
- data
1547
- end
1548
592
 
1549
593
  # List member events
1550
- # Get events for a contact.
1551
- # @param list_id The unique ID for the list.
1552
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address. This endpoint also accepts email addresses.
1553
- # @param [Hash] opts the optional parameters
1554
- # @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**
1555
- # @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**.
1556
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1557
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1558
- # @return [Array<(CollectionOfEvents, Fixnum, Hash)>] CollectionOfEvents data, response status code and response headers
1559
- def get_list_member_events_with_http_info(list_id, subscriber_hash, opts = {})
1560
- # resource path
1561
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/events'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
594
+ def get_list_member_events(list_id, subscriber_hash, opts = {})
595
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
596
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
597
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1562
598
 
1563
- # query parameters
1564
599
  query_params = {}
1565
600
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1566
601
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1567
602
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1568
603
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1569
-
1570
- # header parameters
1571
- header_params = {}
1572
- # HTTP header 'Accept' (if needed)
1573
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1574
- # HTTP header 'Content-Type'
1575
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1576
-
1577
- # form parameters
1578
604
  form_params = {}
1579
-
1580
- # http body (model)
1581
605
  post_body = nil
1582
- auth_names = ['basicAuth']
606
+
607
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/events'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1583
608
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1584
- :header_params => header_params,
1585
609
  :query_params => query_params,
1586
610
  :form_params => form_params,
1587
- :body => post_body,
1588
- :auth_names => auth_names,
1589
- :return_type => 'CollectionOfEvents')
611
+ :body => post_body)
1590
612
  return data, status_code, headers
1591
613
  end
1592
- # List member goal events
1593
- # Get the last 50 Goal events for a member on a specific list.
1594
- # @param list_id The unique ID for the list.
1595
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1596
- # @param [Hash] opts the optional parameters
1597
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1598
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1599
- # @return [CollectionOfMemberActivityEvents]
1600
- def getListMemberGoals(list_id = {}, subscriber_hash = {}, opts = {})
1601
- data, _status_code, _headers = getListMemberGoals_with_http_info(list_id, subscriber_hash, opts)
1602
- data
1603
- end
1604
614
 
1605
615
  # List member goal events
1606
- # Get the last 50 Goal events for a member on a specific list.
1607
- # @param list_id The unique ID for the list.
1608
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1609
- # @param [Hash] opts the optional parameters
1610
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1611
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1612
- # @return [Array<(CollectionOfMemberActivityEvents, Fixnum, Hash)>] CollectionOfMemberActivityEvents data, response status code and response headers
1613
- def getListMemberGoals_with_http_info(list_id, subscriber_hash, opts = {})
1614
- # resource path
1615
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/goals'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
616
+ def getListMemberGoals(list_id, subscriber_hash, opts = {})
617
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
618
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
1616
619
 
1617
- # query parameters
1618
620
  query_params = {}
1619
621
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1620
622
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1621
-
1622
- # header parameters
1623
- header_params = {}
1624
- # HTTP header 'Accept' (if needed)
1625
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1626
- # HTTP header 'Content-Type'
1627
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1628
-
1629
- # form parameters
1630
623
  form_params = {}
1631
-
1632
- # http body (model)
1633
624
  post_body = nil
1634
- auth_names = ['basicAuth']
625
+
626
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/goals'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1635
627
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1636
- :header_params => header_params,
1637
628
  :query_params => query_params,
1638
629
  :form_params => form_params,
1639
- :body => post_body,
1640
- :auth_names => auth_names,
1641
- :return_type => 'CollectionOfMemberActivityEvents')
630
+ :body => post_body)
1642
631
  return data, status_code, headers
1643
632
  end
1644
- # List recent member notes
1645
- # Get recent notes for a specific list member.
1646
- # @param list_id The unique ID for the list.
1647
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1648
- # @param [Hash] opts the optional parameters
1649
- # @option opts [String] :sort_field Returns notes sorted by the specified field.
1650
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
1651
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1652
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1653
- # @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)
1654
- # @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)
1655
- # @return [CollectionOfNotes]
1656
- def get_list_member_notes(list_id = {}, subscriber_hash = {}, opts = {})
1657
- data, _status_code, _headers = get_list_member_notes_with_http_info(list_id, subscriber_hash, opts)
1658
- data
1659
- end
1660
633
 
1661
634
  # List recent member notes
1662
- # Get recent notes for a specific list member.
1663
- # @param list_id The unique ID for the list.
1664
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1665
- # @param [Hash] opts the optional parameters
1666
- # @option opts [String] :sort_field Returns notes sorted by the specified field.
1667
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
1668
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1669
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1670
- # @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**
1671
- # @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**.
1672
- # @return [Array<(CollectionOfNotes, Fixnum, Hash)>] CollectionOfNotes data, response status code and response headers
1673
- def get_list_member_notes_with_http_info(list_id, subscriber_hash, opts = {})
1674
- # resource path
1675
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
635
+ def get_list_member_notes(list_id, subscriber_hash, opts = {})
636
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
637
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
638
+ fail ArgumentError, 'invalid value for "sort_field", must be one of created_at, updated_at, note_id' if opts[:'sort_field'] && !['created_at', 'updated_at', 'note_id'].include?(opts[:'sort_field'])
639
+ fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
640
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1676
641
 
1677
- # query parameters
1678
642
  query_params = {}
1679
643
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
1680
644
  query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
@@ -1682,115 +646,42 @@ module MailchimpMarketing
1682
646
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1683
647
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1684
648
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1685
-
1686
- # header parameters
1687
- header_params = {}
1688
- # HTTP header 'Accept' (if needed)
1689
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1690
- # HTTP header 'Content-Type'
1691
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1692
-
1693
- # form parameters
1694
649
  form_params = {}
1695
-
1696
- # http body (model)
1697
650
  post_body = nil
1698
- auth_names = ['basicAuth']
651
+
652
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1699
653
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1700
- :header_params => header_params,
1701
654
  :query_params => query_params,
1702
655
  :form_params => form_params,
1703
- :body => post_body,
1704
- :auth_names => auth_names,
1705
- :return_type => 'CollectionOfNotes')
656
+ :body => post_body)
1706
657
  return data, status_code, headers
1707
658
  end
1708
- # Get member note
1709
- # Get a specific note for a specific list member.
1710
- # @param list_id The unique ID for the list.
1711
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1712
- # @param note_id The id for the note.
1713
- # @param [Hash] opts the optional parameters
1714
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1715
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1716
- # @return [MemberNotes]
1717
- def get_list_member_note(list_id = {}, subscriber_hash = {}, note_id = {}, opts = {})
1718
- data, _status_code, _headers = get_list_member_note_with_http_info(list_id, subscriber_hash, note_id, opts)
1719
- data
1720
- end
1721
659
 
1722
660
  # Get member note
1723
- # Get a specific note for a specific list member.
1724
- # @param list_id The unique ID for the list.
1725
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1726
- # @param note_id The id for the note.
1727
- # @param [Hash] opts the optional parameters
1728
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1729
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1730
- # @return [Array<(MemberNotes, Fixnum, Hash)>] MemberNotes data, response status code and response headers
1731
- def get_list_member_note_with_http_info(list_id, subscriber_hash, note_id, opts = {})
1732
- # resource path
1733
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s)
661
+ def get_list_member_note(list_id, subscriber_hash, note_id, opts = {})
662
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
663
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
664
+ fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil?
1734
665
 
1735
- # query parameters
1736
666
  query_params = {}
1737
667
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1738
668
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1739
-
1740
- # header parameters
1741
- header_params = {}
1742
- # HTTP header 'Accept' (if needed)
1743
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1744
- # HTTP header 'Content-Type'
1745
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1746
-
1747
- # form parameters
1748
669
  form_params = {}
1749
-
1750
- # http body (model)
1751
670
  post_body = nil
1752
- auth_names = ['basicAuth']
671
+
672
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s)
1753
673
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1754
- :header_params => header_params,
1755
674
  :query_params => query_params,
1756
675
  :form_params => form_params,
1757
- :body => post_body,
1758
- :auth_names => auth_names,
1759
- :return_type => 'MemberNotes')
676
+ :body => post_body)
1760
677
  return data, status_code, headers
1761
678
  end
1762
- # List merge fields
1763
- # Get a list of all merge fields (formerly merge vars) for a list.
1764
- # @param list_id The unique ID for the list.
1765
- # @param [Hash] opts the optional parameters
1766
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1767
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1768
- # @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)
1769
- # @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)
1770
- # @option opts [String] :type The merge field type.
1771
- # @option opts [BOOLEAN] :required The boolean value if the merge field is required.
1772
- # @return [CollectionOfMergeFields]
1773
- def get_list_merge_fields(list_id = {}, opts = {})
1774
- data, _status_code, _headers = get_list_merge_fields_with_http_info(list_id, opts)
1775
- data
1776
- end
1777
679
 
1778
680
  # List merge fields
1779
- # Get a list of all merge fields (formerly merge vars) for a list.
1780
- # @param list_id The unique ID for the list.
1781
- # @param [Hash] opts the optional parameters
1782
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1783
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1784
- # @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**
1785
- # @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**.
1786
- # @option opts [String] :type The merge field type.
1787
- # @option opts [BOOLEAN] :required The boolean value if the merge field is required.
1788
- # @return [Array<(CollectionOfMergeFields, Fixnum, Hash)>] CollectionOfMergeFields data, response status code and response headers
1789
- def get_list_merge_fields_with_http_info(list_id, opts = {})
1790
- # resource path
1791
- local_var_path = '/lists/{list_id}/merge-fields'.sub('{' + 'list_id' + '}', list_id.to_s)
681
+ def get_list_merge_fields(list_id, opts = {})
682
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
683
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1792
684
 
1793
- # query parameters
1794
685
  query_params = {}
1795
686
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1796
687
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -1798,178 +689,64 @@ module MailchimpMarketing
1798
689
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1799
690
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
1800
691
  query_params[:'required'] = opts[:'required'] if !opts[:'required'].nil?
1801
-
1802
- # header parameters
1803
- header_params = {}
1804
- # HTTP header 'Accept' (if needed)
1805
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1806
- # HTTP header 'Content-Type'
1807
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1808
-
1809
- # form parameters
1810
692
  form_params = {}
1811
-
1812
- # http body (model)
1813
693
  post_body = nil
1814
- auth_names = ['basicAuth']
694
+
695
+ local_var_path = '/lists/{list_id}/merge-fields'.sub('{' + 'list_id' + '}', list_id.to_s)
1815
696
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1816
- :header_params => header_params,
1817
697
  :query_params => query_params,
1818
698
  :form_params => form_params,
1819
- :body => post_body,
1820
- :auth_names => auth_names,
1821
- :return_type => 'CollectionOfMergeFields')
699
+ :body => post_body)
1822
700
  return data, status_code, headers
1823
701
  end
1824
- # Get merge field
1825
- # Get information about a specific merge field in a list.
1826
- # @param list_id The unique ID for the list.
1827
- # @param merge_id The id for the merge field.
1828
- # @param [Hash] opts the optional parameters
1829
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1830
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1831
- # @return [MergeField]
1832
- def get_list_merge_field(list_id = {}, merge_id = {}, opts = {})
1833
- data, _status_code, _headers = get_list_merge_field_with_http_info(list_id, merge_id, opts)
1834
- data
1835
- end
1836
702
 
1837
703
  # Get merge field
1838
- # Get information about a specific merge field in a list.
1839
- # @param list_id The unique ID for the list.
1840
- # @param merge_id The id for the merge field.
1841
- # @param [Hash] opts the optional parameters
1842
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1843
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1844
- # @return [Array<(MergeField, Fixnum, Hash)>] MergeField data, response status code and response headers
1845
- def get_list_merge_field_with_http_info(list_id, merge_id, opts = {})
1846
- # resource path
1847
- local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
704
+ def get_list_merge_field(list_id, merge_id, opts = {})
705
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
706
+ fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil?
1848
707
 
1849
- # query parameters
1850
708
  query_params = {}
1851
709
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1852
710
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1853
-
1854
- # header parameters
1855
- header_params = {}
1856
- # HTTP header 'Accept' (if needed)
1857
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1858
- # HTTP header 'Content-Type'
1859
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1860
-
1861
- # form parameters
1862
711
  form_params = {}
1863
-
1864
- # http body (model)
1865
712
  post_body = nil
1866
- auth_names = ['basicAuth']
713
+
714
+ local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
1867
715
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1868
- :header_params => header_params,
1869
716
  :query_params => query_params,
1870
717
  :form_params => form_params,
1871
- :body => post_body,
1872
- :auth_names => auth_names,
1873
- :return_type => 'MergeField')
718
+ :body => post_body)
1874
719
  return data, status_code, headers
1875
720
  end
1876
- # Get segment info
1877
- # Get information about a specific segment.
1878
- # @param list_id The unique ID for the list.
1879
- # @param segment_id The unique id for the segment.
1880
- # @param [Hash] opts the optional parameters
1881
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1882
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1883
- # @option opts [BOOLEAN] :include_cleaned Include cleaned members in response
1884
- # @option opts [BOOLEAN] :include_transactional Include transactional members in response
1885
- # @option opts [BOOLEAN] :include_unsubscribed Include unsubscribed members in response
1886
- # @return [List6]
1887
- def get_segment(list_id = {}, segment_id = {}, opts = {})
1888
- data, _status_code, _headers = get_segment_with_http_info(list_id, segment_id, opts)
1889
- data
1890
- end
1891
721
 
1892
722
  # Get segment info
1893
- # Get information about a specific segment.
1894
- # @param list_id The unique ID for the list.
1895
- # @param segment_id The unique id for the segment.
1896
- # @param [Hash] opts the optional parameters
1897
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1898
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1899
- # @option opts [BOOLEAN] :include_cleaned Include cleaned members in response
1900
- # @option opts [BOOLEAN] :include_transactional Include transactional members in response
1901
- # @option opts [BOOLEAN] :include_unsubscribed Include unsubscribed members in response
1902
- # @return [Array<(List6, Fixnum, Hash)>] List6 data, response status code and response headers
1903
- def get_segment_with_http_info(list_id, segment_id, opts = {})
1904
- # resource path
1905
- local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
723
+ def get_segment(list_id, segment_id, opts = {})
724
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
725
+ fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
1906
726
 
1907
- # query parameters
1908
727
  query_params = {}
1909
728
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1910
729
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1911
730
  query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil?
1912
731
  query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil?
1913
732
  query_params[:'include_unsubscribed'] = opts[:'include_unsubscribed'] if !opts[:'include_unsubscribed'].nil?
1914
-
1915
- # header parameters
1916
- header_params = {}
1917
- # HTTP header 'Accept' (if needed)
1918
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1919
- # HTTP header 'Content-Type'
1920
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1921
-
1922
- # form parameters
1923
733
  form_params = {}
1924
-
1925
- # http body (model)
1926
734
  post_body = nil
1927
- auth_names = ['basicAuth']
735
+
736
+ local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
1928
737
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1929
- :header_params => header_params,
1930
738
  :query_params => query_params,
1931
739
  :form_params => form_params,
1932
- :body => post_body,
1933
- :auth_names => auth_names,
1934
- :return_type => 'List6')
740
+ :body => post_body)
1935
741
  return data, status_code, headers
1936
742
  end
1937
- # List members in segment
1938
- # Get information about members in a saved segment.
1939
- # @param list_id The unique ID for the list.
1940
- # @param segment_id The unique id for the segment.
1941
- # @param [Hash] opts the optional parameters
1942
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1943
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1944
- # @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)
1945
- # @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)
1946
- # @option opts [BOOLEAN] :include_cleaned Include cleaned members in response
1947
- # @option opts [BOOLEAN] :include_transactional Include transactional members in response
1948
- # @option opts [BOOLEAN] :include_unsubscribed Include unsubscribed members in response
1949
- # @return [SegmentMembers]
1950
- def get_segment_members_list(list_id = {}, segment_id = {}, opts = {})
1951
- data, _status_code, _headers = get_segment_members_list_with_http_info(list_id, segment_id, opts)
1952
- data
1953
- end
1954
743
 
1955
744
  # List members in segment
1956
- # Get information about members in a saved segment.
1957
- # @param list_id The unique ID for the list.
1958
- # @param segment_id The unique id for the segment.
1959
- # @param [Hash] opts the optional parameters
1960
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1961
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1962
- # @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**
1963
- # @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**.
1964
- # @option opts [BOOLEAN] :include_cleaned Include cleaned members in response
1965
- # @option opts [BOOLEAN] :include_transactional Include transactional members in response
1966
- # @option opts [BOOLEAN] :include_unsubscribed Include unsubscribed members in response
1967
- # @return [Array<(SegmentMembers, Fixnum, Hash)>] SegmentMembers data, response status code and response headers
1968
- def get_segment_members_list_with_http_info(list_id, segment_id, opts = {})
1969
- # resource path
1970
- local_var_path = '/lists/{list_id}/segments/{segment_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
745
+ def get_segment_members_list(list_id, segment_id, opts = {})
746
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
747
+ fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
748
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1971
749
 
1972
- # query parameters
1973
750
  query_params = {}
1974
751
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1975
752
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -1978,1348 +755,491 @@ module MailchimpMarketing
1978
755
  query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil?
1979
756
  query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil?
1980
757
  query_params[:'include_unsubscribed'] = opts[:'include_unsubscribed'] if !opts[:'include_unsubscribed'].nil?
1981
-
1982
- # header parameters
1983
- header_params = {}
1984
- # HTTP header 'Accept' (if needed)
1985
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1986
- # HTTP header 'Content-Type'
1987
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1988
-
1989
- # form parameters
1990
758
  form_params = {}
1991
-
1992
- # http body (model)
1993
759
  post_body = nil
1994
- auth_names = ['basicAuth']
760
+
761
+ local_var_path = '/lists/{list_id}/segments/{segment_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
1995
762
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1996
- :header_params => header_params,
1997
763
  :query_params => query_params,
1998
764
  :form_params => form_params,
1999
- :body => post_body,
2000
- :auth_names => auth_names,
2001
- :return_type => 'SegmentMembers')
765
+ :body => post_body)
2002
766
  return data, status_code, headers
2003
767
  end
2004
- # List signup forms
2005
- # Get signup forms for a specific list.
2006
- # @param list_id The unique ID for the list.
2007
- # @param [Hash] opts the optional parameters
2008
- # @return [ListSignupForms]
2009
- def get_list_signup_forms(list_id = {}, opts = {})
2010
- data, _status_code, _headers = get_list_signup_forms_with_http_info(list_id, opts)
2011
- data
2012
- end
2013
768
 
2014
769
  # List signup forms
2015
- # Get signup forms for a specific list.
2016
- # @param list_id The unique ID for the list.
2017
- # @param [Hash] opts the optional parameters
2018
- # @return [Array<(ListSignupForms, Fixnum, Hash)>] ListSignupForms data, response status code and response headers
2019
- def get_list_signup_forms_with_http_info(list_id, opts = {})
2020
- # resource path
2021
- local_var_path = '/lists/{list_id}/signup-forms'.sub('{' + 'list_id' + '}', list_id.to_s)
770
+ def get_list_signup_forms(list_id, opts = {})
771
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
2022
772
 
2023
- # query parameters
2024
773
  query_params = {}
2025
-
2026
- # header parameters
2027
- header_params = {}
2028
- # HTTP header 'Accept' (if needed)
2029
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2030
- # HTTP header 'Content-Type'
2031
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2032
-
2033
- # form parameters
2034
774
  form_params = {}
2035
-
2036
- # http body (model)
2037
775
  post_body = nil
2038
- auth_names = ['basicAuth']
776
+
777
+ local_var_path = '/lists/{list_id}/signup-forms'.sub('{' + 'list_id' + '}', list_id.to_s)
2039
778
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2040
- :header_params => header_params,
2041
779
  :query_params => query_params,
2042
780
  :form_params => form_params,
2043
- :body => post_body,
2044
- :auth_names => auth_names,
2045
- :return_type => 'ListSignupForms')
781
+ :body => post_body)
2046
782
  return data, status_code, headers
2047
783
  end
2048
- # List webhooks
2049
- # Get information about all webhooks for a specific list.
2050
- # @param list_id The unique ID for the list.
2051
- # @param [Hash] opts the optional parameters
2052
- # @return [ListWebhooks]
2053
- def get_list_webhooks(list_id = {}, opts = {})
2054
- data, _status_code, _headers = get_list_webhooks_with_http_info(list_id, opts)
2055
- data
2056
- end
2057
784
 
2058
785
  # List webhooks
2059
- # Get information about all webhooks for a specific list.
2060
- # @param list_id The unique ID for the list.
2061
- # @param [Hash] opts the optional parameters
2062
- # @return [Array<(ListWebhooks, Fixnum, Hash)>] ListWebhooks data, response status code and response headers
2063
- def get_list_webhooks_with_http_info(list_id, opts = {})
2064
- # resource path
2065
- local_var_path = '/lists/{list_id}/webhooks'.sub('{' + 'list_id' + '}', list_id.to_s)
786
+ def get_list_webhooks(list_id, opts = {})
787
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
2066
788
 
2067
- # query parameters
2068
789
  query_params = {}
2069
-
2070
- # header parameters
2071
- header_params = {}
2072
- # HTTP header 'Accept' (if needed)
2073
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2074
- # HTTP header 'Content-Type'
2075
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2076
-
2077
- # form parameters
2078
790
  form_params = {}
2079
-
2080
- # http body (model)
2081
791
  post_body = nil
2082
- auth_names = ['basicAuth']
792
+
793
+ local_var_path = '/lists/{list_id}/webhooks'.sub('{' + 'list_id' + '}', list_id.to_s)
2083
794
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2084
- :header_params => header_params,
2085
795
  :query_params => query_params,
2086
796
  :form_params => form_params,
2087
- :body => post_body,
2088
- :auth_names => auth_names,
2089
- :return_type => 'ListWebhooks')
797
+ :body => post_body)
2090
798
  return data, status_code, headers
2091
799
  end
2092
- # Get webhook info
2093
- # Get information about a specific webhook.
2094
- # @param list_id The unique ID for the list.
2095
- # @param webhook_id The webhook&#39;s id.
2096
- # @param [Hash] opts the optional parameters
2097
- # @return [ListWebhooks]
2098
- def get_list_webhook(list_id = {}, webhook_id = {}, opts = {})
2099
- data, _status_code, _headers = get_list_webhook_with_http_info(list_id, webhook_id, opts)
2100
- data
2101
- end
2102
800
 
2103
801
  # Get webhook info
2104
- # Get information about a specific webhook.
2105
- # @param list_id The unique ID for the list.
2106
- # @param webhook_id The webhook&#39;s id.
2107
- # @param [Hash] opts the optional parameters
2108
- # @return [Array<(ListWebhooks, Fixnum, Hash)>] ListWebhooks data, response status code and response headers
2109
- def get_list_webhook_with_http_info(list_id, webhook_id, opts = {})
2110
- # resource path
2111
- local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
802
+ def get_list_webhook(list_id, webhook_id, opts = {})
803
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
804
+ fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil?
2112
805
 
2113
- # query parameters
2114
806
  query_params = {}
2115
-
2116
- # header parameters
2117
- header_params = {}
2118
- # HTTP header 'Accept' (if needed)
2119
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2120
- # HTTP header 'Content-Type'
2121
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2122
-
2123
- # form parameters
2124
807
  form_params = {}
2125
-
2126
- # http body (model)
2127
808
  post_body = nil
2128
- auth_names = ['basicAuth']
809
+
810
+ local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
2129
811
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2130
- :header_params => header_params,
2131
812
  :query_params => query_params,
2132
813
  :form_params => form_params,
2133
- :body => post_body,
2134
- :auth_names => auth_names,
2135
- :return_type => 'ListWebhooks')
814
+ :body => post_body)
2136
815
  return data, status_code, headers
2137
816
  end
2138
- # Update lists
2139
- # Update the settings for a specific list.
2140
- # @param list_id The unique ID for the list.
2141
- # @param body
2142
- # @param [Hash] opts the optional parameters
2143
- # @return [SubscriberList]
2144
- def update_list(list_id = {}, body = {}, opts = {})
2145
- data, _status_code, _headers = update_list_with_http_info(list_id, body, opts)
2146
- data
2147
- end
2148
817
 
2149
818
  # Update lists
2150
- # Update the settings for a specific list.
2151
- # @param list_id The unique ID for the list.
2152
- # @param body
2153
- # @param [Hash] opts the optional parameters
2154
- # @return [Array<(SubscriberList, Fixnum, Hash)>] SubscriberList data, response status code and response headers
2155
- def update_list_with_http_info(list_id, body, opts = {})
2156
- # resource path
2157
- local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
819
+ def update_list(list_id, body, opts = {})
820
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
821
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2158
822
 
2159
- # query parameters
2160
823
  query_params = {}
2161
-
2162
- # header parameters
2163
- header_params = {}
2164
- # HTTP header 'Accept' (if needed)
2165
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2166
- # HTTP header 'Content-Type'
2167
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2168
-
2169
- # form parameters
2170
824
  form_params = {}
2171
-
2172
- # http body (model)
2173
825
  post_body = @api_client.object_to_http_body(body)
2174
- auth_names = ['basicAuth']
826
+
827
+ local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
2175
828
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2176
- :header_params => header_params,
2177
829
  :query_params => query_params,
2178
830
  :form_params => form_params,
2179
- :body => post_body,
2180
- :auth_names => auth_names,
2181
- :return_type => 'SubscriberList')
831
+ :body => post_body)
2182
832
  return data, status_code, headers
2183
833
  end
2184
- # Update interest category
2185
- # Update a specific interest category.
2186
- # @param list_id The unique ID for the list.
2187
- # @param interest_category_id The unique ID for the interest category.
2188
- # @param body
2189
- # @param [Hash] opts the optional parameters
2190
- # @return [InterestCategory]
2191
- def update_interest_category(list_id = {}, interest_category_id = {}, body = {}, opts = {})
2192
- data, _status_code, _headers = update_interest_category_with_http_info(list_id, interest_category_id, body, opts)
2193
- data
2194
- end
2195
834
 
2196
835
  # Update interest category
2197
- # Update a specific interest category.
2198
- # @param list_id The unique ID for the list.
2199
- # @param interest_category_id The unique ID for the interest category.
2200
- # @param body
2201
- # @param [Hash] opts the optional parameters
2202
- # @return [Array<(InterestCategory, Fixnum, Hash)>] InterestCategory data, response status code and response headers
2203
- def update_interest_category_with_http_info(list_id, interest_category_id, body, opts = {})
2204
- # resource path
2205
- local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
836
+ def update_interest_category(list_id, interest_category_id, body, opts = {})
837
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
838
+ fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
839
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2206
840
 
2207
- # query parameters
2208
841
  query_params = {}
2209
-
2210
- # header parameters
2211
- header_params = {}
2212
- # HTTP header 'Accept' (if needed)
2213
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2214
- # HTTP header 'Content-Type'
2215
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2216
-
2217
- # form parameters
2218
842
  form_params = {}
2219
-
2220
- # http body (model)
2221
843
  post_body = @api_client.object_to_http_body(body)
2222
- auth_names = ['basicAuth']
844
+
845
+ local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
2223
846
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2224
- :header_params => header_params,
2225
847
  :query_params => query_params,
2226
848
  :form_params => form_params,
2227
- :body => post_body,
2228
- :auth_names => auth_names,
2229
- :return_type => 'InterestCategory')
849
+ :body => post_body)
2230
850
  return data, status_code, headers
2231
851
  end
2232
- # Update interest in category
2233
- # Update interests or 'group names' for a specific category.
2234
- # @param list_id The unique ID for the list.
2235
- # @param interest_category_id The unique ID for the interest category.
2236
- # @param interest_id The specific interest or &#39;group name&#39;.
2237
- # @param [Hash] opts the optional parameters
2238
- # @option opts [Interest2] :body
2239
- # @return [Interest]
2240
- def update_interest_category_interest(list_id = {}, interest_category_id = {}, interest_id = {}, opts = {})
2241
- data, _status_code, _headers = update_interest_category_interest_with_http_info(list_id, interest_category_id, interest_id, opts)
2242
- data
2243
- end
2244
852
 
2245
853
  # Update interest in category
2246
- # Update interests or &#39;group names&#39; for a specific category.
2247
- # @param list_id The unique ID for the list.
2248
- # @param interest_category_id The unique ID for the interest category.
2249
- # @param interest_id The specific interest or &#39;group name&#39;.
2250
- # @param [Hash] opts the optional parameters
2251
- # @option opts [Interest2] :body
2252
- # @return [Array<(Interest, Fixnum, Hash)>] Interest data, response status code and response headers
2253
- def update_interest_category_interest_with_http_info(list_id, interest_category_id, interest_id, opts = {})
2254
- # resource path
2255
- local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s)
854
+ def update_interest_category_interest(list_id, interest_category_id, interest_id, opts = {})
855
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
856
+ fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
857
+ fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil?
2256
858
 
2257
- # query parameters
2258
859
  query_params = {}
2259
-
2260
- # header parameters
2261
- header_params = {}
2262
- # HTTP header 'Accept' (if needed)
2263
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2264
- # HTTP header 'Content-Type'
2265
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2266
-
2267
- # form parameters
2268
860
  form_params = {}
2269
-
2270
- # http body (model)
2271
861
  post_body = @api_client.object_to_http_body(opts[:'body'])
2272
- auth_names = ['basicAuth']
862
+
863
+ local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s)
2273
864
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2274
- :header_params => header_params,
2275
865
  :query_params => query_params,
2276
866
  :form_params => form_params,
2277
- :body => post_body,
2278
- :auth_names => auth_names,
2279
- :return_type => 'Interest')
867
+ :body => post_body)
2280
868
  return data, status_code, headers
2281
869
  end
2282
- # Update list member
2283
- # Update information for a specific list member.
2284
- # @param list_id The unique ID for the list.
2285
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
2286
- # @param body
2287
- # @param [Hash] opts the optional parameters
2288
- # @option opts [BOOLEAN] :skip_merge_validation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to False.
2289
- # @return [ListMembers2]
2290
- def update_list_member(list_id = {}, subscriber_hash = {}, body = {}, opts = {})
2291
- data, _status_code, _headers = update_list_member_with_http_info(list_id, subscriber_hash, body, opts)
2292
- data
2293
- end
2294
870
 
2295
871
  # Update list member
2296
- # Update information for a specific list member.
2297
- # @param list_id The unique ID for the list.
2298
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
2299
- # @param body
2300
- # @param [Hash] opts the optional parameters
2301
- # @option opts [BOOLEAN] :skip_merge_validation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to False.
2302
- # @return [Array<(ListMembers2, Fixnum, Hash)>] ListMembers2 data, response status code and response headers
2303
- def update_list_member_with_http_info(list_id, subscriber_hash, body, opts = {})
2304
- # resource path
2305
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
872
+ def update_list_member(list_id, subscriber_hash, body, opts = {})
873
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
874
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
875
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2306
876
 
2307
- # query parameters
2308
877
  query_params = {}
2309
878
  query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
2310
-
2311
- # header parameters
2312
- header_params = {}
2313
- # HTTP header 'Accept' (if needed)
2314
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2315
- # HTTP header 'Content-Type'
2316
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2317
-
2318
- # form parameters
2319
879
  form_params = {}
2320
-
2321
- # http body (model)
2322
880
  post_body = @api_client.object_to_http_body(body)
2323
- auth_names = ['basicAuth']
881
+
882
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
2324
883
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2325
- :header_params => header_params,
2326
884
  :query_params => query_params,
2327
885
  :form_params => form_params,
2328
- :body => post_body,
2329
- :auth_names => auth_names,
2330
- :return_type => 'ListMembers2')
886
+ :body => post_body)
2331
887
  return data, status_code, headers
2332
888
  end
2333
- # Update note
2334
- # Update a specific note for a specific list member.
2335
- # @param list_id The unique ID for the list.
2336
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
2337
- # @param note_id The id for the note.
2338
- # @param [Hash] opts the optional parameters
2339
- # @option opts [MemberNotes2] :body
2340
- # @return [MemberNotes]
2341
- def update_list_member_note(list_id = {}, subscriber_hash = {}, note_id = {}, opts = {})
2342
- data, _status_code, _headers = update_list_member_note_with_http_info(list_id, subscriber_hash, note_id, opts)
2343
- data
2344
- end
2345
889
 
2346
890
  # Update note
2347
- # Update a specific note for a specific list member.
2348
- # @param list_id The unique ID for the list.
2349
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
2350
- # @param note_id The id for the note.
2351
- # @param [Hash] opts the optional parameters
2352
- # @option opts [MemberNotes2] :body
2353
- # @return [Array<(MemberNotes, Fixnum, Hash)>] MemberNotes data, response status code and response headers
2354
- def update_list_member_note_with_http_info(list_id, subscriber_hash, note_id, opts = {})
2355
- # resource path
2356
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s)
891
+ def update_list_member_note(list_id, subscriber_hash, note_id, opts = {})
892
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
893
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
894
+ fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil?
2357
895
 
2358
- # query parameters
2359
896
  query_params = {}
2360
-
2361
- # header parameters
2362
- header_params = {}
2363
- # HTTP header 'Accept' (if needed)
2364
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2365
- # HTTP header 'Content-Type'
2366
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2367
-
2368
- # form parameters
2369
897
  form_params = {}
2370
-
2371
- # http body (model)
2372
898
  post_body = @api_client.object_to_http_body(opts[:'body'])
2373
- auth_names = ['basicAuth']
899
+
900
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s)
2374
901
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2375
- :header_params => header_params,
2376
902
  :query_params => query_params,
2377
903
  :form_params => form_params,
2378
- :body => post_body,
2379
- :auth_names => auth_names,
2380
- :return_type => 'MemberNotes')
904
+ :body => post_body)
2381
905
  return data, status_code, headers
2382
906
  end
2383
- # Update merge field
2384
- # Update a specific merge field in a list.
2385
- # @param list_id The unique ID for the list.
2386
- # @param merge_id The id for the merge field.
2387
- # @param body
2388
- # @param [Hash] opts the optional parameters
2389
- # @return [MergeField]
2390
- def update_list_merge_field(list_id = {}, merge_id = {}, body = {}, opts = {})
2391
- data, _status_code, _headers = update_list_merge_field_with_http_info(list_id, merge_id, body, opts)
2392
- data
2393
- end
2394
907
 
2395
908
  # Update merge field
2396
- # Update a specific merge field in a list.
2397
- # @param list_id The unique ID for the list.
2398
- # @param merge_id The id for the merge field.
2399
- # @param body
2400
- # @param [Hash] opts the optional parameters
2401
- # @return [Array<(MergeField, Fixnum, Hash)>] MergeField data, response status code and response headers
2402
- def update_list_merge_field_with_http_info(list_id, merge_id, body, opts = {})
2403
- # resource path
2404
- local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
909
+ def update_list_merge_field(list_id, merge_id, body, opts = {})
910
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
911
+ fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil?
912
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2405
913
 
2406
- # query parameters
2407
914
  query_params = {}
2408
-
2409
- # header parameters
2410
- header_params = {}
2411
- # HTTP header 'Accept' (if needed)
2412
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2413
- # HTTP header 'Content-Type'
2414
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2415
-
2416
- # form parameters
2417
915
  form_params = {}
2418
-
2419
- # http body (model)
2420
916
  post_body = @api_client.object_to_http_body(body)
2421
- auth_names = ['basicAuth']
917
+
918
+ local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
2422
919
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2423
- :header_params => header_params,
2424
920
  :query_params => query_params,
2425
921
  :form_params => form_params,
2426
- :body => post_body,
2427
- :auth_names => auth_names,
2428
- :return_type => 'MergeField')
922
+ :body => post_body)
2429
923
  return data, status_code, headers
2430
924
  end
2431
- # Update segment
2432
- # Update a specific segment in a list.
2433
- # @param list_id The unique ID for the list.
2434
- # @param segment_id The unique id for the segment.
2435
- # @param body
2436
- # @param [Hash] opts the optional parameters
2437
- # @return [List6]
2438
- def update_segment(list_id = {}, segment_id = {}, body = {}, opts = {})
2439
- data, _status_code, _headers = update_segment_with_http_info(list_id, segment_id, body, opts)
2440
- data
2441
- end
2442
925
 
2443
926
  # Update segment
2444
- # Update a specific segment in a list.
2445
- # @param list_id The unique ID for the list.
2446
- # @param segment_id The unique id for the segment.
2447
- # @param body
2448
- # @param [Hash] opts the optional parameters
2449
- # @return [Array<(List6, Fixnum, Hash)>] List6 data, response status code and response headers
2450
- def update_segment_with_http_info(list_id, segment_id, body, opts = {})
2451
- # resource path
2452
- local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
927
+ def update_segment(list_id, segment_id, body, opts = {})
928
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
929
+ fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
930
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2453
931
 
2454
- # query parameters
2455
932
  query_params = {}
2456
-
2457
- # header parameters
2458
- header_params = {}
2459
- # HTTP header 'Accept' (if needed)
2460
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2461
- # HTTP header 'Content-Type'
2462
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2463
-
2464
- # form parameters
2465
933
  form_params = {}
2466
-
2467
- # http body (model)
2468
934
  post_body = @api_client.object_to_http_body(body)
2469
- auth_names = ['basicAuth']
935
+
936
+ local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
2470
937
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2471
- :header_params => header_params,
2472
938
  :query_params => query_params,
2473
939
  :form_params => form_params,
2474
- :body => post_body,
2475
- :auth_names => auth_names,
2476
- :return_type => 'List6')
940
+ :body => post_body)
2477
941
  return data, status_code, headers
2478
942
  end
2479
- # Update webhook
2480
- # Update the settings for an existing webhook.
2481
- # @param list_id The unique ID for the list.
2482
- # @param webhook_id The webhook&#39;s id.
2483
- # @param body
2484
- # @param [Hash] opts the optional parameters
2485
- # @return [ListWebhooks]
2486
- def update_list_webhook(list_id = {}, webhook_id = {}, body = {}, opts = {})
2487
- data, _status_code, _headers = update_list_webhook_with_http_info(list_id, webhook_id, body, opts)
2488
- data
2489
- end
2490
943
 
2491
944
  # Update webhook
2492
- # Update the settings for an existing webhook.
2493
- # @param list_id The unique ID for the list.
2494
- # @param webhook_id The webhook&#39;s id.
2495
- # @param body
2496
- # @param [Hash] opts the optional parameters
2497
- # @return [Array<(ListWebhooks, Fixnum, Hash)>] ListWebhooks data, response status code and response headers
2498
- def update_list_webhook_with_http_info(list_id, webhook_id, body, opts = {})
2499
- # resource path
2500
- local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
945
+ def update_list_webhook(list_id, webhook_id, body, opts = {})
946
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
947
+ fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil?
948
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2501
949
 
2502
- # query parameters
2503
950
  query_params = {}
2504
-
2505
- # header parameters
2506
- header_params = {}
2507
- # HTTP header 'Accept' (if needed)
2508
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2509
- # HTTP header 'Content-Type'
2510
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2511
-
2512
- # form parameters
2513
951
  form_params = {}
2514
-
2515
- # http body (model)
2516
952
  post_body = @api_client.object_to_http_body(body)
2517
- auth_names = ['basicAuth']
953
+
954
+ local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
2518
955
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2519
- :header_params => header_params,
2520
956
  :query_params => query_params,
2521
957
  :form_params => form_params,
2522
- :body => post_body,
2523
- :auth_names => auth_names,
2524
- :return_type => 'ListWebhooks')
958
+ :body => post_body)
2525
959
  return data, status_code, headers
2526
960
  end
2527
- # Add event
2528
- # Add an event for a list member.
2529
- # @param list_id The unique ID for the list.
2530
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address. This endpoint also accepts email addresses.
2531
- # @param [Hash] opts the optional parameters
2532
- # @option opts [Events] :body
2533
- # @return [nil]
2534
- def create_list_member_event(list_id = {}, subscriber_hash = {}, opts = {})
2535
- create_list_member_event_with_http_info(list_id, subscriber_hash, opts)
2536
- nil
2537
- end
2538
961
 
2539
962
  # Add event
2540
- # Add an event for a list member.
2541
- # @param list_id The unique ID for the list.
2542
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address. This endpoint also accepts email addresses.
2543
- # @param [Hash] opts the optional parameters
2544
- # @option opts [Events] :body
2545
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
2546
- def create_list_member_event_with_http_info(list_id, subscriber_hash, opts = {})
2547
- # resource path
2548
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/events'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
963
+ def create_list_member_event(list_id, subscriber_hash, opts = {})
964
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
965
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
2549
966
 
2550
- # query parameters
2551
967
  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
968
  form_params = {}
2562
-
2563
- # http body (model)
2564
969
  post_body = @api_client.object_to_http_body(opts[:'body'])
2565
- auth_names = ['basicAuth']
970
+
971
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/events'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
2566
972
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2567
- :header_params => header_params,
2568
973
  :query_params => query_params,
2569
974
  :form_params => form_params,
2570
- :body => post_body,
2571
- :auth_names => auth_names)
975
+ :body => post_body)
2572
976
  return data, status_code, headers
2573
977
  end
2574
- # Add or remove member tags
2575
- # Add or remove tags from a list member. If a tag that does not exist is passed in and set as 'active', a new tag will be created.
2576
- # @param list_id The unique ID for the list.
2577
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
2578
- # @param [Hash] opts the optional parameters
2579
- # @option opts [MemberTags] :body
2580
- # @return [nil]
2581
- def update_list_member_tags(list_id = {}, subscriber_hash = {}, opts = {})
2582
- update_list_member_tags_with_http_info(list_id, subscriber_hash, opts)
2583
- nil
2584
- end
2585
978
 
2586
979
  # Add or remove member tags
2587
- # Add or remove tags from a list member. If a tag that does not exist is passed in and set as &#39;active&#39;, a new tag will be created.
2588
- # @param list_id The unique ID for the list.
2589
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
2590
- # @param [Hash] opts the optional parameters
2591
- # @option opts [MemberTags] :body
2592
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
2593
- def update_list_member_tags_with_http_info(list_id, subscriber_hash, opts = {})
2594
- # resource path
2595
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/tags'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
980
+ def update_list_member_tags(list_id, subscriber_hash, opts = {})
981
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
982
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
2596
983
 
2597
- # query parameters
2598
984
  query_params = {}
2599
-
2600
- # header parameters
2601
- header_params = {}
2602
- # HTTP header 'Accept' (if needed)
2603
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2604
- # HTTP header 'Content-Type'
2605
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2606
-
2607
- # form parameters
2608
985
  form_params = {}
2609
-
2610
- # http body (model)
2611
986
  post_body = @api_client.object_to_http_body(opts[:'body'])
2612
- auth_names = ['basicAuth']
987
+
988
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/tags'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
2613
989
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2614
- :header_params => header_params,
2615
990
  :query_params => query_params,
2616
991
  :form_params => form_params,
2617
- :body => post_body,
2618
- :auth_names => auth_names)
992
+ :body => post_body)
2619
993
  return data, status_code, headers
2620
994
  end
2621
- # Add list
2622
- # Create a new list in your Mailchimp account.
2623
- # @param body
2624
- # @param [Hash] opts the optional parameters
2625
- # @return [SubscriberList]
2626
- def create_list(body = {}, opts = {})
2627
- data, _status_code, _headers = create_list_with_http_info(body, opts)
2628
- data
2629
- end
2630
995
 
2631
996
  # Add list
2632
- # Create a new list in your Mailchimp account.
2633
- # @param body
2634
- # @param [Hash] opts the optional parameters
2635
- # @return [Array<(SubscriberList, Fixnum, Hash)>] SubscriberList data, response status code and response headers
2636
- def create_list_with_http_info(body, opts = {})
2637
- # resource path
2638
- local_var_path = '/lists'
997
+ def create_list(body, opts = {})
998
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2639
999
 
2640
- # query parameters
2641
1000
  query_params = {}
2642
-
2643
- # header parameters
2644
- header_params = {}
2645
- # HTTP header 'Accept' (if needed)
2646
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2647
- # HTTP header 'Content-Type'
2648
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2649
-
2650
- # form parameters
2651
1001
  form_params = {}
2652
-
2653
- # http body (model)
2654
1002
  post_body = @api_client.object_to_http_body(body)
2655
- auth_names = ['basicAuth']
1003
+
1004
+ local_var_path = '/lists'
2656
1005
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2657
- :header_params => header_params,
2658
1006
  :query_params => query_params,
2659
1007
  :form_params => form_params,
2660
- :body => post_body,
2661
- :auth_names => auth_names,
2662
- :return_type => 'SubscriberList')
1008
+ :body => post_body)
2663
1009
  return data, status_code, headers
2664
1010
  end
2665
- # Batch subscribe or unsubscibe
2666
- # Batch subscribe or unsubscribe list members.
2667
- # @param list_id The unique ID for the list.
2668
- # @param body
2669
- # @param [Hash] opts the optional parameters
2670
- # @option opts [BOOLEAN] :skip_merge_validation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to False.
2671
- # @option opts [BOOLEAN] :skip_duplicate_check If skip_duplicate_check is true, we will ignore duplicates sent in the request when using the batch sub/unsub on the lists endpoint. The status of the first appearance in the request will be saved. This defaults to False.
2672
- # @return [BatchUpdateListMembers]
2673
- def batch_list_members(list_id = {}, body = {}, opts = {})
2674
- data, _status_code, _headers = batch_list_members_with_http_info(list_id, body, opts)
2675
- data
2676
- end
2677
1011
 
2678
1012
  # Batch subscribe or unsubscibe
2679
- # Batch subscribe or unsubscribe list members.
2680
- # @param list_id The unique ID for the list.
2681
- # @param body
2682
- # @param [Hash] opts the optional parameters
2683
- # @option opts [BOOLEAN] :skip_merge_validation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to False.
2684
- # @option opts [BOOLEAN] :skip_duplicate_check If skip_duplicate_check is true, we will ignore duplicates sent in the request when using the batch sub/unsub on the lists endpoint. The status of the first appearance in the request will be saved. This defaults to False.
2685
- # @return [Array<(BatchUpdateListMembers, Fixnum, Hash)>] BatchUpdateListMembers data, response status code and response headers
2686
- def batch_list_members_with_http_info(list_id, body, opts = {})
2687
- # resource path
2688
- local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
1013
+ def batch_list_members(list_id, body, opts = {})
1014
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1015
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2689
1016
 
2690
- # query parameters
2691
1017
  query_params = {}
2692
1018
  query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
2693
1019
  query_params[:'skip_duplicate_check'] = opts[:'skip_duplicate_check'] if !opts[:'skip_duplicate_check'].nil?
2694
-
2695
- # header parameters
2696
- header_params = {}
2697
- # HTTP header 'Accept' (if needed)
2698
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2699
- # HTTP header 'Content-Type'
2700
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2701
-
2702
- # form parameters
2703
1020
  form_params = {}
2704
-
2705
- # http body (model)
2706
1021
  post_body = @api_client.object_to_http_body(body)
2707
- auth_names = ['basicAuth']
1022
+
1023
+ local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
2708
1024
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2709
- :header_params => header_params,
2710
1025
  :query_params => query_params,
2711
1026
  :form_params => form_params,
2712
- :body => post_body,
2713
- :auth_names => auth_names,
2714
- :return_type => 'BatchUpdateListMembers')
1027
+ :body => post_body)
2715
1028
  return data, status_code, headers
2716
1029
  end
2717
- # Add external id
2718
- # Create a new external identifier for a Mailchimp list.
2719
- # @param list_id The unique ID for the list.
2720
- # @param [Hash] opts the optional parameters
2721
- # @option opts [ExternalIdentifier1] :body
2722
- # @return [ExternalIdentifier]
2723
- def create_list_external_id(list_id = {}, opts = {})
2724
- data, _status_code, _headers = create_list_external_id_with_http_info(list_id, opts)
2725
- data
2726
- end
2727
1030
 
2728
1031
  # Add external id
2729
- # Create a new external identifier for a Mailchimp list.
2730
- # @param list_id The unique ID for the list.
2731
- # @param [Hash] opts the optional parameters
2732
- # @option opts [ExternalIdentifier1] :body
2733
- # @return [Array<(ExternalIdentifier, Fixnum, Hash)>] ExternalIdentifier data, response status code and response headers
2734
- def create_list_external_id_with_http_info(list_id, opts = {})
2735
- # resource path
2736
- local_var_path = '/lists/{list_id}/external-ids'.sub('{' + 'list_id' + '}', list_id.to_s)
1032
+ def create_list_external_id(list_id, opts = {})
1033
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
2737
1034
 
2738
- # query parameters
2739
1035
  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
1036
  form_params = {}
2750
-
2751
- # http body (model)
2752
1037
  post_body = @api_client.object_to_http_body(opts[:'body'])
2753
- auth_names = ['basicAuth']
1038
+
1039
+ local_var_path = '/lists/{list_id}/external-ids'.sub('{' + 'list_id' + '}', list_id.to_s)
2754
1040
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2755
- :header_params => header_params,
2756
1041
  :query_params => query_params,
2757
1042
  :form_params => form_params,
2758
- :body => post_body,
2759
- :auth_names => auth_names,
2760
- :return_type => 'ExternalIdentifier')
1043
+ :body => post_body)
2761
1044
  return data, status_code, headers
2762
1045
  end
2763
- # Add interest category
2764
- # Create a new interest category.
2765
- # @param list_id The unique ID for the list.
2766
- # @param body
2767
- # @param [Hash] opts the optional parameters
2768
- # @return [InterestCategory]
2769
- def create_list_interest_category(list_id = {}, body = {}, opts = {})
2770
- data, _status_code, _headers = create_list_interest_category_with_http_info(list_id, body, opts)
2771
- data
2772
- end
2773
1046
 
2774
1047
  # Add interest category
2775
- # Create a new interest category.
2776
- # @param list_id The unique ID for the list.
2777
- # @param body
2778
- # @param [Hash] opts the optional parameters
2779
- # @return [Array<(InterestCategory, Fixnum, Hash)>] InterestCategory data, response status code and response headers
2780
- def create_list_interest_category_with_http_info(list_id, body, opts = {})
2781
- # resource path
2782
- local_var_path = '/lists/{list_id}/interest-categories'.sub('{' + 'list_id' + '}', list_id.to_s)
1048
+ def create_list_interest_category(list_id, body, opts = {})
1049
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1050
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2783
1051
 
2784
- # query parameters
2785
1052
  query_params = {}
2786
-
2787
- # header parameters
2788
- header_params = {}
2789
- # HTTP header 'Accept' (if needed)
2790
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2791
- # HTTP header 'Content-Type'
2792
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2793
-
2794
- # form parameters
2795
1053
  form_params = {}
2796
-
2797
- # http body (model)
2798
1054
  post_body = @api_client.object_to_http_body(body)
2799
- auth_names = ['basicAuth']
1055
+
1056
+ local_var_path = '/lists/{list_id}/interest-categories'.sub('{' + 'list_id' + '}', list_id.to_s)
2800
1057
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2801
- :header_params => header_params,
2802
1058
  :query_params => query_params,
2803
1059
  :form_params => form_params,
2804
- :body => post_body,
2805
- :auth_names => auth_names,
2806
- :return_type => 'InterestCategory')
1060
+ :body => post_body)
2807
1061
  return data, status_code, headers
2808
1062
  end
2809
- # Add interest in category
2810
- # Create a new interest or 'group name' for a specific category.
2811
- # @param list_id The unique ID for the list.
2812
- # @param interest_category_id The unique ID for the interest category.
2813
- # @param body
2814
- # @param [Hash] opts the optional parameters
2815
- # @return [Interest]
2816
- def create_interest_category_interest(list_id = {}, interest_category_id = {}, body = {}, opts = {})
2817
- data, _status_code, _headers = create_interest_category_interest_with_http_info(list_id, interest_category_id, body, opts)
2818
- data
2819
- end
2820
1063
 
2821
1064
  # Add interest in category
2822
- # Create a new interest or &#39;group name&#39; for a specific category.
2823
- # @param list_id The unique ID for the list.
2824
- # @param interest_category_id The unique ID for the interest category.
2825
- # @param body
2826
- # @param [Hash] opts the optional parameters
2827
- # @return [Array<(Interest, Fixnum, Hash)>] Interest data, response status code and response headers
2828
- def create_interest_category_interest_with_http_info(list_id, interest_category_id, body, opts = {})
2829
- # resource path
2830
- local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
1065
+ def create_interest_category_interest(list_id, interest_category_id, body, opts = {})
1066
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1067
+ fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
1068
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2831
1069
 
2832
- # query parameters
2833
1070
  query_params = {}
2834
-
2835
- # header parameters
2836
- header_params = {}
2837
- # HTTP header 'Accept' (if needed)
2838
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2839
- # HTTP header 'Content-Type'
2840
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2841
-
2842
- # form parameters
2843
1071
  form_params = {}
2844
-
2845
- # http body (model)
2846
1072
  post_body = @api_client.object_to_http_body(body)
2847
- auth_names = ['basicAuth']
1073
+
1074
+ local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
2848
1075
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2849
- :header_params => header_params,
2850
1076
  :query_params => query_params,
2851
1077
  :form_params => form_params,
2852
- :body => post_body,
2853
- :auth_names => auth_names,
2854
- :return_type => 'Interest')
1078
+ :body => post_body)
2855
1079
  return data, status_code, headers
2856
1080
  end
2857
- # Add member to list
2858
- # Add a new member to the list.
2859
- # @param list_id The unique ID for the list.
2860
- # @param body
2861
- # @param [Hash] opts the optional parameters
2862
- # @option opts [BOOLEAN] :skip_merge_validation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to False.
2863
- # @return [ListMembers2]
2864
- def add_list_member(list_id = {}, body = {}, opts = {})
2865
- data, _status_code, _headers = add_list_member_with_http_info(list_id, body, opts)
2866
- data
2867
- end
2868
1081
 
2869
1082
  # Add member to list
2870
- # Add a new member to the list.
2871
- # @param list_id The unique ID for the list.
2872
- # @param body
2873
- # @param [Hash] opts the optional parameters
2874
- # @option opts [BOOLEAN] :skip_merge_validation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to False.
2875
- # @return [Array<(ListMembers2, Fixnum, Hash)>] ListMembers2 data, response status code and response headers
2876
- def add_list_member_with_http_info(list_id, body, opts = {})
2877
- # resource path
2878
- local_var_path = '/lists/{list_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s)
1083
+ def add_list_member(list_id, body, opts = {})
1084
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1085
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
2879
1086
 
2880
- # query parameters
2881
1087
  query_params = {}
2882
1088
  query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
2883
-
2884
- # header parameters
2885
- header_params = {}
2886
- # HTTP header 'Accept' (if needed)
2887
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2888
- # HTTP header 'Content-Type'
2889
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2890
-
2891
- # form parameters
2892
1089
  form_params = {}
2893
-
2894
- # http body (model)
2895
1090
  post_body = @api_client.object_to_http_body(body)
2896
- auth_names = ['basicAuth']
1091
+
1092
+ local_var_path = '/lists/{list_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s)
2897
1093
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2898
- :header_params => header_params,
2899
1094
  :query_params => query_params,
2900
1095
  :form_params => form_params,
2901
- :body => post_body,
2902
- :auth_names => auth_names,
2903
- :return_type => 'ListMembers2')
1096
+ :body => post_body)
2904
1097
  return data, status_code, headers
2905
1098
  end
2906
- # Delete list member
2907
- # Delete all personally identifiable information related to a list member, and remove them from a list. This will make it impossible to re-import the list member.
2908
- # @param list_id The unique ID for the list.
2909
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
2910
- # @param [Hash] opts the optional parameters
2911
- # @return [nil]
2912
- def delete_list_member_permanent(list_id = {}, subscriber_hash = {}, opts = {})
2913
- delete_list_member_permanent_with_http_info(list_id, subscriber_hash, opts)
2914
- nil
2915
- end
2916
1099
 
2917
1100
  # Delete list member
2918
- # Delete all personally identifiable information related to a list member, and remove them from a list. This will make it impossible to re-import the list member.
2919
- # @param list_id The unique ID for the list.
2920
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
2921
- # @param [Hash] opts the optional parameters
2922
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
2923
- def delete_list_member_permanent_with_http_info(list_id, subscriber_hash, opts = {})
2924
- # resource path
2925
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/actions/delete-permanent'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1101
+ def delete_list_member_permanent(list_id, subscriber_hash, opts = {})
1102
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1103
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
2926
1104
 
2927
- # query parameters
2928
1105
  query_params = {}
2929
-
2930
- # header parameters
2931
- header_params = {}
2932
- # HTTP header 'Accept' (if needed)
2933
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2934
- # HTTP header 'Content-Type'
2935
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2936
-
2937
- # form parameters
2938
1106
  form_params = {}
2939
-
2940
- # http body (model)
2941
1107
  post_body = nil
2942
- auth_names = ['basicAuth']
1108
+
1109
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/actions/delete-permanent'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
2943
1110
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2944
- :header_params => header_params,
2945
1111
  :query_params => query_params,
2946
1112
  :form_params => form_params,
2947
- :body => post_body,
2948
- :auth_names => auth_names)
1113
+ :body => post_body)
2949
1114
  return data, status_code, headers
2950
1115
  end
2951
- # Add member note
2952
- # Add a new note for a specific subscriber.
2953
- # @param list_id The unique ID for the list.
2954
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
2955
- # @param [Hash] opts the optional parameters
2956
- # @option opts [MemberNotes1] :body
2957
- # @return [MemberNotes]
2958
- def create_list_member_note(list_id = {}, subscriber_hash = {}, opts = {})
2959
- data, _status_code, _headers = create_list_member_note_with_http_info(list_id, subscriber_hash, opts)
2960
- data
2961
- end
2962
1116
 
2963
1117
  # Add member note
2964
- # Add a new note for a specific subscriber.
2965
- # @param list_id The unique ID for the list.
2966
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
2967
- # @param [Hash] opts the optional parameters
2968
- # @option opts [MemberNotes1] :body
2969
- # @return [Array<(MemberNotes, Fixnum, Hash)>] MemberNotes data, response status code and response headers
2970
- def create_list_member_note_with_http_info(list_id, subscriber_hash, opts = {})
2971
- # resource path
2972
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1118
+ def create_list_member_note(list_id, subscriber_hash, opts = {})
1119
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1120
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
2973
1121
 
2974
- # query parameters
2975
1122
  query_params = {}
2976
-
2977
- # header parameters
2978
- header_params = {}
2979
- # HTTP header 'Accept' (if needed)
2980
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2981
- # HTTP header 'Content-Type'
2982
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2983
-
2984
- # form parameters
2985
1123
  form_params = {}
2986
-
2987
- # http body (model)
2988
1124
  post_body = @api_client.object_to_http_body(opts[:'body'])
2989
- auth_names = ['basicAuth']
1125
+
1126
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
2990
1127
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2991
- :header_params => header_params,
2992
1128
  :query_params => query_params,
2993
1129
  :form_params => form_params,
2994
- :body => post_body,
2995
- :auth_names => auth_names,
2996
- :return_type => 'MemberNotes')
1130
+ :body => post_body)
2997
1131
  return data, status_code, headers
2998
1132
  end
2999
- # Add merge field
3000
- # Add a new merge field for a specific list.
3001
- # @param list_id The unique ID for the list.
3002
- # @param body
3003
- # @param [Hash] opts the optional parameters
3004
- # @return [MergeField]
3005
- def add_list_merge_field(list_id = {}, body = {}, opts = {})
3006
- data, _status_code, _headers = add_list_merge_field_with_http_info(list_id, body, opts)
3007
- data
3008
- end
3009
1133
 
3010
1134
  # Add merge field
3011
- # Add a new merge field for a specific list.
3012
- # @param list_id The unique ID for the list.
3013
- # @param body
3014
- # @param [Hash] opts the optional parameters
3015
- # @return [Array<(MergeField, Fixnum, Hash)>] MergeField data, response status code and response headers
3016
- def add_list_merge_field_with_http_info(list_id, body, opts = {})
3017
- # resource path
3018
- local_var_path = '/lists/{list_id}/merge-fields'.sub('{' + 'list_id' + '}', list_id.to_s)
1135
+ def add_list_merge_field(list_id, body, opts = {})
1136
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1137
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
3019
1138
 
3020
- # query parameters
3021
1139
  query_params = {}
3022
-
3023
- # header parameters
3024
- header_params = {}
3025
- # HTTP header 'Accept' (if needed)
3026
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
3027
- # HTTP header 'Content-Type'
3028
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3029
-
3030
- # form parameters
3031
1140
  form_params = {}
3032
-
3033
- # http body (model)
3034
1141
  post_body = @api_client.object_to_http_body(body)
3035
- auth_names = ['basicAuth']
1142
+
1143
+ local_var_path = '/lists/{list_id}/merge-fields'.sub('{' + 'list_id' + '}', list_id.to_s)
3036
1144
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3037
- :header_params => header_params,
3038
1145
  :query_params => query_params,
3039
1146
  :form_params => form_params,
3040
- :body => post_body,
3041
- :auth_names => auth_names,
3042
- :return_type => 'MergeField')
1147
+ :body => post_body)
3043
1148
  return data, status_code, headers
3044
1149
  end
3045
- # Add segment
3046
- # Create a new segment in a specific list.
3047
- # @param list_id The unique ID for the list.
3048
- # @param body
3049
- # @param [Hash] opts the optional parameters
3050
- # @return [List6]
3051
- def create_segment(list_id = {}, body = {}, opts = {})
3052
- data, _status_code, _headers = create_segment_with_http_info(list_id, body, opts)
3053
- data
3054
- end
3055
1150
 
3056
1151
  # Add segment
3057
- # Create a new segment in a specific list.
3058
- # @param list_id The unique ID for the list.
3059
- # @param body
3060
- # @param [Hash] opts the optional parameters
3061
- # @return [Array<(List6, Fixnum, Hash)>] List6 data, response status code and response headers
3062
- def create_segment_with_http_info(list_id, body, opts = {})
3063
- # resource path
3064
- local_var_path = '/lists/{list_id}/segments'.sub('{' + 'list_id' + '}', list_id.to_s)
1152
+ def create_segment(list_id, body, opts = {})
1153
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1154
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
3065
1155
 
3066
- # query parameters
3067
1156
  query_params = {}
3068
-
3069
- # header parameters
3070
- header_params = {}
3071
- # HTTP header 'Accept' (if needed)
3072
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
3073
- # HTTP header 'Content-Type'
3074
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3075
-
3076
- # form parameters
3077
1157
  form_params = {}
3078
-
3079
- # http body (model)
3080
1158
  post_body = @api_client.object_to_http_body(body)
3081
- auth_names = ['basicAuth']
1159
+
1160
+ local_var_path = '/lists/{list_id}/segments'.sub('{' + 'list_id' + '}', list_id.to_s)
3082
1161
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3083
- :header_params => header_params,
3084
1162
  :query_params => query_params,
3085
1163
  :form_params => form_params,
3086
- :body => post_body,
3087
- :auth_names => auth_names,
3088
- :return_type => 'List6')
1164
+ :body => post_body)
3089
1165
  return data, status_code, headers
3090
1166
  end
3091
- # Batch add or remove members
3092
- # Batch add/remove list members to static segment
3093
- # @param body
3094
- # @param list_id The unique ID for the list.
3095
- # @param segment_id The unique id for the segment.
3096
- # @param [Hash] opts the optional parameters
3097
- # @return [BatchAddremoveListMembersTofromStaticSegment]
3098
- def batch_segment_members(body = {}, list_id = {}, segment_id = {}, opts = {})
3099
- data, _status_code, _headers = batch_segment_members_with_http_info(body, list_id, segment_id, opts)
3100
- data
3101
- end
3102
1167
 
3103
1168
  # Batch add or remove members
3104
- # Batch add/remove list members to static segment
3105
- # @param body
3106
- # @param list_id The unique ID for the list.
3107
- # @param segment_id The unique id for the segment.
3108
- # @param [Hash] opts the optional parameters
3109
- # @return [Array<(BatchAddremoveListMembersTofromStaticSegment, Fixnum, Hash)>] BatchAddremoveListMembersTofromStaticSegment data, response status code and response headers
3110
- def batch_segment_members_with_http_info(body, list_id, segment_id, opts = {})
3111
- # resource path
3112
- local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
1169
+ def batch_segment_members(body, list_id, segment_id, opts = {})
1170
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
1171
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1172
+ fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
3113
1173
 
3114
- # query parameters
3115
1174
  query_params = {}
3116
-
3117
- # header parameters
3118
- header_params = {}
3119
- # HTTP header 'Accept' (if needed)
3120
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
3121
- # HTTP header 'Content-Type'
3122
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3123
-
3124
- # form parameters
3125
1175
  form_params = {}
3126
-
3127
- # http body (model)
3128
1176
  post_body = @api_client.object_to_http_body(body)
3129
- auth_names = ['basicAuth']
1177
+
1178
+ local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
3130
1179
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3131
- :header_params => header_params,
3132
1180
  :query_params => query_params,
3133
1181
  :form_params => form_params,
3134
- :body => post_body,
3135
- :auth_names => auth_names,
3136
- :return_type => 'BatchAddremoveListMembersTofromStaticSegment')
1182
+ :body => post_body)
3137
1183
  return data, status_code, headers
3138
1184
  end
3139
- # Add member to segment
3140
- # Add a member to a static segment.
3141
- # @param list_id The unique ID for the list.
3142
- # @param segment_id The unique id for the segment.
3143
- # @param body
3144
- # @param [Hash] opts the optional parameters
3145
- # @return [ListMembers1]
3146
- def create_segment_member(list_id = {}, segment_id = {}, body = {}, opts = {})
3147
- data, _status_code, _headers = create_segment_member_with_http_info(list_id, segment_id, body, opts)
3148
- data
3149
- end
3150
1185
 
3151
1186
  # Add member to segment
3152
- # Add a member to a static segment.
3153
- # @param list_id The unique ID for the list.
3154
- # @param segment_id The unique id for the segment.
3155
- # @param body
3156
- # @param [Hash] opts the optional parameters
3157
- # @return [Array<(ListMembers1, Fixnum, Hash)>] ListMembers1 data, response status code and response headers
3158
- def create_segment_member_with_http_info(list_id, segment_id, body, opts = {})
3159
- # resource path
3160
- local_var_path = '/lists/{list_id}/segments/{segment_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
1187
+ def create_segment_member(list_id, segment_id, body, opts = {})
1188
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1189
+ fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
1190
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
3161
1191
 
3162
- # query parameters
3163
1192
  query_params = {}
3164
-
3165
- # header parameters
3166
- header_params = {}
3167
- # HTTP header 'Accept' (if needed)
3168
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
3169
- # HTTP header 'Content-Type'
3170
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3171
-
3172
- # form parameters
3173
1193
  form_params = {}
3174
-
3175
- # http body (model)
3176
1194
  post_body = @api_client.object_to_http_body(body)
3177
- auth_names = ['basicAuth']
1195
+
1196
+ local_var_path = '/lists/{list_id}/segments/{segment_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
3178
1197
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3179
- :header_params => header_params,
3180
1198
  :query_params => query_params,
3181
1199
  :form_params => form_params,
3182
- :body => post_body,
3183
- :auth_names => auth_names,
3184
- :return_type => 'ListMembers1')
1200
+ :body => post_body)
3185
1201
  return data, status_code, headers
3186
1202
  end
3187
- # Customize signup form
3188
- # Customize a list's default signup form.
3189
- # @param list_id The unique ID for the list.
3190
- # @param body
3191
- # @param [Hash] opts the optional parameters
3192
- # @return [SignupForm]
3193
- def update_list_signup_form(list_id = {}, body = {}, opts = {})
3194
- data, _status_code, _headers = update_list_signup_form_with_http_info(list_id, body, opts)
3195
- data
3196
- end
3197
1203
 
3198
1204
  # Customize signup form
3199
- # Customize a list&#39;s default signup form.
3200
- # @param list_id The unique ID for the list.
3201
- # @param body
3202
- # @param [Hash] opts the optional parameters
3203
- # @return [Array<(SignupForm, Fixnum, Hash)>] SignupForm data, response status code and response headers
3204
- def update_list_signup_form_with_http_info(list_id, body, opts = {})
3205
- # resource path
3206
- local_var_path = '/lists/{list_id}/signup-forms'.sub('{' + 'list_id' + '}', list_id.to_s)
1205
+ def update_list_signup_form(list_id, body, opts = {})
1206
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1207
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
3207
1208
 
3208
- # query parameters
3209
1209
  query_params = {}
3210
-
3211
- # header parameters
3212
- header_params = {}
3213
- # HTTP header 'Accept' (if needed)
3214
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
3215
- # HTTP header 'Content-Type'
3216
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3217
-
3218
- # form parameters
3219
1210
  form_params = {}
3220
-
3221
- # http body (model)
3222
1211
  post_body = @api_client.object_to_http_body(body)
3223
- auth_names = ['basicAuth']
1212
+
1213
+ local_var_path = '/lists/{list_id}/signup-forms'.sub('{' + 'list_id' + '}', list_id.to_s)
3224
1214
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3225
- :header_params => header_params,
3226
1215
  :query_params => query_params,
3227
1216
  :form_params => form_params,
3228
- :body => post_body,
3229
- :auth_names => auth_names,
3230
- :return_type => 'SignupForm')
1217
+ :body => post_body)
3231
1218
  return data, status_code, headers
3232
1219
  end
3233
- # Add webhook
3234
- # Create a new webhook for a specific list.
3235
- # @param list_id The unique ID for the list.
3236
- # @param body
3237
- # @param [Hash] opts the optional parameters
3238
- # @return [ListWebhooks]
3239
- def create_list_webhook(list_id = {}, body = {}, opts = {})
3240
- data, _status_code, _headers = create_list_webhook_with_http_info(list_id, body, opts)
3241
- data
3242
- end
3243
1220
 
3244
1221
  # Add webhook
3245
- # Create a new webhook for a specific list.
3246
- # @param list_id The unique ID for the list.
3247
- # @param body
3248
- # @param [Hash] opts the optional parameters
3249
- # @return [Array<(ListWebhooks, Fixnum, Hash)>] ListWebhooks data, response status code and response headers
3250
- def create_list_webhook_with_http_info(list_id, body, opts = {})
3251
- # resource path
3252
- local_var_path = '/lists/{list_id}/webhooks'.sub('{' + 'list_id' + '}', list_id.to_s)
1222
+ def create_list_webhook(list_id, body, opts = {})
1223
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1224
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
3253
1225
 
3254
- # query parameters
3255
1226
  query_params = {}
3256
-
3257
- # header parameters
3258
- header_params = {}
3259
- # HTTP header 'Accept' (if needed)
3260
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
3261
- # HTTP header 'Content-Type'
3262
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3263
-
3264
- # form parameters
3265
1227
  form_params = {}
3266
-
3267
- # http body (model)
3268
1228
  post_body = @api_client.object_to_http_body(body)
3269
- auth_names = ['basicAuth']
1229
+
1230
+ local_var_path = '/lists/{list_id}/webhooks'.sub('{' + 'list_id' + '}', list_id.to_s)
3270
1231
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3271
- :header_params => header_params,
3272
1232
  :query_params => query_params,
3273
1233
  :form_params => form_params,
3274
- :body => post_body,
3275
- :auth_names => auth_names,
3276
- :return_type => 'ListWebhooks')
1234
+ :body => post_body)
3277
1235
  return data, status_code, headers
3278
1236
  end
3279
- # List segments
3280
- # Get information about all available segments for a specific list.
3281
- # @param list_id The unique ID for the list.
3282
- # @param [Hash] opts the optional parameters
3283
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
3284
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
3285
- # @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)
3286
- # @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)
3287
- # @option opts [String] :type Limit results based on segment type.
3288
- # @option opts [String] :since_created_at Restrict results to segments created after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
3289
- # @option opts [String] :before_created_at Restrict results to segments created before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
3290
- # @option opts [BOOLEAN] :include_cleaned Include cleaned members in response
3291
- # @option opts [BOOLEAN] :include_transactional Include transactional members in response
3292
- # @option opts [BOOLEAN] :include_unsubscribed Include unsubscribed members in response
3293
- # @option opts [String] :since_updated_at Restrict results to segments update after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
3294
- # @option opts [String] :before_updated_at Restrict results to segments update before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
3295
- # @return [CollectionOfSegments]
3296
- def list_segments(list_id = {}, opts = {})
3297
- data, _status_code, _headers = list_segments_with_http_info(list_id, opts)
3298
- data
3299
- end
3300
1237
 
3301
1238
  # List segments
3302
- # Get information about all available segments for a specific list.
3303
- # @param list_id The unique ID for the list.
3304
- # @param [Hash] opts the optional parameters
3305
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
3306
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
3307
- # @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**
3308
- # @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**.
3309
- # @option opts [String] :type Limit results based on segment type.
3310
- # @option opts [String] :since_created_at Restrict results to segments created after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
3311
- # @option opts [String] :before_created_at Restrict results to segments created before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
3312
- # @option opts [BOOLEAN] :include_cleaned Include cleaned members in response
3313
- # @option opts [BOOLEAN] :include_transactional Include transactional members in response
3314
- # @option opts [BOOLEAN] :include_unsubscribed Include unsubscribed members in response
3315
- # @option opts [String] :since_updated_at Restrict results to segments update after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
3316
- # @option opts [String] :before_updated_at Restrict results to segments update before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
3317
- # @return [Array<(CollectionOfSegments, Fixnum, Hash)>] CollectionOfSegments data, response status code and response headers
3318
- def list_segments_with_http_info(list_id, opts = {})
3319
- # resource path
3320
- local_var_path = '/lists/{list_id}/segments'.sub('{' + 'list_id' + '}', list_id.to_s)
1239
+ def list_segments(list_id, opts = {})
1240
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1241
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
3321
1242
 
3322
- # query parameters
3323
1243
  query_params = {}
3324
1244
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
3325
1245
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -3333,124 +1253,49 @@ module MailchimpMarketing
3333
1253
  query_params[:'include_unsubscribed'] = opts[:'include_unsubscribed'] if !opts[:'include_unsubscribed'].nil?
3334
1254
  query_params[:'since_updated_at'] = opts[:'since_updated_at'] if !opts[:'since_updated_at'].nil?
3335
1255
  query_params[:'before_updated_at'] = opts[:'before_updated_at'] if !opts[:'before_updated_at'].nil?
3336
-
3337
- # header parameters
3338
- header_params = {}
3339
- # HTTP header 'Accept' (if needed)
3340
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
3341
- # HTTP header 'Content-Type'
3342
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3343
-
3344
- # form parameters
3345
1256
  form_params = {}
3346
-
3347
- # http body (model)
3348
1257
  post_body = nil
3349
- auth_names = ['basicAuth']
1258
+
1259
+ local_var_path = '/lists/{list_id}/segments'.sub('{' + 'list_id' + '}', list_id.to_s)
3350
1260
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
3351
- :header_params => header_params,
3352
1261
  :query_params => query_params,
3353
1262
  :form_params => form_params,
3354
- :body => post_body,
3355
- :auth_names => auth_names,
3356
- :return_type => 'CollectionOfSegments')
1263
+ :body => post_body)
3357
1264
  return data, status_code, headers
3358
1265
  end
3359
- # Preview segment
3360
- # Preview a segment of users by sending conditions.
3361
- # @param list_id The unique ID for the list.
3362
- # @param [Hash] opts the optional parameters
3363
- # @option opts [Body4] :body
3364
- # @return [ListMembers2]
3365
- def preview_segment(list_id = {}, opts = {})
3366
- data, _status_code, _headers = preview_segment_with_http_info(list_id, opts)
3367
- data
3368
- end
3369
1266
 
3370
1267
  # Preview segment
3371
- # Preview a segment of users by sending conditions.
3372
- # @param list_id The unique ID for the list.
3373
- # @param [Hash] opts the optional parameters
3374
- # @option opts [Body4] :body
3375
- # @return [Array<(ListMembers2, Fixnum, Hash)>] ListMembers2 data, response status code and response headers
3376
- def preview_segment_with_http_info(list_id, opts = {})
3377
- # resource path
3378
- local_var_path = '/lists/{list_id}/preview-segment'.sub('{' + 'list_id' + '}', list_id.to_s)
1268
+ def preview_segment(list_id, opts = {})
1269
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
3379
1270
 
3380
- # query parameters
3381
1271
  query_params = {}
3382
-
3383
- # header parameters
3384
- header_params = {}
3385
- # HTTP header 'Accept' (if needed)
3386
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
3387
- # HTTP header 'Content-Type'
3388
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3389
-
3390
- # form parameters
3391
1272
  form_params = {}
3392
-
3393
- # http body (model)
3394
1273
  post_body = @api_client.object_to_http_body(opts[:'body'])
3395
- auth_names = ['basicAuth']
1274
+
1275
+ local_var_path = '/lists/{list_id}/preview-segment'.sub('{' + 'list_id' + '}', list_id.to_s)
3396
1276
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3397
- :header_params => header_params,
3398
1277
  :query_params => query_params,
3399
1278
  :form_params => form_params,
3400
- :body => post_body,
3401
- :auth_names => auth_names,
3402
- :return_type => 'ListMembers2')
1279
+ :body => post_body)
3403
1280
  return data, status_code, headers
3404
1281
  end
3405
- # Add or update list member
3406
- # Add or update a list member.
3407
- # @param list_id The unique ID for the list.
3408
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
3409
- # @param body
3410
- # @param [Hash] opts the optional parameters
3411
- # @option opts [BOOLEAN] :skip_merge_validation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to False.
3412
- # @return [ListMembers2]
3413
- def set_list_member(list_id = {}, subscriber_hash = {}, body = {}, opts = {})
3414
- data, _status_code, _headers = set_list_member_with_http_info(list_id, subscriber_hash, body, opts)
3415
- data
3416
- end
3417
1282
 
3418
1283
  # Add or update list member
3419
- # Add or update a list member.
3420
- # @param list_id The unique ID for the list.
3421
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
3422
- # @param body
3423
- # @param [Hash] opts the optional parameters
3424
- # @option opts [BOOLEAN] :skip_merge_validation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to False.
3425
- # @return [Array<(ListMembers2, Fixnum, Hash)>] ListMembers2 data, response status code and response headers
3426
- def set_list_member_with_http_info(list_id, subscriber_hash, body, opts = {})
3427
- # resource path
3428
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1284
+ def set_list_member(list_id, subscriber_hash, body, opts = {})
1285
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1286
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
1287
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
3429
1288
 
3430
- # query parameters
3431
1289
  query_params = {}
3432
1290
  query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
3433
-
3434
- # header parameters
3435
- header_params = {}
3436
- # HTTP header 'Accept' (if needed)
3437
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
3438
- # HTTP header 'Content-Type'
3439
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3440
-
3441
- # form parameters
3442
1291
  form_params = {}
3443
-
3444
- # http body (model)
3445
1292
  post_body = @api_client.object_to_http_body(body)
3446
- auth_names = ['basicAuth']
1293
+
1294
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
3447
1295
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
3448
- :header_params => header_params,
3449
1296
  :query_params => query_params,
3450
1297
  :form_params => form_params,
3451
- :body => post_body,
3452
- :auth_names => auth_names,
3453
- :return_type => 'ListMembers2')
1298
+ :body => post_body)
3454
1299
  return data, status_code, headers
3455
1300
  end
3456
1301
  end