
    h                     2    d dl mZ ddlmZ  G d de      Zy)   )Resource   )URLc                   `     e Zd Zd fd	Zi fdZi f fd	Zi fdZi fdZi fdZi fdZ	 xZ
S )	Accountc                 x    t         t        |   |       t        j                  t        j
                  z   | _        y N)superr   __init__r   V2ACCOUNTbase_url)selfclient	__class__s     X/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/razorpay/resources/account.pyr   zAccount.__init__   s&    gt%f-,    c                 B    | j                   } | j                  ||fi |S )zm
        Create account from given dict

        Returns:
            Account Dict which was created
        )r   post_url)r   datakwargsurls       r   createzAccount.create
   s%     mmt}}S$1&11r   c                 .    t        t        | 
  ||fi |S )z
        Fetch account for given Id

        Args:
            account_id : Id for which addon object has to be retrieved

        Returns:
            account dict for given account_id
        )r
   r   fetch)r   
account_idr   r   r   s       r   r   zAccount.fetch   s     Wd)*dEfEEr   c                 b    dj                  | j                  |      } | j                  ||fi |S )zv
        Edit account information from given dict

        Returns:
            Account Dict which was edited
        {}/{})formatr   	patch_urlr   r   r   r   r   s        r   editzAccount.edit    s0     nnT]]J7t~~c42622r   c                 b    dj                  | j                  |      } | j                  ||fi |S )z
        Delete account for given id

        Args:
            account_id : Id for which account object has to be deleted
        r   )r   r   
delete_urlr!   s        r   deletezAccount.delete+   s0     nnT]]J7tsD3F33r   c                 d    dj                  | j                  |d      } | j                  ||fi |S )z{
        Upload Account Documents

        Returns:
           Account Document dict which was created            
        {}/{}/{}	documents)r   r   file_urlr!   s        r   uploadAccountDoczAccount.uploadAccountDoc6   s4     z;Gt}}S$1&11r   c                 d    dj                  | j                  |d      } | j                  ||fi |S )zr
        Fetch Account Documents

        Returns:
            Account Document dict for given account_id
        r'   r(   )r   r   get_urlr!   s        r   fetchAccountDoczAccount.fetchAccountDocA   s4     z;Gt||C000r   r	   )__name__
__module____qualname__r   r   r   r"   r%   r*   r-   __classcell__)r   s   @r   r   r      sE    -  2 &( 
F %' 	3 ') 	4 13 	2 02 	1r   r   N)baser   constants.urlr   r    r   r   <module>r5      s     E1h E1r   