@cosmosapp/pay_sdkDefinitionenServer

BaseManager

Base class for all resource managers. Each manager owns a slice of the API (payment intents, webhooks, ...) and a lightweight in-memory cache of the structures…

Base class for all resource managers. Each manager owns a slice of the API (payment intents, webhooks, ...) and a lightweight in-memory cache of the structures it has materialized — an atomic, per-resource manager pattern. Extends EventEmitter so managers that surface real-time events (e.g. the webhook listener) can emit/on without extra plumbing.

Constructor

BaseManager

constructor(client: Client)

Parameters

Properties

id

id: string

member

}> extends EventEmitter { readonly client: Client

cache

Cache of structures keyed by id, populated on fetch/create.

readonly cache: Map<string, Structure>

protected

Shortcut to the shared REST instance.

protected get rest(): REST

protected

Store a structure in the cache and return it.

protected _add(structure: Structure): Structure

resolveId

Resolve an id from either a raw id or a structure instance.

resolveId(idOrStructure: string | { id: string

member

}): string

Auf dieser Seite