Examples of withdraw()


Examples of org.melonbrew.fe.database.Account.withdraw()

        if (account == null) {
            return new EconomyResponse(0, 0, ResponseType.FAILURE, "Account doesn't exist");
        }

        if (account.has(amount)) {
            account.withdraw(amount);

            return new EconomyResponse(amount, account.getMoney(), ResponseType.SUCCESS, "");
        } else {
            return new EconomyResponse(0, account.getMoney(), ResponseType.FAILURE, "Insufficient funds");
        }
View Full Code Here

Examples of org.mifosplatform.portfolio.savings.domain.RecurringDepositAccount.withdraw()

                    paymentDetail, savingsAccountTransaction.createdDate());
            transaction = account.deposit(transactionDTO);
        } else {
            final SavingsAccountTransactionDTO transactionDTO = new SavingsAccountTransactionDTO(fmt, transactionDate, transactionAmount,
                    paymentDetail, savingsAccountTransaction.createdDate());
            transaction = account.withdraw(transactionDTO, true);
        }
        final Long newtransactionId = saveTransactionToGenerateTransactionId(transaction);
        boolean isInterestTransfer = false;
        if (account.isBeforeLastPostingPeriod(transactionDate)
                || account.isBeforeLastPostingPeriod(savingsAccountTransaction.transactionLocalDate())) {
View Full Code Here

Examples of org.mifosplatform.portfolio.savings.domain.SavingsAccount.withdraw()

        final SavingsAccountTransactionDTO transactionDTO = new SavingsAccountTransactionDTO(fmt, transactionDate, transactionAmount,
                paymentDetail, savingsAccountTransaction.createdDate());
        if (savingsAccountTransaction.isDeposit()) {
            transaction = account.deposit(transactionDTO);
        } else {
            transaction = account.withdraw(transactionDTO, true);
        }
        final Long newtransactionId = saveTransactionToGenerateTransactionId(transaction);

        if (account.isBeforeLastPostingPeriod(transactionDate)
                || account.isBeforeLastPostingPeriod(savingsAccountTransaction.transactionLocalDate())) {
View Full Code Here

Examples of org.sodatest.examples.basic.java.BankAccountJava.withdraw()

    @Override
    public void executeEvent() {
        BankAccountJava account = service.get(accountName);
        if (account != null) {
            account.withdraw(amount);
        } else {
            throw new RuntimeException("Unknown account");
        }
    }
}
View Full Code Here

Examples of vs.example.Account.withdraw()

            System.out.println("\tspecify amount");
            System.out.print(">> ");
            line = bis.readLine();
            long amount = Long.parseLong(line);
            try {
              account.withdraw(amount);
              System.out.println("\tamount "+amount+" withdrawn");
            } catch (AccountException e) {
              System.out.println("Exception occured: class= " + e.getClass().getCanonicalName());
              System.out.println("Exception occured: message= " + e.getMessage());
            }
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.