MailchimpMarketing 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/MailchimpMarketing.gemspec +45 -0
  4. data/README.md +369 -0
  5. data/lib/MailchimpMarketing.rb +163 -0
  6. data/lib/MailchimpMarketing/api/activity_feed_api.rb +113 -0
  7. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +171 -0
  8. data/lib/MailchimpMarketing/api/automations_api.rb +906 -0
  9. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +260 -0
  10. data/lib/MailchimpMarketing/api/batches_api.rb +214 -0
  11. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +260 -0
  12. data/lib/MailchimpMarketing/api/campaigns_api.rb +1073 -0
  13. data/lib/MailchimpMarketing/api/connected_sites_api.rb +257 -0
  14. data/lib/MailchimpMarketing/api/conversations_api.rb +293 -0
  15. data/lib/MailchimpMarketing/api/dashboard_api.rb +317 -0
  16. data/lib/MailchimpMarketing/api/ecommerce_api.rb +3004 -0
  17. data/lib/MailchimpMarketing/api/external_auths_api.rb +171 -0
  18. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +133 -0
  19. data/lib/MailchimpMarketing/api/file_manager_api.rb +566 -0
  20. data/lib/MailchimpMarketing/api/landing_pages_api.rb +399 -0
  21. data/lib/MailchimpMarketing/api/lists_api.rb +3457 -0
  22. data/lib/MailchimpMarketing/api/ping_api.rb +65 -0
  23. data/lib/MailchimpMarketing/api/postcards_api.rb +77 -0
  24. data/lib/MailchimpMarketing/api/reporting_api.rb +338 -0
  25. data/lib/MailchimpMarketing/api/reports_api.rb +1214 -0
  26. data/lib/MailchimpMarketing/api/root_api.rb +71 -0
  27. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +74 -0
  28. data/lib/MailchimpMarketing/api/search_members_api.rb +77 -0
  29. data/lib/MailchimpMarketing/api/template_folders_api.rb +260 -0
  30. data/lib/MailchimpMarketing/api/templates_api.rb +331 -0
  31. data/lib/MailchimpMarketing/api/verified_domains_api.rb +242 -0
  32. data/lib/MailchimpMarketing/api_client.rb +192 -0
  33. data/lib/MailchimpMarketing/api_error.rb +38 -0
  34. data/lib/MailchimpMarketing/configuration.rb +209 -0
  35. data/lib/MailchimpMarketing/version.rb +15 -0
  36. metadata +257 -0
@@ -0,0 +1,399 @@
1
+ =begin
2
+ #Mailchimp Marketing API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 3.0.1
7
+ Contact: apihelp@mailchimp.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.12
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module MailchimpMarketing
16
+ class LandingPagesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a 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
+
32
+ # Delete a 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)
40
+
41
+ # query parameters
42
+ query_params = {}
43
+
44
+ # header parameters
45
+ header_params = {}
46
+ # HTTP header 'Accept' (if needed)
47
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
48
+ # HTTP header 'Content-Type'
49
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
50
+
51
+ # form parameters
52
+ form_params = {}
53
+
54
+ # http body (model)
55
+ post_body = nil
56
+ auth_names = ['basicAuth']
57
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
58
+ :header_params => header_params,
59
+ :query_params => query_params,
60
+ :form_params => form_params,
61
+ :body => post_body,
62
+ :auth_names => auth_names)
63
+ return data, status_code, headers
64
+ end
65
+ # __summary__
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
+
79
+ # __summary__
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'
91
+
92
+ # query parameters
93
+ query_params = {}
94
+ query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
95
+ query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
96
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
97
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
98
+ 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
+ form_params = {}
109
+
110
+ # http body (model)
111
+ post_body = nil
112
+ auth_names = ['basicAuth']
113
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
114
+ :header_params => header_params,
115
+ :query_params => query_params,
116
+ :form_params => form_params,
117
+ :body => post_body,
118
+ :auth_names => auth_names,
119
+ :return_type => 'InlineResponse2006')
120
+ return data, status_code, headers
121
+ end
122
+ # Get information about a specific page
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
+
134
+ # Get information about a specific page
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)
144
+
145
+ # query parameters
146
+ query_params = {}
147
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
148
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
149
+
150
+ # header parameters
151
+ header_params = {}
152
+ # HTTP header 'Accept' (if needed)
153
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
154
+ # HTTP header 'Content-Type'
155
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
156
+
157
+ # form parameters
158
+ form_params = {}
159
+
160
+ # http body (model)
161
+ post_body = nil
162
+ auth_names = ['basicAuth']
163
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
164
+ :header_params => header_params,
165
+ :query_params => query_params,
166
+ :form_params => form_params,
167
+ :body => post_body,
168
+ :auth_names => auth_names,
169
+ :return_type => 'LandingPage')
170
+ return data, status_code, headers
171
+ 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
+
184
+ # 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)
194
+
195
+ # query parameters
196
+ query_params = {}
197
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
198
+ 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
+ form_params = {}
209
+
210
+ # http body (model)
211
+ post_body = nil
212
+ auth_names = ['basicAuth']
213
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
214
+ :header_params => header_params,
215
+ :query_params => query_params,
216
+ :form_params => form_params,
217
+ :body => post_body,
218
+ :auth_names => auth_names,
219
+ :return_type => 'LandingPageContent')
220
+ return data, status_code, headers
221
+ 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
+
233
+ # 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)
242
+
243
+ # query parameters
244
+ 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
+ form_params = {}
255
+
256
+ # http body (model)
257
+ post_body = @api_client.object_to_http_body(body)
258
+ auth_names = ['basicAuth']
259
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
260
+ :header_params => header_params,
261
+ :query_params => query_params,
262
+ :form_params => form_params,
263
+ :body => post_body,
264
+ :auth_names => auth_names,
265
+ :return_type => 'LandingPage')
266
+ return data, status_code, headers
267
+ end
268
+ # Create a new 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
+
278
+ # Create a new 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'
286
+
287
+ # query parameters
288
+ 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
+ form_params = {}
299
+
300
+ # http body (model)
301
+ post_body = @api_client.object_to_http_body(body)
302
+ auth_names = ['basicAuth']
303
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
304
+ :header_params => header_params,
305
+ :query_params => query_params,
306
+ :form_params => form_params,
307
+ :body => post_body,
308
+ :auth_names => auth_names,
309
+ :return_type => 'LandingPage')
310
+ return data, status_code, headers
311
+ end
312
+ # Publish a 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
+
322
+ # Publish a 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)
330
+
331
+ # query parameters
332
+ 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
+ form_params = {}
343
+
344
+ # http body (model)
345
+ post_body = nil
346
+ auth_names = ['basicAuth']
347
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
348
+ :header_params => header_params,
349
+ :query_params => query_params,
350
+ :form_params => form_params,
351
+ :body => post_body,
352
+ :auth_names => auth_names)
353
+ return data, status_code, headers
354
+ end
355
+ # Unpublish a 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
+
365
+ # Unpublish a 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)
373
+
374
+ # query parameters
375
+ 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
+ form_params = {}
386
+
387
+ # http body (model)
388
+ post_body = nil
389
+ auth_names = ['basicAuth']
390
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
391
+ :header_params => header_params,
392
+ :query_params => query_params,
393
+ :form_params => form_params,
394
+ :body => post_body,
395
+ :auth_names => auth_names)
396
+ return data, status_code, headers
397
+ end
398
+ end
399
+ end
@@ -0,0 +1,3457 @@
1
+ =begin
2
+ #Mailchimp Marketing API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 3.0.1
7
+ Contact: apihelp@mailchimp.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.12
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module MailchimpMarketing
16
+ class ListsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a 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](https://mailchimp.com/help/view-or-export-a-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
+
32
+ # Delete a 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](https://mailchimp.com/help/view-or-export-a-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)
40
+
41
+ # query parameters
42
+ query_params = {}
43
+
44
+ # header parameters
45
+ header_params = {}
46
+ # HTTP header 'Accept' (if needed)
47
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
48
+ # HTTP header 'Content-Type'
49
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
50
+
51
+ # form parameters
52
+ form_params = {}
53
+
54
+ # http body (model)
55
+ post_body = nil
56
+ auth_names = ['basicAuth']
57
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
58
+ :header_params => header_params,
59
+ :query_params => query_params,
60
+ :form_params => form_params,
61
+ :body => post_body,
62
+ :auth_names => auth_names)
63
+ return data, status_code, headers
64
+ end
65
+ # Delete a specific 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
+
76
+ # Delete a specific 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)
85
+
86
+ # query parameters
87
+ query_params = {}
88
+
89
+ # header parameters
90
+ header_params = {}
91
+ # HTTP header 'Accept' (if needed)
92
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
93
+ # HTTP header 'Content-Type'
94
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
95
+
96
+ # form parameters
97
+ form_params = {}
98
+
99
+ # http body (model)
100
+ post_body = nil
101
+ auth_names = ['basicAuth']
102
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
103
+ :header_params => header_params,
104
+ :query_params => query_params,
105
+ :form_params => form_params,
106
+ :body => post_body,
107
+ :auth_names => auth_names)
108
+ return data, status_code, headers
109
+ end
110
+ # Delete interests in a specific 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
+
122
+ # Delete interests in a specific 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)
132
+
133
+ # query parameters
134
+ query_params = {}
135
+
136
+ # header parameters
137
+ header_params = {}
138
+ # HTTP header 'Accept' (if needed)
139
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
140
+ # HTTP header 'Content-Type'
141
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
142
+
143
+ # form parameters
144
+ form_params = {}
145
+
146
+ # http body (model)
147
+ post_body = nil
148
+ auth_names = ['basicAuth']
149
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
150
+ :header_params => header_params,
151
+ :query_params => query_params,
152
+ :form_params => form_params,
153
+ :body => post_body,
154
+ :auth_names => auth_names)
155
+ return data, status_code, headers
156
+ end
157
+ # Archive a list member
158
+ # [Archive](/help/archive-unarchive-contacts/) a list member. To permanently delete, use the [delete-permanent action](/developer/reference/lists/list-members/#post_/lists/-list_id-/members/-subscriber_hash-/actions/delete-permanent).
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
+
168
+ # Archive a list member
169
+ # [Archive](/help/archive-unarchive-contacts/) a list member. To permanently delete, use the [delete-permanent action](/developer/reference/lists/list-members/#post_/lists/-list_id-/members/-subscriber_hash-/actions/delete-permanent).
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)
177
+
178
+ # query parameters
179
+ query_params = {}
180
+
181
+ # header parameters
182
+ header_params = {}
183
+ # HTTP header 'Accept' (if needed)
184
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
185
+ # HTTP header 'Content-Type'
186
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
187
+
188
+ # form parameters
189
+ form_params = {}
190
+
191
+ # http body (model)
192
+ post_body = nil
193
+ auth_names = ['basicAuth']
194
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
195
+ :header_params => header_params,
196
+ :query_params => query_params,
197
+ :form_params => form_params,
198
+ :body => post_body,
199
+ :auth_names => auth_names)
200
+ return data, status_code, headers
201
+ end
202
+ # Delete a 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
+
214
+ # Delete a 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)
224
+
225
+ # query parameters
226
+ 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
+ form_params = {}
237
+
238
+ # http body (model)
239
+ post_body = nil
240
+ auth_names = ['basicAuth']
241
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
242
+ :header_params => header_params,
243
+ :query_params => query_params,
244
+ :form_params => form_params,
245
+ :body => post_body,
246
+ :auth_names => auth_names)
247
+ return data, status_code, headers
248
+ end
249
+ # Delete a 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
+
260
+ # Delete a 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)
269
+
270
+ # query parameters
271
+ query_params = {}
272
+
273
+ # header parameters
274
+ header_params = {}
275
+ # HTTP header 'Accept' (if needed)
276
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
277
+ # HTTP header 'Content-Type'
278
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
279
+
280
+ # form parameters
281
+ form_params = {}
282
+
283
+ # http body (model)
284
+ post_body = nil
285
+ auth_names = ['basicAuth']
286
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
287
+ :header_params => header_params,
288
+ :query_params => query_params,
289
+ :form_params => form_params,
290
+ :body => post_body,
291
+ :auth_names => auth_names)
292
+ return data, status_code, headers
293
+ end
294
+ # Delete a 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
+
305
+ # Delete a 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)
314
+
315
+ # query parameters
316
+ query_params = {}
317
+
318
+ # header parameters
319
+ header_params = {}
320
+ # HTTP header 'Accept' (if needed)
321
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
322
+ # HTTP header 'Content-Type'
323
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
324
+
325
+ # form parameters
326
+ form_params = {}
327
+
328
+ # http body (model)
329
+ post_body = nil
330
+ auth_names = ['basicAuth']
331
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
332
+ :header_params => header_params,
333
+ :query_params => query_params,
334
+ :form_params => form_params,
335
+ :body => post_body,
336
+ :auth_names => auth_names)
337
+ return data, status_code, headers
338
+ end
339
+ # Remove a member from the specified static 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
+
351
+ # Remove a member from the specified static 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)
361
+
362
+ # query parameters
363
+ query_params = {}
364
+
365
+ # header parameters
366
+ header_params = {}
367
+ # HTTP header 'Accept' (if needed)
368
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
369
+ # HTTP header 'Content-Type'
370
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
371
+
372
+ # form parameters
373
+ form_params = {}
374
+
375
+ # http body (model)
376
+ post_body = nil
377
+ auth_names = ['basicAuth']
378
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
379
+ :header_params => header_params,
380
+ :query_params => query_params,
381
+ :form_params => form_params,
382
+ :body => post_body,
383
+ :auth_names => auth_names)
384
+ return data, status_code, headers
385
+ end
386
+ # Delete a 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
+
397
+ # Delete a 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)
406
+
407
+ # query parameters
408
+ 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
+ form_params = {}
419
+
420
+ # http body (model)
421
+ post_body = nil
422
+ auth_names = ['basicAuth']
423
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
424
+ :header_params => header_params,
425
+ :query_params => query_params,
426
+ :form_params => form_params,
427
+ :body => post_body,
428
+ :auth_names => auth_names)
429
+ return data, status_code, headers
430
+ end
431
+ # Get the tags on a list member.
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
+
446
+ # Get the tags on a list member.
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)
459
+
460
+ # query parameters
461
+ query_params = {}
462
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
463
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
464
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
465
+ 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
+ form_params = {}
476
+
477
+ # http body (model)
478
+ post_body = nil
479
+ auth_names = ['basicAuth']
480
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
481
+ :header_params => header_params,
482
+ :query_params => query_params,
483
+ :form_params => form_params,
484
+ :body => post_body,
485
+ :auth_names => auth_names,
486
+ :return_type => 'CollectionOfTags')
487
+ return data, status_code, headers
488
+ end
489
+ # Get information about all lists
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
+
509
+ # Get information about all lists
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'
527
+
528
+ # query parameters
529
+ query_params = {}
530
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
531
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
532
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
533
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
534
+ query_params[:'before_date_created'] = opts[:'before_date_created'] if !opts[:'before_date_created'].nil?
535
+ query_params[:'since_date_created'] = opts[:'since_date_created'] if !opts[:'since_date_created'].nil?
536
+ query_params[:'before_campaign_last_sent'] = opts[:'before_campaign_last_sent'] if !opts[:'before_campaign_last_sent'].nil?
537
+ query_params[:'since_campaign_last_sent'] = opts[:'since_campaign_last_sent'] if !opts[:'since_campaign_last_sent'].nil?
538
+ query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
539
+ query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
540
+ 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
+ form_params = {}
551
+
552
+ # http body (model)
553
+ post_body = nil
554
+ auth_names = ['basicAuth']
555
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
556
+ :header_params => header_params,
557
+ :query_params => query_params,
558
+ :form_params => form_params,
559
+ :body => post_body,
560
+ :auth_names => auth_names,
561
+ :return_type => 'SubscriberLists')
562
+ return data, status_code, headers
563
+ end
564
+ # Get information about a specific list
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](https://mailchimp.com/help/view-unsubscribed-contacts/) or [cleaned](https://mailchimp.com/help/about-cleaned-contacts/).
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
+
576
+ # Get information about a specific list
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](https://mailchimp.com/help/view-unsubscribed-contacts/) or [cleaned](https://mailchimp.com/help/about-cleaned-contacts/).
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)
586
+
587
+ # query parameters
588
+ query_params = {}
589
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
590
+ 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
+ form_params = {}
601
+
602
+ # http body (model)
603
+ post_body = nil
604
+ auth_names = ['basicAuth']
605
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
606
+ :header_params => header_params,
607
+ :query_params => query_params,
608
+ :form_params => form_params,
609
+ :body => post_body,
610
+ :auth_names => auth_names,
611
+ :return_type => 'SubscriberList')
612
+ return data, status_code, headers
613
+ end
614
+ # Get information about 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
+
628
+ # Get information about 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)
640
+
641
+ # query parameters
642
+ query_params = {}
643
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
644
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
645
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
646
+ 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
+ form_params = {}
657
+
658
+ # http body (model)
659
+ post_body = nil
660
+ auth_names = ['basicAuth']
661
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
662
+ :header_params => header_params,
663
+ :query_params => query_params,
664
+ :form_params => form_params,
665
+ :body => post_body,
666
+ :auth_names => auth_names,
667
+ :return_type => 'AbuseComplaints')
668
+ return data, status_code, headers
669
+ end
670
+ # Get details about a specific 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
+
685
+ # Get details about a specific 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)
698
+
699
+ # query parameters
700
+ query_params = {}
701
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
702
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
703
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
704
+ 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
+ form_params = {}
715
+
716
+ # http body (model)
717
+ post_body = nil
718
+ auth_names = ['basicAuth']
719
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
720
+ :header_params => header_params,
721
+ :query_params => query_params,
722
+ :form_params => form_params,
723
+ :body => post_body,
724
+ :auth_names => auth_names,
725
+ :return_type => 'AbuseComplaint')
726
+ return data, status_code, headers
727
+ end
728
+ # Get recent list 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
+
740
+ # Get recent list 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)
750
+
751
+ # query parameters
752
+ query_params = {}
753
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
754
+ 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
+ form_params = {}
765
+
766
+ # http body (model)
767
+ post_body = nil
768
+ auth_names = ['basicAuth']
769
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
770
+ :header_params => header_params,
771
+ :query_params => query_params,
772
+ :form_params => form_params,
773
+ :body => post_body,
774
+ :auth_names => auth_names,
775
+ :return_type => 'ListActivity')
776
+ return data, status_code, headers
777
+ end
778
+ # Get 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
+
790
+ # Get 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)
800
+
801
+ # query parameters
802
+ query_params = {}
803
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
804
+ 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
+ form_params = {}
815
+
816
+ # http body (model)
817
+ post_body = nil
818
+ auth_names = ['basicAuth']
819
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
820
+ :header_params => header_params,
821
+ :query_params => query_params,
822
+ :form_params => form_params,
823
+ :body => post_body,
824
+ :auth_names => auth_names,
825
+ :return_type => 'EmailClients')
826
+ return data, status_code, headers
827
+ end
828
+ # Get information about external identifiers
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
+
840
+ # Get information about external identifiers
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)
850
+
851
+ # query parameters
852
+ query_params = {}
853
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
854
+ 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
+ form_params = {}
865
+
866
+ # http body (model)
867
+ post_body = nil
868
+ auth_names = ['basicAuth']
869
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
870
+ :header_params => header_params,
871
+ :query_params => query_params,
872
+ :form_params => form_params,
873
+ :body => post_body,
874
+ :auth_names => auth_names,
875
+ :return_type => 'CollectionOfExternalIdentifiers')
876
+ return data, status_code, headers
877
+ end
878
+ # Get 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
+
894
+ # Get 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)
908
+
909
+ # query parameters
910
+ query_params = {}
911
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
912
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
913
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
914
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
915
+ query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
916
+ 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
+ form_params = {}
927
+
928
+ # http body (model)
929
+ post_body = nil
930
+ auth_names = ['basicAuth']
931
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
932
+ :header_params => header_params,
933
+ :query_params => query_params,
934
+ :form_params => form_params,
935
+ :body => post_body,
936
+ :auth_names => auth_names,
937
+ :return_type => 'GrowthHistory')
938
+ return data, status_code, headers
939
+ end
940
+ # Get list 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
+
953
+ # Get list 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)
964
+
965
+ # query parameters
966
+ query_params = {}
967
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
968
+ 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
+ form_params = {}
979
+
980
+ # http body (model)
981
+ post_body = nil
982
+ auth_names = ['basicAuth']
983
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
984
+ :header_params => header_params,
985
+ :query_params => query_params,
986
+ :form_params => form_params,
987
+ :body => post_body,
988
+ :auth_names => auth_names,
989
+ :return_type => 'GrowthHistory')
990
+ return data, status_code, headers
991
+ end
992
+ # Get information about a list's 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
+
1007
+ # Get information about a list&#39;s 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)
1020
+
1021
+ # query parameters
1022
+ query_params = {}
1023
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1024
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1025
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1026
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1027
+ 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
+ form_params = {}
1038
+
1039
+ # http body (model)
1040
+ post_body = nil
1041
+ auth_names = ['basicAuth']
1042
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1043
+ :header_params => header_params,
1044
+ :query_params => query_params,
1045
+ :form_params => form_params,
1046
+ :body => post_body,
1047
+ :auth_names => auth_names,
1048
+ :return_type => 'InterestGroupings')
1049
+ return data, status_code, headers
1050
+ end
1051
+ # Get information about a specific interest category
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
+
1064
+ # Get information about a specific interest category
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)
1075
+
1076
+ # query parameters
1077
+ query_params = {}
1078
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1079
+ 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
+ form_params = {}
1090
+
1091
+ # http body (model)
1092
+ post_body = nil
1093
+ auth_names = ['basicAuth']
1094
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1095
+ :header_params => header_params,
1096
+ :query_params => query_params,
1097
+ :form_params => form_params,
1098
+ :body => post_body,
1099
+ :auth_names => auth_names,
1100
+ :return_type => 'InterestCategory')
1101
+ return data, status_code, headers
1102
+ end
1103
+ # Get all interests in a specific 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
+
1118
+ # Get all interests in a specific 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)
1131
+
1132
+ # query parameters
1133
+ query_params = {}
1134
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1135
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1136
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1137
+ 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
+ form_params = {}
1148
+
1149
+ # http body (model)
1150
+ post_body = nil
1151
+ auth_names = ['basicAuth']
1152
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1153
+ :header_params => header_params,
1154
+ :query_params => query_params,
1155
+ :form_params => form_params,
1156
+ :body => post_body,
1157
+ :auth_names => auth_names,
1158
+ :return_type => 'Interests')
1159
+ return data, status_code, headers
1160
+ end
1161
+ # Get interests in a specific 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
+
1175
+ # Get interests in a specific 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)
1187
+
1188
+ # query parameters
1189
+ query_params = {}
1190
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1191
+ 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
+ form_params = {}
1202
+
1203
+ # http body (model)
1204
+ post_body = nil
1205
+ auth_names = ['basicAuth']
1206
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1207
+ :header_params => header_params,
1208
+ :query_params => query_params,
1209
+ :form_params => form_params,
1210
+ :body => post_body,
1211
+ :auth_names => auth_names,
1212
+ :return_type => 'Interest')
1213
+ return data, status_code, headers
1214
+ end
1215
+ # Get 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
+
1227
+ # Get 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)
1237
+
1238
+ # query parameters
1239
+ query_params = {}
1240
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1241
+ 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
+ form_params = {}
1252
+
1253
+ # http body (model)
1254
+ post_body = nil
1255
+ auth_names = ['basicAuth']
1256
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1257
+ :header_params => header_params,
1258
+ :query_params => query_params,
1259
+ :form_params => form_params,
1260
+ :body => post_body,
1261
+ :auth_names => auth_names,
1262
+ :return_type => 'ListLocations')
1263
+ return data, status_code, headers
1264
+ end
1265
+ # Get information about members in a list
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
+
1294
+ # Get information about members in a list
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)
1321
+
1322
+ # query parameters
1323
+ query_params = {}
1324
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1325
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1326
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1327
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1328
+ query_params[:'email_type'] = opts[:'email_type'] if !opts[:'email_type'].nil?
1329
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
1330
+ query_params[:'since_timestamp_opt'] = opts[:'since_timestamp_opt'] if !opts[:'since_timestamp_opt'].nil?
1331
+ query_params[:'before_timestamp_opt'] = opts[:'before_timestamp_opt'] if !opts[:'before_timestamp_opt'].nil?
1332
+ query_params[:'since_last_changed'] = opts[:'since_last_changed'] if !opts[:'since_last_changed'].nil?
1333
+ query_params[:'before_last_changed'] = opts[:'before_last_changed'] if !opts[:'before_last_changed'].nil?
1334
+ query_params[:'unique_email_id'] = opts[:'unique_email_id'] if !opts[:'unique_email_id'].nil?
1335
+ query_params[:'vip_only'] = opts[:'vip_only'] if !opts[:'vip_only'].nil?
1336
+ query_params[:'interest_category_id'] = opts[:'interest_category_id'] if !opts[:'interest_category_id'].nil?
1337
+ query_params[:'interest_ids'] = opts[:'interest_ids'] if !opts[:'interest_ids'].nil?
1338
+ query_params[:'interest_match'] = opts[:'interest_match'] if !opts[:'interest_match'].nil?
1339
+ query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
1340
+ query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
1341
+ query_params[:'since_last_campaign'] = opts[:'since_last_campaign'] if !opts[:'since_last_campaign'].nil?
1342
+ 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
+ form_params = {}
1353
+
1354
+ # http body (model)
1355
+ post_body = nil
1356
+ auth_names = ['basicAuth']
1357
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1358
+ :header_params => header_params,
1359
+ :query_params => query_params,
1360
+ :form_params => form_params,
1361
+ :body => post_body,
1362
+ :auth_names => auth_names,
1363
+ :return_type => 'ListMembers2')
1364
+ return data, status_code, headers
1365
+ end
1366
+ # Get information about a specific list member
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
+
1379
+ # Get information about a specific list member
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)
1390
+
1391
+ # query parameters
1392
+ query_params = {}
1393
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1394
+ 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
+ form_params = {}
1405
+
1406
+ # http body (model)
1407
+ post_body = nil
1408
+ auth_names = ['basicAuth']
1409
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1410
+ :header_params => header_params,
1411
+ :query_params => query_params,
1412
+ :form_params => form_params,
1413
+ :body => post_body,
1414
+ :auth_names => auth_names,
1415
+ :return_type => 'ListMembers2')
1416
+ return data, status_code, headers
1417
+ end
1418
+ # Get recent list member activity
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
+
1432
+ # Get recent list member activity
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)
1444
+
1445
+ # query parameters
1446
+ query_params = {}
1447
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1448
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1449
+ 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
+ form_params = {}
1460
+
1461
+ # http body (model)
1462
+ post_body = nil
1463
+ auth_names = ['basicAuth']
1464
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1465
+ :header_params => header_params,
1466
+ :query_params => query_params,
1467
+ :form_params => form_params,
1468
+ :body => post_body,
1469
+ :auth_names => auth_names,
1470
+ :return_type => 'MemberActivityEvents')
1471
+ return data, status_code, headers
1472
+ end
1473
+ # Get recent list member activity
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
+
1489
+ # Get recent list member activity
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)
1503
+
1504
+ # query parameters
1505
+ query_params = {}
1506
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1507
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1508
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1509
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1510
+ 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
+ form_params = {}
1521
+
1522
+ # http body (model)
1523
+ post_body = nil
1524
+ auth_names = ['basicAuth']
1525
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1526
+ :header_params => header_params,
1527
+ :query_params => query_params,
1528
+ :form_params => form_params,
1529
+ :body => post_body,
1530
+ :auth_names => auth_names,
1531
+ :return_type => 'MemberActivityEvents1')
1532
+ return data, status_code, headers
1533
+ end
1534
+ # Get events for a contact
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
+
1549
+ # Get events for a contact
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)
1562
+
1563
+ # query parameters
1564
+ query_params = {}
1565
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1566
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1567
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1568
+ 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
+ form_params = {}
1579
+
1580
+ # http body (model)
1581
+ post_body = nil
1582
+ auth_names = ['basicAuth']
1583
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1584
+ :header_params => header_params,
1585
+ :query_params => query_params,
1586
+ :form_params => form_params,
1587
+ :body => post_body,
1588
+ :auth_names => auth_names,
1589
+ :return_type => 'CollectionOfEvents')
1590
+ return data, status_code, headers
1591
+ end
1592
+ # Get the last 50 Goal events for a member on a specific list
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
+
1605
+ # Get the last 50 Goal events for a member on a specific list
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)
1616
+
1617
+ # query parameters
1618
+ query_params = {}
1619
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1620
+ 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
+ form_params = {}
1631
+
1632
+ # http body (model)
1633
+ post_body = nil
1634
+ auth_names = ['basicAuth']
1635
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1636
+ :header_params => header_params,
1637
+ :query_params => query_params,
1638
+ :form_params => form_params,
1639
+ :body => post_body,
1640
+ :auth_names => auth_names,
1641
+ :return_type => 'CollectionOfMemberActivityEvents')
1642
+ return data, status_code, headers
1643
+ end
1644
+ # Get recent notes for a specific list member
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
+
1661
+ # Get recent notes for a specific list member
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)
1676
+
1677
+ # query parameters
1678
+ query_params = {}
1679
+ query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
1680
+ query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
1681
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1682
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1683
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1684
+ 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
+ form_params = {}
1695
+
1696
+ # http body (model)
1697
+ post_body = nil
1698
+ auth_names = ['basicAuth']
1699
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1700
+ :header_params => header_params,
1701
+ :query_params => query_params,
1702
+ :form_params => form_params,
1703
+ :body => post_body,
1704
+ :auth_names => auth_names,
1705
+ :return_type => 'CollectionOfNotes')
1706
+ return data, status_code, headers
1707
+ end
1708
+ # Get a specific note for a specific list member
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
+
1722
+ # Get a specific note for a specific list member
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)
1734
+
1735
+ # query parameters
1736
+ query_params = {}
1737
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1738
+ 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
+ form_params = {}
1749
+
1750
+ # http body (model)
1751
+ post_body = nil
1752
+ auth_names = ['basicAuth']
1753
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1754
+ :header_params => header_params,
1755
+ :query_params => query_params,
1756
+ :form_params => form_params,
1757
+ :body => post_body,
1758
+ :auth_names => auth_names,
1759
+ :return_type => 'MemberNotes')
1760
+ return data, status_code, headers
1761
+ end
1762
+ # Get all merge fields for a list
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
+
1778
+ # Get all merge fields for a list
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)
1792
+
1793
+ # query parameters
1794
+ query_params = {}
1795
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1796
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1797
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1798
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1799
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
1800
+ 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
+ form_params = {}
1811
+
1812
+ # http body (model)
1813
+ post_body = nil
1814
+ auth_names = ['basicAuth']
1815
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1816
+ :header_params => header_params,
1817
+ :query_params => query_params,
1818
+ :form_params => form_params,
1819
+ :body => post_body,
1820
+ :auth_names => auth_names,
1821
+ :return_type => 'CollectionOfMergeFields')
1822
+ return data, status_code, headers
1823
+ end
1824
+ # Get a specific 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
+
1837
+ # Get a specific 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)
1848
+
1849
+ # query parameters
1850
+ query_params = {}
1851
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1852
+ 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
+ form_params = {}
1863
+
1864
+ # http body (model)
1865
+ post_body = nil
1866
+ auth_names = ['basicAuth']
1867
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1868
+ :header_params => header_params,
1869
+ :query_params => query_params,
1870
+ :form_params => form_params,
1871
+ :body => post_body,
1872
+ :auth_names => auth_names,
1873
+ :return_type => 'MergeField')
1874
+ return data, status_code, headers
1875
+ end
1876
+ # Get information about a specific segment
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
+
1892
+ # Get information about a specific segment
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)
1906
+
1907
+ # query parameters
1908
+ query_params = {}
1909
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1910
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1911
+ query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil?
1912
+ query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil?
1913
+ 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
+ form_params = {}
1924
+
1925
+ # http body (model)
1926
+ post_body = nil
1927
+ auth_names = ['basicAuth']
1928
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1929
+ :header_params => header_params,
1930
+ :query_params => query_params,
1931
+ :form_params => form_params,
1932
+ :body => post_body,
1933
+ :auth_names => auth_names,
1934
+ :return_type => 'List6')
1935
+ return data, status_code, headers
1936
+ end
1937
+ # Get information about all members in a list segment
1938
+ # Get information about members in a [saved segment](https://mailchimp.com/help/save-and-manage-segments/).
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
+
1955
+ # Get information about all members in a list segment
1956
+ # Get information about members in a [saved segment](https://mailchimp.com/help/save-and-manage-segments/).
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)
1971
+
1972
+ # query parameters
1973
+ query_params = {}
1974
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1975
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1976
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1977
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1978
+ query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil?
1979
+ query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil?
1980
+ 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
+ form_params = {}
1991
+
1992
+ # http body (model)
1993
+ post_body = nil
1994
+ auth_names = ['basicAuth']
1995
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1996
+ :header_params => header_params,
1997
+ :query_params => query_params,
1998
+ :form_params => form_params,
1999
+ :body => post_body,
2000
+ :auth_names => auth_names,
2001
+ :return_type => 'SegmentMembers')
2002
+ return data, status_code, headers
2003
+ end
2004
+ # Get signup forms for a specific list
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
+
2014
+ # Get signup forms for a specific list
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)
2022
+
2023
+ # query parameters
2024
+ 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
+ form_params = {}
2035
+
2036
+ # http body (model)
2037
+ post_body = nil
2038
+ auth_names = ['basicAuth']
2039
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2040
+ :header_params => header_params,
2041
+ :query_params => query_params,
2042
+ :form_params => form_params,
2043
+ :body => post_body,
2044
+ :auth_names => auth_names,
2045
+ :return_type => 'ListSignupForms')
2046
+ return data, status_code, headers
2047
+ end
2048
+ # Get information about all webhooks for a specific list
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
+
2058
+ # Get information about all webhooks for a specific list
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)
2066
+
2067
+ # query parameters
2068
+ 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
+ form_params = {}
2079
+
2080
+ # http body (model)
2081
+ post_body = nil
2082
+ auth_names = ['basicAuth']
2083
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2084
+ :header_params => header_params,
2085
+ :query_params => query_params,
2086
+ :form_params => form_params,
2087
+ :body => post_body,
2088
+ :auth_names => auth_names,
2089
+ :return_type => 'ListWebhooks')
2090
+ return data, status_code, headers
2091
+ end
2092
+ # Get information about a specific webhook
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
+
2103
+ # Get information about a specific webhook
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)
2112
+
2113
+ # query parameters
2114
+ 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
+ form_params = {}
2125
+
2126
+ # http body (model)
2127
+ post_body = nil
2128
+ auth_names = ['basicAuth']
2129
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2130
+ :header_params => header_params,
2131
+ :query_params => query_params,
2132
+ :form_params => form_params,
2133
+ :body => post_body,
2134
+ :auth_names => auth_names,
2135
+ :return_type => 'ListWebhooks')
2136
+ return data, status_code, headers
2137
+ end
2138
+ # Update a specific list
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
+
2149
+ # Update a specific list
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)
2158
+
2159
+ # query parameters
2160
+ 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
+ form_params = {}
2171
+
2172
+ # http body (model)
2173
+ post_body = @api_client.object_to_http_body(body)
2174
+ auth_names = ['basicAuth']
2175
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2176
+ :header_params => header_params,
2177
+ :query_params => query_params,
2178
+ :form_params => form_params,
2179
+ :body => post_body,
2180
+ :auth_names => auth_names,
2181
+ :return_type => 'SubscriberList')
2182
+ return data, status_code, headers
2183
+ end
2184
+ # Update a specific 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
+
2196
+ # Update a specific 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)
2206
+
2207
+ # query parameters
2208
+ 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
+ form_params = {}
2219
+
2220
+ # http body (model)
2221
+ post_body = @api_client.object_to_http_body(body)
2222
+ auth_names = ['basicAuth']
2223
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2224
+ :header_params => header_params,
2225
+ :query_params => query_params,
2226
+ :form_params => form_params,
2227
+ :body => post_body,
2228
+ :auth_names => auth_names,
2229
+ :return_type => 'InterestCategory')
2230
+ return data, status_code, headers
2231
+ end
2232
+ # Update interests in a specific 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
+
2245
+ # Update interests in a specific 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)
2256
+
2257
+ # query parameters
2258
+ 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
+ form_params = {}
2269
+
2270
+ # http body (model)
2271
+ post_body = @api_client.object_to_http_body(opts[:'body'])
2272
+ auth_names = ['basicAuth']
2273
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2274
+ :header_params => header_params,
2275
+ :query_params => query_params,
2276
+ :form_params => form_params,
2277
+ :body => post_body,
2278
+ :auth_names => auth_names,
2279
+ :return_type => 'Interest')
2280
+ return data, status_code, headers
2281
+ end
2282
+ # Update a 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
+
2295
+ # Update a 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)
2306
+
2307
+ # query parameters
2308
+ query_params = {}
2309
+ 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
+ form_params = {}
2320
+
2321
+ # http body (model)
2322
+ post_body = @api_client.object_to_http_body(body)
2323
+ auth_names = ['basicAuth']
2324
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2325
+ :header_params => header_params,
2326
+ :query_params => query_params,
2327
+ :form_params => form_params,
2328
+ :body => post_body,
2329
+ :auth_names => auth_names,
2330
+ :return_type => 'ListMembers2')
2331
+ return data, status_code, headers
2332
+ end
2333
+ # Update a 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
+
2346
+ # Update a 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)
2357
+
2358
+ # query parameters
2359
+ 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
+ form_params = {}
2370
+
2371
+ # http body (model)
2372
+ post_body = @api_client.object_to_http_body(opts[:'body'])
2373
+ auth_names = ['basicAuth']
2374
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2375
+ :header_params => header_params,
2376
+ :query_params => query_params,
2377
+ :form_params => form_params,
2378
+ :body => post_body,
2379
+ :auth_names => auth_names,
2380
+ :return_type => 'MemberNotes')
2381
+ return data, status_code, headers
2382
+ end
2383
+ # Update a 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
+
2395
+ # Update a 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)
2405
+
2406
+ # query parameters
2407
+ 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
+ form_params = {}
2418
+
2419
+ # http body (model)
2420
+ post_body = @api_client.object_to_http_body(body)
2421
+ auth_names = ['basicAuth']
2422
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2423
+ :header_params => header_params,
2424
+ :query_params => query_params,
2425
+ :form_params => form_params,
2426
+ :body => post_body,
2427
+ :auth_names => auth_names,
2428
+ :return_type => 'MergeField')
2429
+ return data, status_code, headers
2430
+ end
2431
+ # Update a 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
+
2443
+ # Update a 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)
2453
+
2454
+ # query parameters
2455
+ 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
+ form_params = {}
2466
+
2467
+ # http body (model)
2468
+ post_body = @api_client.object_to_http_body(body)
2469
+ auth_names = ['basicAuth']
2470
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2471
+ :header_params => header_params,
2472
+ :query_params => query_params,
2473
+ :form_params => form_params,
2474
+ :body => post_body,
2475
+ :auth_names => auth_names,
2476
+ :return_type => 'List6')
2477
+ return data, status_code, headers
2478
+ end
2479
+ # Update a 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
+
2491
+ # Update a 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)
2501
+
2502
+ # query parameters
2503
+ 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
+ form_params = {}
2514
+
2515
+ # http body (model)
2516
+ post_body = @api_client.object_to_http_body(body)
2517
+ auth_names = ['basicAuth']
2518
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2519
+ :header_params => header_params,
2520
+ :query_params => query_params,
2521
+ :form_params => form_params,
2522
+ :body => post_body,
2523
+ :auth_names => auth_names,
2524
+ :return_type => 'ListWebhooks')
2525
+ return data, status_code, headers
2526
+ end
2527
+ # Create an event for a list member.
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
+
2539
+ # Create an event for a list member.
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)
2549
+
2550
+ # query parameters
2551
+ query_params = {}
2552
+
2553
+ # header parameters
2554
+ header_params = {}
2555
+ # HTTP header 'Accept' (if needed)
2556
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2557
+ # HTTP header 'Content-Type'
2558
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2559
+
2560
+ # form parameters
2561
+ form_params = {}
2562
+
2563
+ # http body (model)
2564
+ post_body = @api_client.object_to_http_body(opts[:'body'])
2565
+ auth_names = ['basicAuth']
2566
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2567
+ :header_params => header_params,
2568
+ :query_params => query_params,
2569
+ :form_params => form_params,
2570
+ :body => post_body,
2571
+ :auth_names => auth_names)
2572
+ return data, status_code, headers
2573
+ end
2574
+ # Post the tags on a list member.
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
+
2586
+ # Post the tags on a list member.
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)
2596
+
2597
+ # query parameters
2598
+ 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
+ form_params = {}
2609
+
2610
+ # http body (model)
2611
+ post_body = @api_client.object_to_http_body(opts[:'body'])
2612
+ auth_names = ['basicAuth']
2613
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2614
+ :header_params => header_params,
2615
+ :query_params => query_params,
2616
+ :form_params => form_params,
2617
+ :body => post_body,
2618
+ :auth_names => auth_names)
2619
+ return data, status_code, headers
2620
+ end
2621
+ # Create a new 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
+
2631
+ # Create a new 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'
2639
+
2640
+ # query parameters
2641
+ 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
+ form_params = {}
2652
+
2653
+ # http body (model)
2654
+ post_body = @api_client.object_to_http_body(body)
2655
+ auth_names = ['basicAuth']
2656
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2657
+ :header_params => header_params,
2658
+ :query_params => query_params,
2659
+ :form_params => form_params,
2660
+ :body => post_body,
2661
+ :auth_names => auth_names,
2662
+ :return_type => 'SubscriberList')
2663
+ return data, status_code, headers
2664
+ end
2665
+ # Batch sub/unsub list members
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
+
2678
+ # Batch sub/unsub list members
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)
2689
+
2690
+ # query parameters
2691
+ query_params = {}
2692
+ query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
2693
+ 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
+ form_params = {}
2704
+
2705
+ # http body (model)
2706
+ post_body = @api_client.object_to_http_body(body)
2707
+ auth_names = ['basicAuth']
2708
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2709
+ :header_params => header_params,
2710
+ :query_params => query_params,
2711
+ :form_params => form_params,
2712
+ :body => post_body,
2713
+ :auth_names => auth_names,
2714
+ :return_type => 'BatchUpdateListMembers')
2715
+ return data, status_code, headers
2716
+ end
2717
+ # Create a new external identifier
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
+
2728
+ # Create a new external identifier
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)
2737
+
2738
+ # query parameters
2739
+ query_params = {}
2740
+
2741
+ # header parameters
2742
+ header_params = {}
2743
+ # HTTP header 'Accept' (if needed)
2744
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
2745
+ # HTTP header 'Content-Type'
2746
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2747
+
2748
+ # form parameters
2749
+ form_params = {}
2750
+
2751
+ # http body (model)
2752
+ post_body = @api_client.object_to_http_body(opts[:'body'])
2753
+ auth_names = ['basicAuth']
2754
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2755
+ :header_params => header_params,
2756
+ :query_params => query_params,
2757
+ :form_params => form_params,
2758
+ :body => post_body,
2759
+ :auth_names => auth_names,
2760
+ :return_type => 'ExternalIdentifier')
2761
+ return data, status_code, headers
2762
+ end
2763
+ # Create a new 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
+
2774
+ # Create a new 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)
2783
+
2784
+ # query parameters
2785
+ 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
+ form_params = {}
2796
+
2797
+ # http body (model)
2798
+ post_body = @api_client.object_to_http_body(body)
2799
+ auth_names = ['basicAuth']
2800
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2801
+ :header_params => header_params,
2802
+ :query_params => query_params,
2803
+ :form_params => form_params,
2804
+ :body => post_body,
2805
+ :auth_names => auth_names,
2806
+ :return_type => 'InterestCategory')
2807
+ return data, status_code, headers
2808
+ end
2809
+ # Create a new interest in a specific 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
+
2821
+ # Create a new interest in a specific 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)
2831
+
2832
+ # query parameters
2833
+ 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
+ form_params = {}
2844
+
2845
+ # http body (model)
2846
+ post_body = @api_client.object_to_http_body(body)
2847
+ auth_names = ['basicAuth']
2848
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2849
+ :header_params => header_params,
2850
+ :query_params => query_params,
2851
+ :form_params => form_params,
2852
+ :body => post_body,
2853
+ :auth_names => auth_names,
2854
+ :return_type => 'Interest')
2855
+ return data, status_code, headers
2856
+ end
2857
+ # Add a new list member
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
+
2869
+ # Add a new list member
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)
2879
+
2880
+ # query parameters
2881
+ query_params = {}
2882
+ 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
+ form_params = {}
2893
+
2894
+ # http body (model)
2895
+ post_body = @api_client.object_to_http_body(body)
2896
+ auth_names = ['basicAuth']
2897
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2898
+ :header_params => header_params,
2899
+ :query_params => query_params,
2900
+ :form_params => form_params,
2901
+ :body => post_body,
2902
+ :auth_names => auth_names,
2903
+ :return_type => 'ListMembers2')
2904
+ return data, status_code, headers
2905
+ end
2906
+ # Permanently delete a 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
+
2917
+ # Permanently delete a 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)
2926
+
2927
+ # query parameters
2928
+ 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
+ form_params = {}
2939
+
2940
+ # http body (model)
2941
+ post_body = nil
2942
+ auth_names = ['basicAuth']
2943
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2944
+ :header_params => header_params,
2945
+ :query_params => query_params,
2946
+ :form_params => form_params,
2947
+ :body => post_body,
2948
+ :auth_names => auth_names)
2949
+ return data, status_code, headers
2950
+ end
2951
+ # Add a new 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
+
2963
+ # Add a new 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)
2973
+
2974
+ # query parameters
2975
+ 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
+ form_params = {}
2986
+
2987
+ # http body (model)
2988
+ post_body = @api_client.object_to_http_body(opts[:'body'])
2989
+ auth_names = ['basicAuth']
2990
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2991
+ :header_params => header_params,
2992
+ :query_params => query_params,
2993
+ :form_params => form_params,
2994
+ :body => post_body,
2995
+ :auth_names => auth_names,
2996
+ :return_type => 'MemberNotes')
2997
+ return data, status_code, headers
2998
+ end
2999
+ # Add a new 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
+
3010
+ # Add a new 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)
3019
+
3020
+ # query parameters
3021
+ 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
+ form_params = {}
3032
+
3033
+ # http body (model)
3034
+ post_body = @api_client.object_to_http_body(body)
3035
+ auth_names = ['basicAuth']
3036
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3037
+ :header_params => header_params,
3038
+ :query_params => query_params,
3039
+ :form_params => form_params,
3040
+ :body => post_body,
3041
+ :auth_names => auth_names,
3042
+ :return_type => 'MergeField')
3043
+ return data, status_code, headers
3044
+ end
3045
+ # Create a new 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
+
3056
+ # Create a new 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)
3065
+
3066
+ # query parameters
3067
+ 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
+ form_params = {}
3078
+
3079
+ # http body (model)
3080
+ post_body = @api_client.object_to_http_body(body)
3081
+ auth_names = ['basicAuth']
3082
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3083
+ :header_params => header_params,
3084
+ :query_params => query_params,
3085
+ :form_params => form_params,
3086
+ :body => post_body,
3087
+ :auth_names => auth_names,
3088
+ :return_type => 'List6')
3089
+ return data, status_code, headers
3090
+ end
3091
+ # Batch add/remove list members to static segment
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
+
3103
+ # Batch add/remove list members to static segment
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)
3113
+
3114
+ # query parameters
3115
+ 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
+ form_params = {}
3126
+
3127
+ # http body (model)
3128
+ post_body = @api_client.object_to_http_body(body)
3129
+ auth_names = ['basicAuth']
3130
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3131
+ :header_params => header_params,
3132
+ :query_params => query_params,
3133
+ :form_params => form_params,
3134
+ :body => post_body,
3135
+ :auth_names => auth_names,
3136
+ :return_type => 'BatchAddremoveListMembersTofromStaticSegment')
3137
+ return data, status_code, headers
3138
+ end
3139
+ # Add a member to a static 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
+
3151
+ # Add a member to a static 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)
3161
+
3162
+ # query parameters
3163
+ 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
+ form_params = {}
3174
+
3175
+ # http body (model)
3176
+ post_body = @api_client.object_to_http_body(body)
3177
+ auth_names = ['basicAuth']
3178
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3179
+ :header_params => header_params,
3180
+ :query_params => query_params,
3181
+ :form_params => form_params,
3182
+ :body => post_body,
3183
+ :auth_names => auth_names,
3184
+ :return_type => 'ListMembers1')
3185
+ return data, status_code, headers
3186
+ end
3187
+ # Customize the signup form settings for a specific list
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
+
3198
+ # Customize the signup form settings for a specific list
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)
3207
+
3208
+ # query parameters
3209
+ 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
+ form_params = {}
3220
+
3221
+ # http body (model)
3222
+ post_body = @api_client.object_to_http_body(body)
3223
+ auth_names = ['basicAuth']
3224
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3225
+ :header_params => header_params,
3226
+ :query_params => query_params,
3227
+ :form_params => form_params,
3228
+ :body => post_body,
3229
+ :auth_names => auth_names,
3230
+ :return_type => 'SignupForm')
3231
+ return data, status_code, headers
3232
+ end
3233
+ # Create a new 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
+
3244
+ # Create a new 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)
3253
+
3254
+ # query parameters
3255
+ 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
+ form_params = {}
3266
+
3267
+ # http body (model)
3268
+ post_body = @api_client.object_to_http_body(body)
3269
+ auth_names = ['basicAuth']
3270
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3271
+ :header_params => header_params,
3272
+ :query_params => query_params,
3273
+ :form_params => form_params,
3274
+ :body => post_body,
3275
+ :auth_names => auth_names,
3276
+ :return_type => 'ListWebhooks')
3277
+ return data, status_code, headers
3278
+ end
3279
+ # Get information about all segments in a list
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
+
3301
+ # Get information about all segments in a list
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)
3321
+
3322
+ # query parameters
3323
+ query_params = {}
3324
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
3325
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
3326
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
3327
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
3328
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
3329
+ query_params[:'since_created_at'] = opts[:'since_created_at'] if !opts[:'since_created_at'].nil?
3330
+ query_params[:'before_created_at'] = opts[:'before_created_at'] if !opts[:'before_created_at'].nil?
3331
+ query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil?
3332
+ query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil?
3333
+ query_params[:'include_unsubscribed'] = opts[:'include_unsubscribed'] if !opts[:'include_unsubscribed'].nil?
3334
+ query_params[:'since_updated_at'] = opts[:'since_updated_at'] if !opts[:'since_updated_at'].nil?
3335
+ 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
+ form_params = {}
3346
+
3347
+ # http body (model)
3348
+ post_body = nil
3349
+ auth_names = ['basicAuth']
3350
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
3351
+ :header_params => header_params,
3352
+ :query_params => query_params,
3353
+ :form_params => form_params,
3354
+ :body => post_body,
3355
+ :auth_names => auth_names,
3356
+ :return_type => 'CollectionOfSegments')
3357
+ return data, status_code, headers
3358
+ end
3359
+ # Preview a 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
+
3370
+ # Preview a 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)
3379
+
3380
+ # query parameters
3381
+ 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
+ form_params = {}
3392
+
3393
+ # http body (model)
3394
+ post_body = @api_client.object_to_http_body(opts[:'body'])
3395
+ auth_names = ['basicAuth']
3396
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3397
+ :header_params => header_params,
3398
+ :query_params => query_params,
3399
+ :form_params => form_params,
3400
+ :body => post_body,
3401
+ :auth_names => auth_names,
3402
+ :return_type => 'ListMembers2')
3403
+ return data, status_code, headers
3404
+ end
3405
+ # Add or update a 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
+
3418
+ # Add or update a 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)
3429
+
3430
+ # query parameters
3431
+ query_params = {}
3432
+ 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
+ form_params = {}
3443
+
3444
+ # http body (model)
3445
+ post_body = @api_client.object_to_http_body(body)
3446
+ auth_names = ['basicAuth']
3447
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
3448
+ :header_params => header_params,
3449
+ :query_params => query_params,
3450
+ :form_params => form_params,
3451
+ :body => post_body,
3452
+ :auth_names => auth_names,
3453
+ :return_type => 'ListMembers2')
3454
+ return data, status_code, headers
3455
+ end
3456
+ end
3457
+ end