
    _jI                         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e
          Zdedee         d	efd
Zh dZ	 deeeef                  d	eeeeef         f         fdZdS )    )RequestorOptions)MappingOptionalDictTupleAny)NotRequired	TypedDictTYPE_CHECKING)StripeContextc                       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__     [/var/www/app.qaans.com/backend/venv/lib/python3.11/site-packages/stripe/_request_options.pyr   r   	   s         $$$$
++++
++++ <====$Z0000 ,,,,j))))1222222r   r   	requestorrequestreturnc           
         |$| j         | j        | j        | j        | j        ddddS |                    d          p| j         |                    d          p| j        |                    d          p| j        |                    d          p| j        |                    d          |                    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   s     r   merge_optionsr#      s     ('6'6'6#,#@# 	
 	
 		
 ;;y))>Y->!++&677 $#!++&677 $#!++&677 $#;;,--9  '{{+@AAA*";;'899N33;;y))  r   >   r   r   r   r   dc                 z    | si i fS i }t          |           }dD ]}||v r|                    |          ||<   ||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keys       r   extract_options_from_dictr+   E   s_      2v G!WWF	 + + &==!::c??GCLF?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   <module>r2      s<   6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 C C C C C C C C C C 54444443 3 3 3 3Y 3 3 3""n%" " " " "J   S!"
>4S>)*     r   