random play on the data
This commit is contained in:
@@ -8,6 +8,8 @@ from app.api.enums import TransactionType
|
|||||||
from app.api.integrations import SimbrellaIntegration
|
from app.api.integrations import SimbrellaIntegration
|
||||||
from app.extensions import db
|
from app.extensions import db
|
||||||
from app.models import Offer
|
from app.models import Offer
|
||||||
|
import random
|
||||||
|
|
||||||
|
|
||||||
class EligibilityCheckService(BaseService):
|
class EligibilityCheckService(BaseService):
|
||||||
TRANSACTION_TYPE = TransactionType.ELIGIBILITY_CHECK
|
TRANSACTION_TYPE = TransactionType.ELIGIBILITY_CHECK
|
||||||
@@ -68,7 +70,8 @@ class EligibilityCheckService(BaseService):
|
|||||||
|
|
||||||
for offer in offers:
|
for offer in offers:
|
||||||
# Determine an approved amount
|
# Determine an approved amount
|
||||||
approved_amount = min(offer.max_amount, 5000)
|
random_float = random.random() # temporary to play data
|
||||||
|
approved_amount = min(offer.max_amount, offer.max_amount * random_float) #temporary for now
|
||||||
|
|
||||||
transaction_offer = TransactionOffer.create_transaction_offer(
|
transaction_offer = TransactionOffer.create_transaction_offer(
|
||||||
customer_id = customer.id,
|
customer_id = customer.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user