MailchimpMarketing 3.0.1 → 3.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/MailchimpMarketing.gemspec +1 -1
  4. data/README.md +55 -46
  5. data/lib/MailchimpMarketing.rb +5 -6
  6. data/lib/MailchimpMarketing/api/activity_feed_api.rb +13 -69
  7. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +20 -113
  8. data/lib/MailchimpMarketing/api/automations_api.rb +130 -685
  9. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +33 -182
  10. data/lib/MailchimpMarketing/api/batches_api.rb +26 -146
  11. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +33 -182
  12. data/lib/MailchimpMarketing/api/campaigns_api.rb +144 -803
  13. data/lib/MailchimpMarketing/api/connected_sites_api.rb +32 -179
  14. data/lib/MailchimpMarketing/api/conversations_api.rb +36 -205
  15. data/lib/MailchimpMarketing/api/dashboard_api.rb +32 -221
  16. data/lib/MailchimpMarketing/api/ecommerce_api.rb +447 -2312
  17. data/lib/MailchimpMarketing/api/external_auths_api.rb +20 -113
  18. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +16 -83
  19. data/lib/MailchimpMarketing/api/file_manager_api.rb +71 -413
  20. data/lib/MailchimpMarketing/api/landing_pages_api.rb +51 -286
  21. data/lib/MailchimpMarketing/api/lists_api.rb +721 -2876
  22. data/lib/MailchimpMarketing/api/ping_api.rb +7 -33
  23. data/lib/MailchimpMarketing/api/postcards_api.rb +9 -41
  24. data/lib/MailchimpMarketing/api/reporting_api.rb +41 -237
  25. data/lib/MailchimpMarketing/api/reports_api.rb +153 -903
  26. data/lib/MailchimpMarketing/api/root_api.rb +7 -37
  27. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +8 -39
  28. data/lib/MailchimpMarketing/api/search_members_api.rb +8 -41
  29. data/lib/MailchimpMarketing/api/template_folders_api.rb +33 -182
  30. data/lib/MailchimpMarketing/api/templates_api.rb +40 -234
  31. data/lib/MailchimpMarketing/api/verified_domains_api.rb +32 -170
  32. data/lib/MailchimpMarketing/api_client.rb +94 -64
  33. data/lib/MailchimpMarketing/api_error.rb +4 -4
  34. data/lib/MailchimpMarketing/configuration.rb +1 -1
  35. data/lib/MailchimpMarketing/version.rb +2 -2
  36. metadata +2 -2
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.1
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  require 'uri'
14
+ require 'json'
14
15
 
15
16
  module MailchimpMarketing
16
17
  class AutomationsApi
@@ -19,126 +20,44 @@ module MailchimpMarketing
19
20
  def initialize(api_client)
20
21
  @api_client = api_client
21
22
  end
22
- # Archive an automation workflow.
23
- # Archiving will permanently end your automation and keep the report data. You’ll be able to replicate your archived automation, but you can’t restart it.
24
- # @param workflow_id The unique id for the Automation workflow.
25
- # @param [Hash] opts the optional parameters
26
- # @return [nil]
27
- def archive(workflow_id = {}, opts = {})
28
- archive_with_http_info(workflow_id, opts)
29
- nil
30
- end
31
23
 
32
- # Archive an automation workflow.
33
- # Archiving will permanently end your automation and keep the report data. You’ll be able to replicate your archived automation, but you can’t restart it.
34
- # @param workflow_id The unique id for the Automation workflow.
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
37
- def archive_with_http_info(workflow_id, opts = {})
38
- # resource path
39
- local_var_path = '/automations/{workflow_id}/actions/archive'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
24
+ # Archive automation
25
+ def archive(workflow_id, opts = {})
26
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
40
27
 
41
- # query parameters
42
28
  query_params = {}
43
-
44
- # header parameters
45
- header_params = {}
46
- # HTTP header 'Accept' (if needed)
47
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
48
- # HTTP header 'Content-Type'
49
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
50
-
51
- # form parameters
52
29
  form_params = {}
53
-
54
- # http body (model)
55
30
  post_body = nil
56
- auth_names = ['basicAuth']
31
+
32
+ local_var_path = '/automations/{workflow_id}/actions/archive'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
57
33
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
58
- :header_params => header_params,
59
34
  :query_params => query_params,
60
35
  :form_params => form_params,
61
- :body => post_body,
62
- :auth_names => auth_names)
36
+ :body => post_body)
63
37
  return data, status_code, headers
64
38
  end
65
- # Delete a workflow email
66
- # Removes an individual Automation workflow email. Emails from certain workflow types, including the Abandoned Cart Email (abandonedCart) and Product Retargeting Email (abandonedBrowse) Workflows, cannot be deleted.
67
- # @param workflow_id The unique id for the Automation workflow.
68
- # @param workflow_email_id The unique id for the Automation workflow email.
69
- # @param [Hash] opts the optional parameters
70
- # @return [nil]
71
- def delete_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
72
- delete_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
73
- nil
74
- end
75
39
 
