Skip to main content

BillingReceiptService

Service for generating billing receipts. Provides functionality to generate and retrieve receipts for transactions.

Constructors

new BillingReceiptService()

new BillingReceiptService(): BillingReceiptService

Returns

BillingReceiptService

Methods

generateReceipt()

generateReceipt(transaction): BillingReceipt

Generates a billing receipt for a transaction and stores it. Each receipt includes a unique ID and timestamp, essential for record-keeping and customer service.

Parameters

ParameterTypeDescription
transactionBillingTransactionThe billing transaction for which to generate a receipt.

Returns

BillingReceipt

The generated billing receipt.


getAllReceipts()

getAllReceipts(): BillingReceipt[]

Retrieves all the billing receipts that have been generated. Useful for providing customers with copies of their receipts or for internal financial tracking.

Returns

BillingReceipt[]

An array of all billing receipts.