MailchimpMarketing 3.0.5 → 3.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/MailchimpMarketing.gemspec +2 -2
- data/README.md +22 -26
- data/lib/MailchimpMarketing.rb +1 -1
- data/lib/MailchimpMarketing/api/activity_feed_api.rb +10 -71
- data/lib/MailchimpMarketing/api/authorized_apps_api.rb +16 -116
- data/lib/MailchimpMarketing/api/automations_api.rb +110 -704
- data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +27 -187
- data/lib/MailchimpMarketing/api/batches_api.rb +21 -150
- data/lib/MailchimpMarketing/api/campaign_folders_api.rb +27 -187
- data/lib/MailchimpMarketing/api/campaigns_api.rb +124 -828
- data/lib/MailchimpMarketing/api/connected_sites_api.rb +26 -184
- data/lib/MailchimpMarketing/api/conversations_api.rb +30 -210
- data/lib/MailchimpMarketing/api/dashboard_api.rb +25 -227
- data/lib/MailchimpMarketing/api/ecommerce_api.rb +387 -2371
- data/lib/MailchimpMarketing/api/external_auths_api.rb +16 -116
- data/lib/MailchimpMarketing/api/facebook_ads_api.rb +13 -85
- data/lib/MailchimpMarketing/api/file_manager_api.rb +59 -424
- data/lib/MailchimpMarketing/api/landing_pages_api.rb +44 -296
- data/lib/MailchimpMarketing/api/lists_api.rb +420 -2707
- data/lib/MailchimpMarketing/api/ping_api.rb +5 -34
- data/lib/MailchimpMarketing/api/postcards_api.rb +7 -42
- data/lib/MailchimpMarketing/api/reporting_api.rb +34 -243
- data/lib/MailchimpMarketing/api/reports_api.rb +130 -925
- data/lib/MailchimpMarketing/api/root_api.rb +5 -38
- data/lib/MailchimpMarketing/api/search_campaigns_api.rb +6 -40
- data/lib/MailchimpMarketing/api/search_members_api.rb +6 -42
- data/lib/MailchimpMarketing/api/template_folders_api.rb +27 -187
- data/lib/MailchimpMarketing/api/templates_api.rb +33 -240
- data/lib/MailchimpMarketing/api/verified_domains_api.rb +26 -175
- data/lib/MailchimpMarketing/api_client.rb +15 -161
- data/lib/MailchimpMarketing/api_error.rb +1 -1
- data/lib/MailchimpMarketing/configuration.rb +1 -1
- data/lib/MailchimpMarketing/version.rb +2 -2
- metadata +5 -11
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.10
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -19,380 +19,128 @@ module MailchimpMarketing
|
|
19
19
|
def initialize(api_client)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Delete landing page
|
23
|
-
# Delete a landing page.
|
24
|
-
# @param page_id The unique id for the page.
|
25
|
-
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [nil]
|
27
|
-
def delete_page(page_id = {}, opts = {})
|
28
|
-
delete_page_with_http_info(page_id, opts)
|
29
|
-
nil
|
30
|
-
end
|
31
22
|
|
32
23
|
# Delete landing page
|
33
|
-
|
34
|
-
|
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)
|
24
|
+
def delete_page(page_id, opts = {})
|
25
|
+
fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
|
40
26
|
|
41
|
-
# query parameters
|
42
27
|
query_params = {}
|
43
|
-
|
44
|
-
# header parameters
|
45
|
-
header_params = {}
|
46
|
-
# HTTP header 'Accept' (if needed)
|
47
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
48
|
-
# HTTP header 'Content-Type'
|
49
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
50
|
-
|
51
|
-
# form parameters
|
52
|
-
form_params = {}
|
53
|
-
|
54
|
-
# http body (model)
|
55
28
|
post_body = nil
|
56
|
-
|
29
|
+
|
30
|
+
local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_id.to_s)
|
57
31
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
58
|
-
:header_params => header_params,
|
59
32
|
:query_params => query_params,
|
60
|
-
:
|
61
|
-
:body => post_body,
|
62
|
-
:auth_names => auth_names)
|
33
|
+
:body => post_body)
|
63
34
|
return data, status_code, headers
|
64
35
|
end
|
65
|
-
# List landing pages
|
66
|
-
# Get all landing pages.
|
67
|
-
# @param [Hash] opts the optional parameters
|
68
|
-
# @option opts [String] :sort_dir Determines the order direction for sorted results.
|
69
|
-
# @option opts [String] :sort_field Returns files sorted by the specified field.
|
70
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
71
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
72
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
73
|
-
# @return [InlineResponse2006]
|
74
|
-
def get_all(opts = {})
|
75
|
-
data, _status_code, _headers = get_all_with_http_info(opts)
|
76
|
-
data
|
77
|
-
end
|
78
36
|
|
79
37
|
# List landing pages
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
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'
|
38
|
+
def get_all(opts = {})
|
39
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
40
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of created_at, updated_at' if opts[:'sort_field'] && !['created_at', 'updated_at'].include?(opts[:'sort_field'])
|
41
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
91
42
|
|
92
|
-
# query parameters
|
93
43
|
query_params = {}
|
94
44
|
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
95
45
|
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
96
46
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
97
47
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
98
48
|
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
49
|
post_body = nil
|
112
|
-
|
50
|
+
|
51
|
+
local_var_path = '/landing-pages'
|
113
52
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
114
|
-
:header_params => header_params,
|
115
53
|
:query_params => query_params,
|
116
|
-
:
|
117
|
-
:body => post_body,
|
118
|
-
:auth_names => auth_names,
|
119
|
-
:return_type => 'InlineResponse2006')
|
54
|
+
:body => post_body)
|
120
55
|
return data, status_code, headers
|
121
56
|
end
|
122
|
-
# Get landing page info
|
123
|
-
# Get information about a specific page.
|
124
|
-
# @param page_id The unique id for the page.
|
125
|
-
# @param [Hash] opts the optional parameters
|
126
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
127
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
128
|
-
# @return [LandingPage]
|
129
|
-
def get_page(page_id = {}, opts = {})
|
130
|
-
data, _status_code, _headers = get_page_with_http_info(page_id, opts)
|
131
|
-
data
|
132
|
-
end
|
133
57
|
|
134
58
|
# Get landing page info
|
135
|
-
|
136
|
-
|
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)
|
59
|
+
def get_page(page_id, opts = {})
|
60
|
+
fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
|
144
61
|
|
145
|
-
# query parameters
|
146
62
|
query_params = {}
|
147
63
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
148
64
|
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
65
|
post_body = nil
|
162
|
-
|
66
|
+
|
67
|
+
local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_id.to_s)
|
163
68
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
164
|
-
:header_params => header_params,
|
165
69
|
:query_params => query_params,
|
166
|
-
:
|
167
|
-
:body => post_body,
|
168
|
-
:auth_names => auth_names,
|
169
|
-
:return_type => 'LandingPage')
|
70
|
+
:body => post_body)
|
170
71
|
return data, status_code, headers
|
171
72
|
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
73
|
|
184
74
|
# Get landing page content
|
185
|
-
|
186
|
-
|
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)
|
75
|
+
def get_page_content(page_id, opts = {})
|
76
|
+
fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
|
194
77
|
|
195
|
-
# query parameters
|
196
78
|
query_params = {}
|
197
79
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
198
80
|
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
81
|
post_body = nil
|
212
|
-
|
82
|
+
|
83
|
+
local_var_path = '/landing-pages/{page_id}/content'.sub('{' + 'page_id' + '}', page_id.to_s)
|
213
84
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
214
|
-
:header_params => header_params,
|
215
85
|
:query_params => query_params,
|
216
|
-
:
|
217
|
-
:body => post_body,
|
218
|
-
:auth_names => auth_names,
|
219
|
-
:return_type => 'LandingPageContent')
|
86
|
+
:body => post_body)
|
220
87
|
return data, status_code, headers
|
221
88
|
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
89
|
|
233
90
|
# Update landing page
|
234
|
-
|
235
|
-
|
236
|
-
|
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)
|
91
|
+
def update_page(page_id, body, opts = {})
|
92
|
+
fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
|
93
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
242
94
|
|
243
|
-
# query parameters
|
244
95
|
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
96
|
post_body = @api_client.object_to_http_body(body)
|
258
|
-
|
97
|
+
|
98
|
+
local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_id.to_s)
|
259
99
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
260
|
-
:header_params => header_params,
|
261
100
|
:query_params => query_params,
|
262
|
-
:
|
263
|
-
:body => post_body,
|
264
|
-
:auth_names => auth_names,
|
265
|
-
:return_type => 'LandingPage')
|
101
|
+
:body => post_body)
|
266
102
|
return data, status_code, headers
|
267
103
|
end
|
268
|
-
# Add landing page
|
269
|
-
# Create a new Mailchimp landing page.
|
270
|
-
# @param body
|
271
|
-
# @param [Hash] opts the optional parameters
|
272
|
-
# @return [LandingPage]
|
273
|
-
def create(body = {}, opts = {})
|
274
|
-
data, _status_code, _headers = create_with_http_info(body, opts)
|
275
|
-
data
|
276
|
-
end
|
277
104
|
|
278
105
|
# Add landing page
|
279
|
-
|
280
|
-
|
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'
|
106
|
+
def create(body, opts = {})
|
107
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
286
108
|
|
287
|
-
# query parameters
|
288
109
|
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
110
|
post_body = @api_client.object_to_http_body(body)
|
302
|
-
|
111
|
+
|
112
|
+
local_var_path = '/landing-pages'
|
303
113
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
304
|
-
:header_params => header_params,
|
305
114
|
:query_params => query_params,
|
306
|
-
:
|
307
|
-
:body => post_body,
|
308
|
-
:auth_names => auth_names,
|
309
|
-
:return_type => 'LandingPage')
|
115
|
+
:body => post_body)
|
310
116
|
return data, status_code, headers
|
311
117
|
end
|
312
|
-
# Publish landing page
|
313
|
-
# Publish a landing page that is in draft, unpublished, or has been previously published and edited.
|
314
|
-
# @param page_id The unique id for the page.
|
315
|
-
# @param [Hash] opts the optional parameters
|
316
|
-
# @return [nil]
|
317
|
-
def publish_page(page_id = {}, opts = {})
|
318
|
-
publish_page_with_http_info(page_id, opts)
|
319
|
-
nil
|
320
|
-
end
|
321
118
|
|
322
119
|
# Publish landing page
|
323
|
-
|
324
|
-
|
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)
|
120
|
+
def publish_page(page_id, opts = {})
|
121
|
+
fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
|
330
122
|
|
331
|
-
# query parameters
|
332
123
|
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
124
|
post_body = nil
|
346
|
-
|
125
|
+
|
126
|
+
local_var_path = '/landing-pages/{page_id}/actions/publish'.sub('{' + 'page_id' + '}', page_id.to_s)
|
347
127
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
348
|
-
:header_params => header_params,
|
349
128
|
:query_params => query_params,
|
350
|
-
:
|
351
|
-
:body => post_body,
|
352
|
-
:auth_names => auth_names)
|
129
|
+
:body => post_body)
|
353
130
|
return data, status_code, headers
|
354
131
|
end
|
355
|
-
# Unpublish landing page
|
356
|
-
# Unpublish a landing page that is in draft or has been published.
|
357
|
-
# @param page_id The unique id for the page.
|
358
|
-
# @param [Hash] opts the optional parameters
|
359
|
-
# @return [nil]
|
360
|
-
def unpublish_page(page_id = {}, opts = {})
|
361
|
-
unpublish_page_with_http_info(page_id, opts)
|
362
|
-
nil
|
363
|
-
end
|
364
132
|
|
365
133
|
# Unpublish landing page
|
366
|
-
|
367
|
-
|
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)
|
134
|
+
def unpublish_page(page_id, opts = {})
|
135
|
+
fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
|
373
136
|
|
374
|
-
# query parameters
|
375
137
|
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
138
|
post_body = nil
|
389
|
-
|
139
|
+
|
140
|
+
local_var_path = '/landing-pages/{page_id}/actions/unpublish'.sub('{' + 'page_id' + '}', page_id.to_s)
|
390
141
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
391
|
-
:header_params => header_params,
|
392
142
|
:query_params => query_params,
|
393
|
-
:
|
394
|
-
:body => post_body,
|
395
|
-
:auth_names => auth_names)
|
143
|
+
:body => post_body)
|
396
144
|
return data, status_code, headers
|
397
145
|
end
|
398
146
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.10
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -19,513 +19,170 @@ module MailchimpMarketing
|
|
19
19
|
def initialize(api_client)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Delete list
|
23
|
-
# Delete a list from your Mailchimp account. If you delete a list, you'll lose the list history—including subscriber activity, unsubscribes, complaints, and bounces. You’ll also lose subscribers’ email addresses, unless you exported and backed up your list.
|
24
|
-
# @param list_id The unique ID for the list.
|
25
|
-
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [nil]
|
27
|
-
def delete_list(list_id = {}, opts = {})
|
28
|
-
delete_list_with_http_info(list_id, opts)
|
29
|
-
nil
|
30
|
-
end
|
31
22
|
|
32
23
|
# Delete list
|
33
|
-
|
34
|
-
|
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)
|
24
|
+
def delete_list(list_id, opts = {})
|
25
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
40
26
|
|
41
|
-
# query parameters
|
42
27
|
query_params = {}
|
43
|
-
|
44
|
-
# header parameters
|
45
|
-
header_params = {}
|
46
|
-
# HTTP header 'Accept' (if needed)
|
47
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
48
|
-
# HTTP header 'Content-Type'
|
49
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
50
|
-
|
51
|
-
# form parameters
|
52
|
-
form_params = {}
|
53
|
-
|
54
|
-
# http body (model)
|
55
28
|
post_body = nil
|
56
|
-
|
29
|
+
|
30
|
+
local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
|
57
31
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
58
|
-
:header_params => header_params,
|
59
32
|
:query_params => query_params,
|
60
|
-
:
|
61
|
-
:body => post_body,
|
62
|
-
:auth_names => auth_names)
|
33
|
+
:body => post_body)
|
63
34
|
return data, status_code, headers
|
64
35
|
end
|
65
|
-
# Delete 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
36
|
|
76
37
|
# Delete interest category
|
77
|
-
|
78
|
-
|
79
|
-
|
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)
|
38
|
+
def delete_interest_category(list_id, interest_category_id, opts = {})
|
39
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
40
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
85
41
|
|
86
|
-
# query parameters
|
87
42
|
query_params = {}
|
88
|
-
|
89
|
-
# header parameters
|
90
|
-
header_params = {}
|
91
|
-
# HTTP header 'Accept' (if needed)
|
92
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
93
|
-
# HTTP header 'Content-Type'
|
94
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
95
|
-
|
96
|
-
# form parameters
|
97
|
-
form_params = {}
|
98
|
-
|
99
|
-
# http body (model)
|
100
43
|
post_body = nil
|
101
|
-
|
44
|
+
|
45
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
|
102
46
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
103
|
-
:header_params => header_params,
|
104
47
|
:query_params => query_params,
|
105
|
-
:
|
106
|
-
:body => post_body,
|
107
|
-
:auth_names => auth_names)
|
48
|
+
:body => post_body)
|
108
49
|
return data, status_code, headers
|
109
50
|
end
|
110
|
-
# Delete interest in category
|
111
|
-
# Delete interests or group names in a specific category.
|
112
|
-
# @param list_id The unique ID for the list.
|
113
|
-
# @param interest_category_id The unique ID for the interest category.
|
114
|
-
# @param interest_id The specific interest or 'group name'.
|
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
51
|
|
122
52
|
# Delete interest in category
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
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)
|
53
|
+
def delete_interest_category_interest(list_id, interest_category_id, interest_id, opts = {})
|
54
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
55
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
56
|
+
fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil?
|
132
57
|
|
133
|
-
# query parameters
|
134
58
|
query_params = {}
|
135
|
-
|
136
|
-
# header parameters
|
137
|
-
header_params = {}
|
138
|
-
# HTTP header 'Accept' (if needed)
|
139
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
140
|
-
# HTTP header 'Content-Type'
|
141
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
142
|
-
|
143
|
-
# form parameters
|
144
|
-
form_params = {}
|
145
|
-
|
146
|
-
# http body (model)
|
147
59
|
post_body = nil
|
148
|
-
|
60
|
+
|
61
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s)
|
149
62
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
150
|
-
:header_params => header_params,
|
151
63
|
:query_params => query_params,
|
152
|
-
:
|
153
|
-
:body => post_body,
|
154
|
-
:auth_names => auth_names)
|
64
|
+
:body => post_body)
|
155
65
|
return data, status_code, headers
|
156
66
|
end
|
157
|
-
# Archive list member
|
158
|
-
# Archive a list member. To permanently delete, use the delete-permanent action.
|
159
|
-
# @param list_id The unique ID for the list.
|
160
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
67
|
|
168
68
|
# Archive list member
|
169
|
-
|
170
|
-
|
171
|
-
|
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)
|
69
|
+
def delete_list_member(list_id, subscriber_hash, opts = {})
|
70
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
71
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
177
72
|
|
178
|
-
# query parameters
|
179
73
|
query_params = {}
|
180
|
-
|
181
|
-
# header parameters
|
182
|
-
header_params = {}
|
183
|
-
# HTTP header 'Accept' (if needed)
|
184
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
185
|
-
# HTTP header 'Content-Type'
|
186
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
187
|
-
|
188
|
-
# form parameters
|
189
|
-
form_params = {}
|
190
|
-
|
191
|
-
# http body (model)
|
192
74
|
post_body = nil
|
193
|
-
|
75
|
+
|
76
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
194
77
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
195
|
-
:header_params => header_params,
|
196
78
|
:query_params => query_params,
|
197
|
-
:
|
198
|
-
:body => post_body,
|
199
|
-
:auth_names => auth_names)
|
79
|
+
:body => post_body)
|
200
80
|
return data, status_code, headers
|
201
81
|
end
|
202
|
-
# Delete 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'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
82
|
|
214
83
|
# Delete note
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
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)
|
84
|
+
def delete_list_member_note(list_id, subscriber_hash, note_id, opts = {})
|
85
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
86
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
87
|
+
fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil?
|
224
88
|
|
225
|
-
# query parameters
|
226
89
|
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
90
|
post_body = nil
|
240
|
-
|
91
|
+
|
92
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s)
|
241
93
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
242
|
-
:header_params => header_params,
|
243
94
|
:query_params => query_params,
|
244
|
-
:
|
245
|
-
:body => post_body,
|
246
|
-
:auth_names => auth_names)
|
95
|
+
:body => post_body)
|
247
96
|
return data, status_code, headers
|
248
97
|
end
|
249
|
-
# Delete merge field
|
250
|
-
# Delete a specific merge field in a list.
|
251
|
-
# @param list_id The unique ID for the list.
|
252
|
-
# @param merge_id The id for the merge field.
|
253
|
-
# @param [Hash] opts the optional parameters
|
254
|
-
# @return [nil]
|
255
|
-
def delete_list_merge_field(list_id = {}, merge_id = {}, opts = {})
|
256
|
-
delete_list_merge_field_with_http_info(list_id, merge_id, opts)
|
257
|
-
nil
|
258
|
-
end
|
259
98
|
|
260
99
|
# Delete merge field
|
261
|
-
|
262
|
-
|
263
|
-
|
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)
|
100
|
+
def delete_list_merge_field(list_id, merge_id, opts = {})
|
101
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
102
|
+
fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil?
|
269
103
|
|
270
|
-
# query parameters
|
271
104
|
query_params = {}
|
272
|
-
|
273
|
-
# header parameters
|
274
|
-
header_params = {}
|
275
|
-
# HTTP header 'Accept' (if needed)
|
276
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
277
|
-
# HTTP header 'Content-Type'
|
278
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
279
|
-
|
280
|
-
# form parameters
|
281
|
-
form_params = {}
|
282
|
-
|
283
|
-
# http body (model)
|
284
105
|
post_body = nil
|
285
|
-
|
106
|
+
|
107
|
+
local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
|
286
108
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
287
|
-
:header_params => header_params,
|
288
109
|
:query_params => query_params,
|
289
|
-
:
|
290
|
-
:body => post_body,
|
291
|
-
:auth_names => auth_names)
|
110
|
+
:body => post_body)
|
292
111
|
return data, status_code, headers
|
293
112
|
end
|
294
|
-
# Delete 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
113
|
|
305
114
|
# Delete segment
|
306
|
-
|
307
|
-
|
308
|
-
|
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)
|
115
|
+
def delete_segment(list_id, segment_id, opts = {})
|
116
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
117
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
314
118
|
|
315
|
-
# query parameters
|
316
119
|
query_params = {}
|
317
|
-
|
318
|
-
# header parameters
|
319
|
-
header_params = {}
|
320
|
-
# HTTP header 'Accept' (if needed)
|
321
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
322
|
-
# HTTP header 'Content-Type'
|
323
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
324
|
-
|
325
|
-
# form parameters
|
326
|
-
form_params = {}
|
327
|
-
|
328
|
-
# http body (model)
|
329
120
|
post_body = nil
|
330
|
-
|
121
|
+
|
122
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
331
123
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
332
|
-
:header_params => header_params,
|
333
124
|
:query_params => query_params,
|
334
|
-
:
|
335
|
-
:body => post_body,
|
336
|
-
:auth_names => auth_names)
|
125
|
+
:body => post_body)
|
337
126
|
return data, status_code, headers
|
338
127
|
end
|
339
|
-
# Remove list member from segment
|
340
|
-
# Remove a member from the specified static segment.
|
341
|
-
# @param list_id The unique ID for the list.
|
342
|
-
# @param segment_id The unique id for the segment.
|
343
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
128
|
|
351
129
|
# Remove list member from segment
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
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)
|
130
|
+
def remove_segment_member(list_id, segment_id, subscriber_hash, opts = {})
|
131
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
132
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
133
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
361
134
|
|
362
|
-
# query parameters
|
363
135
|
query_params = {}
|
364
|
-
|
365
|
-
# header parameters
|
366
|
-
header_params = {}
|
367
|
-
# HTTP header 'Accept' (if needed)
|
368
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
369
|
-
# HTTP header 'Content-Type'
|
370
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
371
|
-
|
372
|
-
# form parameters
|
373
|
-
form_params = {}
|
374
|
-
|
375
|
-
# http body (model)
|
376
136
|
post_body = nil
|
377
|
-
|
137
|
+
|
138
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
378
139
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
379
|
-
:header_params => header_params,
|
380
140
|
:query_params => query_params,
|
381
|
-
:
|
382
|
-
:body => post_body,
|
383
|
-
:auth_names => auth_names)
|
141
|
+
:body => post_body)
|
384
142
|
return data, status_code, headers
|
385
143
|
end
|
386
|
-
# Delete 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'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
144
|
|
397
145
|
# Delete webhook
|
398
|
-
|
399
|
-
|
400
|
-
|
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)
|
146
|
+
def delete_list_webhook(list_id, webhook_id, opts = {})
|
147
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
148
|
+
fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil?
|
406
149
|
|
407
|
-
# query parameters
|
408
150
|
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
151
|
post_body = nil
|
422
|
-
|
152
|
+
|
153
|
+
local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
|
423
154
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
424
|
-
:header_params => header_params,
|
425
155
|
:query_params => query_params,
|
426
|
-
:
|
427
|
-
:body => post_body,
|
428
|
-
:auth_names => auth_names)
|
156
|
+
:body => post_body)
|
429
157
|
return data, status_code, headers
|
430
158
|
end
|
431
|
-
# List member tags
|
432
|
-
# Get the tags on a list member.
|
433
|
-
# @param list_id The unique ID for the list.
|
434
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
159
|
|
446
160
|
# List member tags
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
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)
|
161
|
+
def get_list_member_tags(list_id, subscriber_hash, opts = {})
|
162
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
163
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
164
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
459
165
|
|
460
|
-
# query parameters
|
461
166
|
query_params = {}
|
462
167
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
463
168
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
464
169
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
465
170
|
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
171
|
post_body = nil
|
479
|
-
|
172
|
+
|
173
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/tags'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
480
174
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
481
|
-
:header_params => header_params,
|
482
175
|
:query_params => query_params,
|
483
|
-
:
|
484
|
-
:body => post_body,
|
485
|
-
:auth_names => auth_names,
|
486
|
-
:return_type => 'CollectionOfTags')
|
176
|
+
:body => post_body)
|
487
177
|
return data, status_code, headers
|
488
178
|
end
|
489
|
-
# Get lists info
|
490
|
-
# Get information about all lists in the account.
|
491
|
-
# @param [Hash] opts the optional parameters
|
492
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
493
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
494
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
495
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
496
|
-
# @option opts [String] :before_date_created Restrict response to lists created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
497
|
-
# @option opts [String] :since_date_created Restrict results to lists created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
498
|
-
# @option opts [String] :before_campaign_last_sent Restrict results to lists created before the last campaign send date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
499
|
-
# @option opts [String] :since_campaign_last_sent Restrict results to lists created after the last campaign send date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
500
|
-
# @option opts [String] :email Restrict results to lists that include a specific subscriber'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
179
|
|
509
180
|
# Get lists info
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
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'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'
|
181
|
+
def get_all_lists(opts = {})
|
182
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
183
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of date_created' if opts[:'sort_field'] && !['date_created'].include?(opts[:'sort_field'])
|
184
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
527
185
|
|
528
|
-
# query parameters
|
529
186
|
query_params = {}
|
530
187
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
531
188
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
@@ -538,375 +195,126 @@ module MailchimpMarketing
|
|
538
195
|
query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
|
539
196
|
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
540
197
|
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
198
|
post_body = nil
|
554
|
-
|
199
|
+
|
200
|
+
local_var_path = '/lists'
|
555
201
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
556
|
-
:header_params => header_params,
|
557
202
|
:query_params => query_params,
|
558
|
-
:
|
559
|
-
:body => post_body,
|
560
|
-
:auth_names => auth_names,
|
561
|
-
:return_type => 'SubscriberLists')
|
203
|
+
:body => post_body)
|
562
204
|
return data, status_code, headers
|
563
205
|
end
|
564
|
-
# Get list info
|
565
|
-
# Get information about a specific list in your Mailchimp account. Results include list members who have signed up but haven't confirmed their subscription yet and unsubscribed or cleaned.
|
566
|
-
# @param list_id The unique ID for the list.
|
567
|
-
# @param [Hash] opts the optional parameters
|
568
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
569
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
570
|
-
# @return [SubscriberList]
|
571
|
-
def get_list(list_id = {}, opts = {})
|
572
|
-
data, _status_code, _headers = get_list_with_http_info(list_id, opts)
|
573
|
-
data
|
574
|
-
end
|
575
206
|
|
576
207
|
# Get list info
|
577
|
-
|
578
|
-
|
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)
|
208
|
+
def get_list(list_id, opts = {})
|
209
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
586
210
|
|
587
|
-
# query parameters
|
588
211
|
query_params = {}
|
589
212
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
590
213
|
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
214
|
post_body = nil
|
604
|
-
|
215
|
+
|
216
|
+
local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
|
605
217
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
606
|
-
:header_params => header_params,
|
607
218
|
:query_params => query_params,
|
608
|
-
:
|
609
|
-
:body => post_body,
|
610
|
-
:auth_names => auth_names,
|
611
|
-
:return_type => 'SubscriberList')
|
219
|
+
:body => post_body)
|
612
220
|
return data, status_code, headers
|
613
221
|
end
|
614
|
-
# List abuse reports
|
615
|
-
# Get all abuse reports for a specific list.
|
616
|
-
# @param list_id The unique ID for the list.
|
617
|
-
# @param [Hash] opts the optional parameters
|
618
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
619
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
620
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
621
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
622
|
-
# @return [AbuseComplaints]
|
623
|
-
def get_list_abuse_reports(list_id = {}, opts = {})
|
624
|
-
data, _status_code, _headers = get_list_abuse_reports_with_http_info(list_id, opts)
|
625
|
-
data
|
626
|
-
end
|
627
222
|
|
628
223
|
# List abuse reports
|
629
|
-
|
630
|
-
|
631
|
-
|
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)
|
224
|
+
def get_list_abuse_reports(list_id, opts = {})
|
225
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
226
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
640
227
|
|
641
|
-
# query parameters
|
642
228
|
query_params = {}
|
643
229
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
644
230
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
645
231
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
646
232
|
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
233
|
post_body = nil
|
660
|
-
|
234
|
+
|
235
|
+
local_var_path = '/lists/{list_id}/abuse-reports'.sub('{' + 'list_id' + '}', list_id.to_s)
|
661
236
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
662
|
-
:header_params => header_params,
|
663
237
|
:query_params => query_params,
|
664
|
-
:
|
665
|
-
:body => post_body,
|
666
|
-
:auth_names => auth_names,
|
667
|
-
:return_type => 'AbuseComplaints')
|
238
|
+
:body => post_body)
|
668
239
|
return data, status_code, headers
|
669
240
|
end
|
670
|
-
# Get abuse report
|
671
|
-
# Get details about a specific abuse report.
|
672
|
-
# @param list_id The unique ID for the list.
|
673
|
-
# @param report_id The id for the abuse report.
|
674
|
-
# @param [Hash] opts the optional parameters
|
675
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
676
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
677
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
678
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
679
|
-
# @return [AbuseComplaint]
|
680
|
-
def get_list_abuse_report_details(list_id = {}, report_id = {}, opts = {})
|
681
|
-
data, _status_code, _headers = get_list_abuse_report_details_with_http_info(list_id, report_id, opts)
|
682
|
-
data
|
683
|
-
end
|
684
241
|
|
685
242
|
# Get abuse report
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
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)
|
243
|
+
def get_list_abuse_report_details(list_id, report_id, opts = {})
|
244
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
245
|
+
fail ArgumentError, "Missing required param: 'report_id'" if report_id.nil?
|
246
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
698
247
|
|
699
|
-
# query parameters
|
700
248
|
query_params = {}
|
701
249
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
702
250
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
703
251
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
704
252
|
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
253
|
post_body = nil
|
718
|
-
|
254
|
+
|
255
|
+
local_var_path = '/lists/{list_id}/abuse-reports/{report_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'report_id' + '}', report_id.to_s)
|
719
256
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
720
|
-
:header_params => header_params,
|
721
257
|
:query_params => query_params,
|
722
|
-
:
|
723
|
-
:body => post_body,
|
724
|
-
:auth_names => auth_names,
|
725
|
-
:return_type => 'AbuseComplaint')
|
258
|
+
:body => post_body)
|
726
259
|
return data, status_code, headers
|
727
260
|
end
|
728
|
-
# List recent activity
|
729
|
-
# Get up to the previous 180 days of daily detailed aggregated activity stats for a list, not including Automation activity.
|
730
|
-
# @param list_id The unique ID for the list.
|
731
|
-
# @param [Hash] opts the optional parameters
|
732
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
733
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
734
|
-
# @return [ListActivity]
|
735
|
-
def get_list_recent_activity(list_id = {}, opts = {})
|
736
|
-
data, _status_code, _headers = get_list_recent_activity_with_http_info(list_id, opts)
|
737
|
-
data
|
738
|
-
end
|
739
261
|
|
740
262
|
# List recent activity
|
741
|
-
|
742
|
-
|
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)
|
263
|
+
def get_list_recent_activity(list_id, opts = {})
|
264
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
750
265
|
|
751
|
-
# query parameters
|
752
266
|
query_params = {}
|
753
267
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
754
268
|
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
269
|
post_body = nil
|
768
|
-
|
270
|
+
|
271
|
+
local_var_path = '/lists/{list_id}/activity'.sub('{' + 'list_id' + '}', list_id.to_s)
|
769
272
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
770
|
-
:header_params => header_params,
|
771
273
|
:query_params => query_params,
|
772
|
-
:
|
773
|
-
:body => post_body,
|
774
|
-
:auth_names => auth_names,
|
775
|
-
:return_type => 'ListActivity')
|
274
|
+
:body => post_body)
|
776
275
|
return data, status_code, headers
|
777
276
|
end
|
778
|
-
# List top email clients
|
779
|
-
# Get a list of the top email clients based on user-agent strings.
|
780
|
-
# @param list_id The unique ID for the list.
|
781
|
-
# @param [Hash] opts the optional parameters
|
782
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
783
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
784
|
-
# @return [EmailClients]
|
785
|
-
def get_list_clients(list_id = {}, opts = {})
|
786
|
-
data, _status_code, _headers = get_list_clients_with_http_info(list_id, opts)
|
787
|
-
data
|
788
|
-
end
|
789
277
|
|
790
278
|
# List top email clients
|
791
|
-
|
792
|
-
|
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)
|
279
|
+
def get_list_clients(list_id, opts = {})
|
280
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
800
281
|
|
801
|
-
# query parameters
|
802
282
|
query_params = {}
|
803
283
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
804
284
|
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
285
|
post_body = nil
|
818
|
-
|
286
|
+
|
287
|
+
local_var_path = '/lists/{list_id}/clients'.sub('{' + 'list_id' + '}', list_id.to_s)
|
819
288
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
820
|
-
:header_params => header_params,
|
821
289
|
:query_params => query_params,
|
822
|
-
:
|
823
|
-
:body => post_body,
|
824
|
-
:auth_names => auth_names,
|
825
|
-
:return_type => 'EmailClients')
|
290
|
+
:body => post_body)
|
826
291
|
return data, status_code, headers
|
827
292
|
end
|
828
|
-
# List external i ds
|
829
|
-
# Get external identifiers created for a Mailchimp list.
|
830
|
-
# @param list_id The unique ID for the list.
|
831
|
-
# @param [Hash] opts the optional parameters
|
832
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
833
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
834
|
-
# @return [CollectionOfExternalIdentifiers]
|
835
|
-
def get_list_external_ids(list_id = {}, opts = {})
|
836
|
-
data, _status_code, _headers = get_list_external_ids_with_http_info(list_id, opts)
|
837
|
-
data
|
838
|
-
end
|
839
293
|
|
840
294
|
# List external i ds
|
841
|
-
|
842
|
-
|
843
|
-
|
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)
|
295
|
+
def get_list_external_ids(list_id, opts = {})
|
296
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
297
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
850
298
|
|
851
|
-
# query parameters
|
852
299
|
query_params = {}
|
853
300
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
854
301
|
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
302
|
post_body = nil
|
868
|
-
|
303
|
+
|
304
|
+
local_var_path = '/lists/{list_id}/external-ids'.sub('{' + 'list_id' + '}', list_id.to_s)
|
869
305
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
870
|
-
:header_params => header_params,
|
871
306
|
:query_params => query_params,
|
872
|
-
:
|
873
|
-
:body => post_body,
|
874
|
-
:auth_names => auth_names,
|
875
|
-
:return_type => 'CollectionOfExternalIdentifiers')
|
307
|
+
:body => post_body)
|
876
308
|
return data, status_code, headers
|
877
309
|
end
|
878
|
-
# List growth history data
|
879
|
-
# Get a month-by-month summary of a specific list's growth activity.
|
880
|
-
# @param list_id The unique ID for the list.
|
881
|
-
# @param [Hash] opts the optional parameters
|
882
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
883
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
884
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
885
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
886
|
-
# @option opts [String] :sort_field Returns files sorted by the specified field.
|
887
|
-
# @option opts [String] :sort_dir Determines the order direction for sorted results.
|
888
|
-
# @return [GrowthHistory]
|
889
|
-
def get_list_growth_history(list_id = {}, opts = {})
|
890
|
-
data, _status_code, _headers = get_list_growth_history_with_http_info(list_id, opts)
|
891
|
-
data
|
892
|
-
end
|
893
310
|
|
894
311
|
# List growth history data
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
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)
|
312
|
+
def get_list_growth_history(list_id, opts = {})
|
313
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
314
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
315
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of month' if opts[:'sort_field'] && !['month'].include?(opts[:'sort_field'])
|
316
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
908
317
|
|
909
|
-
# query parameters
|
910
318
|
query_params = {}
|
911
319
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
912
320
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
@@ -914,412 +322,132 @@ module MailchimpMarketing
|
|
914
322
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
915
323
|
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
916
324
|
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
325
|
post_body = nil
|
930
|
-
|
326
|
+
|
327
|
+
local_var_path = '/lists/{list_id}/growth-history'.sub('{' + 'list_id' + '}', list_id.to_s)
|
931
328
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
932
|
-
:header_params => header_params,
|
933
329
|
:query_params => query_params,
|
934
|
-
:
|
935
|
-
:body => post_body,
|
936
|
-
:auth_names => auth_names,
|
937
|
-
:return_type => 'GrowthHistory')
|
330
|
+
:body => post_body)
|
938
331
|
return data, status_code, headers
|
939
332
|
end
|
940
|
-
# Get growth history by month
|
941
|
-
# Get a summary of a specific list's growth activity for a specific month and year.
|
942
|
-
# @param list_id The unique ID for the list.
|
943
|
-
# @param month A specific month of list growth history.
|
944
|
-
# @param [Hash] opts the optional parameters
|
945
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
946
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
947
|
-
# @return [GrowthHistory]
|
948
|
-
def get_list_growth_history_by_month(list_id = {}, month = {}, opts = {})
|
949
|
-
data, _status_code, _headers = get_list_growth_history_by_month_with_http_info(list_id, month, opts)
|
950
|
-
data
|
951
|
-
end
|
952
333
|
|
953
334
|
# Get growth history by month
|
954
|
-
|
955
|
-
|
956
|
-
|
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)
|
335
|
+
def get_list_growth_history_by_month(list_id, month, opts = {})
|
336
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
337
|
+
fail ArgumentError, "Missing required param: 'month'" if month.nil?
|
964
338
|
|
965
|
-
# query parameters
|
966
339
|
query_params = {}
|
967
340
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
968
341
|
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
342
|
post_body = nil
|
982
|
-
|
343
|
+
|
344
|
+
local_var_path = '/lists/{list_id}/growth-history/{month}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'month' + '}', month.to_s)
|
983
345
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
984
|
-
:header_params => header_params,
|
985
346
|
:query_params => query_params,
|
986
|
-
:
|
987
|
-
:body => post_body,
|
988
|
-
:auth_names => auth_names,
|
989
|
-
:return_type => 'GrowthHistory')
|
347
|
+
:body => post_body)
|
990
348
|
return data, status_code, headers
|
991
349
|
end
|
992
|
-
# List interest categories
|
993
|
-
# Get information about a list's interest categories.
|
994
|
-
# @param list_id The unique ID for the list.
|
995
|
-
# @param [Hash] opts the optional parameters
|
996
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
997
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
998
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
999
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
1000
|
-
# @option opts [String] :type Restrict results a type of interest group
|
1001
|
-
# @return [InterestGroupings]
|
1002
|
-
def get_list_interest_categories(list_id = {}, opts = {})
|
1003
|
-
data, _status_code, _headers = get_list_interest_categories_with_http_info(list_id, opts)
|
1004
|
-
data
|
1005
|
-
end
|
1006
350
|
|
1007
351
|
# List interest categories
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
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)
|
352
|
+
def get_list_interest_categories(list_id, opts = {})
|
353
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
354
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
1020
355
|
|
1021
|
-
# query parameters
|
1022
356
|
query_params = {}
|
1023
357
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1024
358
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
1025
359
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
1026
360
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
1027
361
|
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
362
|
post_body = nil
|
1041
|
-
|
363
|
+
|
364
|
+
local_var_path = '/lists/{list_id}/interest-categories'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1042
365
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1043
|
-
:header_params => header_params,
|
1044
366
|
:query_params => query_params,
|
1045
|
-
:
|
1046
|
-
:body => post_body,
|
1047
|
-
:auth_names => auth_names,
|
1048
|
-
:return_type => 'InterestGroupings')
|
367
|
+
:body => post_body)
|
1049
368
|
return data, status_code, headers
|
1050
369
|
end
|
1051
|
-
# Get interest category info
|
1052
|
-
# Get information about a specific interest category.
|
1053
|
-
# @param list_id The unique ID for the list.
|
1054
|
-
# @param interest_category_id The unique ID for the interest category.
|
1055
|
-
# @param [Hash] opts the optional parameters
|
1056
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
1057
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
1058
|
-
# @return [InterestCategory]
|
1059
|
-
def get_interest_category(list_id = {}, interest_category_id = {}, opts = {})
|
1060
|
-
data, _status_code, _headers = get_interest_category_with_http_info(list_id, interest_category_id, opts)
|
1061
|
-
data
|
1062
|
-
end
|
1063
370
|
|
1064
371
|
# Get interest category info
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
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)
|
372
|
+
def get_interest_category(list_id, interest_category_id, opts = {})
|
373
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
374
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
1075
375
|
|
1076
|
-
# query parameters
|
1077
376
|
query_params = {}
|
1078
377
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1079
378
|
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
379
|
post_body = nil
|
1093
|
-
|
380
|
+
|
381
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
|
1094
382
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1095
|
-
:header_params => header_params,
|
1096
383
|
:query_params => query_params,
|
1097
|
-
:
|
1098
|
-
:body => post_body,
|
1099
|
-
:auth_names => auth_names,
|
1100
|
-
:return_type => 'InterestCategory')
|
384
|
+
:body => post_body)
|
1101
385
|
return data, status_code, headers
|
1102
386
|
end
|
1103
|
-
# List interests in category
|
1104
|
-
# Get a list of this category's interests.
|
1105
|
-
# @param list_id The unique ID for the list.
|
1106
|
-
# @param interest_category_id The unique ID for the interest category.
|
1107
|
-
# @param [Hash] opts the optional parameters
|
1108
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
1109
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
1110
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
1111
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
1112
|
-
# @return [Interests]
|
1113
|
-
def list_interest_category_interests(list_id = {}, interest_category_id = {}, opts = {})
|
1114
|
-
data, _status_code, _headers = list_interest_category_interests_with_http_info(list_id, interest_category_id, opts)
|
1115
|
-
data
|
1116
|
-
end
|
1117
387
|
|
1118
388
|
# List interests in category
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
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)
|
389
|
+
def list_interest_category_interests(list_id, interest_category_id, opts = {})
|
390
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
391
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
392
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
1131
393
|
|
1132
|
-
# query parameters
|
1133
394
|
query_params = {}
|
1134
395
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1135
396
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
1136
397
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
1137
398
|
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
399
|
post_body = nil
|
1151
|
-
|
400
|
+
|
401
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
|
1152
402
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1153
|
-
:header_params => header_params,
|
1154
403
|
:query_params => query_params,
|
1155
|
-
:
|
1156
|
-
:body => post_body,
|
1157
|
-
:auth_names => auth_names,
|
1158
|
-
:return_type => 'Interests')
|
404
|
+
:body => post_body)
|
1159
405
|
return data, status_code, headers
|
1160
406
|
end
|
1161
|
-
# Get interest in category
|
1162
|
-
# Get interests or 'group names' for a specific category.
|
1163
|
-
# @param list_id The unique ID for the list.
|
1164
|
-
# @param interest_category_id The unique ID for the interest category.
|
1165
|
-
# @param interest_id The specific interest or 'group name'.
|
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
407
|
|
1175
408
|
# Get interest in category
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
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)
|
409
|
+
def get_interest_category_interest(list_id, interest_category_id, interest_id, opts = {})
|
410
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
411
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
412
|
+
fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil?
|
1187
413
|
|
1188
|
-
# query parameters
|
1189
414
|
query_params = {}
|
1190
415
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1191
416
|
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
417
|
post_body = nil
|
1205
|
-
|
418
|
+
|
419
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s)
|
1206
420
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1207
|
-
:header_params => header_params,
|
1208
421
|
:query_params => query_params,
|
1209
|
-
:
|
1210
|
-
:body => post_body,
|
1211
|
-
:auth_names => auth_names,
|
1212
|
-
:return_type => 'Interest')
|
422
|
+
:body => post_body)
|
1213
423
|
return data, status_code, headers
|
1214
424
|
end
|
1215
|
-
# List locations
|
1216
|
-
# Get the locations (countries) that the list's subscribers have been tagged to based on geocoding their IP address.
|
1217
|
-
# @param list_id The unique ID for the list.
|
1218
|
-
# @param [Hash] opts the optional parameters
|
1219
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
1220
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
1221
|
-
# @return [ListLocations]
|
1222
|
-
def get_list_locations(list_id = {}, opts = {})
|
1223
|
-
data, _status_code, _headers = get_list_locations_with_http_info(list_id, opts)
|
1224
|
-
data
|
1225
|
-
end
|
1226
425
|
|
1227
426
|
# List locations
|
1228
|
-
|
1229
|
-
|
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)
|
427
|
+
def get_list_locations(list_id, opts = {})
|
428
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1237
429
|
|
1238
|
-
# query parameters
|
1239
430
|
query_params = {}
|
1240
431
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1241
432
|
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
433
|
post_body = nil
|
1255
|
-
|
434
|
+
|
435
|
+
local_var_path = '/lists/{list_id}/locations'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1256
436
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1257
|
-
:header_params => header_params,
|
1258
437
|
:query_params => query_params,
|
1259
|
-
:
|
1260
|
-
:body => post_body,
|
1261
|
-
:auth_names => auth_names,
|
1262
|
-
:return_type => 'ListLocations')
|
438
|
+
:body => post_body)
|
1263
439
|
return data, status_code, headers
|
1264
440
|
end
|
1265
|
-
# List members info
|
1266
|
-
# Get information about members in a specific Mailchimp list.
|
1267
|
-
# @param list_id The unique ID for the list.
|
1268
|
-
# @param [Hash] opts the optional parameters
|
1269
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
1270
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
1271
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
1272
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
1273
|
-
# @option opts [String] :email_type The email type.
|
1274
|
-
# @option opts [String] :status The subscriber'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's VIP members. Passing `true` will restrict results to VIP list members, passing `false` 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. \"any\" will match a member with any of the interest supplied, \"all\" will only match members with every interest supplied, and \"none\" 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
441
|
|
1294
442
|
# List members info
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
# @option opts [String] :email_type The email type.
|
1303
|
-
# @option opts [String] :status The subscriber'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's VIP members. Passing `true` will restrict results to VIP list members, passing `false` 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. \"any\" will match a member with any of the interest supplied, \"all\" will only match members with every interest supplied, and \"none\" 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)
|
443
|
+
def get_list_members_info(list_id, opts = {})
|
444
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
445
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
446
|
+
fail ArgumentError, 'invalid value for "status", must be one of subscribed, unsubscribed, cleaned, pending, transactional, archived' if opts[:'status'] && !['subscribed', 'unsubscribed', 'cleaned', 'pending', 'transactional', 'archived'].include?(opts[:'status'])
|
447
|
+
fail ArgumentError, 'invalid value for "interest_match", must be one of any, all, none' if opts[:'interest_match'] && !['any', 'all', 'none'].include?(opts[:'interest_match'])
|
448
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of timestamp_opt, timestamp_signup, last_changed' if opts[:'sort_field'] && !['timestamp_opt', 'timestamp_signup', 'last_changed'].include?(opts[:'sort_field'])
|
449
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
1321
450
|
|
1322
|
-
# query parameters
|
1323
451
|
query_params = {}
|
1324
452
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1325
453
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
@@ -1340,341 +468,116 @@ module MailchimpMarketing
|
|
1340
468
|
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
1341
469
|
query_params[:'since_last_campaign'] = opts[:'since_last_campaign'] if !opts[:'since_last_campaign'].nil?
|
1342
470
|
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
471
|
post_body = nil
|
1356
|
-
|
472
|
+
|
473
|
+
local_var_path = '/lists/{list_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1357
474
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1358
|
-
:header_params => header_params,
|
1359
475
|
:query_params => query_params,
|
1360
|
-
:
|
1361
|
-
:body => post_body,
|
1362
|
-
:auth_names => auth_names,
|
1363
|
-
:return_type => 'ListMembers2')
|
476
|
+
:body => post_body)
|
1364
477
|
return data, status_code, headers
|
1365
478
|
end
|
1366
|
-
# Get member info
|
1367
|
-
# Get information about a specific list member, including a currently subscribed, unsubscribed, or bounced member.
|
1368
|
-
# @param list_id The unique ID for the list.
|
1369
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
479
|
|
1379
480
|
# Get member info
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
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)
|
481
|
+
def get_list_member(list_id, subscriber_hash, opts = {})
|
482
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
483
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
1390
484
|
|
1391
|
-
# query parameters
|
1392
485
|
query_params = {}
|
1393
486
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1394
487
|
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
488
|
post_body = nil
|
1408
|
-
|
489
|
+
|
490
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
1409
491
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1410
|
-
:header_params => header_params,
|
1411
492
|
:query_params => query_params,
|
1412
|
-
:
|
1413
|
-
:body => post_body,
|
1414
|
-
:auth_names => auth_names,
|
1415
|
-
:return_type => 'ListMembers2')
|
493
|
+
:body => post_body)
|
1416
494
|
return data, status_code, headers
|
1417
495
|
end
|
1418
|
-
# View recent activity 50
|
1419
|
-
# Get the last 50 events of a member's activity on a specific list, including opens, clicks, and unsubscribes.
|
1420
|
-
# @param list_id The unique ID for the list.
|
1421
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
496
|
|
1432
497
|
# View recent activity 50
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
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)
|
498
|
+
def get_list_member_activity(list_id, subscriber_hash, opts = {})
|
499
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
500
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
1444
501
|
|
1445
|
-
# query parameters
|
1446
502
|
query_params = {}
|
1447
503
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1448
504
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
1449
505
|
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
506
|
post_body = nil
|
1463
|
-
|
507
|
+
|
508
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/activity'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
1464
509
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1465
|
-
:header_params => header_params,
|
1466
510
|
:query_params => query_params,
|
1467
|
-
:
|
1468
|
-
:body => post_body,
|
1469
|
-
:auth_names => auth_names,
|
1470
|
-
:return_type => 'MemberActivityEvents')
|
511
|
+
:body => post_body)
|
1471
512
|
return data, status_code, headers
|
1472
513
|
end
|
1473
|
-
# View recent activity 10
|
1474
|
-
# Get the last 10 events of a member's activity on a specific list, including opens, clicks, and unsubscribes.
|
1475
|
-
# @param list_id The unique ID for the list.
|
1476
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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 \"?activity_filters=open,bounce,click\".
|
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
514
|
|
1489
515
|
# View recent activity 10
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
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 \"?activity_filters=open,bounce,click\".
|
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)
|
516
|
+
def get_list_member_activity_feed(list_id, subscriber_hash, opts = {})
|
517
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
518
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
519
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
1503
520
|
|
1504
|
-
# query parameters
|
1505
521
|
query_params = {}
|
1506
522
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1507
523
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
1508
524
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
1509
525
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
1510
526
|
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
527
|
post_body = nil
|
1524
|
-
|
528
|
+
|
529
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/activity-feed'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
1525
530
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1526
|
-
:header_params => header_params,
|
1527
531
|
:query_params => query_params,
|
1528
|
-
:
|
1529
|
-
:body => post_body,
|
1530
|
-
:auth_names => auth_names,
|
1531
|
-
:return_type => 'MemberActivityEvents1')
|
532
|
+
:body => post_body)
|
1532
533
|
return data, status_code, headers
|
1533
534
|
end
|
1534
|
-
# List member events
|
1535
|
-
# Get events for a contact.
|
1536
|
-
# @param list_id The unique ID for the list.
|
1537
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
535
|
|
1549
536
|
# List member events
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
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)
|
537
|
+
def get_list_member_events(list_id, subscriber_hash, opts = {})
|
538
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
539
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
540
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
1562
541
|
|
1563
|
-
# query parameters
|
1564
542
|
query_params = {}
|
1565
543
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
1566
544
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
1567
545
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1568
546
|
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
547
|
post_body = nil
|
1582
|
-
|
548
|
+
|
549
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/events'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
1583
550
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1584
|
-
:header_params => header_params,
|
1585
551
|
:query_params => query_params,
|
1586
|
-
:
|
1587
|
-
:body => post_body,
|
1588
|
-
:auth_names => auth_names,
|
1589
|
-
:return_type => 'CollectionOfEvents')
|
552
|
+
:body => post_body)
|
1590
553
|
return data, status_code, headers
|
1591
554
|
end
|
1592
|
-
# List member goal events
|
1593
|
-
# Get the last 50 Goal events for a member on a specific list.
|
1594
|
-
# @param list_id The unique ID for the list.
|
1595
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
555
|
|
1605
556
|
# List member goal events
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
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)
|
557
|
+
def getListMemberGoals(list_id, subscriber_hash, opts = {})
|
558
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
559
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
1616
560
|
|
1617
|
-
# query parameters
|
1618
561
|
query_params = {}
|
1619
562
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1620
563
|
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
564
|
post_body = nil
|
1634
|
-
|
565
|
+
|
566
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/goals'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
1635
567
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1636
|
-
:header_params => header_params,
|
1637
568
|
:query_params => query_params,
|
1638
|
-
:
|
1639
|
-
:body => post_body,
|
1640
|
-
:auth_names => auth_names,
|
1641
|
-
:return_type => 'CollectionOfMemberActivityEvents')
|
569
|
+
:body => post_body)
|
1642
570
|
return data, status_code, headers
|
1643
571
|
end
|
1644
|
-
# List recent member notes
|
1645
|
-
# Get recent notes for a specific list member.
|
1646
|
-
# @param list_id The unique ID for the list.
|
1647
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
572
|
|
1661
573
|
# List recent member notes
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
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)
|
574
|
+
def get_list_member_notes(list_id, subscriber_hash, opts = {})
|
575
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
576
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
577
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of created_at, updated_at, note_id' if opts[:'sort_field'] && !['created_at', 'updated_at', 'note_id'].include?(opts[:'sort_field'])
|
578
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
579
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
1676
580
|
|
1677
|
-
# query parameters
|
1678
581
|
query_params = {}
|
1679
582
|
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
1680
583
|
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
@@ -1682,115 +585,38 @@ module MailchimpMarketing
|
|
1682
585
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
1683
586
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
1684
587
|
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
588
|
post_body = nil
|
1698
|
-
|
589
|
+
|
590
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
1699
591
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1700
|
-
:header_params => header_params,
|
1701
592
|
:query_params => query_params,
|
1702
|
-
:
|
1703
|
-
:body => post_body,
|
1704
|
-
:auth_names => auth_names,
|
1705
|
-
:return_type => 'CollectionOfNotes')
|
593
|
+
:body => post_body)
|
1706
594
|
return data, status_code, headers
|
1707
595
|
end
|
1708
|
-
# Get member note
|
1709
|
-
# Get a specific note for a specific list member.
|
1710
|
-
# @param list_id The unique ID for the list.
|
1711
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
596
|
|
1722
597
|
# Get member note
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
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)
|
598
|
+
def get_list_member_note(list_id, subscriber_hash, note_id, opts = {})
|
599
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
600
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
601
|
+
fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil?
|
1734
602
|
|
1735
|
-
# query parameters
|
1736
603
|
query_params = {}
|
1737
604
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1738
605
|
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
606
|
post_body = nil
|
1752
|
-
|
607
|
+
|
608
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s)
|
1753
609
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1754
|
-
:header_params => header_params,
|
1755
610
|
:query_params => query_params,
|
1756
|
-
:
|
1757
|
-
:body => post_body,
|
1758
|
-
:auth_names => auth_names,
|
1759
|
-
:return_type => 'MemberNotes')
|
611
|
+
:body => post_body)
|
1760
612
|
return data, status_code, headers
|
1761
613
|
end
|
1762
|
-
# List merge fields
|
1763
|
-
# Get a list of all merge fields (formerly merge vars) for a list.
|
1764
|
-
# @param list_id The unique ID for the list.
|
1765
|
-
# @param [Hash] opts the optional parameters
|
1766
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
1767
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
1768
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
1769
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
1770
|
-
# @option opts [String] :type The merge field type.
|
1771
|
-
# @option opts [BOOLEAN] :required The boolean value if the merge field is required.
|
1772
|
-
# @return [CollectionOfMergeFields]
|
1773
|
-
def get_list_merge_fields(list_id = {}, opts = {})
|
1774
|
-
data, _status_code, _headers = get_list_merge_fields_with_http_info(list_id, opts)
|
1775
|
-
data
|
1776
|
-
end
|
1777
614
|
|
1778
615
|
# List merge fields
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
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)
|
616
|
+
def get_list_merge_fields(list_id, opts = {})
|
617
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
618
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
1792
619
|
|
1793
|
-
# query parameters
|
1794
620
|
query_params = {}
|
1795
621
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1796
622
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
@@ -1798,178 +624,58 @@ module MailchimpMarketing
|
|
1798
624
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
1799
625
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
1800
626
|
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
627
|
post_body = nil
|
1814
|
-
|
628
|
+
|
629
|
+
local_var_path = '/lists/{list_id}/merge-fields'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1815
630
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1816
|
-
:header_params => header_params,
|
1817
631
|
:query_params => query_params,
|
1818
|
-
:
|
1819
|
-
:body => post_body,
|
1820
|
-
:auth_names => auth_names,
|
1821
|
-
:return_type => 'CollectionOfMergeFields')
|
632
|
+
:body => post_body)
|
1822
633
|
return data, status_code, headers
|
1823
634
|
end
|
1824
|
-
# Get merge field
|
1825
|
-
# Get information about a specific merge field in a list.
|
1826
|
-
# @param list_id The unique ID for the list.
|
1827
|
-
# @param merge_id The id for the merge field.
|
1828
|
-
# @param [Hash] opts the optional parameters
|
1829
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
1830
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
1831
|
-
# @return [MergeField]
|
1832
|
-
def get_list_merge_field(list_id = {}, merge_id = {}, opts = {})
|
1833
|
-
data, _status_code, _headers = get_list_merge_field_with_http_info(list_id, merge_id, opts)
|
1834
|
-
data
|
1835
|
-
end
|
1836
635
|
|
1837
636
|
# Get merge field
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
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)
|
637
|
+
def get_list_merge_field(list_id, merge_id, opts = {})
|
638
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
639
|
+
fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil?
|
1848
640
|
|
1849
|
-
# query parameters
|
1850
641
|
query_params = {}
|
1851
642
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
1852
643
|
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
644
|
post_body = nil
|
1866
|
-
|
645
|
+
|
646
|
+
local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
|
1867
647
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1868
|
-
:header_params => header_params,
|
1869
648
|
:query_params => query_params,
|
1870
|
-
:
|
1871
|
-
:body => post_body,
|
1872
|
-
:auth_names => auth_names,
|
1873
|
-
:return_type => 'MergeField')
|
649
|
+
:body => post_body)
|
1874
650
|
return data, status_code, headers
|
1875
651
|
end
|
1876
|
-
# Get segment info
|
1877
|
-
# Get information about a specific segment.
|
1878
|
-
# @param list_id The unique ID for the list.
|
1879
|
-
# @param segment_id The unique id for the segment.
|
1880
|
-
# @param [Hash] opts the optional parameters
|
1881
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
1882
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
1883
|
-
# @option opts [BOOLEAN] :include_cleaned Include cleaned members in response
|
1884
|
-
# @option opts [BOOLEAN] :include_transactional Include transactional members in response
|
1885
|
-
# @option opts [BOOLEAN] :include_unsubscribed Include unsubscribed members in response
|
1886
|
-
# @return [List6]
|
1887
|
-
def get_segment(list_id = {}, segment_id = {}, opts = {})
|
1888
|
-
data, _status_code, _headers = get_segment_with_http_info(list_id, segment_id, opts)
|
1889
|
-
data
|
1890
|
-
end
|
1891
652
|
|
1892
653
|
# Get segment info
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
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)
|
654
|
+
def get_segment(list_id, segment_id, opts = {})
|
655
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
656
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
1906
657
|
|
1907
|
-
# query parameters
|
1908
658
|
query_params = {}
|
1909
659
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1910
660
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
1911
661
|
query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil?
|
1912
662
|
query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil?
|
1913
663
|
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
664
|
post_body = nil
|
1927
|
-
|
665
|
+
|
666
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
1928
667
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1929
|
-
:header_params => header_params,
|
1930
668
|
:query_params => query_params,
|
1931
|
-
:
|
1932
|
-
:body => post_body,
|
1933
|
-
:auth_names => auth_names,
|
1934
|
-
:return_type => 'List6')
|
669
|
+
:body => post_body)
|
1935
670
|
return data, status_code, headers
|
1936
671
|
end
|
1937
|
-
# List members in segment
|
1938
|
-
# Get information about members in a saved segment.
|
1939
|
-
# @param list_id The unique ID for the list.
|
1940
|
-
# @param segment_id The unique id for the segment.
|
1941
|
-
# @param [Hash] opts the optional parameters
|
1942
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
1943
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
1944
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
1945
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
1946
|
-
# @option opts [BOOLEAN] :include_cleaned Include cleaned members in response
|
1947
|
-
# @option opts [BOOLEAN] :include_transactional Include transactional members in response
|
1948
|
-
# @option opts [BOOLEAN] :include_unsubscribed Include unsubscribed members in response
|
1949
|
-
# @return [SegmentMembers]
|
1950
|
-
def get_segment_members_list(list_id = {}, segment_id = {}, opts = {})
|
1951
|
-
data, _status_code, _headers = get_segment_members_list_with_http_info(list_id, segment_id, opts)
|
1952
|
-
data
|
1953
|
-
end
|
1954
672
|
|
1955
673
|
# List members in segment
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
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)
|
674
|
+
def get_segment_members_list(list_id, segment_id, opts = {})
|
675
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
676
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
677
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
1971
678
|
|
1972
|
-
# query parameters
|
1973
679
|
query_params = {}
|
1974
680
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1975
681
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
@@ -1978,1348 +684,436 @@ module MailchimpMarketing
|
|
1978
684
|
query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil?
|
1979
685
|
query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil?
|
1980
686
|
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
687
|
post_body = nil
|
1994
|
-
|
688
|
+
|
689
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
1995
690
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1996
|
-
:header_params => header_params,
|
1997
691
|
:query_params => query_params,
|
1998
|
-
:
|
1999
|
-
:body => post_body,
|
2000
|
-
:auth_names => auth_names,
|
2001
|
-
:return_type => 'SegmentMembers')
|
692
|
+
:body => post_body)
|
2002
693
|
return data, status_code, headers
|
2003
694
|
end
|
2004
|
-
# List signup forms
|
2005
|
-
# Get signup forms for a specific list.
|
2006
|
-
# @param list_id The unique ID for the list.
|
2007
|
-
# @param [Hash] opts the optional parameters
|
2008
|
-
# @return [ListSignupForms]
|
2009
|
-
def get_list_signup_forms(list_id = {}, opts = {})
|
2010
|
-
data, _status_code, _headers = get_list_signup_forms_with_http_info(list_id, opts)
|
2011
|
-
data
|
2012
|
-
end
|
2013
695
|
|
2014
696
|
# List signup forms
|
2015
|
-
|
2016
|
-
|
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)
|
697
|
+
def get_list_signup_forms(list_id, opts = {})
|
698
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
2022
699
|
|
2023
|
-
# query parameters
|
2024
700
|
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
701
|
post_body = nil
|
2038
|
-
|
702
|
+
|
703
|
+
local_var_path = '/lists/{list_id}/signup-forms'.sub('{' + 'list_id' + '}', list_id.to_s)
|
2039
704
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
2040
|
-
:header_params => header_params,
|
2041
705
|
:query_params => query_params,
|
2042
|
-
:
|
2043
|
-
:body => post_body,
|
2044
|
-
:auth_names => auth_names,
|
2045
|
-
:return_type => 'ListSignupForms')
|
706
|
+
:body => post_body)
|
2046
707
|
return data, status_code, headers
|
2047
708
|
end
|
2048
|
-
# List webhooks
|
2049
|
-
# Get information about all webhooks for a specific list.
|
2050
|
-
# @param list_id The unique ID for the list.
|
2051
|
-
# @param [Hash] opts the optional parameters
|
2052
|
-
# @return [ListWebhooks]
|
2053
|
-
def get_list_webhooks(list_id = {}, opts = {})
|
2054
|
-
data, _status_code, _headers = get_list_webhooks_with_http_info(list_id, opts)
|
2055
|
-
data
|
2056
|
-
end
|
2057
709
|
|
2058
710
|
# List webhooks
|
2059
|
-
|
2060
|
-
|
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)
|
711
|
+
def get_list_webhooks(list_id, opts = {})
|
712
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
2066
713
|
|
2067
|
-
# query parameters
|
2068
714
|
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
715
|
post_body = nil
|
2082
|
-
|
716
|
+
|
717
|
+
local_var_path = '/lists/{list_id}/webhooks'.sub('{' + 'list_id' + '}', list_id.to_s)
|
2083
718
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
2084
|
-
:header_params => header_params,
|
2085
719
|
:query_params => query_params,
|
2086
|
-
:
|
2087
|
-
:body => post_body,
|
2088
|
-
:auth_names => auth_names,
|
2089
|
-
:return_type => 'ListWebhooks')
|
720
|
+
:body => post_body)
|
2090
721
|
return data, status_code, headers
|
2091
722
|
end
|
2092
|
-
# Get webhook info
|
2093
|
-
# Get information about a specific webhook.
|
2094
|
-
# @param list_id The unique ID for the list.
|
2095
|
-
# @param webhook_id The webhook'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
723
|
|
2103
724
|
# Get webhook info
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
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)
|
725
|
+
def get_list_webhook(list_id, webhook_id, opts = {})
|
726
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
727
|
+
fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil?
|
2112
728
|
|
2113
|
-
# query parameters
|
2114
729
|
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
730
|
post_body = nil
|
2128
|
-
|
731
|
+
|
732
|
+
local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
|
2129
733
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
2130
|
-
:header_params => header_params,
|
2131
734
|
:query_params => query_params,
|
2132
|
-
:
|
2133
|
-
:body => post_body,
|
2134
|
-
:auth_names => auth_names,
|
2135
|
-
:return_type => 'ListWebhooks')
|
735
|
+
:body => post_body)
|
2136
736
|
return data, status_code, headers
|
2137
737
|
end
|
2138
|
-
# Update lists
|
2139
|
-
# Update the settings for a specific list.
|
2140
|
-
# @param list_id The unique ID for the list.
|
2141
|
-
# @param body
|
2142
|
-
# @param [Hash] opts the optional parameters
|
2143
|
-
# @return [SubscriberList]
|
2144
|
-
def update_list(list_id = {}, body = {}, opts = {})
|
2145
|
-
data, _status_code, _headers = update_list_with_http_info(list_id, body, opts)
|
2146
|
-
data
|
2147
|
-
end
|
2148
738
|
|
2149
739
|
# Update lists
|
2150
|
-
|
2151
|
-
|
2152
|
-
|
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)
|
740
|
+
def update_list(list_id, body, opts = {})
|
741
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
742
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2158
743
|
|
2159
|
-
# query parameters
|
2160
744
|
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
745
|
post_body = @api_client.object_to_http_body(body)
|
2174
|
-
|
746
|
+
|
747
|
+
local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
|
2175
748
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
2176
|
-
:header_params => header_params,
|
2177
749
|
:query_params => query_params,
|
2178
|
-
:
|
2179
|
-
:body => post_body,
|
2180
|
-
:auth_names => auth_names,
|
2181
|
-
:return_type => 'SubscriberList')
|
750
|
+
:body => post_body)
|
2182
751
|
return data, status_code, headers
|
2183
752
|
end
|
2184
|
-
# Update interest category
|
2185
|
-
# Update a specific interest category.
|
2186
|
-
# @param list_id The unique ID for the list.
|
2187
|
-
# @param interest_category_id The unique ID for the interest category.
|
2188
|
-
# @param body
|
2189
|
-
# @param [Hash] opts the optional parameters
|
2190
|
-
# @return [InterestCategory]
|
2191
|
-
def update_interest_category(list_id = {}, interest_category_id = {}, body = {}, opts = {})
|
2192
|
-
data, _status_code, _headers = update_interest_category_with_http_info(list_id, interest_category_id, body, opts)
|
2193
|
-
data
|
2194
|
-
end
|
2195
753
|
|
2196
754
|
# Update interest category
|
2197
|
-
|
2198
|
-
|
2199
|
-
|
2200
|
-
|
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)
|
755
|
+
def update_interest_category(list_id, interest_category_id, body, opts = {})
|
756
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
757
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
758
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2206
759
|
|
2207
|
-
# query parameters
|
2208
760
|
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
761
|
post_body = @api_client.object_to_http_body(body)
|
2222
|
-
|
762
|
+
|
763
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
|
2223
764
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
2224
|
-
:header_params => header_params,
|
2225
765
|
:query_params => query_params,
|
2226
|
-
:
|
2227
|
-
:body => post_body,
|
2228
|
-
:auth_names => auth_names,
|
2229
|
-
:return_type => 'InterestCategory')
|
766
|
+
:body => post_body)
|
2230
767
|
return data, status_code, headers
|
2231
768
|
end
|
2232
|
-
# Update interest in category
|
2233
|
-
# Update interests or 'group names' for a specific category.
|
2234
|
-
# @param list_id The unique ID for the list.
|
2235
|
-
# @param interest_category_id The unique ID for the interest category.
|
2236
|
-
# @param interest_id The specific interest or 'group name'.
|
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
769
|
|
2245
770
|
# Update interest in category
|
2246
|
-
|
2247
|
-
|
2248
|
-
|
2249
|
-
|
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)
|
771
|
+
def update_interest_category_interest(list_id, interest_category_id, interest_id, opts = {})
|
772
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
773
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
774
|
+
fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil?
|
2256
775
|
|
2257
|
-
# query parameters
|
2258
776
|
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
777
|
post_body = @api_client.object_to_http_body(opts[:'body'])
|
2272
|
-
|
778
|
+
|
779
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s)
|
2273
780
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
2274
|
-
:header_params => header_params,
|
2275
781
|
:query_params => query_params,
|
2276
|
-
:
|
2277
|
-
:body => post_body,
|
2278
|
-
:auth_names => auth_names,
|
2279
|
-
:return_type => 'Interest')
|
782
|
+
:body => post_body)
|
2280
783
|
return data, status_code, headers
|
2281
784
|
end
|
2282
|
-
# Update list member
|
2283
|
-
# Update information for a specific list member.
|
2284
|
-
# @param list_id The unique ID for the list.
|
2285
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
785
|
|
2295
786
|
# Update list member
|
2296
|
-
|
2297
|
-
|
2298
|
-
|
2299
|
-
|
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)
|
787
|
+
def update_list_member(list_id, subscriber_hash, body, opts = {})
|
788
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
789
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
790
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2306
791
|
|
2307
|
-
# query parameters
|
2308
792
|
query_params = {}
|
2309
793
|
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
794
|
post_body = @api_client.object_to_http_body(body)
|
2323
|
-
|
795
|
+
|
796
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
2324
797
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
2325
|
-
:header_params => header_params,
|
2326
798
|
:query_params => query_params,
|
2327
|
-
:
|
2328
|
-
:body => post_body,
|
2329
|
-
:auth_names => auth_names,
|
2330
|
-
:return_type => 'ListMembers2')
|
799
|
+
:body => post_body)
|
2331
800
|
return data, status_code, headers
|
2332
801
|
end
|
2333
|
-
# Update note
|
2334
|
-
# Update a specific note for a specific list member.
|
2335
|
-
# @param list_id The unique ID for the list.
|
2336
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
802
|
|
2346
803
|
# Update note
|
2347
|
-
|
2348
|
-
|
2349
|
-
|
2350
|
-
|
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)
|
804
|
+
def update_list_member_note(list_id, subscriber_hash, note_id, opts = {})
|
805
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
806
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
807
|
+
fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil?
|
2357
808
|
|
2358
|
-
# query parameters
|
2359
809
|
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
810
|
post_body = @api_client.object_to_http_body(opts[:'body'])
|
2373
|
-
|
811
|
+
|
812
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s)
|
2374
813
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
2375
|
-
:header_params => header_params,
|
2376
814
|
:query_params => query_params,
|
2377
|
-
:
|
2378
|
-
:body => post_body,
|
2379
|
-
:auth_names => auth_names,
|
2380
|
-
:return_type => 'MemberNotes')
|
815
|
+
:body => post_body)
|
2381
816
|
return data, status_code, headers
|
2382
817
|
end
|
2383
|
-
# Update merge field
|
2384
|
-
# Update a specific merge field in a list.
|
2385
|
-
# @param list_id The unique ID for the list.
|
2386
|
-
# @param merge_id The id for the merge field.
|
2387
|
-
# @param body
|
2388
|
-
# @param [Hash] opts the optional parameters
|
2389
|
-
# @return [MergeField]
|
2390
|
-
def update_list_merge_field(list_id = {}, merge_id = {}, body = {}, opts = {})
|
2391
|
-
data, _status_code, _headers = update_list_merge_field_with_http_info(list_id, merge_id, body, opts)
|
2392
|
-
data
|
2393
|
-
end
|
2394
818
|
|
2395
819
|
# Update merge field
|
2396
|
-
|
2397
|
-
|
2398
|
-
|
2399
|
-
|
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)
|
820
|
+
def update_list_merge_field(list_id, merge_id, body, opts = {})
|
821
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
822
|
+
fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil?
|
823
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2405
824
|
|
2406
|
-
# query parameters
|
2407
825
|
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
826
|
post_body = @api_client.object_to_http_body(body)
|
2421
|
-
|
827
|
+
|
828
|
+
local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
|
2422
829
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
2423
|
-
:header_params => header_params,
|
2424
830
|
:query_params => query_params,
|
2425
|
-
:
|
2426
|
-
:body => post_body,
|
2427
|
-
:auth_names => auth_names,
|
2428
|
-
:return_type => 'MergeField')
|
831
|
+
:body => post_body)
|
2429
832
|
return data, status_code, headers
|
2430
833
|
end
|
2431
|
-
# Update segment
|
2432
|
-
# Update a specific segment in a list.
|
2433
|
-
# @param list_id The unique ID for the list.
|
2434
|
-
# @param segment_id The unique id for the segment.
|
2435
|
-
# @param body
|
2436
|
-
# @param [Hash] opts the optional parameters
|
2437
|
-
# @return [List6]
|
2438
|
-
def update_segment(list_id = {}, segment_id = {}, body = {}, opts = {})
|
2439
|
-
data, _status_code, _headers = update_segment_with_http_info(list_id, segment_id, body, opts)
|
2440
|
-
data
|
2441
|
-
end
|
2442
834
|
|
2443
835
|
# Update segment
|
2444
|
-
|
2445
|
-
|
2446
|
-
|
2447
|
-
|
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)
|
836
|
+
def update_segment(list_id, segment_id, body, opts = {})
|
837
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
838
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
839
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2453
840
|
|
2454
|
-
# query parameters
|
2455
841
|
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
842
|
post_body = @api_client.object_to_http_body(body)
|
2469
|
-
|
843
|
+
|
844
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
2470
845
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
2471
|
-
:header_params => header_params,
|
2472
846
|
:query_params => query_params,
|
2473
|
-
:
|
2474
|
-
:body => post_body,
|
2475
|
-
:auth_names => auth_names,
|
2476
|
-
:return_type => 'List6')
|
847
|
+
:body => post_body)
|
2477
848
|
return data, status_code, headers
|
2478
849
|
end
|
2479
|
-
# Update webhook
|
2480
|
-
# Update the settings for an existing webhook.
|
2481
|
-
# @param list_id The unique ID for the list.
|
2482
|
-
# @param webhook_id The webhook'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
850
|
|
2491
851
|
# Update webhook
|
2492
|
-
|
2493
|
-
|
2494
|
-
|
2495
|
-
|
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)
|
852
|
+
def update_list_webhook(list_id, webhook_id, body, opts = {})
|
853
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
854
|
+
fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil?
|
855
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2501
856
|
|
2502
|
-
# query parameters
|
2503
857
|
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
858
|
post_body = @api_client.object_to_http_body(body)
|
2517
|
-
|
859
|
+
|
860
|
+
local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
|
2518
861
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
2519
|
-
:header_params => header_params,
|
2520
862
|
:query_params => query_params,
|
2521
|
-
:
|
2522
|
-
:body => post_body,
|
2523
|
-
:auth_names => auth_names,
|
2524
|
-
:return_type => 'ListWebhooks')
|
863
|
+
:body => post_body)
|
2525
864
|
return data, status_code, headers
|
2526
865
|
end
|
2527
|
-
# Add event
|
2528
|
-
# Add an event for a list member.
|
2529
|
-
# @param list_id The unique ID for the list.
|
2530
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
866
|
|
2539
867
|
# Add event
|
2540
|
-
|
2541
|
-
|
2542
|
-
|
2543
|
-
|
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)
|
868
|
+
def create_list_member_event(list_id, subscriber_hash, body, opts = {})
|
869
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
870
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
871
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2549
872
|
|
2550
|
-
# query parameters
|
2551
873
|
query_params = {}
|
874
|
+
post_body = @api_client.object_to_http_body(body)
|
2552
875
|
|
2553
|
-
|
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']
|
876
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/events'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
2566
877
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2567
|
-
:header_params => header_params,
|
2568
878
|
:query_params => query_params,
|
2569
|
-
:
|
2570
|
-
:body => post_body,
|
2571
|
-
:auth_names => auth_names)
|
879
|
+
:body => post_body)
|
2572
880
|
return data, status_code, headers
|
2573
881
|
end
|
2574
|
-
# Add or remove member tags
|
2575
|
-
# Add or remove tags from a list member. If a tag that does not exist is passed in and set as 'active', a new tag will be created.
|
2576
|
-
# @param list_id The unique ID for the list.
|
2577
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
882
|
|
2586
883
|
# Add or remove member tags
|
2587
|
-
|
2588
|
-
|
2589
|
-
|
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)
|
884
|
+
def update_list_member_tags(list_id, subscriber_hash, opts = {})
|
885
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
886
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
2596
887
|
|
2597
|
-
# query parameters
|
2598
888
|
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
889
|
post_body = @api_client.object_to_http_body(opts[:'body'])
|
2612
|
-
|
890
|
+
|
891
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/tags'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
2613
892
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2614
|
-
:header_params => header_params,
|
2615
893
|
:query_params => query_params,
|
2616
|
-
:
|
2617
|
-
:body => post_body,
|
2618
|
-
:auth_names => auth_names)
|
894
|
+
:body => post_body)
|
2619
895
|
return data, status_code, headers
|
2620
896
|
end
|
2621
|
-
# Add list
|
2622
|
-
# Create a new list in your Mailchimp account.
|
2623
|
-
# @param body
|
2624
|
-
# @param [Hash] opts the optional parameters
|
2625
|
-
# @return [SubscriberList]
|
2626
|
-
def create_list(body = {}, opts = {})
|
2627
|
-
data, _status_code, _headers = create_list_with_http_info(body, opts)
|
2628
|
-
data
|
2629
|
-
end
|
2630
897
|
|
2631
898
|
# Add list
|
2632
|
-
|
2633
|
-
|
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'
|
899
|
+
def create_list(body, opts = {})
|
900
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2639
901
|
|
2640
|
-
# query parameters
|
2641
902
|
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
903
|
post_body = @api_client.object_to_http_body(body)
|
2655
|
-
|
904
|
+
|
905
|
+
local_var_path = '/lists'
|
2656
906
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2657
|
-
:header_params => header_params,
|
2658
907
|
:query_params => query_params,
|
2659
|
-
:
|
2660
|
-
:body => post_body,
|
2661
|
-
:auth_names => auth_names,
|
2662
|
-
:return_type => 'SubscriberList')
|
908
|
+
:body => post_body)
|
2663
909
|
return data, status_code, headers
|
2664
910
|
end
|
2665
|
-
# Batch subscribe or unsubscibe
|
2666
|
-
# Batch subscribe or unsubscribe list members.
|
2667
|
-
# @param list_id The unique ID for the list.
|
2668
|
-
# @param body
|
2669
|
-
# @param [Hash] opts the optional parameters
|
2670
|
-
# @option opts [BOOLEAN] :skip_merge_validation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to False.
|
2671
|
-
# @option opts [BOOLEAN] :skip_duplicate_check If skip_duplicate_check is true, we will ignore duplicates sent in the request when using the batch sub/unsub on the lists endpoint. The status of the first appearance in the request will be saved. This defaults to False.
|
2672
|
-
# @return [BatchUpdateListMembers]
|
2673
|
-
def batch_list_members(list_id = {}, body = {}, opts = {})
|
2674
|
-
data, _status_code, _headers = batch_list_members_with_http_info(list_id, body, opts)
|
2675
|
-
data
|
2676
|
-
end
|
2677
911
|
|
2678
912
|
# Batch subscribe or unsubscibe
|
2679
|
-
|
2680
|
-
|
2681
|
-
|
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)
|
913
|
+
def batch_list_members(list_id, body, opts = {})
|
914
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
915
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2689
916
|
|
2690
|
-
# query parameters
|
2691
917
|
query_params = {}
|
2692
918
|
query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
|
2693
919
|
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
920
|
post_body = @api_client.object_to_http_body(body)
|
2707
|
-
|
921
|
+
|
922
|
+
local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
|
2708
923
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2709
|
-
:header_params => header_params,
|
2710
924
|
:query_params => query_params,
|
2711
|
-
:
|
2712
|
-
:body => post_body,
|
2713
|
-
:auth_names => auth_names,
|
2714
|
-
:return_type => 'BatchUpdateListMembers')
|
925
|
+
:body => post_body)
|
2715
926
|
return data, status_code, headers
|
2716
927
|
end
|
2717
|
-
# Add external id
|
2718
|
-
# Create a new external identifier for a Mailchimp list.
|
2719
|
-
# @param list_id The unique ID for the list.
|
2720
|
-
# @param [Hash] opts the optional parameters
|
2721
|
-
# @option opts [ExternalIdentifier1] :body
|
2722
|
-
# @return [ExternalIdentifier]
|
2723
|
-
def create_list_external_id(list_id = {}, opts = {})
|
2724
|
-
data, _status_code, _headers = create_list_external_id_with_http_info(list_id, opts)
|
2725
|
-
data
|
2726
|
-
end
|
2727
928
|
|
2728
929
|
# Add external id
|
2729
|
-
|
2730
|
-
|
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)
|
930
|
+
def create_list_external_id(list_id, opts = {})
|
931
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
2737
932
|
|
2738
|
-
# query parameters
|
2739
933
|
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
934
|
post_body = @api_client.object_to_http_body(opts[:'body'])
|
2753
|
-
|
935
|
+
|
936
|
+
local_var_path = '/lists/{list_id}/external-ids'.sub('{' + 'list_id' + '}', list_id.to_s)
|
2754
937
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2755
|
-
:header_params => header_params,
|
2756
938
|
:query_params => query_params,
|
2757
|
-
:
|
2758
|
-
:body => post_body,
|
2759
|
-
:auth_names => auth_names,
|
2760
|
-
:return_type => 'ExternalIdentifier')
|
939
|
+
:body => post_body)
|
2761
940
|
return data, status_code, headers
|
2762
941
|
end
|
2763
|
-
# Add interest category
|
2764
|
-
# Create a new interest category.
|
2765
|
-
# @param list_id The unique ID for the list.
|
2766
|
-
# @param body
|
2767
|
-
# @param [Hash] opts the optional parameters
|
2768
|
-
# @return [InterestCategory]
|
2769
|
-
def create_list_interest_category(list_id = {}, body = {}, opts = {})
|
2770
|
-
data, _status_code, _headers = create_list_interest_category_with_http_info(list_id, body, opts)
|
2771
|
-
data
|
2772
|
-
end
|
2773
942
|
|
2774
943
|
# Add interest category
|
2775
|
-
|
2776
|
-
|
2777
|
-
|
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)
|
944
|
+
def create_list_interest_category(list_id, body, opts = {})
|
945
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
946
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2783
947
|
|
2784
|
-
# query parameters
|
2785
948
|
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
949
|
post_body = @api_client.object_to_http_body(body)
|
2799
|
-
|
950
|
+
|
951
|
+
local_var_path = '/lists/{list_id}/interest-categories'.sub('{' + 'list_id' + '}', list_id.to_s)
|
2800
952
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2801
|
-
:header_params => header_params,
|
2802
953
|
:query_params => query_params,
|
2803
|
-
:
|
2804
|
-
:body => post_body,
|
2805
|
-
:auth_names => auth_names,
|
2806
|
-
:return_type => 'InterestCategory')
|
954
|
+
:body => post_body)
|
2807
955
|
return data, status_code, headers
|
2808
956
|
end
|
2809
|
-
# Add interest in category
|
2810
|
-
# Create a new interest or 'group name' for a specific category.
|
2811
|
-
# @param list_id The unique ID for the list.
|
2812
|
-
# @param interest_category_id The unique ID for the interest category.
|
2813
|
-
# @param body
|
2814
|
-
# @param [Hash] opts the optional parameters
|
2815
|
-
# @return [Interest]
|
2816
|
-
def create_interest_category_interest(list_id = {}, interest_category_id = {}, body = {}, opts = {})
|
2817
|
-
data, _status_code, _headers = create_interest_category_interest_with_http_info(list_id, interest_category_id, body, opts)
|
2818
|
-
data
|
2819
|
-
end
|
2820
957
|
|
2821
958
|
# Add interest in category
|
2822
|
-
|
2823
|
-
|
2824
|
-
|
2825
|
-
|
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)
|
959
|
+
def create_interest_category_interest(list_id, interest_category_id, body, opts = {})
|
960
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
961
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
962
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2831
963
|
|
2832
|
-
# query parameters
|
2833
964
|
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
965
|
post_body = @api_client.object_to_http_body(body)
|
2847
|
-
|
966
|
+
|
967
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
|
2848
968
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2849
|
-
:header_params => header_params,
|
2850
969
|
:query_params => query_params,
|
2851
|
-
:
|
2852
|
-
:body => post_body,
|
2853
|
-
:auth_names => auth_names,
|
2854
|
-
:return_type => 'Interest')
|
970
|
+
:body => post_body)
|
2855
971
|
return data, status_code, headers
|
2856
972
|
end
|
2857
|
-
# Add member to list
|
2858
|
-
# Add a new member to the list.
|
2859
|
-
# @param list_id The unique ID for the list.
|
2860
|
-
# @param body
|
2861
|
-
# @param [Hash] opts the optional parameters
|
2862
|
-
# @option opts [BOOLEAN] :skip_merge_validation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to False.
|
2863
|
-
# @return [ListMembers2]
|
2864
|
-
def add_list_member(list_id = {}, body = {}, opts = {})
|
2865
|
-
data, _status_code, _headers = add_list_member_with_http_info(list_id, body, opts)
|
2866
|
-
data
|
2867
|
-
end
|
2868
973
|
|
2869
974
|
# Add member to list
|
2870
|
-
|
2871
|
-
|
2872
|
-
|
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)
|
975
|
+
def add_list_member(list_id, body, opts = {})
|
976
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
977
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
2879
978
|
|
2880
|
-
# query parameters
|
2881
979
|
query_params = {}
|
2882
980
|
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
981
|
post_body = @api_client.object_to_http_body(body)
|
2896
|
-
|
982
|
+
|
983
|
+
local_var_path = '/lists/{list_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s)
|
2897
984
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2898
|
-
:header_params => header_params,
|
2899
985
|
:query_params => query_params,
|
2900
|
-
:
|
2901
|
-
:body => post_body,
|
2902
|
-
:auth_names => auth_names,
|
2903
|
-
:return_type => 'ListMembers2')
|
986
|
+
:body => post_body)
|
2904
987
|
return data, status_code, headers
|
2905
988
|
end
|
2906
|
-
# Delete list member
|
2907
|
-
# Delete all personally identifiable information related to a list member, and remove them from a list. This will make it impossible to re-import the list member.
|
2908
|
-
# @param list_id The unique ID for the list.
|
2909
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
989
|
|
2917
990
|
# Delete list member
|
2918
|
-
|
2919
|
-
|
2920
|
-
|
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)
|
991
|
+
def delete_list_member_permanent(list_id, subscriber_hash, opts = {})
|
992
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
993
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
2926
994
|
|
2927
|
-
# query parameters
|
2928
995
|
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
996
|
post_body = nil
|
2942
|
-
|
997
|
+
|
998
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/actions/delete-permanent'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
2943
999
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2944
|
-
:header_params => header_params,
|
2945
1000
|
:query_params => query_params,
|
2946
|
-
:
|
2947
|
-
:body => post_body,
|
2948
|
-
:auth_names => auth_names)
|
1001
|
+
:body => post_body)
|
2949
1002
|
return data, status_code, headers
|
2950
1003
|
end
|
2951
|
-
# Add member note
|
2952
|
-
# Add a new note for a specific subscriber.
|
2953
|
-
# @param list_id The unique ID for the list.
|
2954
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
1004
|
|
2963
1005
|
# Add member note
|
2964
|
-
|
2965
|
-
|
2966
|
-
|
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)
|
1006
|
+
def create_list_member_note(list_id, subscriber_hash, opts = {})
|
1007
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1008
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
2973
1009
|
|
2974
|
-
# query parameters
|
2975
1010
|
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
1011
|
post_body = @api_client.object_to_http_body(opts[:'body'])
|
2989
|
-
|
1012
|
+
|
1013
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
2990
1014
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2991
|
-
:header_params => header_params,
|
2992
1015
|
:query_params => query_params,
|
2993
|
-
:
|
2994
|
-
:body => post_body,
|
2995
|
-
:auth_names => auth_names,
|
2996
|
-
:return_type => 'MemberNotes')
|
1016
|
+
:body => post_body)
|
2997
1017
|
return data, status_code, headers
|
2998
1018
|
end
|
2999
|
-
# Add merge field
|
3000
|
-
# Add a new merge field for a specific list.
|
3001
|
-
# @param list_id The unique ID for the list.
|
3002
|
-
# @param body
|
3003
|
-
# @param [Hash] opts the optional parameters
|
3004
|
-
# @return [MergeField]
|
3005
|
-
def add_list_merge_field(list_id = {}, body = {}, opts = {})
|
3006
|
-
data, _status_code, _headers = add_list_merge_field_with_http_info(list_id, body, opts)
|
3007
|
-
data
|
3008
|
-
end
|
3009
1019
|
|
3010
1020
|
# Add merge field
|
3011
|
-
|
3012
|
-
|
3013
|
-
|
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)
|
1021
|
+
def add_list_merge_field(list_id, body, opts = {})
|
1022
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1023
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
3019
1024
|
|
3020
|
-
# query parameters
|
3021
1025
|
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
1026
|
post_body = @api_client.object_to_http_body(body)
|
3035
|
-
|
1027
|
+
|
1028
|
+
local_var_path = '/lists/{list_id}/merge-fields'.sub('{' + 'list_id' + '}', list_id.to_s)
|
3036
1029
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
3037
|
-
:header_params => header_params,
|
3038
1030
|
:query_params => query_params,
|
3039
|
-
:
|
3040
|
-
:body => post_body,
|
3041
|
-
:auth_names => auth_names,
|
3042
|
-
:return_type => 'MergeField')
|
1031
|
+
:body => post_body)
|
3043
1032
|
return data, status_code, headers
|
3044
1033
|
end
|
3045
|
-
# Add segment
|
3046
|
-
# Create a new segment in a specific list.
|
3047
|
-
# @param list_id The unique ID for the list.
|
3048
|
-
# @param body
|
3049
|
-
# @param [Hash] opts the optional parameters
|
3050
|
-
# @return [List6]
|
3051
|
-
def create_segment(list_id = {}, body = {}, opts = {})
|
3052
|
-
data, _status_code, _headers = create_segment_with_http_info(list_id, body, opts)
|
3053
|
-
data
|
3054
|
-
end
|
3055
1034
|
|
3056
1035
|
# Add segment
|
3057
|
-
|
3058
|
-
|
3059
|
-
|
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)
|
1036
|
+
def create_segment(list_id, body, opts = {})
|
1037
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1038
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
3065
1039
|
|
3066
|
-
# query parameters
|
3067
1040
|
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
1041
|
post_body = @api_client.object_to_http_body(body)
|
3081
|
-
|
1042
|
+
|
1043
|
+
local_var_path = '/lists/{list_id}/segments'.sub('{' + 'list_id' + '}', list_id.to_s)
|
3082
1044
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
3083
|
-
:header_params => header_params,
|
3084
1045
|
:query_params => query_params,
|
3085
|
-
:
|
3086
|
-
:body => post_body,
|
3087
|
-
:auth_names => auth_names,
|
3088
|
-
:return_type => 'List6')
|
1046
|
+
:body => post_body)
|
3089
1047
|
return data, status_code, headers
|
3090
1048
|
end
|
3091
|
-
# Batch add or remove members
|
3092
|
-
# Batch add/remove list members to static segment
|
3093
|
-
# @param body
|
3094
|
-
# @param list_id The unique ID for the list.
|
3095
|
-
# @param segment_id The unique id for the segment.
|
3096
|
-
# @param [Hash] opts the optional parameters
|
3097
|
-
# @return [BatchAddremoveListMembersTofromStaticSegment]
|
3098
|
-
def batch_segment_members(body = {}, list_id = {}, segment_id = {}, opts = {})
|
3099
|
-
data, _status_code, _headers = batch_segment_members_with_http_info(body, list_id, segment_id, opts)
|
3100
|
-
data
|
3101
|
-
end
|
3102
1049
|
|
3103
1050
|
# Batch add or remove members
|
3104
|
-
|
3105
|
-
|
3106
|
-
|
3107
|
-
|
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)
|
1051
|
+
def batch_segment_members(body, list_id, segment_id, opts = {})
|
1052
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1053
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1054
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
3113
1055
|
|
3114
|
-
# query parameters
|
3115
1056
|
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
1057
|
post_body = @api_client.object_to_http_body(body)
|
3129
|
-
|
1058
|
+
|
1059
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
3130
1060
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
3131
|
-
:header_params => header_params,
|
3132
1061
|
:query_params => query_params,
|
3133
|
-
:
|
3134
|
-
:body => post_body,
|
3135
|
-
:auth_names => auth_names,
|
3136
|
-
:return_type => 'BatchAddremoveListMembersTofromStaticSegment')
|
1062
|
+
:body => post_body)
|
3137
1063
|
return data, status_code, headers
|
3138
1064
|
end
|
3139
|
-
# Add member to segment
|
3140
|
-
# Add a member to a static segment.
|
3141
|
-
# @param list_id The unique ID for the list.
|
3142
|
-
# @param segment_id The unique id for the segment.
|
3143
|
-
# @param body
|
3144
|
-
# @param [Hash] opts the optional parameters
|
3145
|
-
# @return [ListMembers1]
|
3146
|
-
def create_segment_member(list_id = {}, segment_id = {}, body = {}, opts = {})
|
3147
|
-
data, _status_code, _headers = create_segment_member_with_http_info(list_id, segment_id, body, opts)
|
3148
|
-
data
|
3149
|
-
end
|
3150
1065
|
|
3151
1066
|
# Add member to segment
|
3152
|
-
|
3153
|
-
|
3154
|
-
|
3155
|
-
|
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)
|
1067
|
+
def create_segment_member(list_id, segment_id, body, opts = {})
|
1068
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1069
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
1070
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
3161
1071
|
|
3162
|
-
# query parameters
|
3163
1072
|
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
1073
|
post_body = @api_client.object_to_http_body(body)
|
3177
|
-
|
1074
|
+
|
1075
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
3178
1076
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
3179
|
-
:header_params => header_params,
|
3180
1077
|
:query_params => query_params,
|
3181
|
-
:
|
3182
|
-
:body => post_body,
|
3183
|
-
:auth_names => auth_names,
|
3184
|
-
:return_type => 'ListMembers1')
|
1078
|
+
:body => post_body)
|
3185
1079
|
return data, status_code, headers
|
3186
1080
|
end
|
3187
|
-
# Customize signup form
|
3188
|
-
# Customize a list's default signup form.
|
3189
|
-
# @param list_id The unique ID for the list.
|
3190
|
-
# @param body
|
3191
|
-
# @param [Hash] opts the optional parameters
|
3192
|
-
# @return [SignupForm]
|
3193
|
-
def update_list_signup_form(list_id = {}, body = {}, opts = {})
|
3194
|
-
data, _status_code, _headers = update_list_signup_form_with_http_info(list_id, body, opts)
|
3195
|
-
data
|
3196
|
-
end
|
3197
1081
|
|
3198
1082
|
# Customize signup form
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
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)
|
1083
|
+
def update_list_signup_form(list_id, body, opts = {})
|
1084
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1085
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
3207
1086
|
|
3208
|
-
# query parameters
|
3209
1087
|
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
1088
|
post_body = @api_client.object_to_http_body(body)
|
3223
|
-
|
1089
|
+
|
1090
|
+
local_var_path = '/lists/{list_id}/signup-forms'.sub('{' + 'list_id' + '}', list_id.to_s)
|
3224
1091
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
3225
|
-
:header_params => header_params,
|
3226
1092
|
:query_params => query_params,
|
3227
|
-
:
|
3228
|
-
:body => post_body,
|
3229
|
-
:auth_names => auth_names,
|
3230
|
-
:return_type => 'SignupForm')
|
1093
|
+
:body => post_body)
|
3231
1094
|
return data, status_code, headers
|
3232
1095
|
end
|
3233
|
-
# Add webhook
|
3234
|
-
# Create a new webhook for a specific list.
|
3235
|
-
# @param list_id The unique ID for the list.
|
3236
|
-
# @param body
|
3237
|
-
# @param [Hash] opts the optional parameters
|
3238
|
-
# @return [ListWebhooks]
|
3239
|
-
def create_list_webhook(list_id = {}, body = {}, opts = {})
|
3240
|
-
data, _status_code, _headers = create_list_webhook_with_http_info(list_id, body, opts)
|
3241
|
-
data
|
3242
|
-
end
|
3243
1096
|
|
3244
1097
|
# Add webhook
|
3245
|
-
|
3246
|
-
|
3247
|
-
|
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)
|
1098
|
+
def create_list_webhook(list_id, body, opts = {})
|
1099
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1100
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
3253
1101
|
|
3254
|
-
# query parameters
|
3255
1102
|
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
1103
|
post_body = @api_client.object_to_http_body(body)
|
3269
|
-
|
1104
|
+
|
1105
|
+
local_var_path = '/lists/{list_id}/webhooks'.sub('{' + 'list_id' + '}', list_id.to_s)
|
3270
1106
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
3271
|
-
:header_params => header_params,
|
3272
1107
|
:query_params => query_params,
|
3273
|
-
:
|
3274
|
-
:body => post_body,
|
3275
|
-
:auth_names => auth_names,
|
3276
|
-
:return_type => 'ListWebhooks')
|
1108
|
+
:body => post_body)
|
3277
1109
|
return data, status_code, headers
|
3278
1110
|
end
|
3279
|
-
# List segments
|
3280
|
-
# Get information about all available segments for a specific list.
|
3281
|
-
# @param list_id The unique ID for the list.
|
3282
|
-
# @param [Hash] opts the optional parameters
|
3283
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
3284
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
3285
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
3286
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
3287
|
-
# @option opts [String] :type Limit results based on segment type.
|
3288
|
-
# @option opts [String] :since_created_at Restrict results to segments created after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
3289
|
-
# @option opts [String] :before_created_at Restrict results to segments created before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
3290
|
-
# @option opts [BOOLEAN] :include_cleaned Include cleaned members in response
|
3291
|
-
# @option opts [BOOLEAN] :include_transactional Include transactional members in response
|
3292
|
-
# @option opts [BOOLEAN] :include_unsubscribed Include unsubscribed members in response
|
3293
|
-
# @option opts [String] :since_updated_at Restrict results to segments update after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
3294
|
-
# @option opts [String] :before_updated_at Restrict results to segments update before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
3295
|
-
# @return [CollectionOfSegments]
|
3296
|
-
def list_segments(list_id = {}, opts = {})
|
3297
|
-
data, _status_code, _headers = list_segments_with_http_info(list_id, opts)
|
3298
|
-
data
|
3299
|
-
end
|
3300
1111
|
|
3301
1112
|
# List segments
|
3302
|
-
|
3303
|
-
|
3304
|
-
|
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)
|
1113
|
+
def list_segments(list_id, opts = {})
|
1114
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1115
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
3321
1116
|
|
3322
|
-
# query parameters
|
3323
1117
|
query_params = {}
|
3324
1118
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
3325
1119
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
@@ -3333,124 +1127,43 @@ module MailchimpMarketing
|
|
3333
1127
|
query_params[:'include_unsubscribed'] = opts[:'include_unsubscribed'] if !opts[:'include_unsubscribed'].nil?
|
3334
1128
|
query_params[:'since_updated_at'] = opts[:'since_updated_at'] if !opts[:'since_updated_at'].nil?
|
3335
1129
|
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
1130
|
post_body = nil
|
3349
|
-
|
1131
|
+
|
1132
|
+
local_var_path = '/lists/{list_id}/segments'.sub('{' + 'list_id' + '}', list_id.to_s)
|
3350
1133
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
3351
|
-
:header_params => header_params,
|
3352
1134
|
:query_params => query_params,
|
3353
|
-
:
|
3354
|
-
:body => post_body,
|
3355
|
-
:auth_names => auth_names,
|
3356
|
-
:return_type => 'CollectionOfSegments')
|
1135
|
+
:body => post_body)
|
3357
1136
|
return data, status_code, headers
|
3358
1137
|
end
|
3359
|
-
# Preview segment
|
3360
|
-
# Preview a segment of users by sending conditions.
|
3361
|
-
# @param list_id The unique ID for the list.
|
3362
|
-
# @param [Hash] opts the optional parameters
|
3363
|
-
# @option opts [Body4] :body
|
3364
|
-
# @return [ListMembers2]
|
3365
|
-
def preview_segment(list_id = {}, opts = {})
|
3366
|
-
data, _status_code, _headers = preview_segment_with_http_info(list_id, opts)
|
3367
|
-
data
|
3368
|
-
end
|
3369
1138
|
|
3370
1139
|
# Preview segment
|
3371
|
-
|
3372
|
-
|
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)
|
1140
|
+
def preview_segment(list_id, opts = {})
|
1141
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
3379
1142
|
|
3380
|
-
# query parameters
|
3381
1143
|
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
1144
|
post_body = @api_client.object_to_http_body(opts[:'body'])
|
3395
|
-
|
1145
|
+
|
1146
|
+
local_var_path = '/lists/{list_id}/preview-segment'.sub('{' + 'list_id' + '}', list_id.to_s)
|
3396
1147
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
3397
|
-
:header_params => header_params,
|
3398
1148
|
:query_params => query_params,
|
3399
|
-
:
|
3400
|
-
:body => post_body,
|
3401
|
-
:auth_names => auth_names,
|
3402
|
-
:return_type => 'ListMembers2')
|
1149
|
+
:body => post_body)
|
3403
1150
|
return data, status_code, headers
|
3404
1151
|
end
|
3405
|
-
# Add or update list member
|
3406
|
-
# Add or update a list member.
|
3407
|
-
# @param list_id The unique ID for the list.
|
3408
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member'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
1152
|
|
3418
1153
|
# Add or update list member
|
3419
|
-
|
3420
|
-
|
3421
|
-
|
3422
|
-
|
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)
|
1154
|
+
def set_list_member(list_id, subscriber_hash, body, opts = {})
|
1155
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1156
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
1157
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
3429
1158
|
|
3430
|
-
# query parameters
|
3431
1159
|
query_params = {}
|
3432
1160
|
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
1161
|
post_body = @api_client.object_to_http_body(body)
|
3446
|
-
|
1162
|
+
|
1163
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
3447
1164
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
3448
|
-
:header_params => header_params,
|
3449
1165
|
:query_params => query_params,
|
3450
|
-
:
|
3451
|
-
:body => post_body,
|
3452
|
-
:auth_names => auth_names,
|
3453
|
-
:return_type => 'ListMembers2')
|
1166
|
+
:body => post_body)
|
3454
1167
|
return data, status_code, headers
|
3455
1168
|
end
|
3456
1169
|
end
|