76
- # Delete a workflow email
77
- # Removes an individual Automation workflow email. Emails from certain workflow types, including the Abandoned Cart Email (abandonedCart) and Product Retargeting Email (abandonedBrowse) Workflows, cannot be deleted.
78
- # @param workflow_id The unique id for the Automation workflow.
79
- # @param workflow_email_id The unique id for the Automation workflow email.
80
- # @param [Hash] opts the optional parameters
81
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
82
- def delete_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
83
- # resource path
84
- local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
40
+ # Delete workflow email
41
+ def delete_workflow_email(workflow_id, workflow_email_id, opts = {})
42
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
43
+ fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
85
44
 
86
- # query parameters
87
45
  query_params = {}
88
-
89
- # header parameters
90
- header_params = {}
91
- # HTTP header 'Accept' (if needed)
92
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
93
- # HTTP header 'Content-Type'
94
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
95
-
96
- # form parameters
97
46
  form_params = {}
98
-
99
- # http body (model)
100
47
  post_body = nil
101
- auth_names = ['basicAuth']
48
+
49
+ local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
102
50
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
103
- :header_params => header_params,
104
51
  :query_params => query_params,
105
52
  :form_params => form_params,
106
- :body => post_body,
107
- :auth_names => auth_names)
53
+ :body => post_body)
108
54
  return data, status_code, headers
109
55
  end
110
- # Get a list of Automations
111
- # Get a summary of an account's Automations.
112
- # @param [Hash] opts the optional parameters
113
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
114
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
115
- # @option opts [DateTime] :before_create_time Restrict the response to automations 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.
116
- # @option opts [DateTime] :since_create_time Restrict the response to automations 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.
117
- # @option opts [DateTime] :before_send_time Restrict the response to automations sent before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
118
- # @option opts [DateTime] :since_send_time Restrict the response to automations sent after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
119
- # @option opts [String] :status Restrict the results to automations with the specified status.
120
- # @return [InlineResponse2003]
121
- def list(opts = {})
122
- data, _status_code, _headers = list_with_http_info(opts)
123
- data
124
- end
125
56
 
126
- # Get a list of Automations
127
- # Get a summary of an account&#39;s Automations.
128
- # @param [Hash] opts the optional parameters
129
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
130
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
131
- # @option opts [DateTime] :before_create_time Restrict the response to automations 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.
132
- # @option opts [DateTime] :since_create_time Restrict the response to automations 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.
133
- # @option opts [DateTime] :before_send_time Restrict the response to automations sent before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
134
- # @option opts [DateTime] :since_send_time Restrict the response to automations sent after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
135
- # @option opts [String] :status Restrict the results to automations with the specified status.
136
- # @return [Array<(InlineResponse2003, Fixnum, Hash)>] InlineResponse2003 data, response status code and response headers
137
- def list_with_http_info(opts = {})
138
- # resource path
139
- local_var_path = '/automations'
57
+ # List automations
58
+ def list(opts = {})
59
+ fail ArgumentError, 'invalid value for "status", must be one of save, paused, sending' if opts[:'status'] && !['save', 'paused', 'sending'].include?(opts[:'status'])
140
60
 
141
- # query parameters
142
61
  query_params = {}
143
62
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
144
63
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -147,759 +66,285 @@ module MailchimpMarketing
147
66
  query_params[:'before_send_time'] = opts[:'before_send_time'] if !opts[:'before_send_time'].nil?
148
67
  query_params[:'since_send_time'] = opts[:'since_send_time'] if !opts[:'since_send_time'].nil?
149
68
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
150
-
151
- # header parameters
152
- header_params = {}
153
- # HTTP header 'Accept' (if needed)
154
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
155
- # HTTP header 'Content-Type'
156
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
157
-
158
- # form parameters
159
69
  form_params = {}
160
-
161
- # http body (model)
162
70
  post_body = nil
163
- auth_names = ['basicAuth']
71
+
72
+ local_var_path = '/automations'
164
73
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
165
- :header_params => header_params,
166
74
  :query_params => query_params,
167
75
  :form_params => form_params,
168
- :body => post_body,
169
- :auth_names => auth_names,
170
- :return_type => 'InlineResponse2003')
76
+ :body => post_body)
171
77
  return data, status_code, headers
172
78
  end
173
- # Get information about a specific Automation workflow
174
- # Get a summary of an individual Automation workflow's settings and content. The `trigger_settings` object returns information for the first email in the workflow.
175
- # @param workflow_id The unique id for the Automation workflow.
176
- # @param [Hash] opts the optional parameters
177
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
178
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
179
- # @return [AutomationWorkflow]
180
- def get(workflow_id = {}, opts = {})
181
- data, _status_code, _headers = get_with_http_info(workflow_id, opts)
182
- data
183
- end
184
79
 
185
- # Get information about a specific Automation workflow
186
- # Get a summary of an individual Automation workflow&#39;s settings and content. The &#x60;trigger_settings&#x60; object returns information for the first email in the workflow.
187
- # @param workflow_id The unique id for the Automation workflow.
188
- # @param [Hash] opts the optional parameters
189
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
190
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
191
- # @return [Array<(AutomationWorkflow, Fixnum, Hash)>] AutomationWorkflow data, response status code and response headers
192
- def get_with_http_info(workflow_id, opts = {})
193
- # resource path
194
- local_var_path = '/automations/{workflow_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
80
+ # Get automation info
81
+ def get(workflow_id, opts = {})
82
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
195
83
 
