
    h	              	       r    d dl mZ d dlmZ d dlmZ  ej                  d      	 	 d
dededee   fd	       Zy)    )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                 J     dvrt        dz          fd}|S )N)getpostdeletez?Invalid http_verb: %s. Must be one of 'get', 'post' or 'delete'c                    fd}fd}rt        |      }nt        |      }t        | 	d       }|t        | 	|       | S t        | d	z   |        t        j                  d	z         |      }t        | 	|       | S )Nc                     | j                         dt        |      d}| j                  ||      }d|v r|j                  dk(  r||_        |S )N/paramsobjectlist)	class_urlr   _static_requestr   _retrieve_params)clssidr   urlobjr   r   s        U/var/www/api/v1/venv_getwork_v1/lib/python3.12/site-packages/stripe/_custom_method.pycustom_method_requestz=custom_method.<locals>.wrapper.<locals>.custom_method_request   sW    3C
 %%iV%DC 33::#7'-$J    c                 n    | j                         dt        |      d}| j                  ||      S )Nr   r   )r   r   _static_request_stream)r   r   r   r   r   r   s       r   custom_method_request_streamzDcustom_method.<locals>.wrapper.<locals>.custom_method_request_stream(   s7    3C
 --iV-LLr   _cls_)classmethodgetattrsetattrr   class_method_variant)
r   r   r    class_method_implexisting_methodinstance_methodr   r   is_streamingr   s
         r   wrapperzcustom_method.<locals>.wrapper   s    		M  +,H I +,A B!#tT2"C01 
 C4):;He884HO C/
r   )
ValueError)r   r   r   r)   r*   s   ```` r   custom_methodr,      s@     11M
 	
 	-^ Nr   )NF)	typingr   striper   urllib.parser   
deprecatedstrr,    r   r   <module>r3      s[      #  j  $	=
== }==r   