o
    f                     @   s4   d dl mZ ddlmZ ddlZG dd deZdS )   )Resource   )URL    Nc                       sb   e Zd Zd fdd	Zi fddZi fddZi f fdd		Zi f fd
d	Zi fddZ  Z	S )RefundNc                    s"   t t| | tjtj | _d S N)superr   __init__r   V1REFUNDS_URLbase_url)selfclient	__class__ /media/darth/New Volume E/PROJECTS/DRIVERZZ/DRIVERZZ_CUSTOMER_APIS/venv/lib/python3.10/site-packages/razorpay/resources/refund.pyr	      s   zRefund.__init__c                 K   s   t dt | j|fi |S )Nz+Will be Deprecated in next release, use all)warningswarnDeprecationWarningallr   datakwargsr   r   r   	fetch_all   s   zRefund.fetch_allc                 K   s   | j }| j||fi |S )z4
        Create refund for given payment id
        )r   post_url)r   r   r   urlr   r   r   create   s   zRefund.createc                    s   t t| j|fi |S )zL
        Fetch All Refund

        Returns:
            Refund dict
        )r   r   r   r   r   r   r   r      s   z
Refund.allc                    s   t t| j||fi |S )z
        Refund object for given paymnet Id

        Args:
            refund_id : Refund Id for which refund has to be retrieved

        Returns:
            Refund dict for given refund Id
        )r   r   fetch)r   	refund_idr   r   r   r   r   r       s   
zRefund.fetchc                 K   s"   d | j|}| j||fi |S )zZ
        Update Refund

        Returns:
            Refund Dict which was edited
        z{}/{})formatr   	patch_url)r   r   r   r   r   r   r   r   edit,   s   zRefund.editr   )
__name__
__module____qualname__r	   r   r   r   r   r"   __classcell__r   r   r   r   r      s    	r   )baser   constants.urlr   r   r   r   r   r   r   <module>   s    