Exemple #1
0
        public static TierPrice ToWebModel(this QuoteModule.Client.Model.TierPrice serviceModel, Currency currency)
        {
            var webModel = new TierPrice(currency);

            webModel.InjectFrom <NullableAndEnumValueInjecter>(serviceModel);
            webModel.Price = new Money(serviceModel.Price ?? 0, currency);
            return(webModel);
        }
        public virtual TierPrice ToTierPrice(quoteDto.TierPrice tierPriceDto, Currency currency)
        {
            var result = new TierPrice(currency);

            result.InjectFrom <NullableAndEnumValueInjecter>(tierPriceDto);
            result.Price = new Money(tierPriceDto.Price ?? 0, currency);
            return(result);
        }
Exemple #3
0
        public static TierPrice ToWebModel(this VirtoCommerceQuoteModuleWebModelTierPrice serviceModel, Currency currency)
        {
            var webModel = new TierPrice();

            webModel.InjectFrom <NullableAndEnumValueInjecter>(serviceModel);

            webModel.ListPrice = new Money(serviceModel.Price ?? 0, currency);

            return(webModel);
        }
        public static TierPrice ToWebModel(this VirtoCommerceQuoteModuleWebModelTierPrice serviceModel, Currency currency)
        {
            var webModel = new TierPrice(currency);

            webModel.InjectFrom<NullableAndEnumValueInjecter>(serviceModel);

            webModel.Price = new Money(serviceModel.Price ?? 0, currency);

            return webModel;
        }