Get recurring account types

Get list of list of recurring account types that can be used to create a recurring account.

info

Recurring Accounts is available from SDK versions:
Android: 2.4.0
iOS: 3.2.0

Getting get recurring account types

info

You need to register a user token to get a successful response.

ParameterDescription
receiveOnThe dispatch queue used when invoking the result callback handler. Defaults to main.
onResultResult callback handler.
Copy
Copied
SveaAppWallet.shared.getRecurringAccountTypes() { [weak self] result in
    switch result {
    case .success(let recurringAccountType]):
            print("Got recurring account types: \(recurringAccountType)")
    case .failure(let error):
            print("Could not get recurring account types, got error: \(error)")
    }
}

onSuccess

Returned if successful, including a list of RecurringAccountType retrieved from the Svea backend.

onFailure

Returned if the request to fetch recurring account types failed.

Possible errors

Copy
Copied
case noUserTokenProvided                      // A user token has not been provided.
case failedToRetriveRecurringAccountTypes     // The request could not be completed.