
    khX                     (    d dl mZmZ  G d d      Zy)    )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y)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                     |xs g | _         y N	_segments)selfr   s     V/var/www/api/v1/venv_fitandmore/lib/python3.12/site-packages/stripe/_stripe_context.py__init__zStripeContext.__init__   s    !R    segmentreturnc                 4    t        | j                  |gz         S r	   )r   r   )r   r   s     r   pushzStripeContext.push   s    T^^wi788r   c                 `    | j                   st        d      t        | j                   d d       S )Nz&Cannot pop from an empty StripeContext)r   
ValueErrorr   r   s    r   popzStripeContext.pop   s+    ~~EFFT^^CR011r   c                 8    dj                  | 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    133r   c                 V    t        |t              sy| j                  |j                  k(  S )NF)
isinstancer   r   )r   others     r   __eq__zStripeContext.__eq__   s"    %/~~00r   context_strc                 R    | s
t               S | j                  d      }t        |      S r   )r   split)r%   r   s     r   parsezStripeContext.parse"   s(     ?"$$S)X&&r   r	   )r   r   )__name__
__module____qualname____doc__r   r   strr   r   r   r   r    boolr$   staticmethodr(    r   r   r   r      sz    ($s)!4 (9C 9O 92( (4# 41t 1
 '3 '? ' 'r   r   N)typingr   r   r   r0   r   r   <module>r2      s    !$' $'r   