ReceiptFormatter
public protocol ReceiptFormatter
Interface for classes knowing how to format transaction receipts using receipt item fields.
-
Format receipt using the provided fields. Result is a list of {@link Receipt} using
\n
as line breaks. @param terminal Terminal to retrieve certain field values from. @param receiptItems Receipt items used to create receipt.Declaration
Swift
func formatReceipt(terminal: Terminal, receiptItems: ReceiptItems) -> [Receipt]