Conversation
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.
Context
Second step of the Quotes documentation stack. The order form is what a customer signs: it is generated when a quote version is approved, and signing it creates the order. The REST endpoints are on
main, and so are the fourorder_form.*webhooks from lago-api#6134. Everything here has been re-verified against mergedmain.Orders get the next branch.
Changes
4 endpoints under a new
order_formstag, all gated on the premiumorder_formsfeature flag:GET /order_formsstatus[],customer_id[],number[],quote_number[],owner_id[],search_term, andcreated_at/expires_atrangesGET /order_forms/{lago_id}POST /order_forms/{lago_id}/mark_as_signedsigned_document,execution_mode,execute_atPOST /order_forms/{lago_id}/void4 webhooks:
order_form.created,order_form.signed,order_form.expired,order_form.voided.Notes for review
QuoteVersions::DealExpirationfolds the version'send_date, everyplans[].payload.endDate, and every wallet-credit / recurring-ruleexpirationAtinto one boundary, and refuses a date landing on or after it, compared by date.one_offquotes carry none of those fields and are never bounded. The rule is described in prose rather than by its error code, matching the rest of the spec — no resource description names one.OrderFormObjectserves both REST and webhooks — all four webhook services use the plainOrderFormSerializer, so there is no webhook-specific shape here, unlike the quote events in feat(quotes): document the Quotes REST API and webhooks #567.signed_documentis a base64 data URI, not a multipart upload (Utils::Base64File.decode). Documented with the accepted content types and the 10 MB cap from the model.voided_atis set on expiry too, not just on void:ExpireServicewritesstatus: expiredalongsidevoided_atandvoid_reason: expired. The field descriptions say so, since the name suggests otherwise.execution_modebecomes mandatory as soon asexecute_atis set, perExecutionSettingsValidation. With neither, the order is created but never scheduled:Order.executablerequires a non-nullexecute_at, and there is no execute endpoint.*:40andOrderForm.expirablecompares calendar dates in the billing entity's timezone, soorder_form.expiredfires during the expiry day rather than atexpires_at. Worth confirming that's the behaviour we want to promise.cascade_of_voided/cascade_of_expired); the descriptions name the follow-onquote.voidedevent.OrderExecutionModeEnumis extracted here but belongs to the order too; the orders branch will reuse it.redocly lintandspectral lintpass. 5 newarray-params-pluralwarnings, same reason as feat(quotes): document the Quotes REST API and webhooks #567: the API filter params are singular while accepting both a scalar and an array.