196
- # query parameters
197
84
  query_params = {}
198
85
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
199
86
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
200
-
201
- # header parameters
202
- header_params = {}
203
- # HTTP header 'Accept' (if needed)
204
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
205
- # HTTP header 'Content-Type'
206
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
207
-
208
- # form parameters
209
87
  form_params = {}
210
-
211
- # http body (model)
212
88
  post_body = nil
213
- auth_names = ['basicAuth']
89
+
90
+ local_var_path = '/automations/{workflow_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
214
91
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
215
- :header_params => header_params,
216
92
  :query_params => query_params,
217
93
  :form_params => form_params,
218
- :body => post_body,
219
- :auth_names => auth_names,
220
- :return_type => 'AutomationWorkflow')
94
+ :body => post_body)
221
95
  return data, status_code, headers
222
96
  end
223
- # Get a list of automated emails in a workflow
224
- # Get a summary of the emails in an Automation workflow.
225
- # @param workflow_id The unique id for the Automation workflow.
226
- # @param [Hash] opts the optional parameters
227
- # @return [AutomationEmails]
228
- def list_all_workflow_emails(workflow_id = {}, opts = {})
229
- data, _status_code, _headers = list_all_workflow_emails_with_http_info(workflow_id, opts)
230
- data
231
- end
232
97
 
233
- # Get a list of automated emails in a workflow
234
- # Get a summary of the emails in an Automation workflow.
235
- # @param workflow_id The unique id for the Automation workflow.
236
- # @param [Hash] opts the optional parameters
237
- # @return [Array<(AutomationEmails, Fixnum, Hash)>] AutomationEmails data, response status code and response headers
238
- def list_all_workflow_emails_with_http_info(workflow_id, opts = {})
239
- # resource path
240
- local_var_path = '/automations/{workflow_id}/emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
98
+ # List automated emails
99
+ def list_all_workflow_emails(workflow_id, opts = {})
100
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
241
101
 
242
- # query parameters
243
102
  query_params = {}
244
-
245
- # header parameters
246
- header_params = {}
247
- # HTTP header 'Accept' (if needed)
248
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
249
- # HTTP header 'Content-Type'
250
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
251
-
252
- # form parameters
253
103
  form_params = {}
254
-
255
- # http body (model)
256
104
  post_body = nil
257
- auth_names = ['basicAuth']
105
+
106
+ local_var_path = '/automations/{workflow_id}/emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
258
107
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
259
- :header_params => header_params,
260
108
  :query_params => query_params,
261
109
  :form_params => form_params,
262
- :body => post_body,
263
- :auth_names => auth_names,
264
- :return_type => 'AutomationEmails')
110
+ :body => post_body)
265
111
  return data, status_code, headers
266
112
  end
267
- # Get information about a specific workflow email
268
- # Get information about an individual Automation workflow email.
269
- # @param workflow_id The unique id for the Automation workflow.
270
- # @param workflow_email_id The unique id for the Automation workflow email.
271
- # @param [Hash] opts the optional parameters
272
- # @return [AutomationWorkflowEmail]
273
- def get_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
274
- data, _status_code, _headers = get_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
275
- data
276
- end
277
113
 
278
- # Get information about a specific workflow email
279
- # Get information about an individual Automation workflow email.
280
- # @param workflow_id The unique id for the Automation workflow.
281
- # @param workflow_email_id The unique id for the Automation workflow email.
282
- # @param [Hash] opts the optional parameters
283
- # @return [Array<(AutomationWorkflowEmail, Fixnum, Hash)>] AutomationWorkflowEmail data, response status code and response headers
284
- def get_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
285
- # resource path
286
- local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
114
+ # Get workflow email info
115
+ def get_workflow_email(workflow_id, workflow_email_id, opts = {})
116
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
117
+ fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
287
118
 
288
- # query parameters
289
119
  query_params = {}
290
-
291
- # header parameters
292
- header_params = {}
293
- # HTTP header 'Accept' (if needed)
294
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
295
- # HTTP header 'Content-Type'
296
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
297
-
298
- # form parameters
299
120
  form_params = {}
300
-
301
- # http body (model)
302
121
  post_body = nil
303
- auth_names = ['basicAuth']
122
+
123
+ local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
304
124
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
305
- :header_params => header_params,
306
125
  :query_params => query_params,
307
126
  :form_params => form_params,
308
- :body => post_body,
309
- :auth_names => auth_names,
310
- :return_type => 'AutomationWorkflowEmail')
127
+ :body => post_body)
311
128
  return data, status_code, headers
312
129
  end
313
- # View queued subscribers for an automated email
314
- # Get information about an Automation email queue.
315
- # @param workflow_id The unique id for the Automation workflow.
316
- # @param workflow_email_id The unique id for the Automation workflow email.
317
- # @param [Hash] opts the optional parameters
318
- # @return [InlineResponse2004]
319
- def get_workflow_email_subscriber_queue(workflow_id = {}, workflow_email_id = {}, opts = {})
320
- data, _status_code, _headers = get_workflow_email_subscriber_queue_with_http_info(workflow_id, workflow_email_id, opts)
321
- data
322
- end
323
130
 
324
- # View queued subscribers for an automated email
325
- # Get information about an Automation email queue.
326
- # @param workflow_id The unique id for the Automation workflow.
327
- # @param workflow_email_id The unique id for the Automation workflow email.
328
- # @param [Hash] opts the optional parameters
329
- # @return [Array<(InlineResponse2004, Fixnum, Hash)>] InlineResponse2004 data, response status code and response headers
330
- def get_workflow_email_subscriber_queue_with_http_info(workflow_id, workflow_email_id, opts = {})
331
- # resource path
332
- local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
131
+ # List automated email subscribers
132
+ def get_workflow_email_subscriber_queue(workflow_id, workflow_email_id, opts = {})
133
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
134
+ fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
333
135
 
334
- # query parameters
335
136
  query_params = {}
336
-
337
- # header parameters
338
- header_params = {}
339
- # HTTP header 'Accept' (if needed)
340
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
341
- # HTTP header 'Content-Type'
342
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
343
-
344
- # form parameters
345
137
  form_params = {}
346
-
347
- # http body (model)
348
138
  post_body = nil
349
- auth_names = ['basicAuth']
139
+
140
+ local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
350
141
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
351
- :header_params => header_params,
352
142
  :query_params => query_params,
353
143
  :form_params => form_params,
354
- :body => post_body,
355
- :auth_names => auth_names,
356
- :return_type => 'InlineResponse2004')
144
+ :body => post_body)
357
145
  return data, status_code, headers
358
146
  end
359
- # View specific subscriber in email queue
360
- # Get information about a specific subscriber in an Automation email queue.
361
- # @param workflow_id The unique id for the Automation workflow.
362
- # @param workflow_email_id The unique id for the Automation workflow email.
363
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
364
- # @param [Hash] opts the optional parameters
365
- # @return [SubscriberInAutomationQueue2]
366
- def get_workflow_email_subscriber(workflow_id = {}, workflow_email_id = {}, subscriber_hash = {}, opts = {})
367
- data, _status_code, _headers = get_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, subscriber_hash, opts)
368
- data
369
- end
370
147
 
371
- # View specific subscriber in email queue
372
- # Get information about a specific subscriber in an Automation email queue.
373
- # @param workflow_id The unique id for the Automation workflow.
374
- # @param workflow_email_id The unique id for the Automation workflow email.
375
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
376
- # @param [Hash] opts the optional parameters
377
- # @return [Array<(SubscriberInAutomationQueue2, Fixnum, Hash)>] SubscriberInAutomationQueue2 data, response status code and response headers
378
- def get_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, subscriber_hash, opts = {})
379
- # resource path
380
- local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue/{subscriber_hash}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
148
+ # Get automated email subscriber
149
+ def get_workflow_email_subscriber(workflow_id, workflow_email_id, subscriber_hash, opts = {})
150
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
151
+ fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
152
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
381
153
 
382
- # query parameters
383
154
  query_params = {}
384
-
385
- # header parameters
386
- header_params = {}
387
- # HTTP header 'Accept' (if needed)
388
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
389
- # HTTP header 'Content-Type'
390
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
391
-
392
- # form parameters
393
155
  form_params = {}
394
-
395
- # http body (model)
396
156
  post_body = nil
397
- auth_names = ['basicAuth']
157
+
158
+ local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue/{subscriber_hash}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
398
159
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
399
- :header_params => header_params,
400
160
  :query_params => query_params,
401
161
  :form_params => form_params,
402
- :body => post_body,
403
- :auth_names => auth_names,
404
- :return_type => 'SubscriberInAutomationQueue2')
162
+ :body => post_body)
405
163
  return data, status_code, headers
406
164
  end
407
- # View all subscribers removed from a workflow
408
- # Get information about subscribers who were [removed from an Automation workflow](https://mailchimp.com/help/manage-subscribers-in-an-automation/).
409
- # @param workflow_id The unique id for the Automation workflow.
410
- # @param [Hash] opts the optional parameters
411
- # @return [RemovedSubscribers]
412
- def list_workflow_email_subscribers_removed(workflow_id = {}, opts = {})
413
- data, _status_code, _headers = list_workflow_email_subscribers_removed_with_http_info(workflow_id, opts)
414
- data
415
- end
416
165
 
417
- # View all subscribers removed from a workflow
418
- # Get information about subscribers who were [removed from an Automation workflow](https://mailchimp.com/help/manage-subscribers-in-an-automation/).
419
- # @param workflow_id The unique id for the Automation workflow.
420
- # @param [Hash] opts the optional parameters
421
- # @return [Array<(RemovedSubscribers, Fixnum, Hash)>] RemovedSubscribers data, response status code and response headers
422
- def list_workflow_email_subscribers_removed_with_http_info(workflow_id, opts = {})
423
- # resource path
424
- local_var_path = '/automations/{workflow_id}/removed-subscribers'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
166
+ # List subscribers removed from workflow
167
+ def list_workflow_email_subscribers_removed(workflow_id, opts = {})
168
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
425
169
 
426
- # query parameters
427
170
  query_params = {}
