UserInputEventResponse

public class UserInputEventResponse

Contains the response for an UserInputEvent

Methods

asCommerceResponse

public static CommerceResponse asCommerceResponse(UserInputEventResponse userInputEventResponse)

Generate CommerceResponse from the provided response

asTransactionEventResponse

public static TransactionEventResponse asTransactionEventResponse(UserInputEventResponse userInputEventResponse)

Return TransactionEventResponse from the provided response

getInternalData

public String getInternalData()

Get InternalData - mainly for legacy POS support

getInvoiceId

public String getInvoiceId()

Returns invoice id from event

getMessage

public String getMessage()

The message in case of a failure. Primarily used for logging, though it can be displayed to the cashier to allow them to better respond to the specific error scenario.

getResponseInputSubcommand

public InputSubcommand getResponseInputSubcommand()

Returns the requested input subcommand

getResponseInputType

public InputType getResponseInputType()

Returns the requested input type

getResponseValues

public Values getResponseValues()

Returns the Response values

getStatus

public int getStatus()

The status to mark it as failed for some specific reason. Common failed statuses include StatusCode::CANCELLED, StatusCode::COMMAND_TIMED_OUT, and StatusCode::UNSUPPORTED_COMMAND.

getTransaction

public Transaction getTransaction()

Return Transaction from event

setCancelled

public void setCancelled()

Set cancelled

setInternalData

public void setInternalData(String data)

Set InternalData - mainly for legacy POS support

setMessage

public void setMessage(String message)

See getMessage(). Set this value when responding to an input event request and there is some error, otherwise leave it empty.

setStatus

public void setStatus(int status)

See getStatus(). Set this status when responding to an input event request if the user cancels or if there is some error.

setTimedOut

public void setTimedOut()

Set timedout

setValues

public void setValues(Values values)

Sets the Response values

updateTransaction

public void updateTransaction(Transaction transaction)

Update transaction from response