internal SetInventoryShipmentInformationParameters(IShipmentDetailReturn detailReturn) { PalletWeight = detailReturn.PalletWeight; PalletQuantity = detailReturn.PalletQuantity; InventoryShipmentOrderKey = detailReturn.ShipmentKey; ShippingInstructions = detailReturn.ShippingInstructions != null ? new SetShippingInstructionsParameters(detailReturn.ShippingInstructions) : null; TransitInformation = detailReturn.TransitInformation != null ? new SetTransitInformationParameter(detailReturn.TransitInformation) : null; }
internal IResult <ShipmentInformation> Execute(DateTime dateCreated, IShipmentDetailReturn shipment) { if (dateCreated == null) { throw new ArgumentNullException("dateCreated"); } var createResult = Execute(dateCreated); if (!createResult.Success) { return(createResult); } createResult.ResultingObject.SetShipmentInformation(shipment); return(createResult); }
internal static void SetShipmentInformation(this ShipmentInformation shipmentInformation, IShipmentDetailReturn shipment) { if (shipmentInformation == null) { throw new ArgumentNullException("shipmentInformation"); } if (shipmentInformation.ShipFrom == null) { shipmentInformation.ShipFrom = new ShippingLabel(); } if (shipmentInformation.ShipTo == null) { shipmentInformation.ShipTo = new ShippingLabel(); } if (shipmentInformation.FreightBill == null) { shipmentInformation.FreightBill = new ShippingLabel(); } if (shipment == null) { shipmentInformation.Status = ShipmentStatus.Unscheduled; shipmentInformation.PalletWeight = 0.0; shipmentInformation.PalletQuantity = 0; shipmentInformation.SetShippingInstructions(null); shipmentInformation.SetTransitInformation((ITransitInformation)null); } else { shipmentInformation.Status = shipment.Status; shipmentInformation.PalletWeight = shipment.PalletWeight; shipmentInformation.PalletQuantity = shipment.PalletQuantity; shipmentInformation.SetShippingInstructions(shipment.ShippingInstructions); shipmentInformation.SetTransitInformation(shipment.TransitInformation); } }