Class: MailchimpMarketing::AutomationsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/MailchimpMarketing/api/automations_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client) ⇒ AutomationsApi

Returns a new instance of AutomationsApi.



19
20
21
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 19

def initialize(api_client)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_workflow_email_subscriber(workflow_id = {}, workflow_email_id = {}, body = {}, opts = {}) ⇒ SubscriberInAutomationQueue2

Add a subscriber to a workflow email 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](mailchimp.com/help/automation-types/) or add subscribers to an automated email queue that uses the [API request delay type](mailchimp.com/help/automation-types/).

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • workflow_email_id (defaults to: {})

    The unique id for the Automation workflow email.

  • body (defaults to: {})
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (SubscriberInAutomationQueue2)


818
819
820
821
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 818

def add_workflow_email_subscriber(workflow_id = {}, workflow_email_id = {}, body = {}, opts = {})
  data, _status_code, _headers = add_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, body, opts)
  data
end

#add_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, body, opts = {}) ⇒ Array<(SubscriberInAutomationQueue2, Fixnum, Hash)>

Add a subscriber to a workflow email 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](mailchimp.com/help/automation-types/) or add subscribers to an automated email queue that uses the [API request delay type](mailchimp.com/help/automation-types/).

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • workflow_email_id

    The unique id for the Automation workflow email.

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SubscriberInAutomationQueue2, Fixnum, Hash)>)

    SubscriberInAutomationQueue2 data, response status code and response headers



830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 830

def add_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, body, opts = {})
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SubscriberInAutomationQueue2')
  return data, status_code, headers
end

#archive(workflow_id = {}, opts = {}) ⇒ nil

Archive an automation workflow. 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.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


27
28
29
30
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 27

def archive(workflow_id = {}, opts = {})
  archive_with_http_info(workflow_id, opts)
  nil
end

#archive_with_http_info(workflow_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Archive an automation workflow. 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.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 37

def archive_with_http_info(workflow_id, opts = {})
  # resource path
  local_var_path = '/automations/{workflow_id}/actions/archive'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  return data, status_code, headers
end

#create(body = {}, opts = {}) ⇒ AutomationWorkflow

Create a new Automation Create a new Automation in your Mailchimp account.

Parameters:

  • body (defaults to: {})
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (AutomationWorkflow)


596
597
598
599
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 596

def create(body = {}, opts = {})
  data, _status_code, _headers = create_with_http_info(body, opts)
  data
end

#create_with_http_info(body, opts = {}) ⇒ Array<(AutomationWorkflow, Fixnum, Hash)>

Create a new Automation Create a new Automation in your Mailchimp account.

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AutomationWorkflow, Fixnum, Hash)>)

    AutomationWorkflow data, response status code and response headers



606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 606

def create_with_http_info(body, opts = {})
  # resource path
  local_var_path = '/automations'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AutomationWorkflow')
  return data, status_code, headers
end

#delete_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {}) ⇒ nil

Delete a workflow email 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.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • workflow_email_id (defaults to: {})

    The unique id for the Automation workflow email.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


71
72
73
74
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 71

def delete_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
  delete_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
  nil
end

#delete_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a workflow email 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.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • workflow_email_id

    The unique id for the Automation workflow email.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 82

def delete_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  return data, status_code, headers
end

#get(workflow_id = {}, opts = {}) ⇒ AutomationWorkflow

Get information about a specific Automation workflow 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.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (AutomationWorkflow)


180
181
182
183
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 180

def get(workflow_id = {}, opts = {})
  data, _status_code, _headers = get_with_http_info(workflow_id, opts)
  data
end

#get_removed_workflow_email_subscriber(workflow_id = {}, subscriber_hash = {}, opts = {}) ⇒ SubscriberRemovedFromAutomationWorkflow

View a specific subscriber who was removed from a workflow Get information about a specific subscriber who was [removed from an Automation workflow](mailchimp.com/help/manage-subscribers-in-an-automation/).

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • subscriber_hash (defaults to: {})

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (SubscriberRemovedFromAutomationWorkflow)


457
458
459
460
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 457

def get_removed_workflow_email_subscriber(workflow_id = {}, subscriber_hash = {}, opts = {})
  data, _status_code, _headers = get_removed_workflow_email_subscriber_with_http_info(workflow_id, subscriber_hash, opts)
  data
end

#get_removed_workflow_email_subscriber_with_http_info(workflow_id, subscriber_hash, opts = {}) ⇒ Array<(SubscriberRemovedFromAutomationWorkflow, Fixnum, Hash)>

View a specific subscriber who was removed from a workflow Get information about a specific subscriber who was [removed from an Automation workflow](mailchimp.com/help/manage-subscribers-in-an-automation/).

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • subscriber_hash

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SubscriberRemovedFromAutomationWorkflow, Fixnum, Hash)>)

    SubscriberRemovedFromAutomationWorkflow data, response status code and response headers



468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 468

def get_removed_workflow_email_subscriber_with_http_info(workflow_id, subscriber_hash, opts = {})
  # resource path
  local_var_path = '/automations/{workflow_id}/removed-subscribers/{subscriber_hash}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SubscriberRemovedFromAutomationWorkflow')
  return data, status_code, headers
end

#get_with_http_info(workflow_id, opts = {}) ⇒ Array<(AutomationWorkflow, Fixnum, Hash)>

Get information about a specific Automation workflow 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.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(AutomationWorkflow, Fixnum, Hash)>)

    AutomationWorkflow data, response status code and response headers



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 192

def get_with_http_info(workflow_id, opts = {})
  # resource path
  local_var_path = '/automations/{workflow_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AutomationWorkflow')
  return data, status_code, headers
end

#get_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {}) ⇒ AutomationWorkflowEmail

Get information about a specific workflow email Get information about an individual Automation workflow email.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • workflow_email_id (defaults to: {})

    The unique id for the Automation workflow email.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (AutomationWorkflowEmail)


273
274
275
276
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 273

def get_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
  data, _status_code, _headers = get_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
  data
end

#get_workflow_email_subscriber(workflow_id = {}, workflow_email_id = {}, subscriber_hash = {}, opts = {}) ⇒ SubscriberInAutomationQueue2

View specific subscriber in email queue Get information about a specific subscriber in an Automation email queue.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • workflow_email_id (defaults to: {})

    The unique id for the Automation workflow email.

  • subscriber_hash (defaults to: {})

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (SubscriberInAutomationQueue2)


366
367
368
369
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 366

def get_workflow_email_subscriber(workflow_id = {}, workflow_email_id = {}, subscriber_hash = {}, opts = {})
  data, _status_code, _headers = get_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, subscriber_hash, opts)
  data
end

#get_workflow_email_subscriber_queue(workflow_id = {}, workflow_email_id = {}, opts = {}) ⇒ InlineResponse2004

View queued subscribers for an automated email Get information about an Automation email queue.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • workflow_email_id (defaults to: {})

    The unique id for the Automation workflow email.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (InlineResponse2004)


319
320
321
322
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 319

def get_workflow_email_subscriber_queue(workflow_id = {}, workflow_email_id = {}, opts = {})
  data, _status_code, _headers = get_workflow_email_subscriber_queue_with_http_info(workflow_id, workflow_email_id, opts)
  data
end

#get_workflow_email_subscriber_queue_with_http_info(workflow_id, workflow_email_id, opts = {}) ⇒ Array<(InlineResponse2004, Fixnum, Hash)>

View queued subscribers for an automated email Get information about an Automation email queue.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • workflow_email_id

    The unique id for the Automation workflow email.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InlineResponse2004, Fixnum, Hash)>)

    InlineResponse2004 data, response status code and response headers



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 330

def get_workflow_email_subscriber_queue_with_http_info(workflow_id, workflow_email_id, opts = {})
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2004')
  return data, status_code, headers
end

#get_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, subscriber_hash, opts = {}) ⇒ Array<(SubscriberInAutomationQueue2, Fixnum, Hash)>

View specific subscriber in email queue Get information about a specific subscriber in an Automation email queue.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • workflow_email_id

    The unique id for the Automation workflow email.

  • subscriber_hash

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SubscriberInAutomationQueue2, Fixnum, Hash)>)

    SubscriberInAutomationQueue2 data, response status code and response headers



378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 378

def get_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, subscriber_hash, opts = {})
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SubscriberInAutomationQueue2')
  return data, status_code, headers
end

#get_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {}) ⇒ Array<(AutomationWorkflowEmail, Fixnum, Hash)>

Get information about a specific workflow email Get information about an individual Automation workflow email.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • workflow_email_id

    The unique id for the Automation workflow email.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AutomationWorkflowEmail, Fixnum, Hash)>)

    AutomationWorkflowEmail data, response status code and response headers



284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 284

def get_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AutomationWorkflowEmail')
  return data, status_code, headers
end

#list(opts = {}) ⇒ InlineResponse2003

Get a list of Automations Get a summary of an account’s Automations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :before_create_time (DateTime)

    Restrict the response to automations created before the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :since_create_time (DateTime)

    Restrict the response to automations created after the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :before_send_time (DateTime)

    Restrict the response to automations sent before the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :since_send_time (DateTime)

    Restrict the response to automations sent after the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :status (String)

    Restrict the results to automations with the specified status.

