Skip to content

Docs: subscriptions->cancel() returns nothing - #87

Merged
sandervanhooft merged 3 commits into
mainfrom
docs/subscription-cancel-returns-nothing
Dec 1, 2026
Merged

sandervanhooft merged 3 commits into
mainfrom
docs/subscription-cancel-returns-nothing

Conversation

@sandervanhooft

@sandervanhooft sandervanhooft commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

DELETE /v1/subscriptions/{id} answers 204 No Content in the API (CancelSubscriptionController returns response()->noContent()) and in the OpenAPI spec, and cancel() returns void. The subscriptions guide (docs.vatly.com/packages/php/subscriptions) assigned the result to $subscription and read status from it, which assigned null and then raised a warning on ->status.

  • Docs: cancel() returns nothing; read the new state with get() or the cancellation webhooks; show immediately: true and $subscription->cancel().
  • Tests: the resource cancel test stubs a real 204 (no body) instead of a subscription body; new tests cover the endpoint default path and the resource with immediately: true.
  • No code change. The JS, Python and fluent SDKs already return void/None and document it that way.

Rollout phase

Phase: 1 of 1 — docs and tests only
Predecessor deployed: n/a

sandervanhooft and others added 2 commits December 1, 2026 09:44
DELETE /v1/subscriptions/{id} answers 204 No Content and cancel() returns
void, but the subscriptions guide assigned its result and read status from
it. Fetch the subscription with get() instead, and show immediately: true
and the resource method. The resource cancel test now stubs a 204 without a
body, and new tests cover the endpoint default and the resource with
immediately: true.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-0410b2c8-0b76-4f5f-9f15-fb4da0561ffe
@sandervanhooft
sandervanhooft merged commit 07f2044 into main Dec 1, 2026
12 checks passed
@sandervanhooft
sandervanhooft deleted the docs/subscription-cancel-returns-nothing branch December 1, 2026 10:03
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