From 09587ca36ae7a98364a9bbea623b3489e16c7796 Mon Sep 17 00:00:00 2001 From: Krisztian Gacsal Date: Tue, 12 Nov 2024 15:42:00 +0100 Subject: [PATCH] fix: updating TaxConfig and Price attrs --- openmeter/productcatalog/plan/adapter/phase.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/openmeter/productcatalog/plan/adapter/phase.go b/openmeter/productcatalog/plan/adapter/phase.go index f190106b8..88d805d96 100644 --- a/openmeter/productcatalog/plan/adapter/phase.go +++ b/openmeter/productcatalog/plan/adapter/phase.go @@ -422,9 +422,15 @@ func (a *adapter) UpdatePhase(ctx context.Context, params plan.UpdatePhaseInput) SetOrClearDescription(rateCardInput.Description). SetOrClearFeatureKey(rateCardInput.FeatureKey). SetEntitlementTemplate(rateCardInput.EntitlementTemplate). - SetTaxConfig(rateCardInput.TaxConfig). - SetOrClearBillingCadence(rateCardInput.BillingCadence). - SetPrice(rateCardInput.Price) + SetOrClearBillingCadence(rateCardInput.BillingCadence) + + if rateCardInput.TaxConfig != nil { + q.SetTaxConfig(rateCardInput.TaxConfig) + } + + if rateCardInput.Price != nil { + q.SetPrice(rateCardInput.Price) + } if rateCardInput.FeatureID == nil { q.ClearFeatureID()