428
-
429
- # header parameters
430
- header_params = {}
431
- # HTTP header 'Accept' (if needed)
432
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
433
- # HTTP header 'Content-Type'
434
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
435
-
436
- # form parameters
437
171
  form_params = {}
438
-
439
- # http body (model)
440
172
  post_body = nil
441
- auth_names = ['basicAuth']
173
+
174
+ local_var_path = '/automations/{workflow_id}/removed-subscribers'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
442
175
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
443
- :header_params => header_params,
444
176
  :query_params => query_params,
445
177
  :form_params => form_params,
446
- :body => post_body,
447
- :auth_names => auth_names,
448
- :return_type => 'RemovedSubscribers')
178
+ :body => post_body)
449
179
  return data, status_code, headers
450
180
  end
451
- # View a specific subscriber who was removed from a workflow
452
- # Get information about a specific subscriber who was [removed from an Automation workflow](https://mailchimp.com/help/manage-subscribers-in-an-automation/).
453
- # @param workflow_id The unique id for the Automation workflow.
454
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
455
- # @param [Hash] opts the optional parameters
456
- # @return [SubscriberRemovedFromAutomationWorkflow]
457
- def get_removed_workflow_email_subscriber(workflow_id = {}, subscriber_hash = {}, opts = {})
458
- data, _status_code, _headers = get_removed_workflow_email_subscriber_with_http_info(workflow_id, subscriber_hash, opts)
459
- data
460
- end
461
181
 
462
- # View a specific subscriber who was removed from a workflow
463
- # Get information about a specific subscriber who was [removed from an Automation workflow](https://mailchimp.com/help/manage-subscribers-in-an-automation/).
464
- # @param workflow_id The unique id for the Automation workflow.
465
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
466
- # @param [Hash] opts the optional parameters
467
- # @return [Array<(SubscriberRemovedFromAutomationWorkflow, Fixnum, Hash)>] SubscriberRemovedFromAutomationWorkflow data, response status code and response headers
468
- def get_removed_workflow_email_subscriber_with_http_info(workflow_id, subscriber_hash, opts = {})
469
- # resource path
470
- local_var_path = '/automations/{workflow_id}/removed-subscribers/{subscriber_hash}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
182
+ # Get subscriber removed from workflow
183
+ def get_removed_workflow_email_subscriber(workflow_id, subscriber_hash, opts = {})
184
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
185
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
471
186
 
472
- # query parameters
473
187
  query_params = {}
474
-
475
- # header parameters
476
- header_params = {}
477
- # HTTP header 'Accept' (if needed)
478
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
479
- # HTTP header 'Content-Type'
480
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
481
-
482
- # form parameters
483
188
  form_params = {}
484
-
485
- # http body (model)
486
189
  post_body = nil
487
- auth_names = ['basicAuth']
190
+
191
+ local_var_path = '/automations/{workflow_id}/removed-subscribers/{subscriber_hash}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
488
192
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
489
- :header_params => header_params,
490
193
  :query_params => query_params,
491
194
  :form_params => form_params,
492
- :body => post_body,
493
- :auth_names => auth_names,
494
- :return_type => 'SubscriberRemovedFromAutomationWorkflow')
195
+ :body => post_body)
495
196
  return data, status_code, headers
496
197
  end
497
- # Update an Automation workflow email
498
- # Update settings for a Automation workflow email
499
- # @param workflow_id The unique id for the Automation workflow.
500
- # @param workflow_email_id The unique id for the Automation workflow email.
501
- # @param body
502
- # @param [Hash] opts the optional parameters
503
- # @return [AutomationWorkflowEmail]
504
- def update_workflow_email(workflow_id = {}, workflow_email_id = {}, body = {}, opts = {})
505
- data, _status_code, _headers = update_workflow_email_with_http_info(workflow_id, workflow_email_id, body, opts)
506
- data
507
- end
508
198
 
509
- # Update an Automation workflow email
510
- # Update settings for a Automation workflow email
511
- # @param workflow_id The unique id for the Automation workflow.
512
- # @param workflow_email_id The unique id for the Automation workflow email.
513
- # @param body
514
- # @param [Hash] opts the optional parameters
515
- # @return [Array<(AutomationWorkflowEmail, Fixnum, Hash)>] AutomationWorkflowEmail data, response status code and response headers
516
- def update_workflow_email_with_http_info(workflow_id, workflow_email_id, body, opts = {})
517
- # resource path
518
- local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
199
+ # Update workflow email
200
+ def update_workflow_email(workflow_id, workflow_email_id, body, opts = {})
201
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
202
+ fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
203
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
519
204
 
520
- # query parameters
521
205
  query_params = {}
522
-
523
- # header parameters
524
- header_params = {}
525
- # HTTP header 'Accept' (if needed)
526
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
527
- # HTTP header 'Content-Type'
528
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
529
-
530
- # form parameters
531
206
  form_params = {}
532
-
533
- # http body (model)
534
207
  post_body = @api_client.object_to_http_body(body)
535
- auth_names = ['basicAuth']
208
+
209
+ local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
536
210
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
537
- :header_params => header_params,
538
211
  :query_params => query_params,
539
212
  :form_params => form_params,
