o
    iX                     @   s"   d dl mZmZ G dd dZdS )    )ListOptionalc                   @   s   e Zd ZdZddeee  fddZdedd fdd	Zdd
dZ	defddZ
defddZdefddZededd fddZdS )StripeContextaj  
    The StripeContext class provides an immutable container and convenience methods for interacting with the `Stripe-Context` header. All methods return a new instance of StripeContext.

    You can use it whenever you're initializing a `StripeClient` or sending `stripe_context` with a request. It's also found in the `EventNotification.context` property.
    Nsegmentsc                 C   s   |pg | _ d S N	_segments)selfr    r
   v/var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/_stripe_context.py__init__      zStripeContext.__init__segmentreturnc                 C   s   t | j|g S r   )r   r   )r	   r   r
   r
   r   push   s   zStripeContext.pushc                 C   s    | j stdt| j d d S )Nz&Cannot pop from an empty StripeContext)r   
ValueErrorr   r	   r
   r
   r   pop   s   zStripeContext.popc                 C   s   d | jS N/)joinr   r   r
   r
   r   __str__   s   zStripeContext.__str__c                 C   s   d| j dS )NzStripeContext()r   r   r
   r
   r   __repr__   r   zStripeContext.__repr__c                 C   s   t |tsdS | j|jkS )NF)
isinstancer   r   )r	   otherr
   r
   r   __eq__   s   
zStripeContext.__eq__context_strc                 C   s   | st  S | d}t |S r   )r   split)r   r   r
   r
   r   parse"   s   
zStripeContext.parser   )r   r   )__name__
__module____qualname____doc__r   r   strr   r   r   r   r   boolr   staticmethodr    r
   r
   r
   r   r      s    
r   N)typingr   r   r   r
   r
   r
   r   <module>   s    