Skip to content

Market methods: update, delete

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

Reference for Market, one group of Market methods.

Market.update

Changes the given properties of a Market. Verb page.

TypeScript
interface MarketVerbs {
  update(input: MarketUpdateInput, options?: SB.CallOptions): SB.Call<Market>
}

Emits Market.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Market.
countriesstring[]ISO 3166-1 alpha-2 country codes.
currencystringThe ISO 4217 currency Prices show in.
localesstring[]BCP 47 locale tags, the default first.

Returns

OutputTypeRequiredDescription
marketMarketrequiredThe Market.

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 market = await $.Market.update({ id: 'market_4uFEzN14G4', currency: 'USD' })

Market.delete

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

TypeScript
interface MarketVerbs {
  delete(input: MarketDeleteInput, options?: SB.CallOptions): SB.Call<Market>
}

Emits Market.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Market.

Returns

OutputTypeRequiredDescription
marketMarketrequiredThe Market.

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 market = await $.Market.delete({ id: 'market_4uFEzN14G4' })