bursar.Bursar
class bursar.Bursar(*, credit_store, billing_store=None, credits_options=None, billing_options=None, commerce_options=None, emitter=None)
Bases: object
Single application-facing boundary for credit and billing operations.
The facade owns the lifecycle of both services and prevents application
code from wiring unrelated credit and billing implementations together.
Integrations should depend on bursar.credits and bursar.billing
rather than constructing lifecycle services independently.
- Parameters:
- credit_store (CreditStore)
- billing_store (BillingStore | None)
- credits_options (CreditsServiceOptions | None)
- billing_options (BillingServiceOptions | None)
- commerce_options (CommerceOptions | None)
- emitter (CreditEventEmitter | None)
load_catalog()
Load the active catalog into the pricing engine.
- Return type: None
require_billing()
Return billing or raise the SDK’s typed configuration error.
- Return type: BillingCapability
require_commerce()
Return commerce or raise the SDK’s typed configuration error.
- Return type: CommerceService
ingest_billing_event(event)
Submit a normalized provider event through the facade.
- Parameters: event (BillingEvent)
- Return type: BillingEventResult