Renewal methods: update, delete
The Renewal Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Renewal, one group of Renewal methods.
Renewal.update
Changes the given properties of a Renewal. Verb page.
interface RenewalVerbs {
update(input: RenewalUpdateInput, options?: SB.CallOptions): SB.Call<Renewal>
}Emits Renewal.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Renewal. |
value | money | What the Deal is worth if won. | |
owner | Worker | The Worker who runs it. | |
closesOn | date | The date the buyer expects to decide. | |
nextStep | text | The next dated step agreed with the buyer. | |
termEndsAt | datetime | When the current term ends, read from the Subscription. | |
openedAt | datetime | When it opened: by default 90 days before the term ends. | |
usageReview | text | Usage against each Entitlement over the term, written before any Quote. | |
noticeSentAt | datetime | When the renewal notice the legal floor requires went out, with the date, Price and cancel link. | |
saveOffer | text | The one save offer shown on cancel; it never blocks the cancel. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
renewal | Renewal | required | The Renewal. |
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 renewal = await $.Renewal.update({ id: 'renewal_NrJC9bDcII', termEndsAt: '2026-10-22T12: 00: 00Z' })Renewal.delete
Deletes a Renewal: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface RenewalVerbs {
delete(input: RenewalDeleteInput, options?: SB.CallOptions): SB.Call<Renewal>
}Emits Renewal.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Renewal. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
renewal | Renewal | required | The Renewal. |
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 renewal = await $.Renewal.delete({ id: 'renewal_NrJC9bDcII' })