package ru.shine.promo.dto;

import com.fasterxml.jackson.annotation.JsonInclude;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class PromoResponse {

    private boolean success;
    private String message;
    private String wallet;
    private String name;
    private String amountSol;
    private String signature;
    private String explorerUrl;

    public static PromoResponse success(
            String message,
            String wallet,
            String name,
            String amountSol,
            String signature,
            String explorerUrl
    ) {
        PromoResponse response = new PromoResponse();
        response.success = true;
        response.message = message;
        response.wallet = wallet;
        response.name = name;
        response.amountSol = amountSol;
        response.signature = signature;
        response.explorerUrl = explorerUrl;
        return response;
    }

    public static PromoResponse error(String message) {
        PromoResponse response = new PromoResponse();
        response.success = false;
        response.message = message;
        return response;
    }

    public boolean isSuccess() {
        return success;
    }

    public String getMessage() {
        return message;
    }

    public String getWallet() {
        return wallet;
    }

    public String getName() {
        return name;
    }

    public String getAmountSol() {
        return amountSol;
    }

    public String getSignature() {
        return signature;
    }

    public String getExplorerUrl() {
        return explorerUrl;
    }
}
