public Receipt(string phone, string email, ETaxation taxation) { if (string.IsNullOrEmpty(email) && string.IsNullOrEmpty(phone)) { throw new ArgumentNullException("Phone or Email must be not empty"); } ReceiptItems = new List <ReceiptItem>(); Phone = phone; Email = email; Taxation = taxation; }
public Receipt(string phone, string email, ETaxation taxation, IEnumerable <ReceiptItem> items) { if (string.IsNullOrEmpty(email) && string.IsNullOrEmpty(phone)) { throw new ArgumentNullException("Phone or Email must be not empty"); } Items = items; Phone = phone; Email = email; Taxation = taxation; }
public Receipt(string email, ETaxation taxation) : this(null, email, taxation) { }