public virtual ShippingMethod ToLiquidShippingMethod(Storefront.Model.ShippingMethod shippingMethod) { var result = new ShippingMethod(); result.Handle = shippingMethod.ShipmentMethodCode; result.Price = shippingMethod.Price.Amount; result.TaxType = shippingMethod.TaxType; result.Title = shippingMethod.Name; return(result); }
public static ShippingMethod ToShopifyModel(this Storefront.Model.ShippingMethod storefrontModel) { var shopifyModel = new ShippingMethod(); shopifyModel.Handle = storefrontModel.ShipmentMethodCode; shopifyModel.Price = storefrontModel.Price.Amount; shopifyModel.TaxType = storefrontModel.TaxType; shopifyModel.Title = storefrontModel.Name; return(shopifyModel); }
public virtual ShippingMethod ToLiquidShippingMethod(Storefront.Model.ShippingMethod shippingMethod) { var factory = ServiceLocator.Current.GetInstance <ShopifyModelFactory>(); var result = factory.CreateShippingMethod(); result.Handle = shippingMethod.ShipmentMethodCode; result.Price = shippingMethod.Price.Amount; result.TaxType = shippingMethod.TaxType; result.Title = shippingMethod.Name; return(result); }
public static ShippingMethod ToShopifyModel(this Storefront.Model.ShippingMethod shippingMethod) { var converter = new ShopifyModelConverter(); return(converter.ToLiquidShippingMethod(shippingMethod)); }
public static ShippingMethod ToShopifyModel(this Storefront.Model.ShippingMethod shippingMethod) { var converter = ServiceLocator.Current.GetInstance <ShopifyModelConverter>(); return(converter.ToLiquidShippingMethod(shippingMethod)); }