Quote methods: accept, decline, expire
The Quote Verbs accept, decline, expire as typed SDK methods, with inputs, result, refusals and an example.
Reference for Quote, one group of Quote methods.
Quote.accept
Accept takes a sent Quote before it expires, turning one-time lines into an Order and recurring lines into a Subscription. Verb page.
interface QuoteVerbs {
accept(input: QuoteAcceptInput, options?: SB.CallOptions): SB.Call<QuoteAcceptOutput>
}Emits Quote.accepted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
quote | Quote | required | The sent Quote. |
party | Party | required | The Contact or Organization accepting, who becomes the Customer. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
order | Order | The Order for the one-time lines, when the Quote has any. | |
subscription | Subscription | The Subscription for the recurring lines, at each line’s quantity and term. | |
quote | Quote | required | The Quote, now accepted. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
import { $ } from 'startup-builder'
const { order, subscription, quote } = await $.Quote.accept({ quote: 'qt_GZnH5OK100', party: 'party_hmQWaPrAyZ' })Quote.decline
Decline records the buyer’s refusal of a sent Quote, with the reason in their words. Verb page.
interface QuoteVerbs {
decline(input: QuoteDeclineInput, options?: SB.CallOptions): SB.Call<Quote>
}Emits Quote.declined.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
quote | Quote | required | The sent Quote. |
reason | text | Why the buyer declined, kept verbatim. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
quote | Quote | required | The declined Quote. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
import { $ } from 'startup-builder'
const quote = await $.Quote.decline({ quote: 'qt_GZnH5OK100' })Quote.expire
Expire closes a sent Quote that reached its validUntil date unaccepted; it never converts afterward. Verb page.
interface QuoteVerbs {
expire(input: QuoteExpireInput, options?: SB.CallOptions): SB.Call<Quote>
}Emits Quote.expired.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
quote | Quote | required | The Quote past its date. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
quote | Quote | required | The expired Quote. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
import { $ } from 'startup-builder'
const quote = await $.Quote.expire({ quote: 'qt_GZnH5OK100' })