Example #1
0
 private static Models.Shipment ConvertToShipment(Shipment shipment)
 {
     return(new Models.Shipment
     {
         LineItems = shipment.LineItems.Select(ConvertToLineItem).ToArray(),
         Discounts = shipment.Discounts.Select(ConvertToDiscount).ToArray(),
         ShipmentId = shipment.ShipmentId,
         Status = shipment.Status,
         ShippingSubTotal = shipment.ShippingSubTotal,
         ShippingTotal = shipment.ShippingTotal,
         ShippingMethodId = shipment.ShippingMethodId,
         SubTotal = shipment.SubTotal,
         ShippingTax = shipment.ShippingTax,
         ShippingDiscountAmount = shipment.ShippingDiscountAmount,
         ShipmentTrackingNumber = shipment.ShipmentTrackingNumber,
         WarehouseCode = shipment.WarehouseCode,
         ShippingAddressId = shipment.ShippingAddressId,
         ShippingMethodName = shipment.ShippingMethodName,
         PrevStatus = shipment.PrevStatus,
         PickListId = shipment.PickListId,
         Properties = shipment.ToPropertyList()
     });
 }
Example #2
0
 /// <summary>
 /// Sets the parent shipment.
 /// </summary>
 /// <param name="shipment">The shipment.</param>
 public void SetParent(Shipment shipment)
 {
     this._Parent = shipment;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ShipmentDiscountCollection"/> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 public ShipmentDiscountCollection(Shipment parent)
 {
     _Parent = parent;
 }