Added Call Paths
This commit is contained in:
@@ -178,7 +178,22 @@ class SimbrellaClient:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def collect_loan(data):
|
def collect_loan_user_initiated(data):
|
||||||
|
# InitiatedBy = USER_INITIATED
|
||||||
|
return SimbrellaClient._collect_loan(data)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def collect_loan_user_salary_detect(data):
|
||||||
|
#InitiatedBy = SALARY_DETECT
|
||||||
|
return SimbrellaClient._collect_loan(data)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def collect_loan_user_due_payment(data):
|
||||||
|
# InitiatedBy = REPAYMENT_DUE
|
||||||
|
return SimbrellaClient._collect_loan(data)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _collect_loan(data):
|
||||||
api_url = f"{SimbrellaClient.BANK_CALL_BASE_URL}{SimbrellaClient.BANK_CALL_COLLECT_LOAN_ENDPOINT}"
|
api_url = f"{SimbrellaClient.BANK_CALL_BASE_URL}{SimbrellaClient.BANK_CALL_COLLECT_LOAN_ENDPOINT}"
|
||||||
logger.info(f"Calling CollectLoan api_url==> : {api_url}")
|
logger.info(f"Calling CollectLoan api_url==> : {api_url}")
|
||||||
logger.info(f"Calling CollectLoan endpoint with data: {data}")
|
logger.info(f"Calling CollectLoan endpoint with data: {data}")
|
||||||
|
|||||||
+10
-1
@@ -87,7 +87,7 @@ def refresh_collection():
|
|||||||
}
|
}
|
||||||
logger.info(f"Data being sent to Simbrella: {data}")
|
logger.info(f"Data being sent to Simbrella: {data}")
|
||||||
logger.info(f"calling simbrella")
|
logger.info(f"calling simbrella")
|
||||||
response = SimbrellaClient.collect_loan(data)
|
response = SimbrellaClient.collect_loan_user_initiated(data)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
@@ -108,3 +108,12 @@ def penal_charge():
|
|||||||
response = SimbrellaClient.penal_charge(data[0])
|
response = SimbrellaClient.penal_charge(data[0])
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
@autocall_bp.route("/analytic-salary-detect", methods=["POST"])
|
||||||
|
def penal_charge():
|
||||||
|
data = request.get_json()
|
||||||
|
logger.info(f"Calling Salary Detect Endpoints")
|
||||||
|
|
||||||
|
response = SimbrellaClient.collect_loan_user_salary_detect(data)
|
||||||
|
|
||||||
|
return response
|
||||||
Reference in New Issue
Block a user