o
    tBh                     @   s   G d d de ZG dd deZG dd deZG dd deZG dd	 d	eZG d
d deZG dd deZG dd deZG dd de Z	de
fddZdS )c                   @   s   e Zd ZdZdZdd ZdS )SellingApiExceptionz
    Generic Exception

    Parameters:

        message: str The error message
        amzn_code: str Amazon Error Code
        error: list Amazon Error list

    i  c                 C   sH   z|d  d| _|d  d| _W n	 ty   Y nw || _|| _d S )N    messagecode)getr   	amzn_code
IndexErrorerrorheadersselfr   r	    r   m/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/sp_api/base/exceptions.py__init__   s   
zSellingApiException.__init__N)__name__
__module____qualname____doc__r   r   r   r   r   r   r      s    
r   c                       &   e Zd ZdZdZd fdd	Z  ZS )SellingApiBadRequestExceptionzM
    400	Request has missing or invalid parameters and cannot be parsed.
      Nc                       t t| || d S N)superr   r   r
   	__class__r   r   r         z&SellingApiBadRequestException.__init__r   r   r   r   r   r   r   __classcell__r   r   r   r   r          r   c                       r   )SellingApiForbiddenExceptionz
    403	Indicates access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.
      Nc                    r   r   )r   r   r   r
   r   r   r   r   (   r   z%SellingApiForbiddenException.__init__r   r   r   r   r   r   r   "   r   r   c                       r   )SellingApiNotFoundExceptionz4
    404	The resource specified does not exist.
    i  Nc                    r   r   )r   r!   r   r
   r   r   r   r   2   r   z$SellingApiNotFoundException.__init__r   r   r   r   r   r   r!   ,   r   r!   c                       r   )#SellingApiRequestThrottledExceptionzA
    429	The frequency of requests was greater than allowed.
      Nc                    r   r   )r   r"   r   r
   r   r   r   r   <   r   z,SellingApiRequestThrottledException.__init__r   r   r   r   r   r   r"   6   r   r"   c                       r   )SellingApiServerExceptionze
    500	An unexpected condition occurred that prevented the server from fulfilling the request.
      Nc                    r   r   )r   r$   r   r
   r   r   r   r   F   r   z"SellingApiServerException.__init__r   r   r   r   r   r   r$   @   r   r$   c                       r   ))SellingApiTemporarilyUnavailableExceptionA
    503	Temporary overloading or maintenance of the server.
      Nc                    r   r   )r   r&   r   r
   r   r   r   r   P   r   z2SellingApiTemporarilyUnavailableException.__init__r   r   r   r   r   r   r&   J   r   r&   c                       r   )!SellingApiGatewayTimeoutExceptionr'     Nc                    r   r   )r   r)   r   r
   r   r   r   r   Z   r   z*SellingApiGatewayTimeoutException.__init__r   r   r   r   r   r   r)   T   r   r)   c                   @   s   e Zd ZdS )MissingScopeExceptionN)r   r   r   r   r   r   r   r+   ^   s    r+   r   c                 C   s   t tttttd| tS )N)r   r    r#   r%   r(   r*   )r   r   r"   r$   r&   r)   r   r   )r   r   r   r   get_exception_for_codeb   s   r,   N)	Exceptionr   r   r   r!   r"   r$   r&   r)   r+   intr,   r   r   r   r   <module>   s    