Returns:

  • (InlineResponse2003)


121
122
123
124
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 121

def list(opts = {})
  data, _status_code, _headers = list_with_http_info(opts)
  data
end

#list_all_workflow_emails(workflow_id = {}, opts = {}) ⇒ AutomationEmails

Get a list of automated emails in a workflow Get a summary of the emails in an Automation workflow.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (AutomationEmails)


228
229
230
231
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 228

def list_all_workflow_emails(workflow_id = {}, opts = {})
  data, _status_code, _headers = list_all_workflow_emails_with_http_info(workflow_id, opts)
  data
end

#list_all_workflow_emails_with_http_info(workflow_id, opts = {}) ⇒ Array<(AutomationEmails, Fixnum, Hash)>

Get a list of automated emails in a workflow Get a summary of the emails in an Automation workflow.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AutomationEmails, Fixnum, Hash)>)

    AutomationEmails data, response status code and response headers



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 238

def list_all_workflow_emails_with_http_info(workflow_id, opts = {})
  # resource path
  local_var_path = '/automations/{workflow_id}/emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AutomationEmails')
  return data, status_code, headers
end

#list_with_http_info(opts = {}) ⇒ Array<(InlineResponse2003, Fixnum, Hash)>

Get a list of Automations Get a summary of an account&#39;s Automations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :before_create_time (DateTime)

    Restrict the response to automations created before the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :since_create_time (DateTime)

    Restrict the response to automations created after the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :before_send_time (DateTime)

    Restrict the response to automations sent before the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :since_send_time (DateTime)

    Restrict the response to automations sent after the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :status (String)

    Restrict the results to automations with the specified status.

Returns:

  • (Array<(InlineResponse2003, Fixnum, Hash)>)

    InlineResponse2003 data, response status code and response headers



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 137

def list_with_http_info(opts = {})
  # resource path
  local_var_path = '/automations'

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'before_create_time'] = opts[:'before_create_time'] if !opts[:'before_create_time'].nil?
  query_params[:'since_create_time'] = opts[:'since_create_time'] if !opts[:'since_create_time'].nil?
  query_params[:'before_send_time'] = opts[:'before_send_time'] if !opts[:'before_send_time'].nil?
  query_params[:'since_send_time'] = opts[:'since_send_time'] if !opts[:'since_send_time'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2003')
  return data, status_code, headers
end

#list_workflow_email_subscribers_removed(workflow_id = {}, opts = {}) ⇒ RemovedSubscribers

View all subscribers removed from a workflow Get information about subscribers who were [removed from an Automation workflow](mailchimp.com/help/manage-subscribers-in-an-automation/).

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (RemovedSubscribers)


412
413
414
415
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 412

def list_workflow_email_subscribers_removed(workflow_id = {}, opts = {})
  data, _status_code, _headers = list_workflow_email_subscribers_removed_with_http_info(workflow_id, opts)
  data
end

#list_workflow_email_subscribers_removed_with_http_info(workflow_id, opts = {}) ⇒ Array<(RemovedSubscribers, Fixnum, Hash)>

View all subscribers removed from a workflow Get information about subscribers who were [removed from an Automation workflow](mailchimp.com/help/manage-subscribers-in-an-automation/).

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RemovedSubscribers, Fixnum, Hash)>)

    RemovedSubscribers data, response status code and response headers



422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 422

def list_workflow_email_subscribers_removed_with_http_info(workflow_id, opts = {})
  # resource path
  local_var_path = '/automations/{workflow_id}/removed-subscribers'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RemovedSubscribers')
  return data, status_code, headers
end

#pause_all_emails(workflow_id = {}, opts = {}) ⇒ nil

Pause all emails in an Automation workflow Pause all emails in a specific Automation workflow.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


640
641
642
643
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 640

def pause_all_emails(workflow_id = {}, opts = {})
  pause_all_emails_with_http_info(workflow_id, opts)
  nil
end

#pause_all_emails_with_http_info(workflow_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Pause all emails in an Automation workflow Pause all emails in a specific Automation workflow.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 650

def pause_all_emails_with_http_info(workflow_id, opts = {})
  # resource path
  local_var_path = '/automations/{workflow_id}/actions/pause-all-emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  return data, status_code, headers
end

#pause_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {}) ⇒ nil

Pause an automated email Pause an automated email.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • workflow_email_id (defaults to: {})

    The unique id for the Automation workflow email.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


727
728
729
730
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 727

def pause_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
  pause_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
  nil
end

#pause_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Pause an automated email Pause an automated email.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • workflow_email_id

    The unique id for the Automation workflow email.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 738

