Interface: TransactionAPI

TransactionAPI

API class that is used to control transactional behaviour during API usage.

Example

dashboard.getFeature('Transaction')

Methods

endTransaction(transactionToken)

Ends an existing API transaction.

Parameters:
Name Type Description
transactionToken SetOptions

getCurrentTransactionList() → {Array.<SetOptions>}

Returns the list of currently active transaction tokens.

Returns:

Array of all active transaction tokens

Type
Array.<SetOptions>

getTransactionById() → {SetOptions}

Returns the transaction token from the specified unique transaction identifier.

Returns:

transactionToken

Type
SetOptions

isValidTransaction(transactionToken)

Determines whether the token is a valid transaction.

Parameters:
Name Type Description
transactionToken SetOptions

Transaction token

registerTransactionHandler(transactionToken, handlerId, handler, args) → {Promise}

Registers an transaction handler for the existing API transaction.

Parameters:
Name Type Description
transactionToken SetOptions

Transaction token

handlerId string

Unique handler identifier

handler TransactionHandler

Handler to be executed when the transaction is complete

args Object

Arguments to be passed to the TransactionHandler

Returns:

Returns a promise that is resolved once the handler is executed.

Type
Promise

startTransaction(transactionTokenopt) → {SetOptions}

Starts a new API transaction.

Parameters:
Name Type Attributes Description
transactionToken SetOption <optional>

Parent transaction token

Returns:

transactionToken

Type
SetOptions

startTransactionById(transactionId) → {SetOptions}

Starts a new API transaction with the given transactionId. Use TransactionAPI#startTransaction unless a transactionId needs to be reused from a legacy transaction.

Parameters:
Name Type Description
transactionId String

Unique transaction identifier

Deprecated:
  • Yes
Returns:

transactionToken

Type
SetOptions