540
- :body => post_body,
541
- :auth_names => auth_names,
542
- :return_type => 'AutomationWorkflowEmail')
213
+ :body => post_body)
543
214
  return data, status_code, headers
544
215
  end
545
- # Update an Automation
546
- # Update some or all of the settings for a Automation
547
- # @param workflow_id The unique id for the Automation workflow.
548
- # @param body
549
- # @param [Hash] opts the optional parameters
550
- # @return [AutomationWorkflow]
551
- def update(workflow_id = {}, body = {}, opts = {})
552
- data, _status_code, _headers = update_with_http_info(workflow_id, body, opts)
553
- data
554
- end
555
216
 
556
- # Update an Automation
557
- # Update some or all of the settings for a Automation
558
- # @param workflow_id The unique id for the Automation workflow.
559
- # @param body
560
- # @param [Hash] opts the optional parameters
561
- # @return [Array<(AutomationWorkflow, Fixnum, Hash)>] AutomationWorkflow data, response status code and response headers
562
- def update_with_http_info(workflow_id, body, opts = {})
563
- # resource path
564
- local_var_path = '/automations/{workflow_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
217
+ # Update automation
218
+ def update(workflow_id, body, opts = {})
219
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
220
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
565
221
 
566
- # query parameters
567
222
  query_params = {}
568
-
569
- # header parameters
570
- header_params = {}
571
- # HTTP header 'Accept' (if needed)
572
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
573
- # HTTP header 'Content-Type'
574
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
575
-
576
- # form parameters
577
223
  form_params = {}
578
-
579
- # http body (model)
580
224
  post_body = @api_client.object_to_http_body(body)
581
- auth_names = ['basicAuth']
225
+
226
+ local_var_path = '/automations/{workflow_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
582
227
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
583
- :header_params => header_params,
584
228
  :query_params => query_params,
585
229
  :form_params => form_params,
586
- :body => post_body,
587
- :auth_names => auth_names,
588
- :return_type => 'AutomationWorkflow')
230
+ :body => post_body)
589
231
  return data, status_code, headers
590
232
  end
591
- # Create a new Automation
592
- # Create a new Automation in your Mailchimp account.
593
- # @param body
594
- # @param [Hash] opts the optional parameters
595
- # @return [AutomationWorkflow]
596
- def create(body = {}, opts = {})
597
- data, _status_code, _headers = create_with_http_info(body, opts)
598
- data
599
- end
600
233
 
601
- # Create a new Automation
602
- # Create a new Automation in your Mailchimp account.
603
- # @param body
604
- # @param [Hash] opts the optional parameters
605
- # @return [Array<(AutomationWorkflow, Fixnum, Hash)>] AutomationWorkflow data, response status code and response headers
606
- def create_with_http_info(body, opts = {})
607
- # resource path
608
- local_var_path = '/automations'
234
+ # Add automation
235
+ def create(body, opts = {})
236
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
609
237
 
610
- # query parameters
611
238
  query_params = {}
612
-
613
- # header parameters
614
- header_params = {}
615
- # HTTP header 'Accept' (if needed)
616
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
617
- # HTTP header 'Content-Type'
618
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
619
-
620
- # form parameters
621
239
  form_params = {}
622
-
623
- # http body (model)
624
240
  post_body = @api_client.object_to_http_body(body)
625
- auth_names = ['basicAuth']
241
+
242
+ local_var_path = '/automations'
626
243
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
627
- :header_params => header_params,
628
244
  :query_params => query_params,
629
245
  :form_params => form_params,
630
- :body => post_body,
631
- :auth_names => auth_names,
632
- :return_type => 'AutomationWorkflow')
246
+ :body => post_body)
633
247
  return data, status_code, headers
634
248
  end
635
- # Pause all emails in an Automation workflow
636
- # Pause all emails in a specific Automation workflow.
637
- # @param workflow_id The unique id for the Automation workflow.
638
- # @param [Hash] opts the optional parameters
639
- # @return [nil]
640
- def pause_all_emails(workflow_id = {}, opts = {})
641
- pause_all_emails_with_http_info(workflow_id, opts)
642
- nil
643
- end
644
249
 
645
- # Pause all emails in an Automation workflow
646
- # Pause all emails in a specific Automation workflow.
647
- # @param workflow_id The unique id for the Automation workflow.
648
- # @param [Hash] opts the optional parameters
649
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
650
- def pause_all_emails_with_http_info(workflow_id, opts = {})
651
- # resource path
652
- local_var_path = '/automations/{workflow_id}/actions/pause-all-emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
250
+ # Pause automation emails
251
+ def pause_all_emails(workflow_id, opts = {})
252
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
653
253
 
654
- # query parameters
655
254
  query_params = {}
656
-
657
- # header parameters
658
- header_params = {}
659
- # HTTP header 'Accept' (if needed)
660
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
661
- # HTTP header 'Content-Type'
662
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
663
-
664
- # form parameters
665
255
  form_params = {}
666
-
667
- # http body (model)
668
256
  post_body = nil
669
- auth_names = ['basicAuth']
257
+
258
+ local_var_path = '/automations/{workflow_id}/actions/pause-all-emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
670
259
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
671
- :header_params => header_params,
672
260
  :query_params => query_params,
