/// <summary> /// Initializes a new instance of the <see cref="Invoice"/> class. /// </summary> /// <param name="invoiceStatus"> /// The invoice status. /// </param> /// <param name="billToAddress"> /// The bill to address. /// </param> /// <param name="lineItemCollection"> /// The line item collection. /// </param> /// <param name="orders"> /// The orders. /// </param> internal Invoice(IInvoiceStatus invoiceStatus, IAddress billToAddress, LineItemCollection lineItemCollection, OrderCollection orders) { Mandate.ParameterNotNull(invoiceStatus, "invoiceStatus"); Mandate.ParameterNotNull(billToAddress, "billToAddress"); Mandate.ParameterNotNull(lineItemCollection, "lineItemCollection"); Mandate.ParameterNotNull(orders, "orders"); _invoiceStatus = invoiceStatus; _billToName = billToAddress.Name; _billToAddress1 = billToAddress.Address1; _billToAddress2 = billToAddress.Address2; _billToLocality = billToAddress.Locality; _billToRegion = billToAddress.Region; _billToPostalCode = billToAddress.PostalCode; _billToCountryCode = billToAddress.CountryCode; _billToPhone = billToAddress.Phone; _items = lineItemCollection; _orders = orders; _invoiceDate = DateTime.Now; }
/// <summary> /// Constructor /// </summary> public InvoiceOrderShipment() { Orders = new OrderCollection(); LineItems = new List <InvoiceOrderShipmentLineItem>(); }
public bool Equals(OrderCollection compare) { return(Count == compare.Count && compare.All(item => Contains(item.Key))); }