-
Notifications
You must be signed in to change notification settings - Fork 98
Add Subscriptions API suspend and reactivate paths #1208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds subscription suspend and reactivate functionality to the Planet SDK, enabling users to temporarily pause subscriptions without canceling them. The implementation follows the existing patterns in the codebase and includes comprehensive test coverage.
Changes:
- Added four new SDK methods (async and sync):
suspend_subscription,reactivate_subscription,bulk_suspend_subscriptions, andbulk_reactivate_subscriptions - Added four new CLI commands:
suspend,reactivate,bulk-suspend, andbulk-reactivatewith flexible operation modes - Fixed minor documentation typos in existing methods (Args: instead of Args)
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| planet/clients/subscriptions.py | Async client methods for suspend/reactivate operations with validation logic |
| planet/sync/subscriptions.py | Synchronous wrapper methods and typo fixes |
| planet/cli/subscriptions.py | CLI commands for suspend/reactivate with optional parameters |
| tests/integration/test_subscriptions_api.py | 24 new test cases covering success/failure scenarios and parameter validation |
| tests/integration/test_subscriptions_cli.py | 16 new CLI test cases with proper mock setup |
| docs/cli/cli-subscriptions.md | Comprehensive documentation with usage examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
charcey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
2754d9d to
21fd270
Compare
Add Subscription Suspend and Reactivate Support
Summary
Adds support for suspending and reactivating subscriptions in the Planet SDK. Users can now temporarily pause subscriptions without canceling them, and resume them
later with their original configuration intact.
What's New
SDK Methods (Async & Sync)
suspend_subscription(subscription_id, details=None)- Suspend a single subscriptionreactivate_subscription(subscription_id)- Reactivate a suspended subscriptionbulk_suspend_subscriptions(subscription_ids=None, details=None, all_subscriptions=False)- Suspend multiple subscriptionsbulk_reactivate_subscriptions(subscription_ids=None, all_subscriptions=False)- Reactivate multiple subscriptionsCLI Commands
Bulk Operation Modes
Files Changed
Example Usage