All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.knowm.xchange.livecoin.dto.LivecoinBaseResponse Maven / Gradle / Ivy

There is a newer version: 5.2.0
Show newest version
package org.knowm.xchange.livecoin.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import si.mazi.rescu.ExceptionalReturnContentException;

/**
 * Base of all Livecoin responses
 *
 * 

Livecoin doesn't signal most errors via HTTP status. In their documentation they say that they * set the success flag to true or false. But in some cases a successful response will not have the * "success" property at all. * * @author walec51 */ @JsonIgnoreProperties({"errorCode", "errorMessage"}) public class LivecoinBaseResponse { public LivecoinBaseResponse(@JsonProperty("success") Boolean success) { if (success != null && !success) { throw new ExceptionalReturnContentException("Success set to false in response"); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy