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

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

There is a newer version: 1.0.13.7
Show 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.constant.ParamConstant;
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 java.util.List;

/**
 * 卡片解挂失
 *
 * @author 232676
 * @since 1.0.0 2020/11/9 11:19
 */
public class BrmCardRelieveRequest extends AbstractIccRequest {

  private List cardIds;

  public BrmCardRelieveRequest(List cardIds) {
    super(BrmConstant.url(BrmConstant.BRM_URL_CARD_RELIEVE_PUT), Method.PUT);
    putBodyParameter("cardIds", cardIds);
  }

    public BrmCardRelieveRequest(){
        super(BrmConstant.url(BrmConstant.BRM_URL_CARD_RELIEVE_PUT), Method.PUT);
    }

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

  public List getCardIds() {
    return cardIds;
  }

  public void setCardIds(List cardIds) {
    this.cardIds = cardIds;
    putBodyParameter("cardIds", cardIds);
  }

    public void businessValid() {
        if(cardIds == null){
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(),ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "cardIds");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy