o
    
¼>h  ã                   @   s,   d dl mZ ddlmZ G dd„ deƒZdS )é   )ÚResourceé   )ÚURLc                       sN   e Zd Zd‡ 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 )ÚProductNc                    s"   t t| ƒ |¡ tjtj | _d S ©N)Úsuperr   Ú__init__r   ÚV2ÚACCOUNTÚbase_url)ÚselfÚclient©Ú	__class__© úz/var/www/vedio/testing/chatpythonscript.ninositsolution.com/env/lib/python3.10/site-packages/razorpay/resources/product.pyr      s   zProduct.__init__c                 K   s&   d  | j|tj¡}| j||fi |¤ŽS )zŒ
        Request a Product Configuration from given dict

        Returns:
            Product Configuration Dict which was created
        z{}/{}{})Úformatr   r   ÚPRODUCTÚpost_url)r   Ú
account_idÚdataÚkwargsÚurlr   r   r   ÚrequestProductConfiguration
   s   z#Product.requestProductConfigurationc                 K   ó(   d  | j|tj|¡}| j||fi |¤ŽS )z€
        Fetch product for given accound and product id

        Returns:
            account dict for given account_id
        ú
{}/{}{}/{})r   r   r   r   Úget_url©r   r   Ú
product_idr   r   r   r   r   r   Úfetch   ó   zProduct.fetchc                 K   r   )zv
        Edit account information from given dict

        Returns:
            Account Dict which was edited
        r   )r   r   r   r   Ú	patch_urlr   r   r   r   Úedit   r    zProduct.editc                 K   s*   d  tjtj|tj¡}| j||fi |¤ŽS )z{
        Fetch Terms and Conditions for a Sub-Merchant

        Returns:
            Tnc dict for given account_id
        z	{}{}/{}{})r   r   r	   r   ÚTNCr   )r   Úproduct_namer   r   r   r   r   r   ÚfetchTnc)   s   zProduct.fetchTncr   )	Ú__name__Ú
__module__Ú__qualname__r   r   r   r"   r%   Ú__classcell__r   r   r   r   r      s    

r   N)Úbaser   Úconstants.urlr   r   r   r   r   r   Ú<module>   s    