o
    L)jI                     @   s   d dl mZ d dlmZmZmZmZmZ d dlm	Z	m
Z
mZ er&d dlmZ G dd de
Zdedee d	efd
dZh dZ	 deeeef  d	eeeeef f fddZdS )    )RequestorOptions)MappingOptionalDictTupleAny)NotRequired	TypedDictTYPE_CHECKING)StripeContextc                   @   sn   e Zd ZU ed ed< ed ed< ed ed< ed ed< ed ed< ed ed	< ed ed
< ed ed< dS )RequestOptionszstr|Noneapi_keystripe_versionstripe_accountzstr | StripeContext | Nonestripe_contextzint|Nonemax_network_retriesidempotency_keycontent_typezMapping[str, str]|NoneheadersN)__name__
__module____qualname__r   __annotations__ r   r   |/var/www/html/finance-dev.cargoinsureonline.com/_shared/backend-venv/lib/python3.10/site-packages/stripe/_request_options.pyr   	   s   
 r   	requestorrequestreturnc              
   C   s   |du r| j | j| j| j| jddddS |dp| j |dp"| j|dp)| j|dp0| j|ddur<|dn| j|d|d	|d
dS )zi
    Merge a client and request object, giving precedence to the values from
    the request object.
    N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   r   get)r   r   r   r   r   merge_options   s0   



r   >   r   r   r   r   dc                 C   s@   | si i fS i }t | }dD ]}||v r||||< q||fS )z
    Extracts a RequestOptions object from a dict, and returns a tuple of
    the RequestOptions object and the remaining dict.
    )r   r   r   r   r   r   r   r   )dictpop)r    optionsd_copykeyr   r   r   extract_options_from_dictE   s   
r&   N)stripe._requestor_optionsr   typingr   r   r   r   r   typing_extensionsr   r	   r
   stripe._stripe_contextr   r   r   PERSISTENT_OPTIONS_KEYSstrr&   r   r   r   r   <module>   s(    
%