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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
 public static ShippingMethod ToShippingMethod(this quoteDto.ShipmentMethod shippingMethodDto, Currency currency)
 {
     return(QuoteConverterInstance.ToShippingMethod(shippingMethodDto, currency));
 }