estonlabs.cxtl.exchanges.b2c2.v1.domain.B2C2ErrorOrPayloadContainer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cxtl Show documentation
Show all versions of cxtl Show documentation
CXTL – Crypto eXchange Trading Library
package estonlabs.cxtl.exchanges.b2c2.v1.domain;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
public abstract class B2C2ErrorOrPayloadContainer implements B2C2InboundContainer {
private String event;
private boolean success;
private String tag;
private Integer errorCode;
private String errorMessage;
private Map> errors;
abstract MessageType ifNotErrorMessageType();
public MessageType getMessageType() {
if (!success){
return MessageType.ERROR;
}
return ifNotErrorMessageType();
}
}