673
261
  :form_params => form_params,
674
- :body => post_body,
675
- :auth_names => auth_names)
262
+ :body => post_body)
676
263
  return data, status_code, headers
677
264
  end
678
- # Start all emails in an Automation workflow
679
- # Start all emails in an Automation workflow.
680
- # @param workflow_id The unique id for the Automation workflow.
681
- # @param [Hash] opts the optional parameters
682
- # @return [nil]
683
- def start_all_emails(workflow_id = {}, opts = {})
684
- start_all_emails_with_http_info(workflow_id, opts)
685
- nil
686
- end
687
265
 
688
- # Start all emails in an Automation workflow
689
- # Start all emails in an Automation workflow.
690
- # @param workflow_id The unique id for the Automation workflow.
691
- # @param [Hash] opts the optional parameters
692
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
693
- def start_all_emails_with_http_info(workflow_id, opts = {})
694
- # resource path
695
- local_var_path = '/automations/{workflow_id}/actions/start-all-emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
266
+ # Start automation emails
267
+ def start_all_emails(workflow_id, opts = {})
268
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
696
269
 
697
- # query parameters
698
270
  query_params = {}
699
-
700
- # header parameters
701
- header_params = {}
702
- # HTTP header 'Accept' (if needed)
703
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
704
- # HTTP header 'Content-Type'
705
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
706
-
707
- # form parameters
708
271
  form_params = {}
709
-
710
- # http body (model)
711
272
  post_body = nil
712
- auth_names = ['basicAuth']
273
+
274
+ local_var_path = '/automations/{workflow_id}/actions/start-all-emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
713
275
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
714
- :header_params => header_params,
715
276
  :query_params => query_params,
716
277
  :form_params => form_params,
717
- :body => post_body,
718
- :auth_names => auth_names)
278
+ :body => post_body)
719
279
  return data, status_code, headers
720
280
  end
721
- # Pause an automated email
722
- # Pause an automated email.
723
- # @param workflow_id The unique id for the Automation workflow.
724
- # @param workflow_email_id The unique id for the Automation workflow email.
725
- # @param [Hash] opts the optional parameters
726
- # @return [nil]
727
- def pause_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
728
- pause_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
729
- nil
730
- end
731
281
 
732
- # Pause an automated email
733
- # Pause an automated email.
734
- # @param workflow_id The unique id for the Automation workflow.
735
- # @param workflow_email_id The unique id for the Automation workflow email.
736
- # @param [Hash] opts the optional parameters
737
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
738
- def pause_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
739
- # resource path
740
- local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/actions/pause'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
282
+ # Pause automated email
283
+ def pause_workflow_email(workflow_id, workflow_email_id, opts = {})
284
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
285
+ fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
741
286
 
742
- # query parameters
743
287
  query_params = {}
744
-
745
- # header parameters
746
- header_params = {}
747
- # HTTP header 'Accept' (if needed)
748
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
749
- # HTTP header 'Content-Type'
750
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
751
-
752
- # form parameters
753
288
  form_params = {}
754
-
755
- # http body (model)
756
289
  post_body = nil
757
- auth_names = ['basicAuth']
290
+
291
+ local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/actions/pause'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
758
292
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
759
- :header_params => header_params,
760
293
  :query_params => query_params,
761
294
  :form_params => form_params,
762
- :body => post_body,
763
- :auth_names => auth_names)
295
+ :body => post_body)
764
296
  return data, status_code, headers
765
297
  end
766
- # Start an automated email
767
- # Start an automated email.
768
- # @param workflow_id The unique id for the Automation workflow.
769
- # @param workflow_email_id The unique id for the Automation workflow email.
770
- # @param [Hash] opts the optional parameters
771
- # @return [nil]
772
- def start_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
773
- start_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
774
- nil
775
- end
776
298
 
777
- # Start an automated email
778
- # Start an automated email.
779
- # @param workflow_id The unique id for the Automation workflow.
780
- # @param workflow_email_id The unique id for the Automation workflow email.
781
- # @param [Hash] opts the optional parameters
782
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
783
- def start_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
784
- # resource path
785
- local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/actions/start'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
299
+ # Start automated email
300
+ def start_workflow_email(workflow_id, workflow_email_id, opts = {})
301
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
302
+ fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
786
303
 
787
- # query parameters
788
304
  query_params = {}
789
-
790
- # header parameters
791
- header_params = {}
792
- # HTTP header 'Accept' (if needed)
793
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
794
- # HTTP header 'Content-Type'
795
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
796
-
797
- # form parameters
798
305
  form_params = {}
799
-
800
- # http body (model)
801
306
  post_body = nil
802
- auth_names = ['basicAuth']
307
+
308
+ local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/actions/start'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
803
309
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
804
- :header_params => header_params,
805
310
  :query_params => query_params,
806
311
  :form_params => form_params,
807
- :body => post_body,
808
- :auth_names => auth_names)
312
+ :body => post_body)
809
313
  return data, status_code, headers
810
314
  end
