org.knowm.xchange.huobi.dto.HuobiResultV2 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-huobi Show documentation
Show all versions of xchange-huobi Show documentation
XChange implementation for the Huobi Exchange
The newest version!
package org.knowm.xchange.huobi.dto;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
public class HuobiResultV2 {
private final String code;
private final String message;
private final V result;
@JsonCreator
public HuobiResultV2(
@JsonProperty("code") String code, @JsonProperty("message") String message, V result) {
this.code = code;
this.message = message;
this.result = result;
}
public boolean isSuccess() {
return getCode().equals("200");
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}
public V getResult() {
return result;
}
@Override
public String toString() {
return String.format(
"HuobiResult [%s, %s]", code, isSuccess() ? getResult().toString() : getMessage());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy