Repository navigation
Expose relatedResources.subscriptionId on order lines and sync the OpenAPI spec - #76
Merged
Merged
Conversation
…enAPI spec OrderLine and OrderLineData gain a nullable relatedResources with a nullable subscriptionId: the subscription a signup, renewal or immediate-update line belongs to. It is null on historical and unrelated lines and when the key is absent; an unresolved signup line keeps the object with a null subscriptionId. openapi.yaml is synced with the published production bundle, which also adds links.customerInvoice to the Refund and Chargeback schemas. The productType/productId docblocks now describe the plan reference on initial signup lines. Release v0.1.0-alpha.33 in the changelog. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d5d1-d2d3-71cb-987c-ca801d16b2ba Co-authored-by: Amp <amp@ampcode.com>
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.
Vatlify Release 2 is live in production. Order lines now carry
lines[].relatedResources.subscriptionId. This PR brings the SDK in line.OrderLine->relatedResourcesandOrderLineData->relatedResources(also onOrderPaid->lines) are a nullableOrderLineRelatedResourceswith a nullablesubscriptionId.nullon historical and unrelated lines, and when the key is absent.subscriptionId: null.openapi.yamlis now byte-identical to the published bundle on vatlifyproduction(SHA-2565e648169…def9). That also adds the credit-notelinks.customerInvoiceto the Refund and Chargeback schemas. The SDK already supported it; only the spec copy was stale.productType/productIddocblocks now say that initial signup lines reference the plan (subscription_plan). Their behaviour is unchanged.docs/Orders.mddocuments the order line properties. The changelog moves the entry tov0.1.0-alpha.33.Additive: an optional last constructor argument defaulting to
null. Webhook payloads are unchanged.Tests cover a resolved signup line, an unresolved one, an unrelated
nullline and a missing key, through bothGET /orders/{id}andOrderPaid. They fail without the hydration. Locally I also ran the bundle's own order example throughWebhookEventFactory, and it hydrates as expected.