SDK Functions Definition

In this article, you will understand the definitions of various functions within our Android SDK.

Functions

Definitions

fun configure(application: Application, configuration: RmsConfiguration)

Configures the sdk. This function needs to be called in the onCreate of the application class before the sdk usage. The application parameter refers to application instance of the app. The configuration parameter refers to the configuration for the aws.

fun enableLogging()

Enables the debug logs into the logcat. Logging is disabled by default.

fun disableLogging()

Disables the debug logs into the logcat. Logging is disabled by default.

fun getAccessToken(): String?

The internal SDK function to get the access token.

fun setTokens(accessToken: String, refreshToken: String)

Sets the access and refresh token.

fun signIn(activity: Activity, callback: RmsAuthCallback)

Sign in call for authenticating the users. The activity parameter refers to the sign-in function. The RmsAuthCallback refers to the sign-in results.

fun verifyoAuthCallback(intent: Intent?)

Verifies the sign-in data returned from the sign-in page. The intent parameter refers to the auth session returned by the sign-in page.

fun signOut(callback: RmsAuthCallback)

Sign out call for authenticated users. The RmsAuthCallback refers to the sign-in results.

fun getTerminalList(callback: RmsApiCallback<ModelTerminalList>)

Gets the list of terminals from the server.

fun getTransactionList(callback: RmsApiCallback<ModelTransactionsList>)

Gets the transactions list of the active terminals from the server.

fun cancelTransaction(callback: RmsApiCallback<ModelTransactionsList>)

Cancels the transaction of the active terminal from the server.

fun searchTransactions( terminalId: String = "", transactionStatus: String = "", transactionType: String = "", callback: RmsApiCallback<ModelTransaction> )

Searches all the transactions based upon terminal id, transaction status, and transaction type from the server.

fun setActiveTerminal(terminalId: String)

Sets the active terminal.

fun getTerminalDetails(callback: RmsApiCallback<Terminal>)

Gets the details of the active terminal.

fun createTransaction( amount: Int, currencyCode: String, transactionType: String, cashBackAmount: Int = 0, callback: RmsApiCallback<Transaction> )

Creates a transaction on the active terminal. The parameter amount refers to the transaction amount. The currencyCode refers to the currency used for the transaction. Please use [com.kachyng.rmssdk.constants.CurrencyCode] for supported currency codes. The cashBackAmount refers to the cashback amount. The transactionType refers to the type of transaction. Please use [com.kachyng.rmssdk.constants.TransactionType] for supported types.

fun requestReportByType( reportType: String, callback: RmsApiCallback<Void> )

Creates a report on the active terminal.

fun checkStatus(transactionId: String, callback: RmsApiCallback<Transaction>)

Checks the status of the given transaction. The transactionId refers to the [ModelTransaction.transactionRefId] field.

fun searchTransactionById(transactionId: String, callback: RmsApiCallback<Transaction>)

Searches transaction by transaction id.

💬 We're here to help!

If you're looking for help, shoot us an email. Please include a description of the issues that you are running into.


Did this page help you?