o
    ˷e2	                     @   s:   d dl mZmZmZ d dlmZ d dlmZ dddZdS )	    )absolute_importdivisionprint_function)util)
quote_plusNFc                    s6   dvr
t d  d u r  fdd}|S )N)getpostdeletez?Invalid http_verb: %s. Must be one of 'get', 'post' or 'delete'c                    s    fdd} fdd}rt |}nt |}t| d }|d u r+t| | | S t| d | td |}t| | | S )Nc                    sH   d|   tt| f }| j||d}d|v r"|jdkr"||_|S )N%s/%s/%sparamsobjectlist)	class_urlr   r   utf8_static_requestr   _retrieve_params)clssidr   urlobj	http_path	http_verb b/var/www/ideatree/venv/lib/python3.10/site-packages/stripe/api_resources/abstract/custom_method.pycustom_method_request   s   z=custom_method.<locals>.wrapper.<locals>.custom_method_requestc                    s,   d|   tt| f }| j||dS )Nr
   r   )r   r   r   r   _static_request_stream)r   r   r   r   r   r   r   custom_method_request_stream    s   zDcustom_method.<locals>.wrapper.<locals>.custom_method_request_stream_cls_)classmethodgetattrsetattrr   class_method_variant)r   r   r   class_method_implexisting_methodinstance_methodr   r   is_streamingnamer   r   wrapper   s   
zcustom_method.<locals>.wrapper)
ValueError)r)   r   r   r(   r*   r   r'   r   custom_method   s   /r,   )NF)	
__future__r   r   r   striper   stripe.six.moves.urllib.parser   r,   r   r   r   r   <module>   s    