You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename upgrade_subscription to change_repository_plan API (#67)
## Summary
Refactors the subscription API by renaming `upgrade_subscription.py` to
`change_repository_plan.py`, providing a more accurate and flexible API
endpoint name that better reflects its purpose. The module has been
significantly enhanced with improved logic and documentation.
## Key Accomplishments
- **API Rename**: Renamed `upgrade_subscription` to
`change_repository_plan` to better convey the endpoint's capability of
handling repository-level plan changes (not just upgrades)
- **Enhanced Implementation**: Expanded the module with ~37 net new
lines of logic, indicating improved handling of plan change scenarios
(e.g., upgrades, downgrades, or lateral plan switches)
- **Documentation Improvements**: Updated docstrings and documentation
in `upgrade_subscription_request.py` for improved clarity and
consistency with the new naming convention
- **Semantic Accuracy**: The new naming aligns the API surface with the
actual business operation — changing a repository's plan rather than
generically "upgrading a subscription"
## Breaking Changes
⚠️ **Yes — this is a breaking change for consumers of the client
library:**
- `robosystems_client.api.subscriptions.upgrade_subscription` has been
removed and replaced with
`robosystems_client.api.subscriptions.change_repository_plan`
- Any code importing or referencing the old `upgrade_subscription`
module will need to be updated to use `change_repository_plan`
- The `UpgradeSubscriptionRequest` model remains in place but its
documentation has been updated
## Testing Notes
- Verify that all existing subscription plan change workflows function
correctly under the new API path
- Test both upgrade and downgrade scenarios to ensure the broadened
semantics are properly supported
- Validate that the request model (`UpgradeSubscriptionRequest`)
serializes and deserializes correctly with the renamed endpoint
- Ensure no stale references to the old `upgrade_subscription` module
exist in dependent services or integration tests
## Infrastructure Considerations
- Downstream services and CI pipelines that depend on the subscription
API client should be updated to reference the new module name before or
alongside this change
- Consider a coordinated rollout if multiple services consume this
client library to avoid import errors
- Package version should be bumped appropriately (minor or major) to
signal the breaking change to consumers
---
🤖 Generated with [Claude Code](https://claude.ai/code)
**Branch Info:**
- Source: `feature/repo-sub-change`
- Target: `main`
- Type: feature
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments