o
    wÔ+f8
  ã                   @   s   G d d„ de ƒZdS )c                   @   sV   e Zd ZdZddd„Zedd„ ƒZejdd„ ƒZedd	„ ƒZejd
d	„ ƒZdd„ Z	dS )ÚOpenTrackingzÄ
    Allows you to track whether the email was opened or not, by including a
    single pixel image in the body of the content. When the pixel is loaded,
    we log that the email was opened.
    Nc                 C   s0   d| _ d| _|dur|| _|dur|| _dS dS )a3  Create an OpenTracking to track when your email is opened.

        :param enable: If open tracking is enabled.
        :type enable: boolean, optional
        :param substitution_tag: Tag in body to be replaced by tracking pixel.
        :type substitution_tag: OpenTrackingSubstitionTag, optional
        N)Ú_enableÚ_substitution_tagÚenableÚsubstitution_tag)Úselfr   r   © r   úV/var/www/html/venv/lib/python3.10/site-packages/sendgrid/helpers/mail/open_tracking.pyÚ__init__   s   
ÿzOpenTracking.__init__c                 C   ó   | j S )zGIndicates if this setting is enabled.

        :rtype: boolean
        ©r   ©r   r   r   r   r      s   zOpenTracking.enablec                 C   ó
   || _ dS )zˆIndicates if this setting is enabled.

        :param value: Indicates if this setting is enabled.
        :type value: boolean
        Nr   ©r   Úvaluer   r   r   r   !   s   
c                 C   r
   )zÜAllows you to specify a substitution tag that you can insert in the
        body of your email at a location that you desire. This tag will be
        replaced by the open tracking pixel.

        :rtype: string
        ©r   r   r   r   r   r   *   s   zOpenTracking.substitution_tagc                 C   r   )aæ  Allows you to specify a substitution tag that you can insert in the
        body of your email at a location that you desire. This tag will be
        replaced by the open tracking pixel.

        :param value: Allows you to specify a substitution tag that you can
                      insert in the body of your email at a location that you
                      desire. This tag will be replaced by the open tracking
                      pixel.

        :type value: string
        Nr   r   r   r   r   r   4   s   
c                 C   s4   i }| j dur| j |d< | jdur| j ¡ |d< |S )z£
        Get a JSON-ready representation of this OpenTracking.

        :returns: This OpenTracking, ready for use in a request body.
        :rtype: dict
        Nr   r   )r   r   Úget)r   Úopen_trackingr   r   r   r   C   s   


zOpenTracking.get)NN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   Úpropertyr   Úsetterr   r   r   r   r   r   r      s    



	
r   N)Úobjectr   r   r   r   r   Ú<module>   s    