BillingReceiptService
Service for generating billing receipts. Provides functionality to generate and retrieve receipts for transactions.
Constructors
new BillingReceiptService()
new BillingReceiptService(): BillingReceiptService
Returns
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
Parameter | Type | Description |
---|---|---|
transaction | BillingTransaction | The billing transaction for which to generate a receipt. |
Returns
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
An array of all billing receipts.