o
    
¼>hß  ã                   @   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                       s†   e Zd Zd‡ fdd„	Zi f‡ fdd„	Zi f‡ fdd„	Zi fdd	„Zi fd
d„Zi fdd„Zi fdd„Z	i fdd„Z
i fdd„Z‡  ZS )ÚVirtualAccountNc                    s"   t t| ƒ |¡ tjtj | _d S ©N)Úsuperr   Ú__init__r   ÚV1ÚVIRTUAL_ACCOUNT_URLÚbase_url)ÚselfÚclient©Ú	__class__© ú‚/var/www/vedio/testing/chatpythonscript.ninositsolution.com/env/lib/python3.10/site-packages/razorpay/resources/virtual_account.pyr	      s   zVirtualAccount.__init__c                    s   t t| ƒj|fi |¤ŽS )zu
        Fetch all Virtual Account entities

        Returns:
            Dictionary of Virtual Account data
        )r   r   Úall)r   ÚdataÚkwargsr   r   r   r      s   zVirtualAccount.allc                    s   t t| ƒj||fi |¤ŽS )zü
        Fetch Virtual Account for given Id

        Args:
            virtual_account_id :
                Id for which Virtual Account object has to be retrieved

        Returns:
            Virtual Account dict for given Virtual Account Id
        )r   r   Úfetch)r   Úvirtual_account_idr   r   r   r   r   r      s   
þýzVirtualAccount.fetchc                 K   s   | j }| j||fi |¤ŽS )z©
        Create Virtual Account from given dict

        Args:
            Param for Creating Virtual Account

        Returns:
            Virtual Account dict
        )r   Úpost_url)r   r   r   Úurlr   r   r   Úcreate$   s   
zVirtualAccount.createc                 K   ó"   d  | j|¡}| j||fi |¤ŽS )z«
        Close Virtual Account from given Id

        Args:
            virtual_account_id :
                Id for which Virtual Account objects has to be Closed
        z{}/{}/close©Úformatr   r   ©r   r   r   r   r   r   r   r   Úclose1   ó   zVirtualAccount.closec                 K   r   )z÷
        Fetch Payment for Virtual Account Id

        Args:
            virtual_account_id :
                Id for which Virtual Account objects has to be retrieved

        Returns:
            Payment dict for given Virtual Account Id
        z{}/{}/payments)r   r   Úget_urlr   r   r   r   Úpayments<   s   zVirtualAccount.paymentsc                 K   r   )z³
        Add receiver to an existing virtual account

        Args:
            virtual_account_id :
                Id for which Virtual Account objects has to be Closed
        z{}/{}/receiversr   r   r   r   r   Úadd_receiverJ   r    zVirtualAccount.add_receiverc                 K   r   )z¤
        Add an Allowed Payer Account

        Args:
            virtual_account_id :
                Id for which Virtual Account objects has to be Closed
        z{}/{}/allowed_payersr   r   r   r   r   Úadd_allowed_playerU   r    z!VirtualAccount.add_allowed_playerc                 K   s$   d  | j||¡}| j||fi |¤ŽS )zÐ
        Delete an Allowed Payer Account

        Args:
            virtual_account_id :
                Id for which Virtual Account objects has to be Closed
        Returns:
            204        
        z{}/{}/allowed_payers/{})r   r   Ú
delete_url)r   r   Úallowed_player_idr   r   r   r   r   r   Údelete_allowed_player`   s   
z$VirtualAccount.delete_allowed_playerr   )Ú__name__Ú
__module__Ú__qualname__r	   r   r   r   r   r"   r#   r$   r'   Ú__classcell__r   r   r   r   r      s    	r   )Úbaser   Úconstants.urlr   Újsonr   r   r   r   r   Ú<module>   s    