
    _jX                     0    d dl mZmZ  G d d          ZdS )    )ListOptionalc                       e Zd ZdZddeee                  fdZdedd fdZddZ	defd	Z
defd
ZdefdZededd f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                     |pg | _         d S N	_segments)selfr   s     Z/var/www/app.qaans.com/backend/venv/lib/python3.11/site-packages/stripe/_stripe_context.py__init__zStripeContext.__init__   s    !R    segmentreturnc                 2    t          | j        |gz             S r	   )r   r   )r   r   s     r   pushzStripeContext.push   s    T^wi7888r   c                 f    | j         st          d          t          | j         d d                   S )Nz&Cannot pop from an empty StripeContext)r   
ValueErrorr   r   s    r   popzStripeContext.pop   s5    ~ 	GEFFFT^CRC0111r   c                 6    d                     | j                  S N/)joinr   r   s    r   __str__zStripeContext.__str__   s    xx'''r   c                     d| j         dS )NzStripeContext()r
   r   s    r   __repr__zStripeContext.__repr__   s    33333r   c                 P    t          |t                    sdS | j        |j        k    S )NF)
isinstancer   r   )r   others     r   __eq__zStripeContext.__eq__   s(    %// 	5~00r   context_strc                 j    | st                      S |                     d          }t          |          S r   )r   split)r%   r   s     r   parsezStripeContext.parse"   s5     	# ??"$$S))X&&&r   r	   )r   r   )__name__
__module____qualname____doc__r   r   strr   r   r   r   r    boolr$   staticmethodr(    r   r   r   r      s         ( ($s)!4 ( ( ( (9C 9O 9 9 9 92 2 2 2( ( ( ( (4# 4 4 4 41t 1 1 1 1
 '3 '? ' ' ' \' ' 'r   r   N)typingr   r   r   r0   r   r   <module>r2      sO    ! ! ! ! ! ! ! !$' $' $' $' $' $' $' $' $' $'r   