All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.brm.model.v202010.card.BrmCardQueryRequest Maven / Gradle / Ivy

The newest version!
package com.dahuatech.icc.brm.model.v202010.card;

import com.dahuatech.hutool.http.Method;
import com.dahuatech.icc.brm.constant.BrmConstant;
import com.dahuatech.icc.brm.exception.BusinessException;
import com.dahuatech.icc.common.ParamValidEnum;
import com.dahuatech.icc.exception.ClientException;
import com.dahuatech.icc.oauth.http.AbstractIccRequest;
import com.dahuatech.icc.util.StringUtils;

/**
 * 卡片详情查看
 *
 * @author 232676
 * @since 1.0.0 2020/11/9 11:19
 */
public class BrmCardQueryRequest extends AbstractIccRequest {
  private String cardNumber;

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    public BrmCardQueryRequest(String cardNumber) {
       super(BrmConstant.url(BrmConstant.BRM_URL_CARD_DETAIL_REST_GET, cardNumber), Method.GET);
    }

  @Override
  public Class getResponseClass() {
    return BrmCardQueryResponse.class;
  }

    public void businessValid() {
        if(StringUtils.isEmpty(cardNumber)){
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(),ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "cardNumber");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy