Skip to content

chore: sync with OpenAPI — self-service link operation renames#16

Merged
sandervanhooft merged 1 commit into
mainfrom
chore/sync-openapi-self-service-link-renames
May 21, 2026
Merged

chore: sync with OpenAPI — self-service link operation renames#16
sandervanhooft merged 1 commit into
mainfrom
chore/sync-openapi-self-service-link-renames

Conversation

@sandervanhooft
Copy link
Copy Markdown
Member

Summary

Pulls endpoint paths, method names, and HTTP verbs back in line with the latest OpenAPI spec synced into vatly-docs on 2026-05-21.

This effectively reverses the renames from #14: vatlify's canonical operationIds and URL shapes are the ones the OpenAPI documents, and they remained the spec's source of truth.

Method / URL / verb changes

Before After
`OrderEndpoint::createInvoiceUpdateLink` `OrderEndpoint::requestAddressUpdateLink`
`Order::createInvoiceUpdateLink` `Order::requestAddressUpdateLink`
`POST /orders/{id}/invoice-update-link` `POST /orders/{id}/request-address-update-link`
`SubscriptionEndpoint::createBillingUpdateLink` `SubscriptionEndpoint::updateBilling`
`Subscription::createBillingUpdateLink` `Subscription::updateBilling`
`POST /subscriptions/{id}/billing-update-link` `PATCH /subscriptions/{id}/update-billing`

Both operations still return a `{href, type}` hosted-link payload — return type stays `Vatly\API\Types\Link`.

Schema cleanup

  • `OrderLine::$links` removed. The OpenAPI's `OrderLine` schema has no `links` property — line items aren't top-level addressable resources and don't carry HATEOAS links.
  • Unused `OrderLineLinks` class deleted.

Tests

Endpoint tests updated to assert the new URLs and (for `updateBilling`) the PATCH verb. All 71 tests pass.

Breaking changes (downstream coordination required)

This is a breaking-change release. Coordinated companion PRs will update the downstream packages:

  • `vatly/vatly-fluent-php`: rename `CreateSubscriptionBillingUpdateLink` action → `UpdateSubscriptionBilling`, plus `SubscriptionHandle` / `Billable` / `BillableFactory` references
  • `vatly/vatly-laravel`: only docs + Subscription model legacy method, no API surface

Test plan

  • `composer test` → 71/71 pass
  • CI green across PHP 8.0-8.4 matrix

🤖 Generated with Claude Code

Pull endpoint paths, method names, and HTTP verbs back in line with
the latest vatly-docs OpenAPI spec (synced 2026-05-21).

This effectively reverts the renames from #14: vatlify's canonical
operationIds and URL shapes are the ones the OpenAPI documents, and
they remained the spec's source of truth.

### Method/URL/verb changes

| Old | New |
| --- | --- |
| `OrderEndpoint::createInvoiceUpdateLink` | `OrderEndpoint::requestAddressUpdateLink` |
| `Order::createInvoiceUpdateLink` | `Order::requestAddressUpdateLink` |
| `POST /orders/{id}/invoice-update-link` | `POST /orders/{id}/request-address-update-link` |
| `SubscriptionEndpoint::createBillingUpdateLink` | `SubscriptionEndpoint::updateBilling` |
| `Subscription::createBillingUpdateLink` | `Subscription::updateBilling` |
| `POST /subscriptions/{id}/billing-update-link` | `PATCH /subscriptions/{id}/update-billing` |

Both operations still return a `{href, type}` hosted-link payload, so
the return type stays `Vatly\API\Types\Link`.

### Schema cleanup

- `OrderLine::$links` removed. The OpenAPI's OrderLine schema has no
  `links` property — it isn't a top-level addressable resource and
  doesn't carry HATEOAS links. The unused `OrderLineLinks` class is
  deleted along with it.

### Tests

Endpoint tests updated to assert the new URLs and (for `updateBilling`)
the PATCH verb.

All 71 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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