feat: add adaptive fee

This commit is contained in:
2026-05-13 14:22:43 +03:00
parent 4c702b6260
commit bb89aaeee5
4 changed files with 82 additions and 13 deletions

View File

@@ -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',

View File

@@ -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)