Skip to main content
Version: 2.x

Class: Bursar

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

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:259

Parameters​

options​

BursarOptions

Returns​

Bursar

Properties​

accounts​

readonly accounts: AccountService

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


billing​

readonly billing: BillingCapability | null

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


catalog​

readonly catalog: CatalogService

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


commerce​

readonly commerce: CommerceService | null

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


credits​

readonly credits: CreditsService

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

Methods​

ingestBillingEvent()​

ingestBillingEvent(event): Promise<BillingEventResult>

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

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:325

Load the active catalog into the pricing engine.

Returns​

Promise<void>


requireBilling()​

requireBilling(): BillingCapability

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

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

Returns​

BillingCapability


requireCommerce()​

requireCommerce(): CommerceService

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

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

Returns​

CommerceService