Added Call Paths
This commit is contained in:
@@ -178,7 +178,22 @@ class SimbrellaClient:
|
||||
return 0
|
||||
|
||||
@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}"
|
||||
logger.info(f"Calling CollectLoan api_url==> : {api_url}")
|
||||
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"calling simbrella")
|
||||
response = SimbrellaClient.collect_loan(data)
|
||||
response = SimbrellaClient.collect_loan_user_initiated(data)
|
||||
|
||||
return response
|
||||
|
||||
@@ -107,4 +107,13 @@ def penal_charge():
|
||||
|
||||
response = SimbrellaClient.penal_charge(data[0])
|
||||
|
||||
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