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/withdrawal-methods */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class WithdrawalMethodsApiResponse {

    @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("ticker")
        private String ticker;
        @JsonProperty("icon_id")
        private String iconId;
        @JsonProperty("fee_network")
        private String feeNetwork;
        @JsonProperty("fee_network_usd")
        private String feeNetworkUsd;
        @JsonProperty("min_amount_pay")
        private String minAmountPay;
        @JsonProperty("min_amount_pay_usd")
        private String minAmountPayUsd;
        @JsonProperty("rate_usd")
        private String rateUsd;
        @JsonProperty("misha_fee_usd")
        private Double mishaFeeUsd;
    }
}
