
    Ch	              	       v    S SK Jr  S SKJr  S SKJr  \R                  " S5        S
S\S\S\\   4S	 jj5       rg)    )Optional)_util)
quote_pluszthe custom_method class decorator will be removed in a future version of stripe-python. Define custom methods directly and use StripeObject._static_request within.Nname	http_verb	http_pathc                 R   ^ ^^^ TS;  a  [        ST-  5      eTc  T mUUUU 4S jnU$ )N)getpostdeletez?Invalid http_verb: %s. Must be one of 'get', 'post' or 'delete'c                   > UU4S jnUU4S jnT(       a  [        U5      nO[        U5      n[        U T	S 5      nUc  [        U T	U5        U $ [        U ST	-   U5        [        R                  " ST	-   5      " U5      n[        U T	U5        U $ )Nc                    > U R                  5       < S[        U5      < ST< 3nU R                  TX2S9nSU;   a  UR                  S:X  a  X$l        U$ )N/paramsobjectlist)	class_urlr   _static_requestr   _retrieve_params)clssidr   urlobjr   r   s        X/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/stripe/_custom_method.pycustom_method_request=custom_method.<locals>.wrapper.<locals>.custom_method_request   sS    3C
 %%i%DC 33::#7'-$J    c                 l   > U R                  5       < S[        U5      < ST< 3nU R                  TX2S9$ )Nr   r   )r   r   _static_request_stream)r   r   r   r   r   r   s       r   custom_method_request_streamDcustom_method.<locals>.wrapper.<locals>.custom_method_request_stream(   s5    3C
 --i-LLr   _cls_)classmethodgetattrsetattrr   class_method_variant)
r   r   r!   class_method_implexisting_methodinstance_methodr   r   is_streamingr   s
         r   wrappercustom_method.<locals>.wrapper   s    		M  +,H I +,A B!#tT2"C01 
 C4):;#884HO C/
r   )
ValueError)r   r   r   r+   r,   s   ```` r   custom_methodr/      sE     11M
 	
 	- -^ Nr   )NF)	typingr   striper   urllib.parser   
deprecatedstrr/    r   r   <module>r6      sY      #  j  $	=
== }==r   