Skip to content

Supplier methods: update, delete

The Supplier Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.

Reference for Supplier, one group of Supplier methods.

Supplier.update

Changes the given properties of a Supplier. Verb page.

TypeScript
interface SupplierVerbs {
  update(input: SupplierUpdateInput, options?: SB.CallOptions): SB.Call<Supplier>
}

Emits Supplier.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Supplier.
namestringThe legal or personal name.
payoutAccountstringWhere payouts land, held through Stripe.

Returns

OutputTypeRequiredDescription
supplierSupplierrequiredThe Supplier.

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 supplier = await $.Supplier.update({ id: 'supplier_QTsIMiLqO4', payoutAccount: 'Example payout account' })

Supplier.delete

Deletes a Supplier: a soft delete that keeps its history, undone by Thing.restore. Verb page.

TypeScript
interface SupplierVerbs {
  delete(input: SupplierDeleteInput, options?: SB.CallOptions): SB.Call<Supplier>
}

Emits Supplier.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Supplier.

Returns

OutputTypeRequiredDescription
supplierSupplierrequiredThe Supplier.

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 supplier = await $.Supplier.delete({ id: 'supplier_QTsIMiLqO4' })