ApprovedPreApprovalsScreenViewModel

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

ViewModel for the Collection Approved Pre-Approvals screen. Fetches an account holder's approved pre-approvals via the getApprovedPreApprovals query and exposes them as a list so each one can be cancelled individually by its own preApprovalId via cancelPreApproval.

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 accountHolderId: ERROR CLASS: Symbol not found for LiveData<kotlin/String>
Link copied to clipboard
val approvals: ERROR CLASS: Symbol not found for LiveData<kotlin/collections/List<ERROR CLASS: Symbol not found for PreApprovalDetails>>

The approved pre-approvals fetched for the current account holder; one cancellable card each.

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.

Functions

Link copied to clipboard
fun cancelPreApproval(preApprovalId: String)

Cancels a single pre-approval by its preApprovalId and drops it from approvals on success.

Link copied to clipboard

Fetches the approved pre-approvals for the entered account holder and populates approvals.

Link copied to clipboard