Skip to content

Commit

Permalink
Merge pull request #1058 from ish-hcc/fix_azure_and_ibm
Browse files Browse the repository at this point in the history
[+Price] Show PricingPolicyInfo attributes as NA
  • Loading branch information
powerkimhub authored Feb 8, 2024
2 parents c1b5c5a + 1f17841 commit 0341e9b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,17 @@ func (priceInfoHandler *AzurePriceInfoHandler) GetPriceInfo(productFamily string

for _, item := range value {
pricingPolicy := irs.PricingPolicies{
PricingId: item.SkuID,
PricingPolicy: item.Type,
Unit: item.UnitOfMeasure,
Currency: item.CurrencyCode,
Price: strconv.FormatFloat(item.RetailPrice, 'f', -1, 64),
Description: "NA",
PricingPolicyInfo: nil,
PricingId: item.SkuID,
PricingPolicy: item.Type,
Unit: item.UnitOfMeasure,
Currency: item.CurrencyCode,
Price: strconv.FormatFloat(item.RetailPrice, 'f', -1, 64),
Description: "NA",
PricingPolicyInfo: &irs.PricingPolicyInfo{
LeaseContractLength: "NA",
OfferingClass: "NA",
PurchaseOption: "NA",
},
}

picked := true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,13 +587,17 @@ func (priceInfoHandler *IbmPriceInfoHandler) GetPriceInfo(productFamily string,

for _, price := range amount.Prices {
pricingPolicy := irs.PricingPolicies{
PricingId: metric.MetricID,
PricingPolicy: "quantity_tier=" + strconv.Itoa(price.QuantityTier),
Unit: metric.ChargeUnit,
Currency: currency,
Price: strconv.FormatFloat(price.Price, 'f', -1, 64),
Description: metric.ChargeUnitDisplayName,
PricingPolicyInfo: nil,
PricingId: metric.MetricID,
PricingPolicy: "quantity_tier=" + strconv.Itoa(price.QuantityTier),
Unit: metric.ChargeUnit,
Currency: currency,
Price: strconv.FormatFloat(price.Price, 'f', -1, 64),
Description: metric.ChargeUnitDisplayName,
PricingPolicyInfo: &irs.PricingPolicyInfo{
LeaseContractLength: "NA",
OfferingClass: "NA",
PurchaseOption: "NA",
},
}

picked := true
Expand Down

0 comments on commit 0341e9b

Please sign in to comment.