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

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

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

            return(GetStatements(latestCompletedMonth));
        }