Skip to main content
Version: 2.x

Class: Bursar

Defined in: javascript/src/bursar.ts:251

The application-facing Bursar boundary.

Credit and billing services are deliberately created together so consumers cannot accidentally construct unrelated services for the same account lifecycle. Provider and application integrations use this facade rather than constructing lifecycle services independently.

Implements

Constructors

Constructor

new Bursar(options): Bursar

Defined in: javascript/src/bursar.ts:258

Parameters

options

BursarOptions

Returns

Bursar

Properties

accounts

readonly accounts: AccountService

Defined in: javascript/src/bursar.ts:256


billing

readonly billing: BillingCapability | null

Defined in: javascript/src/bursar.ts:253


catalog

readonly catalog: CatalogService

Defined in: javascript/src/bursar.ts:255


commerce

readonly commerce: CommerceService | null

Defined in: javascript/src/bursar.ts:254


credits

readonly credits: CreditsService

Defined in: javascript/src/bursar.ts:252

Methods

ingestBillingEvent()

ingestBillingEvent(event): Promise<BillingEventResult>

Defined in: javascript/src/bursar.ts:348

Ingest a normalized provider event through the facade-owned billing lifecycle. Providers must not depend on BillingService directly.

Parameters

event

BillingEvent

Returns

Promise<BillingEventResult>

Implementation of

BillingEventSink.ingestBillingEvent


loadCatalog()

loadCatalog(): Promise<void>

Defined in: javascript/src/bursar.ts:324

Load the active catalog into the pricing engine.

Returns

Promise<void>


requireBilling()

requireBilling(): BillingCapability

Defined in: javascript/src/bursar.ts:329

Return billing or raise the SDK's typed configuration error.

Returns

BillingCapability


requireCommerce()

requireCommerce(): CommerceService

Defined in: javascript/src/bursar.ts:337

Return commerce or raise the SDK's typed configuration error.

Returns

CommerceService