Class: MailchimpMarketing::AutomationsApi
- Inherits:
-
Object
- Object
- MailchimpMarketing::AutomationsApi
- Defined in:
- lib/MailchimpMarketing/api/automations_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#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.
-
#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.
-
#archive(workflow_id = {}, opts = {}) ⇒ nil
Archive an automation workflow.
-
#archive_with_http_info(workflow_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Archive an automation workflow.
-
#create(body = {}, opts = {}) ⇒ AutomationWorkflow
Create a new Automation Create a new Automation in your Mailchimp account.
-
#create_with_http_info(body, opts = {}) ⇒ Array<(AutomationWorkflow, Fixnum, Hash)>
Create a new Automation Create a new Automation in your Mailchimp account.
-
#delete_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {}) ⇒ nil
Delete a workflow email Removes an individual Automation workflow email.
-
#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.
-
#get(workflow_id = {}, opts = {}) ⇒ AutomationWorkflow
Get information about a specific Automation workflow Get a summary of an individual Automation workflow’s settings and content.
-
#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/).
-
#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/).
-
#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's settings and content.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#initialize(api_client) ⇒ AutomationsApi
constructor
A new instance of AutomationsApi.
-
#list(opts = {}) ⇒ InlineResponse2003
Get a list of Automations Get a summary of an account’s Automations.
-
#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.
-
#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.
-
#list_with_http_info(opts = {}) ⇒ Array<(InlineResponse2003, Fixnum, Hash)>
Get a list of Automations Get a summary of an account's Automations.
-
#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/).
-
#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/).
-
#pause_all_emails(workflow_id = {}, opts = {}) ⇒ nil
Pause all emails in an Automation workflow Pause all emails in a specific Automation workflow.
-
#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.
-
#pause_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {}) ⇒ nil
Pause an automated email Pause an automated email.
-
#pause_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Pause an automated email Pause an automated email.
-
#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.
-
#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.
-
#start_all_emails(workflow_id = {}, opts = {}) ⇒ nil
Start all emails in an Automation workflow Start all emails in an Automation workflow.
-
#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.
-
#start_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {}) ⇒ nil
Start an automated email Start an automated email.
-
#start_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Start an automated email Start an automated email.
-
#update(workflow_id = {}, body = {}, opts = {}) ⇒ AutomationWorkflow
Update an Automation Update some or all of the settings for a Automation.
-
#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.
-
#update_workflow_email(workflow_id = {}, workflow_email_id = {}, body = {}, opts = {}) ⇒ AutomationWorkflowEmail
Update an Automation workflow email Update settings for a Automation workflow email.
-
#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.
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_client ⇒ Object
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/).
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/).
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.
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.
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.
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.
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.
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.
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.
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/).
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/).
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's settings and content. The `trigger_settings` object returns information for the first email in the workflow.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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's Automations.
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/).
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/).
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.
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.
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.
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.
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.
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've been sent from that workflow. Once they're removed, they can never be added back to the same workflow.
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.
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.
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.
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.
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
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
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
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
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 |