
    jof	              	       |    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dS )    )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.NFname	http_verb	http_pathc                 R     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                 6   fd}fd}rt          |          }nt          |          }t          | 	d           }|t          | 	|           nEt          | d	z   |            t          j        d	z             |          }t          | 	|           | S )Nc                     |                                  dt          |          d}|                     ||          }d|v r|j        dk    r||_        |S )N/paramsobjectlist)	class_urlr   _static_requestr   _retrieve_params)clssidr   urlobjr   r   s        O/var/www/html/Alfredo/env/lib/python3.11/site-packages/stripe/_custom_method.pycustom_method_requestz=custom_method.<locals>.wrapper.<locals>.custom_method_request   sk    3	C
 %%iV%DDC 33:#7#7'-$J    c                     |                                  dt          |          d}|                     ||          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(   sH    3	C
 --iV-L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 	M 	M 	M 	M 	M  	C +,H I I +,A B B!#tT22"C01111 C4):;;;He84HH O C///
r   )
ValueError)r   r   r   r)   r*   s   ```` r   custom_methodr,      sn     111M
 
 	
 	- - - - - - - -^ Nr   )NF)	typingr   striper   urllib.parser   
deprecatedstrr,    r   r   <module>r3      s                # # # # # #  j   $	= =
== }= = = = = =r   