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

com.wechat.pay.java.service.profitsharing.model.CreateOrderReceiver Maven / Gradle / Ivy

There is a newer version: 0.2.14
Show newest version
// Copyright 2021 Tencent Inc. All rights reserved.
//
// 微信支付分账API
//
// 微信支付分账API
//
// API version: 0.0.9

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

package com.wechat.pay.java.service.profitsharing.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;

/** CreateOrderReceiver */
public class CreateOrderReceiver {
  /**
   * 分账接收方类型 说明:1、MERCHANT_ID:商户号 2、PERSONAL_OPENID:个人openid(由父商户APPID转换得到) 3、PERSONAL_SUB_OPENID:
   * 个人sub_openid(由子商户APPID转换得到)
   */
  @SerializedName("type")
  private String type;
  /**
   * 分账接收方帐号 说明:1、类型是MERCHANT_ID时,是商户号 2、类型是PERSONAL_OPENID时,是个人openid
   * 3、类型是PERSONAL_SUB_OPENID时,是个人sub_openid
   */
  @SerializedName("account")
  private String account;
  /**
   * 分账个人接收方姓名 说明:可选项,在接收方类型为个人的时可选填,若有值,会检查与 name 是否实名匹配,不匹配会拒绝分账请求
   * 1、分账接收方类型是PERSONAL_OPENID或PERSONAL_SUB_OPENID时,是个人姓名的密文(选传,传则校验) 此字段的加密的方式为:敏感信息加密说明
   * 2、使用微信支付平台证书中的公钥 3、使用RSAES-OAEP算法进行加密 4、将请求中HTTP头部的Wechatpay-Serial设置为证书序列号
   */
  @Encryption
  @SerializedName("name")
  private String name;
  /** 分账金额 说明:分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 */
  @SerializedName("amount")
  private Long amount;
  /** 分账描述 说明:分账的原因描述,分账账单中需要体现 */
  @SerializedName("description")
  private String description;

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public String getAccount() {
    return account;
  }

  public void setAccount(String account) {
    this.account = account;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Long getAmount() {
    return amount;
  }

  public void setAmount(Long amount) {
    this.amount = amount;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateOrderReceiver {\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    account: ").append(toIndentedString(account)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  public CreateOrderReceiver cloneWithCipher(UnaryOperator s) {
    CreateOrderReceiver copy = new CreateOrderReceiver();
    copy.type = type;
    copy.account = account;
    if (name != null && !name.isEmpty()) {
      copy.name = s.apply(name);
    }
    copy.amount = amount;
    copy.description = description;
    return copy;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy