o
    ˷e                     @   s<   d Z ddlmZ ddlmZ ddlmZ G dd deZdS )a  
The Automation Removed Subscribers endpoint

Note: This is a paid feature

Documentation: http://developer.mailchimp.com/documentation/mailchimp/reference/automations/removed-subscribers/
Schema: https://api.mailchimp.com/schema/3.0/Automations/RemovedSubscribers/Instance.json
    )unicode_literals)BaseApi)check_emailc                       s0   e Zd ZdZ fddZdd Zdd Z  ZS )AutomationRemovedSubscribersz9
    Remove subscribers from an Automation workflow.
    c                    s&   t t| j|i | d| _d| _dS )z)
        Initialize the endpoint
        automationsN)superr   __init__endpointworkflow_id)selfargskwargs	__class__ g/var/www/ideatree/venv/lib/python3.10/site-packages/mailchimp3/entities/automationremovedsubscribers.pyr      s   
z%AutomationRemovedSubscribers.__init__c                 C   s:   || _ d|vrtdt|d  | jj| |d|dS )u@  
        Remove a subscriber 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.

        :param workflow_id: The unique id for the Automation workflow.
        :type workflow_id: :py:class:`str`
        :param data: The request body parameters
        :type data: :py:class:`dict`
        data = {
            "email_address": string*
        }
        email_addressz<The automation removed subscriber must have an email_addressremoved-subscribers)urldata)r
   KeyErrorr   
_mc_client_post_build_path)r   r
   r   r   r   r   create   s
   z#AutomationRemovedSubscribers.createc                 C   s   || _ | jj| |ddS )z
        Get information about subscribers who were removed from an Automation
        workflow.

        :param workflow_id: The unique id for the Automation workflow.
        :type workflow_id: :py:class:`str`
        r   )r   )r
   r   _getr   )r   r
   r   r   r   all4   s   z AutomationRemovedSubscribers.all)__name__
__module____qualname____doc__r   r   r   __classcell__r   r   r   r   r      s
    
r   N)r    
__future__r   mailchimp3.baseapir   mailchimp3.helpersr   r   r   r   r   r   <module>   s
   