BillingModule.Class.BillingService - typedoc2md/typedoc-plugin-markdown-examples GitHub Wiki
github-wiki-example / BillingModule / BillingService
Class: BillingService
Service for managing billing transactions. Provides functionality to process and retrieve billing transactions.
Constructors
new BillingService()
new BillingService():
BillingService
Returns
Properties
| Property | Modifier | Type | Default value | Description |
|---|---|---|---|---|
transactions |
private |
BillingTransaction[] |
[] |
Holds all processed transactions within the service. |
Methods
getAllTransactions()
getAllTransactions():
BillingTransaction[]
Retrieves all the billing transactions that have been processed. Useful for audits and general transaction management.
Returns
An array of all billing transactions.
Source
billing.ts:126
processTransaction()
processTransaction(
transaction):BillingTransaction
Processes a billing transaction by adding it to the list of transactions. This simulates the transaction execution and storage in a production environment.
Parameters
| Parameter | Type | Description |
|---|---|---|
transaction |
BillingTransaction |
The billing transaction to be processed. |
Returns
The processed billing transaction, now stored in the service.
Source
billing.ts:116