DefaultSudoVirtualCardsClient
public class DefaultSudoVirtualCardsClient : SudoVirtualCardsClient
Default Client API Endpoint for interacting with the Virtual Cards Service.
-
Initialize a
DefaultSudoVirtualCardsClient
instance. It uses configuration parameters defined insudoplatformconfig.json
file located in the app bundle.Declaration
Swift
public convenience init( keyNamespace: String = "com.sudoplatform.virtualcards", config: SudoVirtualCardsConfig? = nil, userClient: SudoUserClient ) throws
Parameters
keyNamespace
Namespace to use for the keys and passwords. This should be left as the default property
config
Optional configuration to override AWS endpoint. It is recommended that this be left
nil
.userClient
SudoUserClient instance used for authentication. Throws:
-
Declaration
Swift
public func reset() throws
-
createKeysIfAbsent()
AsynchronousDeclaration
Swift
public func createKeysIfAbsent() async throws -> CreateKeysIfAbsentResult
-
setupFundingSource(withInput:
Asynchronous) Declaration
Swift
public func setupFundingSource(withInput input: SetupFundingSourceInput) async throws -> ProvisionalFundingSource
-
completeFundingSource(withInput:
Asynchronous) Declaration
Swift
public func completeFundingSource(withInput input: CompleteFundingSourceInput) async throws -> FundingSource
-
refreshFundingSource(withInput:
Asynchronous) Declaration
Swift
public func refreshFundingSource(withInput input: RefreshFundingSourceInput) async throws -> FundingSource
-
provisionVirtualCard(withInput:
Asynchronousobserver: ) Declaration
Swift
public func provisionVirtualCard( withInput input: ProvisionVirtualCardInput, observer: ProvisionVirtualCardObservable? ) async throws -> ProvisionalCardState
-
cancelFundingSource(withId:
Asynchronous) Declaration
Swift
public func cancelFundingSource(withId id: String) async throws -> FundingSource
-
reviewUnfundedFundingSource(withId:
Asynchronous) Declaration
Swift
public func reviewUnfundedFundingSource(withId id: String) async throws -> FundingSource
-
cancelProvisionalFundingSource(withId:
Asynchronous) Declaration
Swift
public func cancelProvisionalFundingSource(withId id: String) async throws -> ProvisionalFundingSource
-
updateVirtualCard(withInput:
Asynchronous) Declaration
Swift
public func updateVirtualCard(withInput input: UpdateVirtualCardInput) async throws -> SingleAPIResult<VirtualCard, PartialVirtualCard>
-
cancelVirtualCard(withId:
Asynchronous) Declaration
Swift
public func cancelVirtualCard(withId id: String) async throws -> SingleAPIResult<VirtualCard, PartialVirtualCard>
-
getFundingSourceClientConfiguration()
AsynchronousDeclaration
Swift
@available(*, deprecated, message: "Use getVirtualCardsConfig instead to retrieve the FundingSourceClientConfiguration") public func getFundingSourceClientConfiguration() async throws -> [FundingSourceClientConfiguration]
-
getProvisionalCard(withId:
AsynchronouscachePolicy: ) Declaration
Swift
public func getProvisionalCard(withId id: String, cachePolicy: CachePolicy) async throws -> ProvisionalCard?
-
Declaration
Swift
public func listProvisionalCards( withLimit limit: Int?, nextToken: String?, cachePolicy: CachePolicy ) async throws -> ListAPIResult<ProvisionalCard, PartialProvisionalCard>
-
getVirtualCard(withId:
AsynchronouscachePolicy: ) Declaration
Swift
public func getVirtualCard(withId id: String, cachePolicy: CachePolicy) async throws -> VirtualCard?
-
getVirtualCardsConfig(cachePolicy:
Asynchronous) Declaration
Swift
public func getVirtualCardsConfig(cachePolicy: CachePolicy) async throws -> VirtualCardsConfig?
-
Declaration
Swift
public func listVirtualCards( withFilter filter: VirtualCardFilterInput? = nil, sortOrder: SortOrderInput? = nil, withLimit limit: Int? = nil, nextToken: String? = nil, cachePolicy: CachePolicy ) async throws -> ListAPIResult<VirtualCard, PartialVirtualCard>
-
getFundingSource(withId:
AsynchronouscachePolicy: ) Declaration
Swift
public func getFundingSource(withId id: String, cachePolicy: CachePolicy) async throws -> FundingSource?
-
Declaration
Swift
public func listFundingSources( withFilter filter: FundingSourceFilterInput? = nil, sortOrder: SortOrderInput? = nil, withLimit limit: Int? = nil, nextToken: String? = nil, cachePolicy: CachePolicy ) async throws -> ListOutput<FundingSource>
-
Declaration
Swift
public func listProvisionalFundingSources( withFilter filter: ProvisionalFundingSourceFilterInput? = nil, sortOrder: SortOrderInput? = nil, limit: Int? = nil, nextToken: String? = nil, cachePolicy: CachePolicy ) async throws -> ListOutput<ProvisionalFundingSource>
-
Declaration
Swift
public func importKeys(archiveData: Data) throws
-
Declaration
Swift
public func exportKeys() throws -> Data
-
getTransaction(withId:
AsynchronouscachePolicy: ) Declaration
Swift
public func getTransaction(withId id: String, cachePolicy: CachePolicy) async throws -> Transaction?
-
Declaration
Swift
public func listTransactions( withCardId cardId: String, limit: Int?, nextToken: String?, dateRange: DateRangeInput?, sortOrder: SortOrderInput?, cachePolicy: CachePolicy ) async throws -> ListAPIResult<Transaction, PartialTransaction>
-
Declaration
Swift
public func listTransactions( withCardId cardId: String, withTransactionType transactionType: TransactionType, limit: Int?, nextToken: String?, cachePolicy: CachePolicy ) async throws -> ListAPIResult<Transaction, PartialTransaction>
-
Declaration
Swift
public func listTransactions( withLimit limit: Int?, nextToken: String?, dateRange: DateRangeInput?, sortOrder: SortOrderInput?, cachePolicy: CachePolicy ) async throws -> ListAPIResult<Transaction, PartialTransaction>
-
Declaration
Swift
@discardableResult public func subscribeToTransactionUpdated( statusChangeHandler: SudoSubscriptionStatusChangeHandler?, resultHandler: @escaping ClientCompletion<Transaction> ) async throws -> SubscriptionToken?
-
Declaration
Swift
@discardableResult public func subscribeToTransactionDeleted( statusChangeHandler: SudoSubscriptionStatusChangeHandler?, resultHandler: @escaping ClientCompletion<Transaction> ) async throws -> SubscriptionToken?
-
sandboxGetPlaidData(institutionId:
AsynchronousplaidUsername: ) Declaration
Swift
public func sandboxGetPlaidData(institutionId: String, plaidUsername: String) async throws -> SandboxPlaidData
-
Declaration
Swift
public func sandboxSetFundingSourceToRequireRefresh( fundingSourceId: String ) async throws -> FundingSource