From de89fd201190a565460c8a5b3e507e92a3a67767 Mon Sep 17 00:00:00 2001 From: Tara Zou Date: Wed, 5 Jun 2024 15:33:46 -0400 Subject: [PATCH] use unitPriceinBillingCurrency instead --- src/SelfServe/SqlX/SqlX.rp.ts | 6 +++--- src/SelfServe/SqlX/SqlxTypes.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SelfServe/SqlX/SqlX.rp.ts b/src/SelfServe/SqlX/SqlX.rp.ts index 5ecd76f8e..66675f7a6 100644 --- a/src/SelfServe/SqlX/SqlX.rp.ts +++ b/src/SelfServe/SqlX/SqlX.rp.ts @@ -225,9 +225,9 @@ export const getPriceMapAndCurrencyCode = async (map: OfferingIdMap): Promise x.type === "Consumption") - ?.unitEffectivePriceInBillingCurrency; - regionPriceMap.set(skuName, unitEffectivePriceInBillingCurrency); + const unitPriceinBillingCurrency = item.prices.find((x) => x.type === "Consumption") + ?.unitPriceinBillingCurrency; + regionPriceMap.set(skuName, unitPriceinBillingCurrency); } priceMap.set(region, regionPriceMap); } diff --git a/src/SelfServe/SqlX/SqlxTypes.ts b/src/SelfServe/SqlX/SqlxTypes.ts index aba2e61d7..d06b1844d 100644 --- a/src/SelfServe/SqlX/SqlxTypes.ts +++ b/src/SelfServe/SqlX/SqlxTypes.ts @@ -41,7 +41,7 @@ export type PriceItem = { export type PriceType = { type: string; - unitEffectivePriceInBillingCurrency: number; + unitPriceinBillingCurrency: number; }; export type PriceError = {