U
    hRf*                     @   s   d Z ddlmZ ddlmZmZmZmZ ddlmZm	Z	 ddl
mZ ddlmZ ddlmZ G dd	 d	eZG d
d deZdS )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Numbers
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )datetime)AnyDictListOptional)deserializevalues)InstanceResource)ListResource)Versionc                       s>   e Zd ZdZeeeef d fddZedddZ	  Z
S )WebhookInstancea7  
    :ivar url: The URL of the webhook configuration request
    :ivar port_in_target_url: Webhook URL to send a request when a port in request or port in phone number event happens
    :ivar port_out_target_url: Webhook URL to send a request when a port out phone number event happens
    :ivar notifications_of: List of notification events to send a request to the webhook URL
    :ivar port_in_target_date_created: Creation date for the port in webhook configuration
    :ivar port_out_target_date_created: Creation date for the port out webhook configuration
    )versionpayloadc                    sd   t  | |d| _|d| _|d| _|d| _t|d| _	t|d| _
d S )Nurlport_in_target_urlport_out_target_urlnotifications_ofport_in_target_date_createdport_out_target_date_created)super__init__getr   r   r   r   r   iso8601_datetimer   r   )selfr   r   	__class__ B/tmp/pip-unpacked-wheel-74se_viw/twilio/rest/numbers/v1/webhook.pyr   "   s    zWebhookInstance.__init__returnc                 C   s   dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z#<Twilio.Numbers.V1.WebhookInstance>r   r   r   r   r   __repr__0   s    zWebhookInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r   r"   __classcell__r   r   r   r   r      s   	r   c                       sL   e Zd Zed fddZedddZedddZedd	d
Z	  Z
S )WebhookList)r   c                    s   t  | d| _dS )zi
        Initialize the WebhookList

        :param version: Version that contains the resource

        z/Porting/Configuration/WebhookN)r   r   _uri)r   r   r   r   r   r   <   s    zWebhookList.__init__r   c                 C   s.   t ddi}| jjd| j|d}t| j|S )j
        Asynchronously fetch the WebhookInstance


        :returns: The fetched WebhookInstance
        Content-Type!application/x-www-form-urlencodedGETmethoduriheaders)r   of_versionfetchr*   r   r   r2   r   r   r   r   r5   G   s    zWebhookList.fetchc                    s4   t ddi}| jjd| j|dI dH }t| j|S )r+   r,   r-   r.   r/   N)r   r3   r4   fetch_asyncr*   r   r6   r   r   r   r7   T   s      zWebhookList.fetch_asyncc                 C   s   dS )r    z<Twilio.Numbers.V1.WebhookList>r   r!   r   r   r   r"   c   s    zWebhookList.__repr__)r#   r$   r%   r   r   r   r5   r7   r'   r"   r(   r   r   r   r   r)   :   s   r)   N)r&   r   typingr   r   r   r   Ztwilio.baser   r   Ztwilio.base.instance_resourcer	   Ztwilio.base.list_resourcer
   Ztwilio.base.versionr   r   r)   r   r   r   r   <module>   s   "