Add Subscriptions API suspend and reactivate paths#1208
Open
asonnenschein wants to merge 3 commits intomainfrom
Open
Add Subscriptions API suspend and reactivate paths#1208asonnenschein wants to merge 3 commits intomainfrom
asonnenschein wants to merge 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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.
2754d9d to
21fd270
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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