feat: add adaptive fee
This commit is contained in:
@@ -7,6 +7,7 @@ from src.application.domain.exceptions.forbidden_exception import ForbiddenExcep
|
||||
from src.application.domain.exceptions.internal_server_exception import InternalServerException
|
||||
from src.application.domain.exceptions.jwt_exception import JwtException
|
||||
from src.application.domain.exceptions.not_found_exception import NotFoundException
|
||||
from src.application.domain.exceptions.order_total_out_of_range_exception import OrderTotalOutOfRangeException
|
||||
from src.application.domain.exceptions.payment_metadata_exception import PaymentMetadataException
|
||||
from src.application.domain.exceptions.payment_provider_exception import PaymentProviderException
|
||||
from src.application.domain.exceptions.price_changed_exception import PriceChangedException
|
||||
@@ -26,6 +27,7 @@ __all__ = [
|
||||
'InternalServerException',
|
||||
'JwtException',
|
||||
'NotFoundException',
|
||||
'OrderTotalOutOfRangeException',
|
||||
'PaymentMetadataException',
|
||||
'PaymentProviderException',
|
||||
'PriceChangedException',
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
from __future__ import annotations
|
||||
from typing import Mapping
|
||||
from src.application.domain.exceptions.bad_request_exception import BadRequestException
|
||||
|
||||
|
||||
class OrderTotalOutOfRangeException(BadRequestException):
|
||||
def __init__(
|
||||
self,
|
||||
message: str = 'Order total is outside allowed range',
|
||||
headers: Mapping[str,str] | None = None,
|
||||
) -> None:
|
||||
super().__init__(message=message, headers=headers)
|
||||
Reference in New Issue
Block a user