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

estonlabs.cxtl.exchanges.b2c2.v1.domain.B2C2ErrorOrPayloadContainer Maven / Gradle / Ivy

There is a newer version: 1.4.14
Show newest version
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();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy