package com.honey.honey.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

/** Response from external GET /api/v1/deposit-methods */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CryptoDepositMethodsResponse {

    @JsonProperty("request_info")
    private RequestInfo requestInfo;

    @JsonProperty("result")
    private Result result;

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class RequestInfo {
        @JsonProperty("error_code")
        private Integer errorCode;
        @JsonProperty("error_message")
        private String errorMessage;
    }

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Result {
        @JsonProperty("active_methods")
        private List<ActiveMethod> activeMethods;
        @JsonProperty("hash")
        private String hash;
    }

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class ActiveMethod {
        @JsonProperty("pid")
        private Integer pid;
        @JsonProperty("name")
        private String name;
        @JsonProperty("network")
        private String network;
        @JsonProperty("example")
        private String example;
        @JsonProperty("min_deposit_sum")
        private Double minDepositSum;
    }
}
