InvoiceScreenViewModel
ViewModel for the Collection Invoice screen. Showcases the full invoice lifecycle against the SDK: createInvoice → getInvoiceStatus → cancelInvoice, keyed on a locally generated reference ID.
The last operation's outcome (reference ID, status payload, or error) is exposed via result and rendered in a console panel so the flow is visible to developers exploring the SDK.
Constructors
Properties
The reference ID of the last created invoice; enables status/cancel actions.
Controls whether the circular progress indicator is shown instead of the screen content.
Flow of SnackBarComponentConfiguration events to be displayed as snack bars.
Functions
Cancels the previously created invoice. The invoice is identified by the externalId sent at creation (reused here); the path reference and the X-Reference-Id header are two independent fresh UUIDs generated for this cancellation request.
Fetches the status of the previously created invoice and prints the parsed payload.
Creates an invoice with a fresh reference ID and stores that ID for status/cancel.