from flask import Blueprint, request

from V2.functions.Invoices import Wallet
from V2.middlewares.auth import sendResponse

invoicesV2 = Blueprint("invoicesV2", __name__)

@invoicesV2.get("/wallet")
def getWallet():
    return sendResponse(Wallet.getWallet, request)

@invoicesV2.post("/wallet/order-invoice")
def createOrderInvoiceFromWallet():
    return sendResponse(Wallet.createOrderInvoiceFromWallet, request)

@invoicesV2.post("/wallet/batch-invoice")
def createBatchInvoiceFromWallet():
    return sendResponse(Wallet.createBatchInvoiceFromWallet, request)

@invoicesV2.post("/wallet/add-balance")
def addBalance():
    return sendResponse(Wallet.addBalance, request)

@invoicesV2.post("/wallet/update-threshold")
def updateThreshold():
    return sendResponse(Wallet.updateThreshold, request)

@invoicesV2.post("/wallet/update-recharge-amount")
def updateRechargeAmount():
    return sendResponse(Wallet.updateRechargeAmount, request)