public virtual ShippingMethod ToShippingMethod(quoteDto.ShipmentMethod shippingMethodDto, Currency currency) { var result = ServiceLocator.Current.GetInstance <CartFactory>().CreateShippingMethod(currency); result.InjectFrom <NullableAndEnumValueInjecter>(shippingMethodDto); result.Price = new Money(shippingMethodDto.Price ?? 0, currency); return(result); }
public virtual ShippingMethod ToShippingMethod(quoteDto.ShipmentMethod shippingMethodDto, Currency currency) { var result = new ShippingMethod(currency); result.InjectFrom <NullableAndEnumValueInjecter>(shippingMethodDto); result.Price = new Money(shippingMethodDto.Price ?? 0, currency); return(result); }
public virtual ShippingMethod ToShippingMethod(quoteDto.ShipmentMethod shippingMethodDto, Currency currency) { var result = new ShippingMethod(currency) { LogoUrl = shippingMethodDto.LogoUrl, Name = shippingMethodDto.Name, OptionName = shippingMethodDto.OptionName }; result.LogoUrl = shippingMethodDto.LogoUrl; result.Price = new Money(shippingMethodDto.Price ?? 0, currency); return(result); }
public static ShippingMethod ToShippingMethod(this quoteDto.ShipmentMethod shippingMethodDto, Currency currency) { return(QuoteConverterInstance.ToShippingMethod(shippingMethodDto, currency)); }