listVirtualCards

abstract suspend fun listVirtualCards(filter: VirtualCardFilterInput? = null, sortOrder: SortOrder? = SortOrder.DESC, limit: Int = DEFAULT_CARD_LIMIT, nextToken: String? = null): ListAPIResult<VirtualCard, PartialVirtualCard>

Get a list of VirtualCards.

This API returns a ListAPIResult:

  • On ListAPIResult.Success result, contains the list of requested VirtualCards.

  • On ListAPIResult.Partial result, contains the list of PartialVirtualCards representing virtual cards that could not be unsealed successfully and the exception indicating why the unsealing failed. A virtual card may fail to unseal if the client version is not up to date or the required cryptographic key is missing from the client device.

If no VirtualCards can be found, the result will contain null for the nextToken field and contain an empty item list.

To ensure you obtain all the virtual cards that match, you should continue to call this method whenever the nextToken field is not null, even if the items list is empty.

Return

A ListAPIResult.Success or a ListAPIResult.Partial result containing either a list of VirtualCards or PartialVirtualCards respectively. Returns an empty list if no virtual cards can be found.

Parameters

filter

VirtualCardFilterInput The filter to be applied to the list of virtual cards to return.

sortOrder

SortOrder Order in which records are returned (based on date/time at which the virtual card was updated). The default order is descending, ie, most recently updated first.

limit

Int Maximum number of VirtualCards to return. If omitted the limit defaults to 10.

nextToken

String A token generated from previous calls to listVirtualCards. This is to allow for pagination. This value should be generated from a previous pagination call, otherwise it will throw an exception. The same arguments should be passed to this method if using a previously generated nextToken.

Throws