Class AerisBatchResponse


  • public class AerisBatchResponse
    extends Object
    The basic response from the Aeris API. Generally all responses from Aeris will have a success boolean, than error string or an object(s) attached to it. This is the response returned from batch request.
    • Field Detail

      • success

        public boolean success
        Success status of the request.
      • error

        public AerisError error
        AerisError returned from the response.The error property will always be null if the request was successful, results were returned and there were no errors or warnings.
      • responses

        public List<AerisResponse> responses
        List of AerisResponses returned from the response
    • Constructor Detail

      • AerisBatchResponse

        public AerisBatchResponse()
    • Method Detail

      • fromJSON

        public static AerisBatchResponse fromJSON​(org.json.JSONObject jsonObject)
        Converts the JSONObject to a AerisBatchResponse using gson parsing.
        Parameters:
        jsonObject - JSON object to convert
        Returns:
        the AerisBatchResponse converted from the object.
      • isSuccessful

        public boolean isSuccessful()
        Gets the success of the response. Returns true if the response was sucessful or had a warning.
        Returns:
        true if the response was successful.
      • createObjectWithError

        public static AerisBatchResponse createObjectWithError​(String code,
                                                               String description)
        Creates a JSON String for an AerisResponse with a specific Error code and description.
        Parameters:
        code - Code of the error
        description - description of the error
        Returns:
        String JSON object of an AerisResponse with the code and description
      • getError

        public AerisError getError()
        Gets the error from the response, if there is one.
        Returns:
        the error