Skip to content

fix(rate-plans): the update DTO never allowed deactivation - #320

Merged
telivity-otaip merged 2 commits into
TelivityAI:mainfrom
modernitconsultants:fix/rate-plan-deactivate
Aug 13, 2026
Merged

fix(rate-plans): the update DTO never allowed deactivation#320
telivity-otaip merged 2 commits into
TelivityAI:mainfrom
modernitconsultants:fix/rate-plan-deactivate

Conversation

@modernitconsultants

Copy link
Copy Markdown
Contributor

UpdateRatePlanDto is a partial of the create DTO, and the create DTO never carried isActive (it's a schema default) — so the API has no way to retire a rate plan. PATCH {"isActive": false} answers 400 property isActive should not exist, and the only lever left is validTo, which expires a plan but leaves it isActive=true in every filtered list.

isActive joins the update DTO only: plans are created active, and retiring one is an explicit later act.

UpdateRatePlanDto is a partial of the create DTO, and the create DTO never
carried isActive (a schema default) — so the API has no way to retire a
rate plan. PATCH {"isActive": false} answers 400 "property isActive should
not exist", and the only lever left is validTo, which expires a plan but
leaves it active in every isActive-filtered list.

isActive joins the UPDATE DTO only: plans are created active, and retiring
one is an explicit later act.
@telivity-otaip
telivity-otaip merged commit 4a685a5 into TelivityAI:main Aug 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants