PreApprovalScreenViewModel
ViewModel for the Collection Pre-Approval screen. Showcases createPreApproval → getPreApprovalStatus, keyed on a locally generated reference ID. Cancellation lives on the Approved Pre-Approvals screen, since it is keyed on the server-assigned preApprovalId.
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 pre-approval; 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
Fetches the status of the previously created pre-approval and prints the raw payload.
Creates a pre-approval with a fresh reference ID and stores that ID for status/cancel.