added overdue endpoint

This commit was merged in pull request #42.
This commit is contained in:
Chinenye Nmoh
2025-08-20 18:08:44 +01:00
parent d50436253a
commit 97070f3fed
5 changed files with 110 additions and 4 deletions
+9 -2
View File
@@ -226,9 +226,16 @@ class SimbrellaClient:
@staticmethod
def collect_loan_user_due_payment(data):
# InitiatedBy = REPAYMENT_DUE
return SimbrellaClient._collect_loan(data,"3")
try:
return SimbrellaClient._collect_loan(data,"3")
except Exception as e:
logger.error(f"Error in collect_loan_user_due_payment: {e}")
return ResponseHelper.error(
message="Failed to collect loan for due payment",
status_code=500,
error=str(e)
)
@staticmethod
def _collect_loan(data, collectionMethod: str):
api_url = f"{SimbrellaClient.BANK_CALL_BASE_URL}{SimbrellaClient.BANK_CALL_COLLECT_LOAN_ENDPOINT}"