UsageExporter
Defined in: src/billing/usage-export.ts:42
What createUsageExporter returns.
Properties
Section titled “Properties”| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
onUsage |
readonly |
UsageListener |
Pass as the engine’s onUsage option (or call from your own listener). |
src/billing/usage-export.ts:44 |
pending |
readonly |
number |
Records currently buffered. | src/billing/usage-export.ts:52 |
Methods
Section titled “Methods”attach()
Section titled “attach()”attach(engine): void;Defined in: src/billing/usage-export.ts:46
Give the exporter the engine so records carry providerCustomer (from the customer’s links).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
engine |
Entitlements |
Returns
Section titled “Returns”void
close()
Section titled “close()”close(): Promise<void>;Defined in: src/billing/usage-export.ts:50
Flush and stop the timer.
Returns
Section titled “Returns”Promise<void>
flush()
Section titled “flush()”flush(): Promise<void>;Defined in: src/billing/usage-export.ts:48
Report everything buffered now.
Returns
Section titled “Returns”Promise<void>