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

com.wechat.pay.java.service.payrollcard.model.CreateTokenRequest Maven / Gradle / Ivy

There is a newer version: 0.2.15
Show newest version
// Copyright 2021 Tencent Inc. All rights reserved.
//
// 微工卡接口文档
//
// 服务商通过本API文档提供的接口,查询商户和微工卡的授权关系、生成预授权的token口令、核身预下单、核身结果的查询等。
//
// API version: 1.5.2

// Code generated by WechatPay APIv3 Generator based on [OpenAPI
// Generator](https://openapi-generator.tech); DO NOT EDIT.

package com.wechat.pay.java.service.payrollcard.model;

import static com.wechat.pay.java.core.util.StringUtil.toIndentedString;

import com.google.gson.annotations.SerializedName;
import com.wechat.pay.java.core.cipher.Encryption;
import java.util.function.UnaryOperator;

/** CreateTokenRequest */
public class CreateTokenRequest {
  /** 用户OpenID 说明:用户OpenID */
  @SerializedName("openid")
  private String openid;

  /**
   * 服务商AppID 说明:当输入服务商AppID时,会校验其与服务商商户号的绑定关系。 服务商AppID和与特约商户AppID至少输入一个,且必须要有拉起微工卡小程序时使用的AppID。
   */
  @SerializedName("appid")
  private String appid;

  /** 特约商户号 说明:特约商户号 */
  @SerializedName("sub_mchid")
  private String subMchid;

  /**
   * 特约商户AppID 说明:当输入特约商户AppID时,会校验其与特约商户号的绑定关系。 服务商AppID和与特约商户AppID至少输入一个,且必须要有拉起微工卡小程序时使用的AppID。
   */
  @SerializedName("sub_appid")
  private String subAppid;

  /** 用户实名 说明:用户实名信息,按照APIV3标准加密该字段 */
  @Encryption
  @SerializedName("user_name")
  private String userName;

  /** 用户证件号 说明:用户证件号,按照APIV3标准加密该字段 */
  @Encryption
  @SerializedName("id_card_number")
  private String idCardNumber;

  /**
   * 用工类型
   * 说明:微工卡服务仅支持用于与商户有用工关系的用户,需明确用工类型;参考值:长期用工:LONG_TERM_EMPLOYMENT,短期用工:SHORT_TERM_EMPLOYMENT,合作关系:COOPERATION_EMPLOYMENT
   */
  @SerializedName("employment_type")
  private EmploymentType employmentType;

  public String getOpenid() {
    return openid;
  }

  public void setOpenid(String openid) {
    this.openid = openid;
  }

  public String getAppid() {
    return appid;
  }

  public void setAppid(String appid) {
    this.appid = appid;
  }

  public String getSubMchid() {
    return subMchid;
  }

  public void setSubMchid(String subMchid) {
    this.subMchid = subMchid;
  }

  public String getSubAppid() {
    return subAppid;
  }

  public void setSubAppid(String subAppid) {
    this.subAppid = subAppid;
  }

  public String getUserName() {
    return userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public String getIdCardNumber() {
    return idCardNumber;
  }

  public void setIdCardNumber(String idCardNumber) {
    this.idCardNumber = idCardNumber;
  }

  public EmploymentType getEmploymentType() {
    return employmentType;
  }

  public void setEmploymentType(EmploymentType employmentType) {
    this.employmentType = employmentType;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateTokenRequest {\n");
    sb.append("    openid: ").append(toIndentedString(openid)).append("\n");
    sb.append("    appid: ").append(toIndentedString(appid)).append("\n");
    sb.append("    subMchid: ").append(toIndentedString(subMchid)).append("\n");
    sb.append("    subAppid: ").append(toIndentedString(subAppid)).append("\n");
    sb.append("    userName: ").append(toIndentedString(userName)).append("\n");
    sb.append("    idCardNumber: ").append(toIndentedString(idCardNumber)).append("\n");
    sb.append("    employmentType: ").append(toIndentedString(employmentType)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  public CreateTokenRequest cloneWithCipher(UnaryOperator s) {
    CreateTokenRequest copy = new CreateTokenRequest();
    copy.openid = openid;
    copy.appid = appid;
    copy.subMchid = subMchid;
    copy.subAppid = subAppid;
    if (userName != null && !userName.isEmpty()) {
      copy.userName = s.apply(userName);
    }
    if (idCardNumber != null && !idCardNumber.isEmpty()) {
      copy.idCardNumber = s.apply(idCardNumber);
    }
    copy.employmentType = employmentType;
    return copy;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy