Upgrade/downgrade flow — tier changes without new DLID #631
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 5.2 — Tier Upgrade/Downgrade
Parent: #616 | Depends on: #618, #619, #630
Upgrade scenario
Customer has CRM license, purchases POS upgrade:
PATCH /api/v1/licensing/licenses/{id}withtier: "pos"Downgrade scenario
Customer downgrades from Suite to CRM:
Add-on scenario
Customer has POS license, adds HRM as individual add-on:
AddCustomEntitlement(licenseID, "hrm", "MokoSuiteHRM")Prorated billing (Shop side)
Acceptance criteria
Branch created:
feature/631-upgrade-downgrade-flow-tier-changes-withAll Gitea-side acceptance criteria met
The upgrade/downgrade/add-on flow is fully implemented in the models built for #618/#619:
Upgrade
PATCH /api/v1/licensing/licenses/{id}with{"tier": "pos"}→
UpdateLicenseTier()→RebuildEntitlements()→ entitlements rebuilt from tier repos→ Next Joomla update check picks up new repos via
/updates/{product}.xmlDowngrade
Same PATCH with lower tier →
RebuildEntitlements()removes higher-tier repos→ Update endpoint returns empty
<updates/>for non-entitled products→ Installed extensions continue working (GPL), just no more updates
Add-on
AddCustomEntitlement(licenseID, "hrm", "MokoSuiteHRM")→IsCustom: true→
RebuildEntitlements()only deletesis_custom = falseentries→ Custom entitlements survive tier changes
Prorated billing
This is a Shop/CRM concern — tracked in MokoSuiteShop #28 and MokoSuiteCRM #57.