[add]: Summary to loan status response

This commit is contained in:
VivianDee
2025-10-23 08:52:28 +01:00
parent 63da7e8292
commit ad043ba3f8
7 changed files with 134 additions and 24 deletions
+18
View File
@@ -8,6 +8,7 @@ import logging
class SimbrellaIntegration:
BASE_URL = settings.SIMBRELLA_BASE_URL
ENDPOINT_RAC_CHECKS = settings.SIMBRELLA_ENDPOINT_RAC_CHECKS
HEALTH_ENDPOINT = settings.SIMBRELLA_HEALTH
@staticmethod
def rac_check(customer_id, account_id, transaction_id):
@@ -42,4 +43,21 @@ class SimbrellaIntegration:
except Exception as e:
logger.error(f"RACCheck API call failed: {str(e)}", exc_info=True)
raise Exception(f"RACCheck API call failed: {str(e)}")
@staticmethod
def health_check():
"""
Health check for Simbrella Service
"""
url = f"{SimbrellaIntegration.BASE_URL}/{SimbrellaIntegration.HEALTH_ENDPOINT}"
logger.info(f"Simbrella Health Check URL: {url}")
try:
response = httpx.get(url, timeout=10.0)
logger.info(f"Simbrella Health Check Response: {response.text}")
return response
except Exception as e:
logger.error(f"Simbrella Health Check API call failed: {str(e)}", exc_info=True)
raise