Skip to content

feat: add subscription.resume endpoint#25

Merged
sandervanhooft merged 1 commit into
mainfrom
claude/xenodochial-lalande-b7870c
May 27, 2026
Merged

feat: add subscription.resume endpoint#25
sandervanhooft merged 1 commit into
mainfrom
claude/xenodochial-lalande-b7870c

Conversation

@sandervanhooft
Copy link
Copy Markdown
Member

Summary

  • Adds POST /v1/subscriptions/{id}/resume to reverse a pending cancellation while the subscription is still on its grace period.
  • Exposes it as $vatly->subscriptions->resume($id) and $subscription->resume().
  • Updates the cancel description in openapi.yaml to point at the new endpoint (was: "Canceled subscriptions cannot be reactivated through the API").

Files

  • src/API/Endpoints/SubscriptionEndpoint.phpresume() POSTs to /subscriptions/{id}/resume. Idempotency-Key is auto-attached by VatlyApiClient::performHttpCall() like every other POST.
  • src/API/Resources/Subscription.php$subscription->resume() shortcut on the resource.
  • openapi.yaml — new resumeSubscription operation; cancel notes updated.
  • docs/Subscriptions.md — new "Resume a subscription" section.
  • tests/Endpoints/SubscriptionEndpointTest.php — happy-path + idempotency-key tests.

Test plan

  • vendor/bin/phpunit — 96/96 pass (2 new)
  • vendor/bin/phpstan analyse — clean
  • Manual: verify the actual Vatly API server accepts POST /v1/subscriptions/{id}/resume and returns the resumed subscription

Follow-ups

🤖 Generated with Claude Code

Adds POST /v1/subscriptions/{id}/resume to reverse a pending
cancellation while the subscription is still on grace period.

- SubscriptionEndpoint::resume() with idempotency-key support
- Subscription::resume() shortcut on the resource
- OpenAPI spec entry + cancel notes updated to point at it
- Tests for both happy path and idempotency-key forwarding

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sandervanhooft sandervanhooft merged commit 2b51003 into main May 27, 2026
12 checks 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