Пример #1
0
        public static CreditCardStatement Create(CreditCardBill bill, StatementDescription description, MoneyAmount amount, DateTime date)
        {
            if (bill == null)
            {
                throw new ArgumentNullException(nameof(bill));
            }

            if (bill.Id < 1)
            {
                throw new ArgumentException("Credit card bill entity must have a valid id.", nameof(bill));
            }

            return(new CreditCardStatement()
            {
                Bill = bill,
                Description = description,
                Amount = amount,
                BuyDate = date
            });
        }
Пример #2
0
 public CreditCardBill CreateBill(MonthYear monthYear) => CreditCardBill.Create(this, monthYear);