public Statement GetStatement(YearAndMonth yearAndMonth) { var transactions = _transactions .Where(t => yearAndMonth.Matches(t.Date)); return(new Statement(yearAndMonth, transactions)); }
public Statement(YearAndMonth yearAndMonth, IEnumerable <Transaction> transactions) { _yearAndMonth = yearAndMonth; Transactions = transactions.ToArray(); }
public IEnumerable <Statement> GetStatements(YearAndMonth yearAndMonth) { return(_accounts.Select(a => a.GetStatement(yearAndMonth))); }
public Statement GetLatestStatement() { var latestCompletedMonth = YearAndMonth.GetLatestMonth(); return(GetStatement(latestCompletedMonth)); }
public IEnumerable <Statement> GetLatestStatements() { var latestCompletedMonth = YearAndMonth.GetLatestMonth(); return(GetStatements(latestCompletedMonth)); }