public static coreModel.Price ToCoreModel(this googleModel.Price price) { var retVal = new coreModel.Price(); retVal.InjectFrom(price); retVal.Currency = price.Currency; return(retVal); }
public static googleModel.Price ToGoogleModel(this coreModel.Price price) { var retVal = new googleModel.Price(); retVal.InjectFrom(price); retVal.Value = price.List.ToString(CultureInfo.InvariantCulture); retVal.Currency = price.Currency.ToString(); return retVal; }
public static coreModel.Price ToCoreModel(this googleModel.Price price) { var retVal = new coreModel.Price(); retVal.InjectFrom(price); retVal.Currency = (CurrencyCodes)Enum.Parse(typeof(CurrencyCodes), price.Currency); return(retVal); }
public static googleModel.Price ToGoogleModel(this coreModel.Price price) { var retVal = new googleModel.Price(); retVal.InjectFrom(price); retVal.Value = price.List.ToString(CultureInfo.InvariantCulture); retVal.Currency = price.Currency.ToString(); return(retVal); }
private bool TryGetProductPrice(string productId, out GooglePrice productPrice) { var prices = _pricingService.EvaluateProductPrices(new PriceEvaluationContext { ProductIds = new string[] { productId } }); if (prices == null) { productPrice = null; return(false); } productPrice = prices.First(x => x.Currency == "USD").ToGoogleModel(); return(true); }