
com.xeiam.xchange.cointrader.dto.CointraderBaseResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-cointrader Show documentation
Show all versions of xchange-cointrader Show documentation
XChange implementation for the Cointrader Exchange
The newest version!
package com.xeiam.xchange.cointrader.dto;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import si.mazi.rescu.ExceptionalReturnContentException;
public class CointraderBaseResponse {
private final Boolean status;
private final String message;
private final D data;
protected CointraderBaseResponse(@JsonProperty("success") Boolean success, @JsonProperty("message") String message, @JsonProperty("data") D data) {
if (!Objects.equals(success, Boolean.TRUE)) {
throw new ExceptionalReturnContentException(message);
}
this.status = success;
this.message = message;
this.data = data;
}
public String getMessage() {
return message;
}
public Boolean getStatus() {
return status;
}
public D getData() {
return data;
}
@Override
public String toString() {
return String.format("CointraderBaseResponse{status=%s, message='%s', data=%s}", status, message, data);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy