Autocall Cleanup
This commit is contained in:
@@ -21,7 +21,6 @@ from app.config import settings
|
|||||||
|
|
||||||
autocall_bp = Blueprint("autocall", __name__)
|
autocall_bp = Blueprint("autocall", __name__)
|
||||||
|
|
||||||
|
|
||||||
@autocall_bp.route("/refresh-verify-disbursement", methods=["GET"])
|
@autocall_bp.route("/refresh-verify-disbursement", methods=["GET"])
|
||||||
def verify_transaction():
|
def verify_transaction():
|
||||||
logger.info(f"Calling VerifyTransaction Components")
|
logger.info(f"Calling VerifyTransaction Components")
|
||||||
@@ -101,10 +100,6 @@ def retry_disbursement():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Failed to call retry disbursement {data}: {e}")
|
logger.error(f"Failed to call retry disbursement {data}: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@autocall_bp.route("/direct/loan", methods=["POST"])
|
@autocall_bp.route("/direct/loan", methods=["POST"])
|
||||||
def direct_loan():
|
def direct_loan():
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
@@ -238,9 +233,6 @@ def direct_repayment():
|
|||||||
|
|
||||||
response = SimbrellaClient.collect_loan_user_initiated(data_to_process)
|
response = SimbrellaClient.collect_loan_user_initiated(data_to_process)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@autocall_bp.route("/refresh-verify-collection", methods=["GET"])
|
@autocall_bp.route("/refresh-verify-collection", methods=["GET"])
|
||||||
def refresh_verify_collection():
|
def refresh_verify_collection():
|
||||||
@@ -299,7 +291,6 @@ def penal_charge():
|
|||||||
logger.error(f"Error in Penal Charge: {e}")
|
logger.error(f"Error in Penal Charge: {e}")
|
||||||
return ResponseHelper.error("Penal charge failed")
|
return ResponseHelper.error("Penal charge failed")
|
||||||
|
|
||||||
|
|
||||||
@autocall_bp.route("/analytic-salary-detect", methods=["POST"])
|
@autocall_bp.route("/analytic-salary-detect", methods=["POST"])
|
||||||
def salary_detect():
|
def salary_detect():
|
||||||
payload = request.get_json()
|
payload = request.get_json()
|
||||||
@@ -327,13 +318,11 @@ def salary_detect():
|
|||||||
logger.info("Finished processing List")
|
logger.info("Finished processing List")
|
||||||
return ResponseHelper.success([], "AutoCall Add Salary Successful")
|
return ResponseHelper.success([], "AutoCall Add Salary Successful")
|
||||||
|
|
||||||
|
|
||||||
@autocall_bp.route("/analytic-salary-process", methods=["POST"])
|
@autocall_bp.route("/analytic-salary-process", methods=["POST"])
|
||||||
def salary_process():
|
def salary_process():
|
||||||
response = process_salary_list()
|
response = process_salary_list()
|
||||||
return ResponseHelper.success([], "AutoCall Successful")
|
return ResponseHelper.success([], "AutoCall Successful")
|
||||||
|
|
||||||
|
|
||||||
def process_salary_list():
|
def process_salary_list():
|
||||||
# Step 1: Get all pending salaries
|
# Step 1: Get all pending salaries
|
||||||
pending_salaries = SalaryService.get_pending_salaries()
|
pending_salaries = SalaryService.get_pending_salaries()
|
||||||
@@ -427,8 +416,6 @@ def process_salary_list():
|
|||||||
|
|
||||||
return ResponseHelper.success([], "Processed all pending salaries")
|
return ResponseHelper.success([], "Processed all pending salaries")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@autocall_bp.route("/report", methods=["GET"])
|
@autocall_bp.route("/report", methods=["GET"])
|
||||||
def report():
|
def report():
|
||||||
try:
|
try:
|
||||||
@@ -596,7 +583,6 @@ def overdue_loans():
|
|||||||
logger.exception(f"Error fetching overdue loans: {e}")
|
logger.exception(f"Error fetching overdue loans: {e}")
|
||||||
return ResponseHelper.error("Failed to fetch overdue loans", status_code=500, error=str(e))
|
return ResponseHelper.error("Failed to fetch overdue loans", status_code=500, error=str(e))
|
||||||
|
|
||||||
|
|
||||||
def process_overdue_loan(loan):
|
def process_overdue_loan(loan):
|
||||||
"""
|
"""
|
||||||
Handles repayment creation, loan status update, and Simbrella call
|
Handles repayment creation, loan status update, and Simbrella call
|
||||||
|
|||||||
Reference in New Issue
Block a user