ProtocolVersionMigrationEnvironment

Defines migrations based on concrete protocol version.

See also

pl.novelpay.client.sdk.communication.migration.ProtocolVersionMigrationEnvironmentImpl

Constructors

Link copied to clipboard
constructor(protocolName: String)

Properties

Link copied to clipboard

is name of protocol whose version should be checked in order to perform migration properly. It should only use values of pl.novelpay.aidl.kotlin.model.ProtocolName enum type which is out of scope of this module

Functions

Link copied to clipboard
fun <ReturnType> forExactVersion(version: String, migration: () -> ReturnType)

Performs migration only for one specific version

Link copied to clipboard
fun <ReturnType> forVersions(vararg versions: String, migration: (String) -> ReturnType): ReturnType?
Link copied to clipboard
abstract fun getVersion(): String?
Link copied to clipboard
fun <ReturnType> notForVersions(vararg versions: String, migration: (String) -> ReturnType): ReturnType?

Performs migration for all the versions except versions