public static Shipment ToShipmentModel(this ShippingMethod shippingMethod, Currency currency) { var shipmentWebModel = new Shipment(currency); shipmentWebModel.ShipmentMethodCode = shippingMethod.ShipmentMethodCode; shipmentWebModel.ShippingPrice = shippingMethod.Price; shipmentWebModel.TaxType = shippingMethod.TaxType; return shipmentWebModel; }
public static Shipment ToShipmentModel(this ShipmentUpdateModel updateModel, Currency currency) { var shipmentModel = new Shipment(currency); shipmentModel.InjectFrom<NullableAndEnumValueInjecter>(updateModel); return shipmentModel; }