/// <summary> /// Adds a <see cref="IShipment"/> to the extended data collection /// </summary> /// <param name="extendedData"></param> /// <param name="shipment"></param> public static void AddShipment(this ExtendedDataCollection extendedData, IShipment shipment) { extendedData.AddAddress(shipment.GetOriginAddress(), Constants.ExtendedDataKeys.ShippingOriginAddress); extendedData.AddAddress(shipment.GetDestinationAddress(), Constants.ExtendedDataKeys.ShippingDestinationAddress); extendedData.SetValue(Constants.ExtendedDataKeys.ShipMethodKey, shipment.ShipMethodKey.ToString()); extendedData.AddLineItemCollection(shipment.Items); }