Ejemplo n.º 1
0
        public TransactionResult Withdraw(WithdrawTransaction withdrawTransaction)
        {
            // Check for ISF
            if (withdrawTransaction.GetAmount() > _balance)
            {
                return TransactionResult.InsufficientFunds;
            }
            else
            {
                _balance -= withdrawTransaction.GetAmount();
                _transactionHistory.Add(withdrawTransaction);
            }

            return TransactionResult.Success;
        }