InvoiceScreenViewModel

class InvoiceScreenViewModel(defaultRepository: ERROR CLASS: Symbol not found for DefaultRepository, credentialStorage: CredentialStorage, dispatchers: DispatcherProvider, sampleConfig: SampleConfig) : BaseScreenViewModel

ViewModel for the Collection Invoice screen. Showcases the full invoice lifecycle against the SDK: createInvoicegetInvoiceStatuscancelInvoice, 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

Link copied to clipboard
constructor(defaultRepository: ERROR CLASS: Symbol not found for DefaultRepository, credentialStorage: CredentialStorage, dispatchers: DispatcherProvider, sampleConfig: SampleConfig)

Properties

Link copied to clipboard
val amount: ERROR CLASS: Symbol not found for LiveData<kotlin/String>
Link copied to clipboard
val currency: ERROR CLASS: Symbol not found for LiveData<kotlin/String>
Link copied to clipboard
val description: ERROR CLASS: Symbol not found for LiveData<kotlin/String>
Link copied to clipboard
val payeeMsisdn: ERROR CLASS: Symbol not found for LiveData<kotlin/String>
Link copied to clipboard
val payerMsisdn: ERROR CLASS: Symbol not found for LiveData<kotlin/String>
Link copied to clipboard
val referenceId: ERROR CLASS: Unresolved name: MutableLiveData

The reference ID of the last created invoice; enables status/cancel actions.

Link copied to clipboard
val result: ERROR CLASS: Unresolved name: MutableLiveData

Console output describing the outcome of the last operation.

Link copied to clipboard
val showProgressBar: ERROR CLASS: Unresolved name: MutableLiveData

Controls whether the circular progress indicator is shown instead of the screen content.

Link copied to clipboard
val snackBarStateFlow: ERROR CLASS: Symbol not found for SharedFlow<io/rekast/sdk/sample/utils/SnackBarComponentConfiguration>

Flow of SnackBarComponentConfiguration events to be displayed as snack bars.

Link copied to clipboard
val validityDuration: ERROR CLASS: Symbol not found for LiveData<kotlin/String>

Functions

Link copied to clipboard

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.

Link copied to clipboard

Fetches the status of the previously created invoice and prints the parsed payload.

Link copied to clipboard

Creates an invoice with a fresh reference ID and stores that ID for status/cancel.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard