package cz.moneta.test.dsl.wso2.objects.smallbusiness;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class GetSelectedSmeDepositOfferResponse {
    @JsonProperty(value = "data")
    @Builder.Default
    private List<OfferData> data = new ArrayList<>();

    @JsonProperty("fault")
    private FaultModel fault;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonIgnoreProperties(ignoreUnknown = true)

    public static class OfferData {
        @JsonProperty("ProductCode")
        private String productCode;

        @JsonProperty("ProductName")
        private String productName;

        @JsonProperty("FeePlan")
        private String feePlan;

        @JsonProperty("IntRatePlan")
        private String intRatePlan;

        @JsonProperty("CampaignOffer")
        private String campaignOffer;

        @JsonProperty("SalesProductType")
        private String salesProductType;

        @JsonProperty("IBSBTitle")
        private String ibsbTitle;

        @JsonProperty("Currency")
        private String currency;

        @JsonProperty("MaxCount")
        private String maxCount;

        @JsonProperty("IndividualIntRateAllowed")
        private String individualIntRateAllowed;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class FaultModel {
        @JsonProperty("code")
        private String code;

        @JsonProperty("message")
        private String message;

        @JsonProperty("description")
        private String description;
    }
}