RemittanceScreenViewModel

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

ViewModel for the Remittance Transfer screen.

On submit it runs the full Remittance transfer flow against the SDK:

  1. transfer — sends money to the payee (HTTP 202).

  2. getTransferStatus — polls the outcome and posts it to transferStatus.

The screen shows the input form while transferStatus 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 transfer 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
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.

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

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

Functions

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.

Link copied to clipboard

Submits a Remittance transfer, then polls the status and posts the resulting TransferStatus to transferStatus.