Skip to content

Rename upgrade_subscription to change_repository_plan API#67

Merged
jfrench9 merged 1 commit intomainfrom
feature/repo-sub-change
Mar 9, 2026
Merged

Rename upgrade_subscription to change_repository_plan API#67
jfrench9 merged 1 commit intomainfrom
feature/repo-sub-change

Conversation

@jfrench9
Copy link
Member

@jfrench9 jfrench9 commented Mar 9, 2026

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

Branch Info:

  • Source: feature/repo-sub-change
  • Target: main
  • Type: feature

Co-Authored-By: Claude noreply@anthropic.com

@jfrench9 jfrench9 merged commit ce5e870 into main Mar 9, 2026
1 check 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.

1 participant