Skip to content

docs(quote): a draft can be declined, and its reason is optional - #146

Merged
amitsharma-turbodocx merged 3 commits into
developfrom
feature/quote-draft-to-declined
Aug 17, 2026
Merged

docs(quote): a draft can be declined, and its reason is optional#146
amitsharma-turbodocx merged 3 commits into
developfrom
feature/quote-draft-to-declined

Conversation

@yacinekahlerras-turbodocx

Copy link
Copy Markdown
Contributor

The declineQuote reference said "Mark a sent quote as declined". That is now false — a draft can be declined too, for a deal that dies before the quote is ever sent.

What changed in the product

POST /v1/quotes/{id}/decline now accepts the request without a reason:

Quote status reason
draft optional — it never reached the customer, so there is nothing to justify
sent required400 CANNOT_DECLINE_QUOTE without one

The 190-character cap still applies to both.

What this PR fixes

All six language pages now state the rule and carry a no-reason example in that language’s own idiom (matching what actually shipped in the SDK, not one pattern copy-pasted six times):

Page Draft example
javascript declineQuote(id, {})
python decline_quote(id, {})
go &turbodocx.DeclineQuoteRequest{} (unset Reason is omitted)
php new DeclineQuoteRequest()
java new DeclineQuoteRequest() (Gson omits the null)
ruby decline_quote(id, {})

The JavaScript lifecycle line also gains the direct draftdeclined path, which it previously implied was impossible.

Deliberately unchanged

  • voidQuote — still requires a reason; it is only reachable from sent.
  • handleExpiredQuote — its reason and newValidUntil genuinely are both still required.
  • The statusInfo prose lists the flag names without asserting per-status values, so it stayed accurate as written.

🤖 Generated with Claude Code

yacineKahlerras and others added 2 commits August 17, 2026 18:18
The declineQuote pages said "Mark a sent quote as declined", which is now
false: a draft can be declined too, for a deal that dies before the quote
is ever sent. A draft never reached the customer, so the reason is
optional there; a sent quote still requires one (400 CANNOT_DECLINE_QUOTE
without it) and the 190-char cap still applies to both.

All six language pages now state the rule and show a no-reason example in
that language's own idiom. The JS lifecycle line gains the draft-to-
declined path. Void and handleExpiredQuote are unchanged — both still
require a reason.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The previous wording said the reason was "optional for a draft", which
describes the API but hides the outcome: the reason is stored on the
quote's linked signature document, and a draft has none, so anything
passed for a draft is accepted and then silently dropped.

Verified against live data — every declined draft has no reason stored,
while declined SENT quotes do.

Says so plainly now, on all six language pages, so nobody passes a reason
expecting it to persist. The product side matches: the dialog no longer
asks for one on a draft.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…parity

Adds a 'a draft cannot be voided' clause to each SDK quote reference page's void section, brings five intros to parity with the JS page (a draft can also be marked declined directly), and annotates canDecline as true for a draft where flags are annotated by status.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@amitsharma-turbodocx
amitsharma-turbodocx merged commit f48f6ce into develop Aug 17, 2026
1 check 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.

3 participants