Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.alipay.v3.model.EcConsumeInfo Maven / Gradle / Ivy
/*
* 支付宝开放平台API
* 支付宝开放平台v3协议文档
*
* The version of the OpenAPI document: 2024-01-12
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.alipay.v3.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import com.alipay.v3.JSON;
/**
* EcConsumeInfo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class EcConsumeInfo {
public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id";
@SerializedName(SERIALIZED_NAME_ACCOUNT_ID)
private String accountId;
public static final String SERIALIZED_NAME_AGREEMENT_PEER_PAYER_ID = "agreement_peer_payer_id";
@SerializedName(SERIALIZED_NAME_AGREEMENT_PEER_PAYER_ID)
private String agreementPeerPayerId;
public static final String SERIALIZED_NAME_BENEFIT_AMOUNT = "benefit_amount";
@SerializedName(SERIALIZED_NAME_BENEFIT_AMOUNT)
private String benefitAmount;
public static final String SERIALIZED_NAME_BIZ_OUT_NO = "biz_out_no";
@SerializedName(SERIALIZED_NAME_BIZ_OUT_NO)
private String bizOutNo;
public static final String SERIALIZED_NAME_CATEGORY_NAME = "category_name";
@SerializedName(SERIALIZED_NAME_CATEGORY_NAME)
private String categoryName;
public static final String SERIALIZED_NAME_CONSUME_AMOUNT = "consume_amount";
@SerializedName(SERIALIZED_NAME_CONSUME_AMOUNT)
private String consumeAmount;
public static final String SERIALIZED_NAME_CONSUME_BIZ_TYPE = "consume_biz_type";
@SerializedName(SERIALIZED_NAME_CONSUME_BIZ_TYPE)
private String consumeBizType;
public static final String SERIALIZED_NAME_CONSUME_CATEGORY = "consume_category";
@SerializedName(SERIALIZED_NAME_CONSUME_CATEGORY)
private String consumeCategory;
public static final String SERIALIZED_NAME_CONSUME_FEE_WITH_DISCOUNT = "consume_fee_with_discount";
@SerializedName(SERIALIZED_NAME_CONSUME_FEE_WITH_DISCOUNT)
private String consumeFeeWithDiscount;
public static final String SERIALIZED_NAME_CONSUME_MEMO = "consume_memo";
@SerializedName(SERIALIZED_NAME_CONSUME_MEMO)
private String consumeMemo;
public static final String SERIALIZED_NAME_CONSUME_TYPE = "consume_type";
@SerializedName(SERIALIZED_NAME_CONSUME_TYPE)
private String consumeType;
public static final String SERIALIZED_NAME_EMPLOYEE_ID = "employee_id";
@SerializedName(SERIALIZED_NAME_EMPLOYEE_ID)
private String employeeId;
public static final String SERIALIZED_NAME_ENTERPRISE_ID = "enterprise_id";
@SerializedName(SERIALIZED_NAME_ENTERPRISE_ID)
private String enterpriseId;
public static final String SERIALIZED_NAME_EXPENSE_RULE_GROUP_ID = "expense_rule_group_id";
@SerializedName(SERIALIZED_NAME_EXPENSE_RULE_GROUP_ID)
private String expenseRuleGroupId;
public static final String SERIALIZED_NAME_EXPENSE_SCENE_CODE = "expense_scene_code";
@SerializedName(SERIALIZED_NAME_EXPENSE_SCENE_CODE)
private String expenseSceneCode;
public static final String SERIALIZED_NAME_EXPENSE_TYPE = "expense_type";
@SerializedName(SERIALIZED_NAME_EXPENSE_TYPE)
private String expenseType;
public static final String SERIALIZED_NAME_EXPENSE_TYPE_SUB_CATEGORY = "expense_type_sub_category";
@SerializedName(SERIALIZED_NAME_EXPENSE_TYPE_SUB_CATEGORY)
private String expenseTypeSubCategory;
public static final String SERIALIZED_NAME_EXT_INFOS = "ext_infos";
@SerializedName(SERIALIZED_NAME_EXT_INFOS)
private String extInfos;
public static final String SERIALIZED_NAME_FUND_BIZ_TYPE = "fund_biz_type";
@SerializedName(SERIALIZED_NAME_FUND_BIZ_TYPE)
private String fundBizType;
public static final String SERIALIZED_NAME_GMT_BIZ_CREATE = "gmt_biz_create";
@SerializedName(SERIALIZED_NAME_GMT_BIZ_CREATE)
private String gmtBizCreate;
public static final String SERIALIZED_NAME_GMT_RECEIVE_PAY = "gmt_receive_pay";
@SerializedName(SERIALIZED_NAME_GMT_RECEIVE_PAY)
private String gmtReceivePay;
public static final String SERIALIZED_NAME_INVOICE_OPEN_MODE = "invoice_open_mode";
@SerializedName(SERIALIZED_NAME_INVOICE_OPEN_MODE)
private String invoiceOpenMode;
public static final String SERIALIZED_NAME_MERCHANT_ID = "merchant_id";
@SerializedName(SERIALIZED_NAME_MERCHANT_ID)
private String merchantId;
public static final String SERIALIZED_NAME_MERCHANT_NAME = "merchant_name";
@SerializedName(SERIALIZED_NAME_MERCHANT_NAME)
private String merchantName;
public static final String SERIALIZED_NAME_OPEN_ID = "open_id";
@SerializedName(SERIALIZED_NAME_OPEN_ID)
private String openId;
public static final String SERIALIZED_NAME_OPPOSITE_FULL_NAME = "opposite_full_name";
@SerializedName(SERIALIZED_NAME_OPPOSITE_FULL_NAME)
private String oppositeFullName;
public static final String SERIALIZED_NAME_ORDER_COMPLETE_LABEL = "order_complete_label";
@SerializedName(SERIALIZED_NAME_ORDER_COMPLETE_LABEL)
private String orderCompleteLabel;
public static final String SERIALIZED_NAME_ORDER_COMPLETE_TIME = "order_complete_time";
@SerializedName(SERIALIZED_NAME_ORDER_COMPLETE_TIME)
private String orderCompleteTime;
public static final String SERIALIZED_NAME_PAY_NO = "pay_no";
@SerializedName(SERIALIZED_NAME_PAY_NO)
private String payNo;
public static final String SERIALIZED_NAME_PAYER_CARD_NO = "payer_card_no";
@SerializedName(SERIALIZED_NAME_PAYER_CARD_NO)
private String payerCardNo;
public static final String SERIALIZED_NAME_PAYER_LOGON_ID = "payer_logon_id";
@SerializedName(SERIALIZED_NAME_PAYER_LOGON_ID)
private String payerLogonId;
public static final String SERIALIZED_NAME_PAYER_NAME = "payer_name";
@SerializedName(SERIALIZED_NAME_PAYER_NAME)
private String payerName;
public static final String SERIALIZED_NAME_PEER_PAY_AMOUNT = "peer_pay_amount";
@SerializedName(SERIALIZED_NAME_PEER_PAY_AMOUNT)
private String peerPayAmount;
public static final String SERIALIZED_NAME_PEER_PAYER_CARD_NO = "peer_payer_card_no";
@SerializedName(SERIALIZED_NAME_PEER_PAYER_CARD_NO)
private String peerPayerCardNo;
public static final String SERIALIZED_NAME_PEER_REFUND_AMOUNT = "peer_refund_amount";
@SerializedName(SERIALIZED_NAME_PEER_REFUND_AMOUNT)
private String peerRefundAmount;
public static final String SERIALIZED_NAME_PEER_REFUND_STATUS = "peer_refund_status";
@SerializedName(SERIALIZED_NAME_PEER_REFUND_STATUS)
private String peerRefundStatus;
public static final String SERIALIZED_NAME_RELATED_PAY_NO = "related_pay_no";
@SerializedName(SERIALIZED_NAME_RELATED_PAY_NO)
private String relatedPayNo;
public static final String SERIALIZED_NAME_SCENE_CODE = "scene_code";
@SerializedName(SERIALIZED_NAME_SCENE_CODE)
private String sceneCode;
public static final String SERIALIZED_NAME_SELLER_ID = "seller_id";
@SerializedName(SERIALIZED_NAME_SELLER_ID)
private String sellerId;
public static final String SERIALIZED_NAME_SHOP_ID = "shop_id";
@SerializedName(SERIALIZED_NAME_SHOP_ID)
private String shopId;
public static final String SERIALIZED_NAME_STORE_ID = "store_id";
@SerializedName(SERIALIZED_NAME_STORE_ID)
private String storeId;
public static final String SERIALIZED_NAME_SUMMARY_APPLY_ID = "summary_apply_id";
@SerializedName(SERIALIZED_NAME_SUMMARY_APPLY_ID)
private String summaryApplyId;
public static final String SERIALIZED_NAME_USER_ID = "user_id";
@SerializedName(SERIALIZED_NAME_USER_ID)
private String userId;
public EcConsumeInfo() {
}
public EcConsumeInfo accountId(String accountId) {
this.accountId = accountId;
return this;
}
/**
* 共同账户ID
* @return accountId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "共同账户ID")
public String getAccountId() {
return accountId;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public EcConsumeInfo agreementPeerPayerId(String agreementPeerPayerId) {
this.agreementPeerPayerId = agreementPeerPayerId;
return this;
}
/**
* 协议出资支付宝账号
* @return agreementPeerPayerId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "协议出资支付宝账号")
public String getAgreementPeerPayerId() {
return agreementPeerPayerId;
}
public void setAgreementPeerPayerId(String agreementPeerPayerId) {
this.agreementPeerPayerId = agreementPeerPayerId;
}
public EcConsumeInfo benefitAmount(String benefitAmount) {
this.benefitAmount = benefitAmount;
return this;
}
/**
* 员工优惠金额,单位:元
* @return benefitAmount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "员工优惠金额,单位:元")
public String getBenefitAmount() {
return benefitAmount;
}
public void setBenefitAmount(String benefitAmount) {
this.benefitAmount = benefitAmount;
}
public EcConsumeInfo bizOutNo(String bizOutNo) {
this.bizOutNo = bizOutNo;
return this;
}
/**
* 外部交易流水号
* @return bizOutNo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "外部交易流水号")
public String getBizOutNo() {
return bizOutNo;
}
public void setBizOutNo(String bizOutNo) {
this.bizOutNo = bizOutNo;
}
public EcConsumeInfo categoryName(String categoryName) {
this.categoryName = categoryName;
return this;
}
/**
* 账单分类名称,比如:餐饮美食,交通出行,酒店旅游等
* @return categoryName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "账单分类名称,比如:餐饮美食,交通出行,酒店旅游等")
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public EcConsumeInfo consumeAmount(String consumeAmount) {
this.consumeAmount = consumeAmount;
return this;
}
/**
* 账单金额,单位:元,不包含营销资产
* @return consumeAmount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "账单金额,单位:元,不包含营销资产")
public String getConsumeAmount() {
return consumeAmount;
}
public void setConsumeAmount(String consumeAmount) {
this.consumeAmount = consumeAmount;
}
public EcConsumeInfo consumeBizType(String consumeBizType) {
this.consumeBizType = consumeBizType;
return this;
}
/**
* 账单业务类型 -因公支付:EC_PAY -因公收款:EC_CLLCT
* @return consumeBizType
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "账单业务类型 -因公支付:EC_PAY -因公收款:EC_CLLCT")
public String getConsumeBizType() {
return consumeBizType;
}
public void setConsumeBizType(String consumeBizType) {
this.consumeBizType = consumeBizType;
}
public EcConsumeInfo consumeCategory(String consumeCategory) {
this.consumeCategory = consumeCategory;
return this;
}
/**
* 员工消费记账分类
* @return consumeCategory
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "员工消费记账分类")
public String getConsumeCategory() {
return consumeCategory;
}
public void setConsumeCategory(String consumeCategory) {
this.consumeCategory = consumeCategory;
}
public EcConsumeInfo consumeFeeWithDiscount(String consumeFeeWithDiscount) {
this.consumeFeeWithDiscount = consumeFeeWithDiscount;
return this;
}
/**
* 订单原价,单位:元,包含营销资产
* @return consumeFeeWithDiscount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "订单原价,单位:元,包含营销资产")
public String getConsumeFeeWithDiscount() {
return consumeFeeWithDiscount;
}
public void setConsumeFeeWithDiscount(String consumeFeeWithDiscount) {
this.consumeFeeWithDiscount = consumeFeeWithDiscount;
}
public EcConsumeInfo consumeMemo(String consumeMemo) {
this.consumeMemo = consumeMemo;
return this;
}
/**
* 员工消费记账备注
* @return consumeMemo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "员工消费记账备注")
public String getConsumeMemo() {
return consumeMemo;
}
public void setConsumeMemo(String consumeMemo) {
this.consumeMemo = consumeMemo;
}
public EcConsumeInfo consumeType(String consumeType) {
this.consumeType = consumeType;
return this;
}
/**
* 账单类型 -消费账单:CONSUME -退款账单:REFUND -转账账单:TRANSFER
* @return consumeType
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "账单类型 -消费账单:CONSUME -退款账单:REFUND -转账账单:TRANSFER")
public String getConsumeType() {
return consumeType;
}
public void setConsumeType(String consumeType) {
this.consumeType = consumeType;
}
public EcConsumeInfo employeeId(String employeeId) {
this.employeeId = employeeId;
return this;
}
/**
* 员工账号ID
* @return employeeId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "员工账号ID")
public String getEmployeeId() {
return employeeId;
}
public void setEmployeeId(String employeeId) {
this.employeeId = employeeId;
}
public EcConsumeInfo enterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
/**
* 企业ID
* @return enterpriseId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "企业ID")
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public EcConsumeInfo expenseRuleGroupId(String expenseRuleGroupId) {
this.expenseRuleGroupId = expenseRuleGroupId;
return this;
}
/**
* 使用规则ID
* @return expenseRuleGroupId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "使用规则ID")
public String getExpenseRuleGroupId() {
return expenseRuleGroupId;
}
public void setExpenseRuleGroupId(String expenseRuleGroupId) {
this.expenseRuleGroupId = expenseRuleGroupId;
}
public EcConsumeInfo expenseSceneCode(String expenseSceneCode) {
this.expenseSceneCode = expenseSceneCode;
return this;
}
/**
* 费用场景
* @return expenseSceneCode
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "费用场景")
public String getExpenseSceneCode() {
return expenseSceneCode;
}
public void setExpenseSceneCode(String expenseSceneCode) {
this.expenseSceneCode = expenseSceneCode;
}
public EcConsumeInfo expenseType(String expenseType) {
this.expenseType = expenseType;
return this;
}
/**
* 费用类型
* @return expenseType
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "费用类型")
public String getExpenseType() {
return expenseType;
}
public void setExpenseType(String expenseType) {
this.expenseType = expenseType;
}
public EcConsumeInfo expenseTypeSubCategory(String expenseTypeSubCategory) {
this.expenseTypeSubCategory = expenseTypeSubCategory;
return this;
}
/**
* 费用类型子类目
* @return expenseTypeSubCategory
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "费用类型子类目")
public String getExpenseTypeSubCategory() {
return expenseTypeSubCategory;
}
public void setExpenseTypeSubCategory(String expenseTypeSubCategory) {
this.expenseTypeSubCategory = expenseTypeSubCategory;
}
public EcConsumeInfo extInfos(String extInfos) {
this.extInfos = extInfos;
return this;
}
/**
* 账单扩展信息,JsonMap格式, key值枚举 [{\"value\": \"SUMMARY_INFO\",\"name\": \"账单汇总信息\"},{\"value\": \"MERCHANT_EXTEND_INFO\",\"name\": \"商户扩展信息\"}, {\"value\": \"TERMINAL_INFO\",\"name\": \"终端设备信息\"},{\"value\": \"BENEFIT_INFO\",\"name\": \"优惠扩展信息\"}, {\"value\": \"CONSUMPTION_LOCATION\",\"name\": \"消费上报位置\"},{\"value\": \"THIRD_PARTY_PAYMENT_INFO\",\"name\": \"代收款详情\"}]
* @return extInfos
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "账单扩展信息,JsonMap格式, key值枚举 [{\"value\": \"SUMMARY_INFO\",\"name\": \"账单汇总信息\"},{\"value\": \"MERCHANT_EXTEND_INFO\",\"name\": \"商户扩展信息\"}, {\"value\": \"TERMINAL_INFO\",\"name\": \"终端设备信息\"},{\"value\": \"BENEFIT_INFO\",\"name\": \"优惠扩展信息\"}, {\"value\": \"CONSUMPTION_LOCATION\",\"name\": \"消费上报位置\"},{\"value\": \"THIRD_PARTY_PAYMENT_INFO\",\"name\": \"代收款详情\"}]")
public String getExtInfos() {
return extInfos;
}
public void setExtInfos(String extInfos) {
this.extInfos = extInfos;
}
public EcConsumeInfo fundBizType(String fundBizType) {
this.fundBizType = fundBizType;
return this;
}
/**
* 出资模式 个人出资:PERSONAL 企业出资:ENTERPRISE 三方垫资合作伙伴出资:TP 记账:ACCOUNTING
* @return fundBizType
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "出资模式 个人出资:PERSONAL 企业出资:ENTERPRISE 三方垫资合作伙伴出资:TP 记账:ACCOUNTING")
public String getFundBizType() {
return fundBizType;
}
public void setFundBizType(String fundBizType) {
this.fundBizType = fundBizType;
}
public EcConsumeInfo gmtBizCreate(String gmtBizCreate) {
this.gmtBizCreate = gmtBizCreate;
return this;
}
/**
* 账单创建时间,格式:yyyy-MM-dd HH:mm:ss
* @return gmtBizCreate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "账单创建时间,格式:yyyy-MM-dd HH:mm:ss")
public String getGmtBizCreate() {
return gmtBizCreate;
}
public void setGmtBizCreate(String gmtBizCreate) {
this.gmtBizCreate = gmtBizCreate;
}
public EcConsumeInfo gmtReceivePay(String gmtReceivePay) {
this.gmtReceivePay = gmtReceivePay;
return this;
}
/**
* 账单支付时间,格式:yyyy-MM-dd HH:mm:ss
* @return gmtReceivePay
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "账单支付时间,格式:yyyy-MM-dd HH:mm:ss")
public String getGmtReceivePay() {
return gmtReceivePay;
}
public void setGmtReceivePay(String gmtReceivePay) {
this.gmtReceivePay = gmtReceivePay;
}
public EcConsumeInfo invoiceOpenMode(String invoiceOpenMode) {
this.invoiceOpenMode = invoiceOpenMode;
return this;
}
/**
* 开票模式 企业汇总开:ENTERPRISE_AUTO_BATCH
* @return invoiceOpenMode
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "开票模式 企业汇总开:ENTERPRISE_AUTO_BATCH")
public String getInvoiceOpenMode() {
return invoiceOpenMode;
}
public void setInvoiceOpenMode(String invoiceOpenMode) {
this.invoiceOpenMode = invoiceOpenMode;
}
public EcConsumeInfo merchantId(String merchantId) {
this.merchantId = merchantId;
return this;
}
/**
* 商户ID
* @return merchantId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "商户ID")
public String getMerchantId() {
return merchantId;
}
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
public EcConsumeInfo merchantName(String merchantName) {
this.merchantName = merchantName;
return this;
}
/**
* 商户名称
* @return merchantName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "商户名称")
public String getMerchantName() {
return merchantName;
}
public void setMerchantName(String merchantName) {
this.merchantName = merchantName;
}
public EcConsumeInfo openId(String openId) {
this.openId = openId;
return this;
}
/**
* 员工支付宝UID
* @return openId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "员工支付宝UID")
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
public EcConsumeInfo oppositeFullName(String oppositeFullName) {
this.oppositeFullName = oppositeFullName;
return this;
}
/**
* 收款方全称(如果是个人会显示脱敏后的名称)
* @return oppositeFullName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "收款方全称(如果是个人会显示脱敏后的名称)")
public String getOppositeFullName() {
return oppositeFullName;
}
public void setOppositeFullName(String oppositeFullName) {
this.oppositeFullName = oppositeFullName;
}
public EcConsumeInfo orderCompleteLabel(String orderCompleteLabel) {
this.orderCompleteLabel = orderCompleteLabel;
return this;
}
/**
* 订单完结标识 0:未完结 1:已完结
* @return orderCompleteLabel
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "订单完结标识 0:未完结 1:已完结")
public String getOrderCompleteLabel() {
return orderCompleteLabel;
}
public void setOrderCompleteLabel(String orderCompleteLabel) {
this.orderCompleteLabel = orderCompleteLabel;
}
public EcConsumeInfo orderCompleteTime(String orderCompleteTime) {
this.orderCompleteTime = orderCompleteTime;
return this;
}
/**
* 2022-01-01 01:01:02 订单完结时间
* @return orderCompleteTime
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "2022-01-01 01:01:02 订单完结时间")
public String getOrderCompleteTime() {
return orderCompleteTime;
}
public void setOrderCompleteTime(String orderCompleteTime) {
this.orderCompleteTime = orderCompleteTime;
}
public EcConsumeInfo payNo(String payNo) {
this.payNo = payNo;
return this;
}
/**
* 交易流水号
* @return payNo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "交易流水号")
public String getPayNo() {
return payNo;
}
public void setPayNo(String payNo) {
this.payNo = payNo;
}
public EcConsumeInfo payerCardNo(String payerCardNo) {
this.payerCardNo = payerCardNo;
return this;
}
/**
* 付款方卡号
* @return payerCardNo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "付款方卡号")
public String getPayerCardNo() {
return payerCardNo;
}
public void setPayerCardNo(String payerCardNo) {
this.payerCardNo = payerCardNo;
}
public EcConsumeInfo payerLogonId(String payerLogonId) {
this.payerLogonId = payerLogonId;
return this;
}
/**
* 付款方登录账号
* @return payerLogonId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "付款方登录账号")
public String getPayerLogonId() {
return payerLogonId;
}
public void setPayerLogonId(String payerLogonId) {
this.payerLogonId = payerLogonId;
}
public EcConsumeInfo payerName(String payerName) {
this.payerName = payerName;
return this;
}
/**
* 付款方名称
* @return payerName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "付款方名称")
public String getPayerName() {
return payerName;
}
public void setPayerName(String payerName) {
this.payerName = payerName;
}
public EcConsumeInfo peerPayAmount(String peerPayAmount) {
this.peerPayAmount = peerPayAmount;
return this;
}
/**
* 企业代付金额,单位:元
* @return peerPayAmount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "企业代付金额,单位:元")
public String getPeerPayAmount() {
return peerPayAmount;
}
public void setPeerPayAmount(String peerPayAmount) {
this.peerPayAmount = peerPayAmount;
}
public EcConsumeInfo peerPayerCardNo(String peerPayerCardNo) {
this.peerPayerCardNo = peerPayerCardNo;
return this;
}
/**
* 实际出资支付宝账号
* @return peerPayerCardNo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "实际出资支付宝账号")
public String getPeerPayerCardNo() {
return peerPayerCardNo;
}
public void setPeerPayerCardNo(String peerPayerCardNo) {
this.peerPayerCardNo = peerPayerCardNo;
}
public EcConsumeInfo peerRefundAmount(String peerRefundAmount) {
this.peerRefundAmount = peerRefundAmount;
return this;
}
/**
* 消费账单企业代付部分退款金额,单位:元。退款账单该值无意义,值为0。
* @return peerRefundAmount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "消费账单企业代付部分退款金额,单位:元。退款账单该值无意义,值为0。")
public String getPeerRefundAmount() {
return peerRefundAmount;
}
public void setPeerRefundAmount(String peerRefundAmount) {
this.peerRefundAmount = peerRefundAmount;
}
public EcConsumeInfo peerRefundStatus(String peerRefundStatus) {
this.peerRefundStatus = peerRefundStatus;
return this;
}
/**
* 消费账单企业代付部分退款状态,默认为INIT。当消费账单有退款,该值会变为REFUND_PART或REFUND_FULL;退款账单该值无意义,为初始值INIT。 未退款:INIT, 部分退款:REFUND_PART, 全额退款:REFUND_FULL
* @return peerRefundStatus
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "消费账单企业代付部分退款状态,默认为INIT。当消费账单有退款,该值会变为REFUND_PART或REFUND_FULL;退款账单该值无意义,为初始值INIT。 未退款:INIT, 部分退款:REFUND_PART, 全额退款:REFUND_FULL")
public String getPeerRefundStatus() {
return peerRefundStatus;
}
public void setPeerRefundStatus(String peerRefundStatus) {
this.peerRefundStatus = peerRefundStatus;
}
public EcConsumeInfo relatedPayNo(String relatedPayNo) {
this.relatedPayNo = relatedPayNo;
return this;
}
/**
* 退款账单关联的消费账单交易流水号,退款账单才有值
* @return relatedPayNo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "退款账单关联的消费账单交易流水号,退款账单才有值")
public String getRelatedPayNo() {
return relatedPayNo;
}
public void setRelatedPayNo(String relatedPayNo) {
this.relatedPayNo = relatedPayNo;
}
public EcConsumeInfo sceneCode(String sceneCode) {
this.sceneCode = sceneCode;
return this;
}
/**
* 账单场景 TAKE_AWAY:外卖 METRO:地铁 OTHER:其他
* @return sceneCode
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "账单场景 TAKE_AWAY:外卖 METRO:地铁 OTHER:其他")
public String getSceneCode() {
return sceneCode;
}
public void setSceneCode(String sceneCode) {
this.sceneCode = sceneCode;
}
public EcConsumeInfo sellerId(String sellerId) {
this.sellerId = sellerId;
return this;
}
/**
* 卖家ID
* @return sellerId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "卖家ID")
public String getSellerId() {
return sellerId;
}
public void setSellerId(String sellerId) {
this.sellerId = sellerId;
}
public EcConsumeInfo shopId(String shopId) {
this.shopId = shopId;
return this;
}
/**
* 门店ID
* @return shopId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "门店ID")
public String getShopId() {
return shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
public EcConsumeInfo storeId(String storeId) {
this.storeId = storeId;
return this;
}
/**
* 外部门店ID
* @return storeId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "外部门店ID")
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public EcConsumeInfo summaryApplyId(String summaryApplyId) {
this.summaryApplyId = summaryApplyId;
return this;
}
/**
* 汇总批次ID
* @return summaryApplyId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "汇总批次ID")
public String getSummaryApplyId() {
return summaryApplyId;
}
public void setSummaryApplyId(String summaryApplyId) {
this.summaryApplyId = summaryApplyId;
}
public EcConsumeInfo userId(String userId) {
this.userId = userId;
return this;
}
/**
* 员工支付宝UID
* @return userId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "员工支付宝UID")
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
private Map additionalProperties;
/**
* Set the additional (undeclared) property with the specified name and value.
* If the property does not already exist, create it otherwise replace it.
*
* @param key name of the property
* @param value value of the property
* @return the EcConsumeInfo instance itself
*/
public EcConsumeInfo putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap();
}
this.additionalProperties.put(key, value);
return this;
}
/**
* Return the additional (undeclared) property.
*
* @return a map of objects
*/
public Map getAdditionalProperties() {
return additionalProperties;
}
/**
* Return the additional (undeclared) property with the specified name.
*
* @param key name of the property
* @return an object
*/
public Object getAdditionalProperty(String key) {
if (this.additionalProperties == null) {
return null;
}
return this.additionalProperties.get(key);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EcConsumeInfo ecConsumeInfo = (EcConsumeInfo) o;
return Objects.equals(this.accountId, ecConsumeInfo.accountId) &&
Objects.equals(this.agreementPeerPayerId, ecConsumeInfo.agreementPeerPayerId) &&
Objects.equals(this.benefitAmount, ecConsumeInfo.benefitAmount) &&
Objects.equals(this.bizOutNo, ecConsumeInfo.bizOutNo) &&
Objects.equals(this.categoryName, ecConsumeInfo.categoryName) &&
Objects.equals(this.consumeAmount, ecConsumeInfo.consumeAmount) &&
Objects.equals(this.consumeBizType, ecConsumeInfo.consumeBizType) &&
Objects.equals(this.consumeCategory, ecConsumeInfo.consumeCategory) &&
Objects.equals(this.consumeFeeWithDiscount, ecConsumeInfo.consumeFeeWithDiscount) &&
Objects.equals(this.consumeMemo, ecConsumeInfo.consumeMemo) &&
Objects.equals(this.consumeType, ecConsumeInfo.consumeType) &&
Objects.equals(this.employeeId, ecConsumeInfo.employeeId) &&
Objects.equals(this.enterpriseId, ecConsumeInfo.enterpriseId) &&
Objects.equals(this.expenseRuleGroupId, ecConsumeInfo.expenseRuleGroupId) &&
Objects.equals(this.expenseSceneCode, ecConsumeInfo.expenseSceneCode) &&
Objects.equals(this.expenseType, ecConsumeInfo.expenseType) &&
Objects.equals(this.expenseTypeSubCategory, ecConsumeInfo.expenseTypeSubCategory) &&
Objects.equals(this.extInfos, ecConsumeInfo.extInfos) &&
Objects.equals(this.fundBizType, ecConsumeInfo.fundBizType) &&
Objects.equals(this.gmtBizCreate, ecConsumeInfo.gmtBizCreate) &&
Objects.equals(this.gmtReceivePay, ecConsumeInfo.gmtReceivePay) &&
Objects.equals(this.invoiceOpenMode, ecConsumeInfo.invoiceOpenMode) &&
Objects.equals(this.merchantId, ecConsumeInfo.merchantId) &&
Objects.equals(this.merchantName, ecConsumeInfo.merchantName) &&
Objects.equals(this.openId, ecConsumeInfo.openId) &&
Objects.equals(this.oppositeFullName, ecConsumeInfo.oppositeFullName) &&
Objects.equals(this.orderCompleteLabel, ecConsumeInfo.orderCompleteLabel) &&
Objects.equals(this.orderCompleteTime, ecConsumeInfo.orderCompleteTime) &&
Objects.equals(this.payNo, ecConsumeInfo.payNo) &&
Objects.equals(this.payerCardNo, ecConsumeInfo.payerCardNo) &&
Objects.equals(this.payerLogonId, ecConsumeInfo.payerLogonId) &&
Objects.equals(this.payerName, ecConsumeInfo.payerName) &&
Objects.equals(this.peerPayAmount, ecConsumeInfo.peerPayAmount) &&
Objects.equals(this.peerPayerCardNo, ecConsumeInfo.peerPayerCardNo) &&
Objects.equals(this.peerRefundAmount, ecConsumeInfo.peerRefundAmount) &&
Objects.equals(this.peerRefundStatus, ecConsumeInfo.peerRefundStatus) &&
Objects.equals(this.relatedPayNo, ecConsumeInfo.relatedPayNo) &&
Objects.equals(this.sceneCode, ecConsumeInfo.sceneCode) &&
Objects.equals(this.sellerId, ecConsumeInfo.sellerId) &&
Objects.equals(this.shopId, ecConsumeInfo.shopId) &&
Objects.equals(this.storeId, ecConsumeInfo.storeId) &&
Objects.equals(this.summaryApplyId, ecConsumeInfo.summaryApplyId) &&
Objects.equals(this.userId, ecConsumeInfo.userId)&&
Objects.equals(this.additionalProperties, ecConsumeInfo.additionalProperties);
}
@Override
public int hashCode() {
return Objects.hash(accountId, agreementPeerPayerId, benefitAmount, bizOutNo, categoryName, consumeAmount, consumeBizType, consumeCategory, consumeFeeWithDiscount, consumeMemo, consumeType, employeeId, enterpriseId, expenseRuleGroupId, expenseSceneCode, expenseType, expenseTypeSubCategory, extInfos, fundBizType, gmtBizCreate, gmtReceivePay, invoiceOpenMode, merchantId, merchantName, openId, oppositeFullName, orderCompleteLabel, orderCompleteTime, payNo, payerCardNo, payerLogonId, payerName, peerPayAmount, peerPayerCardNo, peerRefundAmount, peerRefundStatus, relatedPayNo, sceneCode, sellerId, shopId, storeId, summaryApplyId, userId, additionalProperties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EcConsumeInfo {\n");
sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n");
sb.append(" agreementPeerPayerId: ").append(toIndentedString(agreementPeerPayerId)).append("\n");
sb.append(" benefitAmount: ").append(toIndentedString(benefitAmount)).append("\n");
sb.append(" bizOutNo: ").append(toIndentedString(bizOutNo)).append("\n");
sb.append(" categoryName: ").append(toIndentedString(categoryName)).append("\n");
sb.append(" consumeAmount: ").append(toIndentedString(consumeAmount)).append("\n");
sb.append(" consumeBizType: ").append(toIndentedString(consumeBizType)).append("\n");
sb.append(" consumeCategory: ").append(toIndentedString(consumeCategory)).append("\n");
sb.append(" consumeFeeWithDiscount: ").append(toIndentedString(consumeFeeWithDiscount)).append("\n");
sb.append(" consumeMemo: ").append(toIndentedString(consumeMemo)).append("\n");
sb.append(" consumeType: ").append(toIndentedString(consumeType)).append("\n");
sb.append(" employeeId: ").append(toIndentedString(employeeId)).append("\n");
sb.append(" enterpriseId: ").append(toIndentedString(enterpriseId)).append("\n");
sb.append(" expenseRuleGroupId: ").append(toIndentedString(expenseRuleGroupId)).append("\n");
sb.append(" expenseSceneCode: ").append(toIndentedString(expenseSceneCode)).append("\n");
sb.append(" expenseType: ").append(toIndentedString(expenseType)).append("\n");
sb.append(" expenseTypeSubCategory: ").append(toIndentedString(expenseTypeSubCategory)).append("\n");
sb.append(" extInfos: ").append(toIndentedString(extInfos)).append("\n");
sb.append(" fundBizType: ").append(toIndentedString(fundBizType)).append("\n");
sb.append(" gmtBizCreate: ").append(toIndentedString(gmtBizCreate)).append("\n");
sb.append(" gmtReceivePay: ").append(toIndentedString(gmtReceivePay)).append("\n");
sb.append(" invoiceOpenMode: ").append(toIndentedString(invoiceOpenMode)).append("\n");
sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n");
sb.append(" merchantName: ").append(toIndentedString(merchantName)).append("\n");
sb.append(" openId: ").append(toIndentedString(openId)).append("\n");
sb.append(" oppositeFullName: ").append(toIndentedString(oppositeFullName)).append("\n");
sb.append(" orderCompleteLabel: ").append(toIndentedString(orderCompleteLabel)).append("\n");
sb.append(" orderCompleteTime: ").append(toIndentedString(orderCompleteTime)).append("\n");
sb.append(" payNo: ").append(toIndentedString(payNo)).append("\n");
sb.append(" payerCardNo: ").append(toIndentedString(payerCardNo)).append("\n");
sb.append(" payerLogonId: ").append(toIndentedString(payerLogonId)).append("\n");
sb.append(" payerName: ").append(toIndentedString(payerName)).append("\n");
sb.append(" peerPayAmount: ").append(toIndentedString(peerPayAmount)).append("\n");
sb.append(" peerPayerCardNo: ").append(toIndentedString(peerPayerCardNo)).append("\n");
sb.append(" peerRefundAmount: ").append(toIndentedString(peerRefundAmount)).append("\n");
sb.append(" peerRefundStatus: ").append(toIndentedString(peerRefundStatus)).append("\n");
sb.append(" relatedPayNo: ").append(toIndentedString(relatedPayNo)).append("\n");
sb.append(" sceneCode: ").append(toIndentedString(sceneCode)).append("\n");
sb.append(" sellerId: ").append(toIndentedString(sellerId)).append("\n");
sb.append(" shopId: ").append(toIndentedString(shopId)).append("\n");
sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n");
sb.append(" summaryApplyId: ").append(toIndentedString(summaryApplyId)).append("\n");
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static HashSet openapiFields;
public static HashSet openapiRequiredFields;
static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet();
openapiFields.add("account_id");
openapiFields.add("agreement_peer_payer_id");
openapiFields.add("benefit_amount");
openapiFields.add("biz_out_no");
openapiFields.add("category_name");
openapiFields.add("consume_amount");
openapiFields.add("consume_biz_type");
openapiFields.add("consume_category");
openapiFields.add("consume_fee_with_discount");
openapiFields.add("consume_memo");
openapiFields.add("consume_type");
openapiFields.add("employee_id");
openapiFields.add("enterprise_id");
openapiFields.add("expense_rule_group_id");
openapiFields.add("expense_scene_code");
openapiFields.add("expense_type");
openapiFields.add("expense_type_sub_category");
openapiFields.add("ext_infos");
openapiFields.add("fund_biz_type");
openapiFields.add("gmt_biz_create");
openapiFields.add("gmt_receive_pay");
openapiFields.add("invoice_open_mode");
openapiFields.add("merchant_id");
openapiFields.add("merchant_name");
openapiFields.add("open_id");
openapiFields.add("opposite_full_name");
openapiFields.add("order_complete_label");
openapiFields.add("order_complete_time");
openapiFields.add("pay_no");
openapiFields.add("payer_card_no");
openapiFields.add("payer_logon_id");
openapiFields.add("payer_name");
openapiFields.add("peer_pay_amount");
openapiFields.add("peer_payer_card_no");
openapiFields.add("peer_refund_amount");
openapiFields.add("peer_refund_status");
openapiFields.add("related_pay_no");
openapiFields.add("scene_code");
openapiFields.add("seller_id");
openapiFields.add("shop_id");
openapiFields.add("store_id");
openapiFields.add("summary_apply_id");
openapiFields.add("user_id");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
}
/**
* Validates the JSON Object and throws an exception if issues found
*
* @param jsonObj JSON Object
* @throws IOException if the JSON Object is invalid with respect to EcConsumeInfo
*/
public static void validateJsonObject(JsonObject jsonObj) throws IOException {
if (jsonObj == null) {
if (EcConsumeInfo.openapiRequiredFields.isEmpty()) {
return;
} else { // has required fields
throw new IllegalArgumentException(String.format("The required field(s) %s in EcConsumeInfo is not found in the empty JSON string", EcConsumeInfo.openapiRequiredFields.toString()));
}
}
if (jsonObj.get("account_id") != null && !jsonObj.get("account_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `account_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_id").toString()));
}
if (jsonObj.get("agreement_peer_payer_id") != null && !jsonObj.get("agreement_peer_payer_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `agreement_peer_payer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agreement_peer_payer_id").toString()));
}
if (jsonObj.get("benefit_amount") != null && !jsonObj.get("benefit_amount").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `benefit_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("benefit_amount").toString()));
}
if (jsonObj.get("biz_out_no") != null && !jsonObj.get("biz_out_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `biz_out_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("biz_out_no").toString()));
}
if (jsonObj.get("category_name") != null && !jsonObj.get("category_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `category_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_name").toString()));
}
if (jsonObj.get("consume_amount") != null && !jsonObj.get("consume_amount").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `consume_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("consume_amount").toString()));
}
if (jsonObj.get("consume_biz_type") != null && !jsonObj.get("consume_biz_type").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `consume_biz_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("consume_biz_type").toString()));
}
if (jsonObj.get("consume_category") != null && !jsonObj.get("consume_category").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `consume_category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("consume_category").toString()));
}
if (jsonObj.get("consume_fee_with_discount") != null && !jsonObj.get("consume_fee_with_discount").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `consume_fee_with_discount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("consume_fee_with_discount").toString()));
}
if (jsonObj.get("consume_memo") != null && !jsonObj.get("consume_memo").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `consume_memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("consume_memo").toString()));
}
if (jsonObj.get("consume_type") != null && !jsonObj.get("consume_type").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `consume_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("consume_type").toString()));
}
if (jsonObj.get("employee_id") != null && !jsonObj.get("employee_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `employee_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employee_id").toString()));
}
if (jsonObj.get("enterprise_id") != null && !jsonObj.get("enterprise_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `enterprise_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enterprise_id").toString()));
}
if (jsonObj.get("expense_rule_group_id") != null && !jsonObj.get("expense_rule_group_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `expense_rule_group_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expense_rule_group_id").toString()));
}
if (jsonObj.get("expense_scene_code") != null && !jsonObj.get("expense_scene_code").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `expense_scene_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expense_scene_code").toString()));
}
if (jsonObj.get("expense_type") != null && !jsonObj.get("expense_type").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `expense_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expense_type").toString()));
}
if (jsonObj.get("expense_type_sub_category") != null && !jsonObj.get("expense_type_sub_category").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `expense_type_sub_category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expense_type_sub_category").toString()));
}
if (jsonObj.get("ext_infos") != null && !jsonObj.get("ext_infos").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `ext_infos` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ext_infos").toString()));
}
if (jsonObj.get("fund_biz_type") != null && !jsonObj.get("fund_biz_type").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `fund_biz_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fund_biz_type").toString()));
}
if (jsonObj.get("gmt_biz_create") != null && !jsonObj.get("gmt_biz_create").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `gmt_biz_create` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gmt_biz_create").toString()));
}
if (jsonObj.get("gmt_receive_pay") != null && !jsonObj.get("gmt_receive_pay").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `gmt_receive_pay` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gmt_receive_pay").toString()));
}
if (jsonObj.get("invoice_open_mode") != null && !jsonObj.get("invoice_open_mode").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_open_mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_open_mode").toString()));
}
if (jsonObj.get("merchant_id") != null && !jsonObj.get("merchant_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `merchant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("merchant_id").toString()));
}
if (jsonObj.get("merchant_name") != null && !jsonObj.get("merchant_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `merchant_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("merchant_name").toString()));
}
if (jsonObj.get("open_id") != null && !jsonObj.get("open_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `open_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("open_id").toString()));
}
if (jsonObj.get("opposite_full_name") != null && !jsonObj.get("opposite_full_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `opposite_full_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("opposite_full_name").toString()));
}
if (jsonObj.get("order_complete_label") != null && !jsonObj.get("order_complete_label").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `order_complete_label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order_complete_label").toString()));
}
if (jsonObj.get("order_complete_time") != null && !jsonObj.get("order_complete_time").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `order_complete_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order_complete_time").toString()));
}
if (jsonObj.get("pay_no") != null && !jsonObj.get("pay_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `pay_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pay_no").toString()));
}
if (jsonObj.get("payer_card_no") != null && !jsonObj.get("payer_card_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payer_card_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payer_card_no").toString()));
}
if (jsonObj.get("payer_logon_id") != null && !jsonObj.get("payer_logon_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payer_logon_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payer_logon_id").toString()));
}
if (jsonObj.get("payer_name") != null && !jsonObj.get("payer_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payer_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payer_name").toString()));
}
if (jsonObj.get("peer_pay_amount") != null && !jsonObj.get("peer_pay_amount").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `peer_pay_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("peer_pay_amount").toString()));
}
if (jsonObj.get("peer_payer_card_no") != null && !jsonObj.get("peer_payer_card_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `peer_payer_card_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("peer_payer_card_no").toString()));
}
if (jsonObj.get("peer_refund_amount") != null && !jsonObj.get("peer_refund_amount").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `peer_refund_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("peer_refund_amount").toString()));
}
if (jsonObj.get("peer_refund_status") != null && !jsonObj.get("peer_refund_status").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `peer_refund_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("peer_refund_status").toString()));
}
if (jsonObj.get("related_pay_no") != null && !jsonObj.get("related_pay_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `related_pay_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_pay_no").toString()));
}
if (jsonObj.get("scene_code") != null && !jsonObj.get("scene_code").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `scene_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scene_code").toString()));
}
if (jsonObj.get("seller_id") != null && !jsonObj.get("seller_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `seller_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("seller_id").toString()));
}
if (jsonObj.get("shop_id") != null && !jsonObj.get("shop_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `shop_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shop_id").toString()));
}
if (jsonObj.get("store_id") != null && !jsonObj.get("store_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `store_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("store_id").toString()));
}
if (jsonObj.get("summary_apply_id") != null && !jsonObj.get("summary_apply_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `summary_apply_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary_apply_id").toString()));
}
if (jsonObj.get("user_id") != null && !jsonObj.get("user_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString()));
}
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
if (!EcConsumeInfo.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'EcConsumeInfo' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter thisAdapter
= gson.getDelegateAdapter(this, TypeToken.get(EcConsumeInfo.class));
return (TypeAdapter) new TypeAdapter() {
@Override
public void write(JsonWriter out, EcConsumeInfo value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
obj.remove("additionalProperties");
// serialize additonal properties
if (value.getAdditionalProperties() != null) {
for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
if (entry.getValue() instanceof String)
obj.addProperty(entry.getKey(), (String) entry.getValue());
else if (entry.getValue() instanceof Number)
obj.addProperty(entry.getKey(), (Number) entry.getValue());
else if (entry.getValue() instanceof Boolean)
obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
else if (entry.getValue() instanceof Character)
obj.addProperty(entry.getKey(), (Character) entry.getValue());
else {
obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
}
}
}
elementAdapter.write(out, obj);
}
@Override
public EcConsumeInfo read(JsonReader in) throws IOException {
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
validateJsonObject(jsonObj);
// store additional fields in the deserialized instance
EcConsumeInfo instance = thisAdapter.fromJsonTree(jsonObj);
for (Map.Entry entry : jsonObj.entrySet()) {
if (!openapiFields.contains(entry.getKey())) {
if (entry.getValue().isJsonPrimitive()) { // primitive type
if (entry.getValue().getAsJsonPrimitive().isString())
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
else if (entry.getValue().getAsJsonPrimitive().isNumber())
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
else if (entry.getValue().getAsJsonPrimitive().isBoolean())
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
else
throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
} else { // non-primitive type
instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
}
}
}
return instance;
}
}.nullSafe();
}
}
/**
* Create an instance of EcConsumeInfo given an JSON string
*
* @param jsonString JSON string
* @return An instance of EcConsumeInfo
* @throws IOException if the JSON string is invalid with respect to EcConsumeInfo
*/
public static EcConsumeInfo fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, EcConsumeInfo.class);
}
/**
* Convert an instance of EcConsumeInfo to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}