Ë
    <@‹g  ã                   ó   — d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	m
Z
mZ d dlmZmZ erd dlmZ d dlmZ  G d	„ d
ed
   «      Zy)é    )ÚExpandableField)ÚTransfer)ÚUpdateableAPIResource)Úsanitize_id)ÚClassVarÚDictÚOptional)ÚLiteralÚTYPE_CHECKING)ÚBalanceTransaction)ÚRefundc                   ó
  — e Zd ZU dZdZeed      ed<   eed<   	 e	e
d      ed<   	 eed<   	 eed<   	 e	e
d	      ed
<   	 eed<   	 e	eeef      ed<   	 ed   ed<   	 e	e
d	      ed<   	 e
d   ed<   	 d„ Zed„ «       Zed„ «       Zy)ÚReversalaT  
    [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a
    connected account, either entirely or partially, and can also specify whether
    to refund any related application fees. Transfer reversals add to the
    platform's balance and subtract from the destination account's balance.

    Reversing a transfer that was made for a [destination
    charge](https://stripe.com/docs/connect/destination-charges) is allowed only up to the amount of
    the charge. It is possible to reverse a
    [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options)
    transfer only if the destination account has enough balance to cover the
    reversal.

    Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers)
    Útransfer_reversalÚOBJECT_NAMEÚamountr   Úbalance_transactionÚcreatedÚcurrencyr   Údestination_payment_refundÚidÚmetadataÚobjectÚsource_refundr   Útransferc                 óÒ   — | j                   }| j                  }t        |t        «      r|j                   }t        j                  «       }t        |«      }t        |«      }|›d|›d|›S )Nú/z/reversals/)r   r   Ú
isinstancer   Ú	class_urlr   )ÚselfÚtokenr   ÚbaseÚ	cust_extnÚextns         úO/var/www/html/AdoubleTech/venv/lib/python3.12/site-packages/stripe/_reversal.pyÚinstance_urlzReversal.instance_urlJ   sV   € Ø—‘ˆØ—=‘=ˆÜh¤Ô)Ø—{‘{ˆHÜ×!Ñ!Ó#ˆÜ Ó)ˆ	Ü˜5Ó!ˆÚ'+ªY¹Ð=Ð=ó    c                 ó   — t        d«      ‚)Nz²Can't modify a reversal without a transfer ID. Use stripe.Transfer.modify_reversal('transfer_id', 'reversal_id', ...) (see https://stripe.com/docs/api/transfer_reversals/update).©ÚNotImplementedError)ÚclsÚsidÚparamss      r%   ÚmodifyzReversal.modifyT   s   € ä!ðKó
ð 	
r'   c                 ó   — t        d«      ‚)Nz³Can't retrieve a reversal without a transfer ID. Use stripe.Transfer.retrieve_reversal('transfer_id', 'reversal_id') (see https://stripe.com/docs/api/transfer_reversals/retrieve).r)   )r+   r   r-   s      r%   ÚretrievezReversal.retrieve\   s   € ä!ðMó
ð 	
r'   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r
   Ú__annotations__Úintr	   r   Ústrr   r&   Úclassmethodr.   r0   © r'   r%   r   r      sÿ   … ñð  ;N€K˜'Ð"5Ñ6Ñ7ÓMØƒKðð " /Ð2FÑ"GÑHÓHðð ƒLðð ƒMðð !)¨¸Ñ)BÑ CÓCðð 	ƒGðð t˜C ˜H‘~Ñ&Ó&ðð Ð'Ñ(Ó(ðð ˜O¨HÑ5Ñ6Ó6ðð ˜jÑ)Ó)ðò>ð ñ
ó ð
ð ñ
ó ñ
r'   r   N)Ústripe._expandable_fieldr   Ústripe._transferr   Ústripe._updateable_api_resourcer   Ústripe._utilr   Útypingr   r   r	   Útyping_extensionsr
   r   Ústripe._balance_transactionr   Ústripe._refundr   r   r9   r'   r%   ú<module>rB      s9   ðõ 5Ý %Ý AÝ $ß +Ñ +ß 4áÝ>Ý%ôS
Ð$ ZÑ0õ S
r'   