Skip to content

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.

TypeScript
interface RenewalVerbs {
  update(input: RenewalUpdateInput, options?: SB.CallOptions): SB.Call<Renewal>
}

Emits Renewal.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Renewal.
valuemoneyWhat the Deal is worth if won.
ownerWorkerThe Worker who runs it.
closesOndateThe date the buyer expects to decide.
nextSteptextThe next dated step agreed with the buyer.
termEndsAtdatetimeWhen the current term ends, read from the Subscription.
openedAtdatetimeWhen it opened: by default 90 days before the term ends.
usageReviewtextUsage against each Entitlement over the term, written before any Quote.
noticeSentAtdatetimeWhen the renewal notice the legal floor requires went out, with the date, Price and cancel link.
saveOffertextThe one save offer shown on cancel; it never blocks the cancel.

Returns

OutputTypeRequiredDescription
renewalRenewalrequiredThe Renewal.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
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.

TypeScript
interface RenewalVerbs {
  delete(input: RenewalDeleteInput, options?: SB.CallOptions): SB.Call<Renewal>
}

Emits Renewal.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Renewal.

Returns

OutputTypeRequiredDescription
renewalRenewalrequiredThe Renewal.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const renewal = await $.Renewal.delete({ id: 'renewal_NrJC9bDcII' })