feat: add endpoints desc

This commit is contained in:
2026-05-11 19:50:25 +03:00
parent 852ee9ec2e
commit 46b1e336d9
22 changed files with 236 additions and 95 deletions

View File

@@ -3,7 +3,7 @@ from ulid import ULID
from src.application.abstractions import IUnitOfWork
from src.application.contracts import ILogger,IQueueMessanger
from src.application.domain.enums import PaymentStatus
from src.application.domain.exceptions import ApplicationException
from src.application.domain.exceptions import PaymentMetadataException
from src.infrastructure.config import settings
from src.infrastructure.database.decorators import transactional
from src.presentation.schemas.itpay_payment_models import ItpayPaymentData
@@ -25,9 +25,9 @@ class CreatePaymentCommand:
trace_id = str(metadata.get('trace_id') or self._logger.get_trace_id())
self._logger.set_trace_id(trace_id)
if not order_id:
raise ApplicationException(status_code=400, message='Itpay webhook metadata missing order_id')
raise PaymentMetadataException(message='Itpay webhook metadata missing order_id')
if not user_id:
raise ApplicationException(status_code=400, message='Itpay webhook metadata missing user_id')
raise PaymentMetadataException(message='Itpay webhook metadata missing user_id')
payment_created = await self._unit_of_work.payment_repository.create_completed(
user_id=user_id,
order_id=order_id,