Skip to main content

BillingHistoryService

Service for managing billing history. Provides functionality to store and retrieve the history of transactions.

Constructors​

new BillingHistoryService()​

new BillingHistoryService(): BillingHistoryService

Returns​

BillingHistoryService

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​

ParameterTypeDescription
transactionBillingTransactionThe 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​

BillingTransaction[]

An array of all billing transactions in the history.