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 }); }
public CreditCardBill CreateBill(MonthYear monthYear) => CreditCardBill.Create(this, monthYear);