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.Object
The response body passed into aSmoochCallback
to pass along information about the result of the action being performed
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SmoochCallback.Response.Builder<T>
Builder for creating instances ofSmoochCallback.Response
with 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 T
getData()
Returns the resulting data from the action being performed.java.lang.String
getError()
Returns the error message from the action if there was a problem.int
getStatus()
Returns the status code of the action.java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
-