
    +hI                     t    d dl mZ d dlmZ d dlmZ d dlmZmZ d dl	m
Z
  ede
      Z G d d	ee         Zy
)    )util)APIResource)
quote_plus)TypeVarcast)StripeObjectT)boundc                   T    e Zd Zedefd       Z ej                  d      dd       Zy)UpdateableAPIResourcereturnc                     | j                         dt        |      }t        t        | j	                  d||            S )N/post)params)	class_urlr   r   r	   _static_request)clssidr   urls       h/var/www/html/venv/lib/python3.12/site-packages/stripe/api_resources/abstract/updateable_api_resource.pymodifyzUpdateableAPIResource.modify   s5    *S/:As**63v*FGG    zThe `save` method is deprecated and will be removed in a future major version of the library. Use the class method `modify` on the resource instead.Nc                     | j                  d       }|r%| j                  d| j                         ||       | S t        j                  j                  d|        | S )Nr   )idempotency_keyr   z&Trying to save already saved object %r)	serialize_request_and_refreshinstance_urlr   loggerdebug)selfr   updated_paramss      r   savezUpdateableAPIResource.save   s`     -%%!!# /%	 &   KKFMr   )N)	__name__
__module____qualname__classmethodr	   r   r   
deprecatedr#    r   r   r   r   
   sC    Ha H H T__ 	_r   r   N)striper   *stripe.api_resources.abstract.api_resourcer   urllib.parser   typingr   r   stripe.stripe_objectr   r	   r   r)   r   r   <module>r/      s0     B #   -C|$KN r   