Package io.smooch.core
Class SmoochCallback.Response<T>
- java.lang.Object
-
- io.smooch.core.SmoochCallback.Response<T>
-
- Type Parameters:
T- the type of the data being returned
- Enclosing interface:
- SmoochCallback<T>
public static class SmoochCallback.Response<T> extends java.lang.ObjectThe response body passed into aSmoochCallbackto pass along information about the result of the action being performed
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSmoochCallback.Response.Builder<T>Builder for creating instances ofSmoochCallback.Responsewith a status code and any additional information required for the callback being notified.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetData()Returns the resulting data from the action being performed.java.lang.StringgetError()Returns the error message from the action if there was a problem.intgetStatus()Returns the status code of the action.java.lang.StringtoString()
-
-
-
Method Detail
-
getStatus
public int getStatus()
Returns the status code of the action.- Returns:
- the status code of the action
-
getError
public java.lang.String getError()
Returns the error message from the action if there was a problem.- Returns:
- the error message from the action if there was a problem, null otherwise
-
getData
public T getData()
Returns the resulting data from the action being performed.- Returns:
- the resulting data from the action being performed, null otherwise
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-