Пример #1
0
def classifyUser():
    # token = request.form["ori_token"]
    customer = Account(token)

    return jsonify({
        "customer_category": customer.predictUserType()
    })
Пример #2
0
def canBuy():
    # token = request.form["ori_token"]
    product_url = request.form["product_url"]
    customer = Account(token)
    product = Product(product_url)

    return jsonify({
        "buy_status": customer.canBuyUsingDebit(product),
        "buy_classification": customer.predictUserType()
    })