package cokr.xit.ens.modules.common.ctgy.intgrnbill.kko.service.process.model;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.Map;

/**
 * 카카오페이 결제정보 응답데이터
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Getter
@ToString
public class KkoPayUrlRespData {
    @Schema(required = false, title = "청구 연월", example = " ")
    @JsonProperty("billed_year_month")  
    @JsonAlias({"billedYearMonth"})
    @SerializedName(value = "billed_year_month", alternate = {"billedYearMonth"})
    private String billedYearMonth;

    @Schema(required = false, title = "동일 고객번호 구분 값", example = " ")
    private String ordinal;

    @NotBlank(message = "URL 만료일은 필수 조건 입니다.")
    @Schema(required = true, title = "URL 만료일", example = "20200130235959")
    @JsonProperty("expire_at")  
    @JsonAlias({"expireAt"})
    @SerializedName(value = "expire_at", alternate = {"expireAt"})
    private String expireAt;

    @Schema(required = false, title = "API 호출 시 함께 전달할 JSON형태의 문자열", example = " ")
    private Map<String, Object> parameters;

    @Valid
    @JsonProperty("custom_url")
    @JsonAlias({"customUrl"})
    @SerializedName(value = "custom_url", alternate = {"customUrl"})
    private CustomUrl customUrl;
}
