BillingHistoryService
Service for managing billing history. Provides functionality to store and retrieve the history of transactions.
Constructors
new BillingHistoryService()
new BillingHistoryService(): BillingHistoryService
Returns
Methods
addTransactionToHistory()
addTransactionToHistory(transaction): void
Adds a transaction to the billing history. This method is typically called after a transaction is completed to maintain a record.
Parameters
Parameter | Type | Description |
---|---|---|
transaction | BillingTransaction | The billing transaction to be added to the history. |
Returns
void
getBillingHistory()
getBillingHistory(): BillingTransaction[]
Retrieves the complete billing history, providing access to all transactions that have been recorded. This is useful for historical analysis and auditing purposes.
Returns
An array of all billing transactions in the history.