Sudo Virtual Cards Client
Interface encapsulating a library for interacting with 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 virtualCardsClient =
SudoVirtualCardsClient
.builder()
.setContext(context)
.setSudoUserClient(sudoUserClient)
.build()
//sampleEnd
}Types
Builder used to construct the SudoVirtualCardsClient.
Defines the exceptions for the funding source based methods.
Defines the exceptions for the virtual payment transaction based methods.
Defines the exceptions for the virtual card cryptographic keys based methods.
Defines the exceptions for the virtual payment card based methods.
Functions
Cancel a FundingSource using the id parameter.
Cancel a ProvisionalFundingSource using the id parameter.
Cancel a VirtualCard using the id parameter.
Complete the creation of a FundingSource.
Create key pair and secret key for use by the virtual cards client if they have not already been created.
Export the cryptographic keys to a key archive.
Get a FundingSource using the id parameter.
Get a ProvisionalVirtualCard using the id parameter.
Get a Transaction using the id parameter.
Get a VirtualCard using the id parameter.
Get the current VirtualCardsConfig.
Import cryptographic keys from a key archive.
Get a ListOutput of FundingSources.
Get a ListOutput of ProvisionalFundingSources. If no ProvisionalFundingSources can be found, the ListOutput will contain null for the ListOutput.nextToken field and contain an empty ListOutput.items list.
Get a list of all Transactions across all virtual cards.
Get a list of all Transactions related to a virtual card.
Get a list of all Transactions for a certain type related to a virtual card.
Get a list of VirtualCards.
Provision a VirtualCard.
Sets an optional callback to be invoked when operations are attempted while not signed in. When set, all operations (except subscriptions and initialization) will check sign-in status and invoke this callback if the user is not signed in. Setting the callback to null disables automatic sign-in checking, restoring the default behavior where operations proceed without sign-in checks. If the callback throws an exception, that exception is propagated to the caller and the original operation is not executed.
Begin the setup of a ProvisionalFundingSource.
Subscribes to be notified of modified FundingSources. Subscribing multiple times with the same subscriber id will cause the previous subscriber to be unsubscribed.
Subscribes to be notified of modified FundingSources.
Subscribes to be notified of new, updated and deleted Transactions. Subscribing multiple times with the same subscriber id will cause the previous subscriber to be unsubscribed.
Subscribes to be notified of new, updated and deleted Transactions.
Unsubscribe all subscribers from receiving notifications about modifications to FundingSources.
Unsubscribe all subscribers from receiving notifications about new, updated or deleted Transactions.
Unsubscribe the specified subscriber so that it no longer receives notifications about modified FundingSources.
Unsubscribe the specified subscriber so that it no longer receives notifications about new, updated or deleted Transactions.
Update the details of a VirtualCard.