SudoVirtualCardsNotifiableClient

interface SudoVirtualCardsNotifiableClient : NotifiableClient

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
}

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val serviceName: String

Functions

Link copied to clipboard
abstract fun getSchema(): NotificationMetaData
Link copied to clipboard
abstract fun processPayload(message: RemoteMessage)