811
- # Add a subscriber to a workflow email
812
- # Manually add a subscriber to a workflow, bypassing the default trigger settings. You can also use this endpoint to trigger a series of automated emails in an [API 3.0 workflow type](https://mailchimp.com/help/automation-types/) or add subscribers to an automated email queue that uses the [API request delay type](https://mailchimp.com/help/automation-types/).
813
- # @param workflow_id The unique id for the Automation workflow.
814
- # @param workflow_email_id The unique id for the Automation workflow email.
815
- # @param body
816
- # @param [Hash] opts the optional parameters
817
- # @return [SubscriberInAutomationQueue2]
818
- def add_workflow_email_subscriber(workflow_id = {}, workflow_email_id = {}, body = {}, opts = {})
819
- data, _status_code, _headers = add_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, body, opts)
820
- data
821
- end
822
315
 
823
- # Add a subscriber to a workflow email
824
- # Manually add a subscriber to a workflow, bypassing the default trigger settings. You can also use this endpoint to trigger a series of automated emails in an [API 3.0 workflow type](https://mailchimp.com/help/automation-types/) or add subscribers to an automated email queue that uses the [API request delay type](https://mailchimp.com/help/automation-types/).
825
- # @param workflow_id The unique id for the Automation workflow.
826
- # @param workflow_email_id The unique id for the Automation workflow email.
827
- # @param body
828
- # @param [Hash] opts the optional parameters
829
- # @return [Array<(SubscriberInAutomationQueue2, Fixnum, Hash)>] SubscriberInAutomationQueue2 data, response status code and response headers
830
- def add_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, body, opts = {})
831
- # resource path
832
- local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
316
+ # Add subscriber to workflow email
317
+ def add_workflow_email_subscriber(workflow_id, workflow_email_id, body, opts = {})
318
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
319
+ fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
320
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
833
321
 
834
- # query parameters
835
322
  query_params = {}
836
-
837
- # header parameters
838
- header_params = {}
839
- # HTTP header 'Accept' (if needed)
840
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
841
- # HTTP header 'Content-Type'
842
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
843
-
844
- # form parameters
845
323
  form_params = {}
846
-
847
- # http body (model)
848
324
  post_body = @api_client.object_to_http_body(body)
849
- auth_names = ['basicAuth']
325
+
326
+ local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
850
327
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
851
- :header_params => header_params,
852
328
  :query_params => query_params,
853
329
  :form_params => form_params,
854
- :body => post_body,
855
- :auth_names => auth_names,
856
- :return_type => 'SubscriberInAutomationQueue2')
330
+ :body => post_body)
857
331
  return data, status_code, headers
858
332
  end
859
- # Remove subscriber from a workflow
860
- # [Remove a subscriber](https://mailchimp.com/help/manage-subscribers-in-an-automation/) from a specific Automation workflow. You can remove a subscriber at any point in an Automation workflow, regardless of how many emails they've been sent from that workflow. Once they're removed, they can never be added back to the same workflow.
861
- # @param workflow_id The unique id for the Automation workflow.
862
- # @param body
863
- # @param [Hash] opts the optional parameters
864
- # @return [SubscriberRemovedFromAutomationWorkflow]
865
- def remove_workflow_email_subscriber(workflow_id = {}, body = {}, opts = {})
866
- data, _status_code, _headers = remove_workflow_email_subscriber_with_http_info(workflow_id, body, opts)
867
- data
868
- end
869
333
 
870
- # Remove subscriber from a workflow
871
- # [Remove a subscriber](https://mailchimp.com/help/manage-subscribers-in-an-automation/) from a specific Automation workflow. You can remove a subscriber at any point in an Automation workflow, regardless of how many emails they&#39;ve been sent from that workflow. Once they&#39;re removed, they can never be added back to the same workflow.
872
- # @param workflow_id The unique id for the Automation workflow.
873
- # @param body
874
- # @param [Hash] opts the optional parameters
875
- # @return [Array<(SubscriberRemovedFromAutomationWorkflow, Fixnum, Hash)>] SubscriberRemovedFromAutomationWorkflow data, response status code and response headers
876
- def remove_workflow_email_subscriber_with_http_info(workflow_id, body, opts = {})
877
- # resource path
878
- local_var_path = '/automations/{workflow_id}/removed-subscribers'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
334
+ # Remove subscriber from workflow
335
+ def remove_workflow_email_subscriber(workflow_id, body, opts = {})
336
+ fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
337
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
879
338
 
880
- # query parameters
881
339
  query_params = {}
882
-
883
- # header parameters
884
- header_params = {}
885
- # HTTP header 'Accept' (if needed)
886
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
887
- # HTTP header 'Content-Type'
888
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
889
-
890
- # form parameters
891
340
  form_params = {}
892
-
893
- # http body (model)
894
341
  post_body = @api_client.object_to_http_body(body)
895
- auth_names = ['basicAuth']
342
+
343
+ local_var_path = '/automations/{workflow_id}/removed-subscribers'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
896
344
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
897
- :header_params => header_params,
898
345
  :query_params => query_params,
899
346
  :form_params => form_params,
900
- :body => post_body,
901
- :auth_names => auth_names,
902
- :return_type => 'SubscriberRemovedFromAutomationWorkflow')
347
+ :body => post_body)
903
348
  return data, status_code, headers
904
349
  end
905
350
  end