public static Vendr.Web.Models.PricePropertyValue GetPrice(IProductComp that) => that.Value <Vendr.Web.Models.PricePropertyValue>("price");
public static string GetSku(IProductComp that) => that.Value <string>("sku");
public static Price CalculatePrice(this IProductComp content) { return(content.AsVendrProduct()?.CalculatePrice()); }
public static IProductSnapshot AsVendrProduct(this IProductComp content) { return(VendrApi.Instance.GetProduct(content.GetProductReference())); }
public static string GetProductReference(this IProductComp content) { return(content.Key.ToString()); }
public static Price CalculatePrice(this IProductComp variant, IProductComp parent) { return(variant.AsVendrProduct(parent)?.CalculatePrice()); }
public static IProductSnapshot AsVendrProduct(this IProductComp variant, IProductComp parent) { return(VendrApi.Instance.GetProduct(parent.GetProductReference(), variant.GetProductReference(), Thread.CurrentThread.CurrentCulture.Name)); }