[fix]: Removed out product and lien amount
This commit is contained in:
@@ -8,8 +8,8 @@ class ProvideLoanSchema(Schema):
|
||||
customerId = fields.Str(required=True)
|
||||
accountId = fields.Str(required=True)
|
||||
msisdn = fields.Str(required=False)
|
||||
productId = fields.Str(required=True)
|
||||
lienAmount = fields.Float(required=True)
|
||||
# productId = fields.Str(required=True)
|
||||
# lienAmount = fields.Float(required=True)
|
||||
requestedAmount = fields.Float(required=True)
|
||||
collectionType = fields.Int(required=True)
|
||||
offerId = fields.Int(required=True)
|
||||
|
||||
@@ -42,14 +42,14 @@ class ProvideLoanService(BaseService):
|
||||
"message": "Failed to log transaction."
|
||||
}), 400
|
||||
|
||||
# Save the loan details here
|
||||
# Save the loan details
|
||||
loan_id = f"loan_{transaction.id}"
|
||||
|
||||
loan = Loan.create_loan(
|
||||
id=loan_id,
|
||||
customer_id=customer_id,
|
||||
account_id=account_id,
|
||||
product_id=validated_data.get('productId'),
|
||||
offer_id=validated_data.get('offerId'),
|
||||
principal_amount=validated_data.get('requestedAmount'),
|
||||
status="active"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user