Skip to content

Commit

Permalink
fix: updating TaxConfig and Price attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgacsal committed Nov 12, 2024
1 parent 6f92337 commit 09587ca
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions openmeter/productcatalog/plan/adapter/phase.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 09587ca

Please sign in to comment.