def pause_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  return data, status_code, headers
end

#remove_workflow_email_subscriber(workflow_id = {}, body = {}, opts = {}) ⇒ SubscriberRemovedFromAutomationWorkflow

Remove subscriber from a workflow [Remove a subscriber](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.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • body (defaults to: {})
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (SubscriberRemovedFromAutomationWorkflow)


865
866
867
868
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 865

def remove_workflow_email_subscriber(workflow_id = {}, body = {}, opts = {})
  data, _status_code, _headers = remove_workflow_email_subscriber_with_http_info(workflow_id, body, opts)
  data
end

#remove_workflow_email_subscriber_with_http_info(workflow_id, body, opts = {}) ⇒ Array<(SubscriberRemovedFromAutomationWorkflow, Fixnum, Hash)>

Remove subscriber from a workflow [Remove a subscriber](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.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SubscriberRemovedFromAutomationWorkflow, Fixnum, Hash)>)

    SubscriberRemovedFromAutomationWorkflow data, response status code and response headers



876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 876

def remove_workflow_email_subscriber_with_http_info(workflow_id, body, opts = {})
  # resource path
  local_var_path = '/automations/{workflow_id}/removed-subscribers'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SubscriberRemovedFromAutomationWorkflow')
  return data, status_code, headers
end

#start_all_emails(workflow_id = {}, opts = {}) ⇒ nil

Start all emails in an Automation workflow Start all emails in an Automation workflow.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


683
684
685
686
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 683

def start_all_emails(workflow_id = {}, opts = {})
  start_all_emails_with_http_info(workflow_id, opts)
  nil
end

#start_all_emails_with_http_info(workflow_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Start all emails in an Automation workflow Start all emails in an Automation workflow.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 693

def start_all_emails_with_http_info(workflow_id, opts = {})
  # resource path
  local_var_path = '/automations/{workflow_id}/actions/start-all-emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  return data, status_code, headers
end

#start_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {}) ⇒ nil

Start an automated email Start an automated email.

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • workflow_email_id (defaults to: {})

    The unique id for the Automation workflow email.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


772
773
774
775
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 772

def start_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
  start_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
  nil
end

#start_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Start an automated email Start an automated email.

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • workflow_email_id

    The unique id for the Automation workflow email.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 783

def start_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  return data, status_code, headers
end

#update(workflow_id = {}, body = {}, opts = {}) ⇒ AutomationWorkflow

Update an Automation Update some or all of the settings for a Automation

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • body (defaults to: {})
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (AutomationWorkflow)


551
552
553
554
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 551

def update(workflow_id = {}, body = {}, opts = {})
  data, _status_code, _headers = update_with_http_info(workflow_id, body, opts)
  data
end

#update_with_http_info(workflow_id, body, opts = {}) ⇒ Array<(AutomationWorkflow, Fixnum, Hash)>

Update an Automation Update some or all of the settings for a Automation

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AutomationWorkflow, Fixnum, Hash)>)

    AutomationWorkflow data, response status code and response headers



562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 562

def update_with_http_info(workflow_id, body, opts = {})
  # resource path
  local_var_path = '/automations/{workflow_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AutomationWorkflow')
  return data, status_code, headers
end

#update_workflow_email(workflow_id = {}, workflow_email_id = {}, body = {}, opts = {}) ⇒ AutomationWorkflowEmail

Update an Automation workflow email Update settings for a Automation workflow email

Parameters:

  • workflow_id (defaults to: {})

    The unique id for the Automation workflow.

  • workflow_email_id (defaults to: {})

    The unique id for the Automation workflow email.

  • body (defaults to: {})
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (AutomationWorkflowEmail)


504
505
506
507
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 504

def update_workflow_email(workflow_id = {}, workflow_email_id = {}, body = {}, opts = {})
  data, _status_code, _headers = update_workflow_email_with_http_info(workflow_id, workflow_email_id, body, opts)
  data
end

#update_workflow_email_with_http_info(workflow_id, workflow_email_id, body, opts = {}) ⇒ Array<(AutomationWorkflowEmail, Fixnum, Hash)>

Update an Automation workflow email Update settings for a Automation workflow email

Parameters:

  • workflow_id

    The unique id for the Automation workflow.

  • workflow_email_id

    The unique id for the Automation workflow email.

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AutomationWorkflowEmail, Fixnum, Hash)>)

    AutomationWorkflowEmail data, response status code and response headers



516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
# File 'lib/MailchimpMarketing/api/automations_api.rb', line 516

def update_workflow_email_with_http_info(workflow_id, workflow_email_id, body, opts = {})
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AutomationWorkflowEmail')
  return data, status_code, headers
end