package com.banesco.common.domain.model;

/**
 * Clase para obtener los codigos y mensajes de salida
 */
public class BackResponse {

    private String backendCode;
    private int httpCode;
    private String statusCode;
    private String description;

    public BackResponse() {
    }

    public BackResponse(String backendCode,
                        int httpCode,
                        String statusCode,
                        String description) {
        this.backendCode = backendCode;
        this.httpCode = httpCode;
        this.statusCode = statusCode;
        this.description = backendCode;
    }

    public String getBackendCode() {
        return backendCode;
    }

    public int getHttpCode() {
        return httpCode;
    }

    public String getStatusCode() {
        return statusCode;
    }

    public String getDescription() {
        return description;
    }

    public void setBackendCode(String backendCode) {
        this.backendCode = backendCode;
    }

    public void setHttpCode(int httpCode) {
        this.httpCode = httpCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return "{\"backendCode\":\"%s\",\"httpCode\":%d,\"statusCode\":\"%s\",\"description\":\"%s\"}"
                .formatted(backendCode, httpCode, statusCode, description);
    }
}