
    T>{iR                        d Z  G d de      Z G d dee      Z G d dee      Z G d dee      Z G d	 d
ee	      Z
 G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Zd Zy)a  
Cashfree Payment Gateway APIs

Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites.

The version of the OpenAPI document: 2023-08-01
Contact: developers@cashfree.com
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
c                       e Zd ZdZy)OpenApiExceptionz2The base exception class for all OpenAPIExceptionsN)__name__
__module____qualname____doc__     T/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/cashfree_pg/exceptions.pyr   r      s    <r	   r   c                   $     e Zd Z	 	 d fd	Z xZS )ApiTypeErrorc                     || _         || _        || _        |}|rdj                  |t	        |            }t
        t        |   |       y)a   Raises an exception for TypeErrors

        Args:
            msg (str): the exception message

        Keyword Args:
            path_to_item (list): a list of keys an indices to get to the
                                 current_item
                                 None if unset
            valid_classes (tuple): the primitive classes that current item
                                   should be an instance of
                                   None if unset
            key_type (bool): False if our value is a value in a dict
                             True if it is a key in a dict
                             False if our item is an item in a list
                             None if unset
        
{0} at {1}N)path_to_itemvalid_classeskey_typeformatrender_pathsuperr   __init__)selfmsgr   r   r   full_msg	__class__s         r
   r   zApiTypeError.__init__   sJ    & )* #**3L0IJHlD*84r	   NNNr   r   r   r   __classcell__r   s   @r
   r   r      s    =A5 5r	   r   c                         e Zd Zd fd	Z xZS )ApiValueErrorc                 x    || _         |}|rdj                  |t        |            }t        t        |   |       y)z
        Args:
            msg (str): the exception message

        Keyword Args:
            path_to_item (list) the path to the exception in the
                received_data dict. None if unset
        r   N)r   r   r   r   r   r   r   r   r   r   r   s       r
   r   zApiValueError.__init__1   s;     )#**3L0IJHmT+H5r	   Nr   r   s   @r
   r   r   0   s    6 6r	   r   c                         e Zd Zd fd	Z xZS )ApiAttributeErrorc                 x    || _         |}|rdj                  |t        |            }t        t        |   |       y)a  
        Raised when an attribute reference or assignment fails.

        Args:
            msg (str): the exception message

        Keyword Args:
            path_to_item (None/list) the path to the exception in the
                received_data dict
        r   N)r   r   r   r   r$   r   r!   s       r
   r   zApiAttributeError.__init__C   s<     )#**3L0IJH/9r	   r"   r   r   s   @r
   r$   r$   B   s    : :r	   r$   c                         e Zd Zd fd	Z xZS )ApiKeyErrorc                 x    || _         |}|rdj                  |t        |            }t        t        |   |       y)z
        Args:
            msg (str): the exception message

        Keyword Args:
            path_to_item (None/list) the path to the exception in the
                received_data dict
        r   N)r   r   r   r   r'   r   r!   s       r
   r   zApiKeyError.__init__V   s;     )#**3L0IJHk4)(3r	   r"   r   r   s   @r
   r'   r'   U   s    4 4r	   r'   c                       e Zd ZddZd Zy)ApiExceptionNc                     |rI|j                   | _         |j                  | _        |j                  | _        |j	                         | _        y || _         || _        d | _        d | _        y r"   )statusreasondatabody
getheadersheaders)r   r,   r-   	http_resps       r
   r   zApiException.__init__h   sV    #**DK#**DK!DI$//1DL DK DKDIDLr	   c                     dj                  | j                  | j                        }| j                  r|dj                  | j                        z  }| j                  r|dj                  | j                        z  }|S )z#Custom error messages for exceptionz({0})
Reason: {1}
zHTTP response headers: {0}
zHTTP response body: {0}
)r   r,   r-   r1   r/   )r   error_messages     r
   __str__zApiException.__str__t   so    ((.t{{DKK(H 	<<;BB M 998??		JJMr	   r   )r   r   r   r   r5   r   r	   r
   r*   r*   f   s    
 r	   r*   c                         e Zd Zd fd	Z xZS )BadRequestExceptionc                 0    t         t        |   |||       y r"   )r   r7   r   r   r,   r-   r2   r   s       r
   r   zBadRequestException.__init__   s    !41&&)Lr	   r   r   r   s   @r
   r7   r7      s    M Mr	   r7   c                         e Zd Zd fd	Z xZS )NotFoundExceptionc                 0    t         t        |   |||       y r"   )r   r;   r   r9   s       r
   r   zNotFoundException.__init__   s    /	Jr	   r   r   r   s   @r
   r;   r;      s    K Kr	   r;   c                         e Zd Zd fd	Z xZS )UnauthorizedExceptionc                 0    t         t        |   |||       y r"   )r   r>   r   r9   s       r
   r   zUnauthorizedException.__init__   s    #T3FFINr	   r   r   r   s   @r
   r>   r>      s    O Or	   r>   c                         e Zd Zd fd	Z xZS )ForbiddenExceptionc                 0    t         t        |   |||       y r"   )r   rA   r   r9   s       r
   r   zForbiddenException.__init__   s     $0Kr	   r   r   r   s   @r
   rA   rA      s    L Lr	   rA   c                         e Zd Zd fd	Z xZS )ServiceExceptionc                 0    t         t        |   |||       y r"   )r   rD   r   r9   s       r
   r   zServiceException.__init__   s    .vvyIr	   r   r   r   s   @r
   rD   rD      s    J Jr	   rD   c                     d}| D ];  }t        |t              r|dj                  |      z  }(|dj                  |      z  }= |S )z)Returns a string representation of a path z[{0}]z['{0}'])
isinstanceintr   )r   resultpths      r
   r   r      sO    F ,c3gnnS))Fi&&s++F	,
 Mr	   N)r   	Exceptionr   	TypeErrorr   
ValueErrorr   AttributeErrorr$   KeyErrorr'   r*   r7   r;   r>   rA   rD   r   r   r	   r
   <module>rQ      s   
=y =5#Y 5:6$j 6$:(. :&4"H 4"# 6M, M
K KOL OL LJ| Jr	   