Examples of InsufficientWalletAmountException


Examples of com.luxoft.dnepr.courses.regular.unit3.exceptions.InsufficientWalletAmountException

    public void checkWithdrawal(BigDecimal amountToWithdraw) throws WalletIsBlockedException, InsufficientWalletAmountException {
        if (status == WalletStatus.BLOCKED) {
            throw new WalletIsBlockedException(id, WALLET_IS_BLOCKED_MESSAGE);
        }
        if (amountToWithdraw.compareTo(amount) > 0) {
            throw new InsufficientWalletAmountException(id, amountToWithdraw, amount,
                    INSUFFICIENT_WALLET_AMOUNT_MESSAGE
            );
        }
    }
View Full Code Here

Examples of com.luxoft.dnepr.courses.regular.unit3.exceptions.InsufficientWalletAmountException

    public void checkWithdrawal(BigDecimal amountToWithdraw) throws WalletIsBlockedException, InsufficientWalletAmountException {
        if (status == WalletStatus.BLOCKED) {
            throw new WalletIsBlockedException(id, "Wallet " + id + " is blocked.");
        }
        if (amount.compareTo(amountToWithdraw) < 0) {
            throw new InsufficientWalletAmountException(id, amountToWithdraw, amount, "Insufficient funds (" +
                    MoneyFormatter.format(amount) + " < " + MoneyFormatter.format(amountToWithdraw) + ")");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.