public AccountBase(decimal initialDeposit) { ValidationHelper.NegativeTransactionValue(initialDeposit, "initialDeposit"); this.InitialDeposit = initialDeposit; this.StartDate = DateProvider.Now(); this.Id = IdentifierHelper.NewAccountId(); }
public InterestBearingAccount(decimal initialDeposit, InterestCounpoundType compoundType = InterestCounpoundType.Daily) : base(initialDeposit) { MonetaryCycles = new CoreList <MonetaryCycle>(); this._CreateCycle(DateProvider.Now().Date); RateLimits = new List <IRateLimit>(); this.CompoundType = compoundType; this.RegisterRateProviders(); this.Transactions_OnAdd(this.Transactions[0], null); }
public string GetStatement() { DateTime _date = DateProvider.Now(); UpdateCycle(_date); String _report = this.TypeName + "\n"; foreach (Transaction transaction in this.Transactions) { _report += " " + transaction.Type.ToString() + " " + transaction.Value.ToDollars() + "\n"; } _report += "Total " + this.MonetaryCycles.Last().AvailableBalance.ToDollars(); return(_report); }
public Transaction(decimal amount, TransactionType type) : this(amount, type, DateProvider.Now()) { }
public void Withdraw(decimal amount) { this.Withdraw(amount, DateProvider.Now()); }
public void Transfer(IAccount receivingAccount, decimal amount) { this.Transfer(receivingAccount, amount, DateProvider.Now()); }
public void Deposit(decimal amount) { this.Deposit(amount, DateProvider.Now()); }
public double GetEffectiveRate() { return(this.GetEffectiveRate(DateProvider.Now())); }
public override decimal GetBalance() { return(this.GetBalance(DateProvider.Now())); }
public decimal InterestEarned() { return(this.InterestEarned(DateProvider.Now())); }