PosLinkSDK

interface PosLinkSDK

Interface for the PosLink integration SDK APIs.

It contains methods specific to PosLink integration type and upon successful setup, the com.teya.unifiedepossdk.TeyaCommonTransactionsApi instance will be available, which has a common API with other integration types for creating transactions.

Types

Link copied to clipboard
sealed interface AuthConfig

Authentication configuration for the PosLink integration. It has two options: Delegated and Managed.

Link copied to clipboard
Link copied to clipboard

Callback invoked when setup fails with SetupFailure

Link copied to clipboard

Callback invoked when setup is successful com.teya.unifiedepossdk.TeyaCommonTransactionsApi.

Link copied to clipboard
class SetupFailure(val reason: PosLinkSDK.SetupFailure.Reason, val debugErrorMessage: String? = null)

Represents possible failure reasons during the setup process.

Properties

Link copied to clipboard

Provides information about the currently linked device and store.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun clearDeviceLink()

Removes the linked device information. After invoking this method, the previously returned com.teya.unifiedepossdk.TeyaCommonTransactionsApi instance will still reference the same device. To link a new device, setup must be called again.

Link copied to clipboard
abstract fun clearUserAuth()

Removes the stored authentication information. After invoking this method, the previously returned com.teya.unifiedepossdk.TeyaCommonTransactionsApi instance will no longer function. To restore functionality, setup must be called again.

Link copied to clipboard

abstract fun setup(onFailure: (PosLinkSDK.SetupFailure) -> Unit, onSuccess: () -> Unit)

Sets up the PosLink integration.

abstract fun setup(preselectedStore: Store, onFailure: (PosLinkSDK.SetupFailure) -> Unit, onSuccess: () -> Unit)

Like setup but allows for passing in a Store that will be used to get the list of terminals. UI to show a list of stores will not be shown in this case.

Link copied to clipboard
abstract fun setupTransactionsApi(onFailure: (PosLinkSDK.Failure) -> Unit, onSuccess: (TeyaCommonTransactionsApi) -> Unit)