
    h	                     2    d dl mZ ddlmZ  G d de      Zy)   )Resource   )URLc                   x     e Zd Zd
 fd	Zi f fd	Zi 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 )Customerc                 x    t         t        |   |       t        j                  t        j
                  z   | _        y N)superr   __init__r   V1CUSTOMER_URLbase_url)selfclient	__class__s     Y/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/razorpay/resources/customer.pyr   zCustomer.__init__   s(    h&v.!1!11    c                 .    t        t        | 
  ||fi |S )z
        Fetch Customer for given Id

        Args:
            customer_id : Id for which customer object has to be retrieved

        Returns:
            Order dict for given customer Id
        )r
   r   fetch)r   customer_iddatakwargsr   s       r   r   zCustomer.fetch
   s     Xt*;GGGr   c                 B    | j                   } | j                  ||fi |S )zo
        Create Customer from given dict

        Returns:
            Customer Dict which was created
        r   post_urlr   r   r   urls       r   createzCustomer.create   s%     mmt}}S$1&11r   c                 b    dj                  | j                  |      } | j                  ||fi |S )zx
        Edit Customer information from given dict

        Returns:
            Customer Dict which was edited
        z{}/{})formatr   put_urlr   r   r   r   r   s        r   editzCustomer.edit    s0     nnT]]K8t||C000r   c                 ,    t        t        | 
  |fi |S )z_
        Fetch all customer

        Returns:
            Dictionary of Customers data
        )r
   r   all)r   r   r   r   s      r   r%   zCustomer.all+   s     Xt(888r   c                 N    | j                    d| d} | j                  ||fi |S )zi
        Add Bank Account of Customer

        Returns:
            Dictionary of Customers data
        /z/bank_accountr   r"   s        r   addBankAccountzCustomer.addBankAccount4   s2     q];t}}S$1&11r   c                 R    | j                    d| d| } | j                  ||fi |S )zl
        Delete Bank Account of Customer

        Returns:
            Dictionary of Customers data
        r'   z/bank_account/)r   
delete_url)r   r   bank_idr   r   r   s         r   deleteBankAccountzCustomer.deleteBankAccount>   s6     q^G9EtsD3F33r   c                 H    | j                    d} | j                  ||fi |S )z`
        Eligibility Check

        Returns:
            Dictionary of eligibility data
        z/eligibilityr   r   s       r   requestEligibilityCheckz Customer.requestEligibilityCheckH   s,     |,t}}S$1&11r   c                 L    | j                    d| } | j                  ||fi |S )zq
        Fetch Eligibility by id

        Returns:
            Eligibility dict for given eligibility Id
        z/eligibility/)r   get_url)r   eligibility_idr   r   r   s        r   fetchEligibilityzCustomer.fetchEligibilityR   s1     }^,<=t||C000r   r	   )__name__
__module____qualname__r   r   r   r#   r%   r(   r,   r.   r2   __classcell__)r   s   @r   r   r      sY    2 ') 
H  2 &( 	1  9 02 2 <> 4 ,. 2 57 1r   r   N)baser   constants.urlr   r    r   r   <module>r:      s     U1x U1r   