public virtual TierPrice ToLiquidTierPrice(Storefront.Model.TierPrice tierPrice) { var result = new TierPrice(); result.Price = tierPrice.Price.Amount * 100; result.Quantity = tierPrice.Quantity; return(result); }
public static TierPrice ToShopifyModel(this Storefront.Model.TierPrice storefrontModel) { var shopifyModel = new TierPrice(); shopifyModel.Price = storefrontModel.ListPrice.Amount * 100; shopifyModel.Quantity = storefrontModel.Quantity; return(shopifyModel); }
public virtual TierPrice ToLiquidTierPrice(Storefront.Model.TierPrice tierPrice) { var factory = ServiceLocator.Current.GetInstance <ShopifyModelFactory>(); var result = factory.CreateTierPrice(); result.Price = tierPrice.Price.Amount * 100; result.Quantity = tierPrice.Quantity; return(result); }
public static TierPrice ToShopifyModel(this Storefront.Model.TierPrice tierPrice) { var converter = ServiceLocator.Current.GetInstance <ShopifyModelConverter>(); return(converter.ToLiquidTierPrice(tierPrice)); }
public static TierPrice ToShopifyModel(this Storefront.Model.TierPrice tierPrice) { var converter = new ShopifyModelConverter(); return(converter.ToLiquidTierPrice(tierPrice)); }