Sudo Virtual Cards Notifiable Client
Interface encapsulating the NotifiableClient used to handle notifications from the Sudo Platform Virtual Cards Service.
Samples
import android.content.Context
import com.sudoplatform.sudonotification.SudoNotificationClient
import com.sudoplatform.sudouser.SudoUserClient
import com.sudoplatform.sudovirtualcards.BaseTests
import com.sudoplatform.sudovirtualcards.SudoVirtualCardsClient
import com.sudoplatform.sudovirtualcards.SudoVirtualCardsNotifiableClient
import com.sudoplatform.sudovirtualcards.SudoVirtualCardsNotificationHandler
import com.sudoplatform.sudovirtualcards.types.VirtualCardsFundingSourceChangedNotification
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.kotlin.mock
import org.robolectric.RobolectricTestRunner
fun main() {
//sampleStart
val notificationHandler = object : SudoVirtualCardsNotificationHandler {
override fun onFundingSourceChanged(notification: VirtualCardsFundingSourceChangedNotification) {
// Handle fundingSourceChanged notification
}
}
val notifiableClient = SudoVirtualCardsNotifiableClient.builder()
.setContext(context)
.setNotificationHandler(notificationHandler)
.build()
val sudoNotificationClient = SudoNotificationClient.builder()
.setSudoUserClient(sudoUserClient)
.setNotifiableClients(listOf(notifiableClient))
.build()
//sampleEnd
}