Exemple #1
0
        public Statement GetStatement(YearAndMonth yearAndMonth)
        {
            var transactions = _transactions
                               .Where(t => yearAndMonth.Matches(t.Date));

            return(new Statement(yearAndMonth, transactions));
        }
Exemple #2
0
 public Statement(YearAndMonth yearAndMonth, IEnumerable <Transaction> transactions)
 {
     _yearAndMonth = yearAndMonth;
     Transactions  = transactions.ToArray();
 }
Exemple #3
0
 public IEnumerable <Statement> GetStatements(YearAndMonth yearAndMonth)
 {
     return(_accounts.Select(a => a.GetStatement(yearAndMonth)));
 }
Exemple #4
0
        public Statement GetLatestStatement()
        {
            var latestCompletedMonth = YearAndMonth.GetLatestMonth();

            return(GetStatement(latestCompletedMonth));
        }
Exemple #5
0
        public IEnumerable <Statement> GetLatestStatements()
        {
            var latestCompletedMonth = YearAndMonth.GetLatestMonth();

            return(GetStatements(latestCompletedMonth));
        }