/// <summary> /// The collection of <see cref="IInvoice"/> associated with the <see cref="IShipment"/>. /// </summary> /// <param name="shipment"> /// The <see cref="IShipment"/> /// </param> /// <param name="merchelloContext"> /// The <see cref="IMerchelloContext"/>. /// </param> /// <returns> /// The <see cref="IEnumerable{IInvoice}"/>. /// </returns> internal static IEnumerable <IInvoice> Invoices(this IShipment shipment, IMerchelloContext merchelloContext) { return(shipment.Orders(merchelloContext) .Select(x => x.Invoice(merchelloContext)).OrderBy(x => x.CreateDate)); }
/// <summary> /// Gets the collection of <see cref="IOrder"/> for the <see cref="IShipment"/>. /// </summary> /// <param name="shipment"> /// The <see cref="IShipment"/>. /// </param> /// <returns> /// The <see cref="IEnumerable{IOrder}"/>. /// </returns> public static IEnumerable <IOrder> Orders(this IShipment shipment) { return(shipment.Orders(MerchelloContext.Current)); }