[add]: eco endpoints and dummy responses
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
from app.eco.enums.transaction_type import TransactionType
|
||||
from app.eco.services.base_service import BaseService
|
||||
from app.eco.schemas.debt_closure_notification import DebtClosureNotificationSchema
|
||||
from marshmallow import ValidationError
|
||||
from app.eco.helpers.response_helper import ResponseHelper
|
||||
|
||||
class DebtClosureNotificationService(BaseService):
|
||||
TRANSACTION_TYPE = TransactionType.DEBT_CLOSURE_NOTIFICATION
|
||||
|
||||
@staticmethod
|
||||
def process_request(data):
|
||||
"""
|
||||
Process the debt closure notification request.
|
||||
|
||||
Args:
|
||||
data (dict): The request data.
|
||||
|
||||
Returns:
|
||||
dict: A standardized response.
|
||||
"""
|
||||
try:
|
||||
validated_data = DebtClosureNotificationService.validate_data(data, DebtClosureNotificationSchema())
|
||||
return ResponseHelper.success()
|
||||
except ValidationError as err:
|
||||
return ResponseHelper.unprocessable_entity(result_description="Validation exception")
|
||||
except Exception as e:
|
||||
return ResponseHelper.internal_server_error()
|
||||
Reference in New Issue
Block a user