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