CommerceResponse

public class CommerceResponse

The main factory for all commerce responses. Please refer to the individual events that generate the response for specific information.

Methods

getEventId

public String getEventId()

Returns an optional event ID as copied from the originating event.

getMessage

public String getMessage()

Returns the message associated with the response, if it is conveying an error.

getSessionId

public String getSessionId()

Returns the session ID associated with this event, or null if detached from a session.

getStatus

public int getStatus()

Returns the status of the response, non-zero if it encountered an error during handling

getType

public String getType()

Returns the response type, generally a copy of the event type, or otherwise linked to the type of event that generated this response.

setFailed

public void setFailed()

Sets the status to a general failed value.

setMessage

public void setMessage(String message)

Refer to getMessage().

setStatus

public void setStatus(int status)

Refer to getStatus().

setSuccessful

public void setSuccessful()

Sets the status to the successful value, namely, 0.