DisbursementDepositScreenViewModel

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

ViewModel for the Disbursement Deposit screen.

On submit it runs the full Disbursement deposit flow against the SDK:

  1. deposit — sends money to the payee's wallet (HTTP 202).

  2. getDepositStatus — polls the outcome and posts it to depositStatus.

The screen shows the input form while depositStatus is null and the result once it is set. Authentication is handled automatically by the SDK's interceptor/authenticator, so the ViewModel only guards on the presence of an access token before starting.

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>

The current payment amount entered in the form.

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

The current delivery note entered in the form.

Link copied to clipboard
var depositStatus: ERROR CLASS: Symbol not found for MutableLiveData<ERROR CLASS: Symbol not found for DepositStatus?>

Holds the DepositStatus returned by the API; null while no request has succeeded.

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

The current financial ID entered in the form.

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

The current payer message entered in the form.

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

The current payer note entered in the form.

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

The current phone number entered in the form.

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

The current reference ID to refund entered in the form.

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 deposit()

Submits a Disbursement deposit, then polls the status and posts the resulting DepositStatus to depositStatus.

Link copied to clipboard
fun onAmountUpdated(amount: String)

Updates the amount field value.

Link copied to clipboard
fun onDeliveryNoteUpdated(deliveryNote: String)

Updates the delivery note field value.

Link copied to clipboard
fun onFinancialIdUpdated(financialId: String)

Updates the financial ID field value.

Link copied to clipboard
fun onPayerMessageUpdated(payerMessage: String)

Updates the payer message field value.

Link copied to clipboard
fun onPayerNoteUpdated(payerNote: String)

Updates the payer note field value.

Link copied to clipboard
fun onPhoneNumberUpdated(phoneNumber: String)

Updates the phone number field value.

Link copied to clipboard
fun onReferenceIdToRefundUpdated(referenceIdToRefund: String)

Updates the reference ID to refund field value.