[add]: loan max amount
This commit was merged in pull request #38.
This commit is contained in:
@@ -64,6 +64,9 @@ class ProvideLoanService(BaseService):
|
||||
|
||||
if(amount < transaction_offer.min_amount):
|
||||
return ResponseHelper.error(result_description="The amount is less than the minimum allowed transaction amount.")
|
||||
elif amount > transaction_offer.max_amount:
|
||||
return ResponseHelper.error(result_description="The amount is greater than the maximum allowed transaction amount.")
|
||||
|
||||
|
||||
# transaction_offer_id = int(offer_id[5:]) # The last part is int
|
||||
|
||||
|
||||
@@ -50,6 +50,8 @@ class Customer(db.Model):
|
||||
raise ValueError("Customer already exists")
|
||||
elif Account.query.filter_by(id=account_id).first():
|
||||
raise ValueError("Account already exists")
|
||||
elif cls.query.filter_by(msisdn=msisdn).first():
|
||||
raise ValueError("msisdn already exists")
|
||||
|
||||
# Create the customer
|
||||
customer = cls(
|
||||
|
||||
Reference in New Issue
Block a user