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.ArInvoiceOpenApiResponse Maven / Gradle / Ivy
/*
* 支付宝开放平台API
* 支付宝开放平台v3协议文档
*
* The version of the OpenAPI document: 2024-11-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.alipay.v3.model.ArInvoiceLineOpenApiResponse;
import com.alipay.v3.model.ArRelInvoiceOpenApiResponse;
import com.alipay.v3.model.MultiCurrencyMoneyOpenApi;
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 java.util.ArrayList;
import java.util.List;
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;
/**
* ArInvoiceOpenApiResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ArInvoiceOpenApiResponse {
public static final String SERIALIZED_NAME_AR_INVOICE_LINES = "ar_invoice_lines";
@SerializedName(SERIALIZED_NAME_AR_INVOICE_LINES)
private List arInvoiceLines = null;
public static final String SERIALIZED_NAME_BUYER_ADDRESS = "buyer_address";
@SerializedName(SERIALIZED_NAME_BUYER_ADDRESS)
private String buyerAddress;
public static final String SERIALIZED_NAME_BUYER_BANK_ACCOUNT = "buyer_bank_account";
@SerializedName(SERIALIZED_NAME_BUYER_BANK_ACCOUNT)
private String buyerBankAccount;
public static final String SERIALIZED_NAME_BUYER_BANK_NAME = "buyer_bank_name";
@SerializedName(SERIALIZED_NAME_BUYER_BANK_NAME)
private String buyerBankName;
public static final String SERIALIZED_NAME_BUYER_INVOICE_TITLE = "buyer_invoice_title";
@SerializedName(SERIALIZED_NAME_BUYER_INVOICE_TITLE)
private String buyerInvoiceTitle;
public static final String SERIALIZED_NAME_BUYER_TAX_NO = "buyer_tax_no";
@SerializedName(SERIALIZED_NAME_BUYER_TAX_NO)
private String buyerTaxNo;
public static final String SERIALIZED_NAME_BUYER_TELEPHONE = "buyer_telephone";
@SerializedName(SERIALIZED_NAME_BUYER_TELEPHONE)
private String buyerTelephone;
public static final String SERIALIZED_NAME_CAN_LINK = "can_link";
@SerializedName(SERIALIZED_NAME_CAN_LINK)
private Boolean canLink;
public static final String SERIALIZED_NAME_CREATOR = "creator";
@SerializedName(SERIALIZED_NAME_CREATOR)
private String creator;
public static final String SERIALIZED_NAME_DRAWER = "drawer";
@SerializedName(SERIALIZED_NAME_DRAWER)
private String drawer;
public static final String SERIALIZED_NAME_ELC_INVOICE_URL = "elc_invoice_url";
@SerializedName(SERIALIZED_NAME_ELC_INVOICE_URL)
private String elcInvoiceUrl;
public static final String SERIALIZED_NAME_GMT_CREATE = "gmt_create";
@SerializedName(SERIALIZED_NAME_GMT_CREATE)
private String gmtCreate;
public static final String SERIALIZED_NAME_GMT_MODIFIED = "gmt_modified";
@SerializedName(SERIALIZED_NAME_GMT_MODIFIED)
private String gmtModified;
public static final String SERIALIZED_NAME_INST_ID = "inst_id";
@SerializedName(SERIALIZED_NAME_INST_ID)
private String instId;
public static final String SERIALIZED_NAME_INVOICE_AMT = "invoice_amt";
@SerializedName(SERIALIZED_NAME_INVOICE_AMT)
private MultiCurrencyMoneyOpenApi invoiceAmt;
public static final String SERIALIZED_NAME_INVOICE_CHANNEL = "invoice_channel";
@SerializedName(SERIALIZED_NAME_INVOICE_CHANNEL)
private String invoiceChannel;
public static final String SERIALIZED_NAME_INVOICE_CODE = "invoice_code";
@SerializedName(SERIALIZED_NAME_INVOICE_CODE)
private String invoiceCode;
public static final String SERIALIZED_NAME_INVOICE_DATE = "invoice_date";
@SerializedName(SERIALIZED_NAME_INVOICE_DATE)
private String invoiceDate;
public static final String SERIALIZED_NAME_INVOICE_ID = "invoice_id";
@SerializedName(SERIALIZED_NAME_INVOICE_ID)
private String invoiceId;
public static final String SERIALIZED_NAME_INVOICE_MATERIAL = "invoice_material";
@SerializedName(SERIALIZED_NAME_INVOICE_MATERIAL)
private String invoiceMaterial;
public static final String SERIALIZED_NAME_INVOICE_NO = "invoice_no";
@SerializedName(SERIALIZED_NAME_INVOICE_NO)
private String invoiceNo;
public static final String SERIALIZED_NAME_INVOICE_NOTE = "invoice_note";
@SerializedName(SERIALIZED_NAME_INVOICE_NOTE)
private String invoiceNote;
public static final String SERIALIZED_NAME_INVOICE_STATUS = "invoice_status";
@SerializedName(SERIALIZED_NAME_INVOICE_STATUS)
private String invoiceStatus;
public static final String SERIALIZED_NAME_INVOICE_TYPE = "invoice_type";
@SerializedName(SERIALIZED_NAME_INVOICE_TYPE)
private String invoiceType;
public static final String SERIALIZED_NAME_IP_ID = "ip_id";
@SerializedName(SERIALIZED_NAME_IP_ID)
private String ipId;
public static final String SERIALIZED_NAME_IP_ROLE_ID = "ip_role_id";
@SerializedName(SERIALIZED_NAME_IP_ROLE_ID)
private String ipRoleId;
public static final String SERIALIZED_NAME_LAST_MODER = "last_moder";
@SerializedName(SERIALIZED_NAME_LAST_MODER)
private String lastModer;
public static final String SERIALIZED_NAME_LINKED_AMT = "linked_amt";
@SerializedName(SERIALIZED_NAME_LINKED_AMT)
private MultiCurrencyMoneyOpenApi linkedAmt;
public static final String SERIALIZED_NAME_MAIL_STATUS = "mail_status";
@SerializedName(SERIALIZED_NAME_MAIL_STATUS)
private String mailStatus;
public static final String SERIALIZED_NAME_MEMO = "memo";
@SerializedName(SERIALIZED_NAME_MEMO)
private String memo;
public static final String SERIALIZED_NAME_NO_BILL_INVOICE_FLAG = "no_bill_invoice_flag";
@SerializedName(SERIALIZED_NAME_NO_BILL_INVOICE_FLAG)
private String noBillInvoiceFlag;
public static final String SERIALIZED_NAME_ONLINE = "online";
@SerializedName(SERIALIZED_NAME_ONLINE)
private Boolean online;
public static final String SERIALIZED_NAME_PAYEE = "payee";
@SerializedName(SERIALIZED_NAME_PAYEE)
private String payee;
public static final String SERIALIZED_NAME_RECENT_MAIL_ID = "recent_mail_id";
@SerializedName(SERIALIZED_NAME_RECENT_MAIL_ID)
private String recentMailId;
public static final String SERIALIZED_NAME_RED = "red";
@SerializedName(SERIALIZED_NAME_RED)
private String red;
public static final String SERIALIZED_NAME_RED_AMT = "red_amt";
@SerializedName(SERIALIZED_NAME_RED_AMT)
private MultiCurrencyMoneyOpenApi redAmt;
public static final String SERIALIZED_NAME_REL_BLUE_INVOICES = "rel_blue_invoices";
@SerializedName(SERIALIZED_NAME_REL_BLUE_INVOICES)
private List relBlueInvoices = null;
public static final String SERIALIZED_NAME_REL_RED_INVOICES = "rel_red_invoices";
@SerializedName(SERIALIZED_NAME_REL_RED_INVOICES)
private List relRedInvoices = null;
public static final String SERIALIZED_NAME_REVIEWER = "reviewer";
@SerializedName(SERIALIZED_NAME_REVIEWER)
private String reviewer;
public static final String SERIALIZED_NAME_SELLER_ADDRESS = "seller_address";
@SerializedName(SERIALIZED_NAME_SELLER_ADDRESS)
private String sellerAddress;
public static final String SERIALIZED_NAME_SELLER_BANK_ACCOUNT = "seller_bank_account";
@SerializedName(SERIALIZED_NAME_SELLER_BANK_ACCOUNT)
private String sellerBankAccount;
public static final String SERIALIZED_NAME_SELLER_BANK_NAME = "seller_bank_name";
@SerializedName(SERIALIZED_NAME_SELLER_BANK_NAME)
private String sellerBankName;
public static final String SERIALIZED_NAME_SELLER_COMPANY_NAME = "seller_company_name";
@SerializedName(SERIALIZED_NAME_SELLER_COMPANY_NAME)
private String sellerCompanyName;
public static final String SERIALIZED_NAME_SELLER_TAX_NO = "seller_tax_no";
@SerializedName(SERIALIZED_NAME_SELLER_TAX_NO)
private String sellerTaxNo;
public static final String SERIALIZED_NAME_SELLER_TELEPHONE = "seller_telephone";
@SerializedName(SERIALIZED_NAME_SELLER_TELEPHONE)
private String sellerTelephone;
public static final String SERIALIZED_NAME_TNT_INST_ID = "tnt_inst_id";
@SerializedName(SERIALIZED_NAME_TNT_INST_ID)
private String tntInstId;
public ArInvoiceOpenApiResponse() {
}
public ArInvoiceOpenApiResponse arInvoiceLines(List arInvoiceLines) {
this.arInvoiceLines = arInvoiceLines;
return this;
}
public ArInvoiceOpenApiResponse addArInvoiceLinesItem(ArInvoiceLineOpenApiResponse arInvoiceLinesItem) {
if (this.arInvoiceLines == null) {
this.arInvoiceLines = new ArrayList<>();
}
this.arInvoiceLines.add(arInvoiceLinesItem);
return this;
}
/**
* 发票行信息集合
* @return arInvoiceLines
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "发票行信息集合")
public List getArInvoiceLines() {
return arInvoiceLines;
}
public void setArInvoiceLines(List arInvoiceLines) {
this.arInvoiceLines = arInvoiceLines;
}
public ArInvoiceOpenApiResponse buyerAddress(String buyerAddress) {
this.buyerAddress = buyerAddress;
return this;
}
/**
* 购方的地址
* @return buyerAddress
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "购方的地址")
public String getBuyerAddress() {
return buyerAddress;
}
public void setBuyerAddress(String buyerAddress) {
this.buyerAddress = buyerAddress;
}
public ArInvoiceOpenApiResponse buyerBankAccount(String buyerBankAccount) {
this.buyerBankAccount = buyerBankAccount;
return this;
}
/**
* 购方银行账号
* @return buyerBankAccount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "购方银行账号")
public String getBuyerBankAccount() {
return buyerBankAccount;
}
public void setBuyerBankAccount(String buyerBankAccount) {
this.buyerBankAccount = buyerBankAccount;
}
public ArInvoiceOpenApiResponse buyerBankName(String buyerBankName) {
this.buyerBankName = buyerBankName;
return this;
}
/**
* 购方开户行名称
* @return buyerBankName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "购方开户行名称")
public String getBuyerBankName() {
return buyerBankName;
}
public void setBuyerBankName(String buyerBankName) {
this.buyerBankName = buyerBankName;
}
public ArInvoiceOpenApiResponse buyerInvoiceTitle(String buyerInvoiceTitle) {
this.buyerInvoiceTitle = buyerInvoiceTitle;
return this;
}
/**
* 购方发票抬头,用于打印在发票上
* @return buyerInvoiceTitle
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "购方发票抬头,用于打印在发票上")
public String getBuyerInvoiceTitle() {
return buyerInvoiceTitle;
}
public void setBuyerInvoiceTitle(String buyerInvoiceTitle) {
this.buyerInvoiceTitle = buyerInvoiceTitle;
}
public ArInvoiceOpenApiResponse buyerTaxNo(String buyerTaxNo) {
this.buyerTaxNo = buyerTaxNo;
return this;
}
/**
* 购方税号
* @return buyerTaxNo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "购方税号")
public String getBuyerTaxNo() {
return buyerTaxNo;
}
public void setBuyerTaxNo(String buyerTaxNo) {
this.buyerTaxNo = buyerTaxNo;
}
public ArInvoiceOpenApiResponse buyerTelephone(String buyerTelephone) {
this.buyerTelephone = buyerTelephone;
return this;
}
/**
* 购方的电话号码
* @return buyerTelephone
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "购方的电话号码")
public String getBuyerTelephone() {
return buyerTelephone;
}
public void setBuyerTelephone(String buyerTelephone) {
this.buyerTelephone = buyerTelephone;
}
public ArInvoiceOpenApiResponse canLink(Boolean canLink) {
this.canLink = canLink;
return this;
}
/**
* 是否可以关联账单
* @return canLink
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "是否可以关联账单")
public Boolean getCanLink() {
return canLink;
}
public void setCanLink(Boolean canLink) {
this.canLink = canLink;
}
public ArInvoiceOpenApiResponse creator(String creator) {
this.creator = creator;
return this;
}
/**
* 创建人
* @return creator
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "创建人")
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public ArInvoiceOpenApiResponse drawer(String drawer) {
this.drawer = drawer;
return this;
}
/**
* 开票人
* @return drawer
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "开票人")
public String getDrawer() {
return drawer;
}
public void setDrawer(String drawer) {
this.drawer = drawer;
}
public ArInvoiceOpenApiResponse elcInvoiceUrl(String elcInvoiceUrl) {
this.elcInvoiceUrl = elcInvoiceUrl;
return this;
}
/**
* 电子发票在oss上的存储地址
* @return elcInvoiceUrl
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "电子发票在oss上的存储地址")
public String getElcInvoiceUrl() {
return elcInvoiceUrl;
}
public void setElcInvoiceUrl(String elcInvoiceUrl) {
this.elcInvoiceUrl = elcInvoiceUrl;
}
public ArInvoiceOpenApiResponse gmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
return this;
}
/**
* 创建时间
* @return gmtCreate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "创建时间")
public String getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public ArInvoiceOpenApiResponse gmtModified(String gmtModified) {
this.gmtModified = gmtModified;
return this;
}
/**
* 修改时间
* @return gmtModified
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "修改时间")
public String getGmtModified() {
return gmtModified;
}
public void setGmtModified(String gmtModified) {
this.gmtModified = gmtModified;
}
public ArInvoiceOpenApiResponse instId(String instId) {
this.instId = instId;
return this;
}
/**
* 对应发票所在OU的id,用于标示该发票所述的OU。
* @return instId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "对应发票所在OU的id,用于标示该发票所述的OU。")
public String getInstId() {
return instId;
}
public void setInstId(String instId) {
this.instId = instId;
}
public ArInvoiceOpenApiResponse invoiceAmt(MultiCurrencyMoneyOpenApi invoiceAmt) {
this.invoiceAmt = invoiceAmt;
return this;
}
/**
* Get invoiceAmt
* @return invoiceAmt
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public MultiCurrencyMoneyOpenApi getInvoiceAmt() {
return invoiceAmt;
}
public void setInvoiceAmt(MultiCurrencyMoneyOpenApi invoiceAmt) {
this.invoiceAmt = invoiceAmt;
}
public ArInvoiceOpenApiResponse invoiceChannel(String invoiceChannel) {
this.invoiceChannel = invoiceChannel;
return this;
}
/**
* 开票渠道,01:在线,02:线下
* @return invoiceChannel
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "开票渠道,01:在线,02:线下")
public String getInvoiceChannel() {
return invoiceChannel;
}
public void setInvoiceChannel(String invoiceChannel) {
this.invoiceChannel = invoiceChannel;
}
public ArInvoiceOpenApiResponse invoiceCode(String invoiceCode) {
this.invoiceCode = invoiceCode;
return this;
}
/**
* 发票编码
* @return invoiceCode
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "发票编码")
public String getInvoiceCode() {
return invoiceCode;
}
public void setInvoiceCode(String invoiceCode) {
this.invoiceCode = invoiceCode;
}
public ArInvoiceOpenApiResponse invoiceDate(String invoiceDate) {
this.invoiceDate = invoiceDate;
return this;
}
/**
* 发票的开票日期,yyyyMMdd
* @return invoiceDate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "发票的开票日期,yyyyMMdd")
public String getInvoiceDate() {
return invoiceDate;
}
public void setInvoiceDate(String invoiceDate) {
this.invoiceDate = invoiceDate;
}
public ArInvoiceOpenApiResponse invoiceId(String invoiceId) {
this.invoiceId = invoiceId;
return this;
}
/**
* 发票ID,唯一标示一张发票
* @return invoiceId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "发票ID,唯一标示一张发票")
public String getInvoiceId() {
return invoiceId;
}
public void setInvoiceId(String invoiceId) {
this.invoiceId = invoiceId;
}
public ArInvoiceOpenApiResponse invoiceMaterial(String invoiceMaterial) {
this.invoiceMaterial = invoiceMaterial;
return this;
}
/**
* 发票介质,01:电子,02:纸质
* @return invoiceMaterial
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "发票介质,01:电子,02:纸质")
public String getInvoiceMaterial() {
return invoiceMaterial;
}
public void setInvoiceMaterial(String invoiceMaterial) {
this.invoiceMaterial = invoiceMaterial;
}
public ArInvoiceOpenApiResponse invoiceNo(String invoiceNo) {
this.invoiceNo = invoiceNo;
return this;
}
/**
* 发票号码
* @return invoiceNo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "发票号码")
public String getInvoiceNo() {
return invoiceNo;
}
public void setInvoiceNo(String invoiceNo) {
this.invoiceNo = invoiceNo;
}
public ArInvoiceOpenApiResponse invoiceNote(String invoiceNote) {
this.invoiceNote = invoiceNote;
return this;
}
/**
* 发票备注
* @return invoiceNote
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "发票备注")
public String getInvoiceNote() {
return invoiceNote;
}
public void setInvoiceNote(String invoiceNote) {
this.invoiceNote = invoiceNote;
}
public ArInvoiceOpenApiResponse invoiceStatus(String invoiceStatus) {
this.invoiceStatus = invoiceStatus;
return this;
}
/**
* 发票状态:用于标示发票当前的状态,状态类型以及相关含义 01:待开票,02:开票中,03:已开票,04:作废中,05:已作废,06:红冲中,07:已红冲,08:部分红冲,09:无效
* @return invoiceStatus
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "发票状态:用于标示发票当前的状态,状态类型以及相关含义 01:待开票,02:开票中,03:已开票,04:作废中,05:已作废,06:红冲中,07:已红冲,08:部分红冲,09:无效")
public String getInvoiceStatus() {
return invoiceStatus;
}
public void setInvoiceStatus(String invoiceStatus) {
this.invoiceStatus = invoiceStatus;
}
public ArInvoiceOpenApiResponse invoiceType(String invoiceType) {
this.invoiceType = invoiceType;
return this;
}
/**
* 发票类型:01:专票,02:普票,03:营业税发票,04:国际形式发票,05:其它发票
* @return invoiceType
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "发票类型:01:专票,02:普票,03:营业税发票,04:国际形式发票,05:其它发票")
public String getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(String invoiceType) {
this.invoiceType = invoiceType;
}
public ArInvoiceOpenApiResponse ipId(String ipId) {
this.ipId = ipId;
return this;
}
/**
* 对应发票商户的ipId,在主站标示mid,在其他环境标示ip_id。
* @return ipId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "对应发票商户的ipId,在主站标示mid,在其他环境标示ip_id。")
public String getIpId() {
return ipId;
}
public void setIpId(String ipId) {
this.ipId = ipId;
}
public ArInvoiceOpenApiResponse ipRoleId(String ipRoleId) {
this.ipRoleId = ipRoleId;
return this;
}
/**
* 商户结算的ipRoleId,表示商户的结算对象,在主站表示pid。
* @return ipRoleId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "商户结算的ipRoleId,表示商户的结算对象,在主站表示pid。")
public String getIpRoleId() {
return ipRoleId;
}
public void setIpRoleId(String ipRoleId) {
this.ipRoleId = ipRoleId;
}
public ArInvoiceOpenApiResponse lastModer(String lastModer) {
this.lastModer = lastModer;
return this;
}
/**
* 最近修改人
* @return lastModer
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "最近修改人")
public String getLastModer() {
return lastModer;
}
public void setLastModer(String lastModer) {
this.lastModer = lastModer;
}
public ArInvoiceOpenApiResponse linkedAmt(MultiCurrencyMoneyOpenApi linkedAmt) {
this.linkedAmt = linkedAmt;
return this;
}
/**
* Get linkedAmt
* @return linkedAmt
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public MultiCurrencyMoneyOpenApi getLinkedAmt() {
return linkedAmt;
}
public void setLinkedAmt(MultiCurrencyMoneyOpenApi linkedAmt) {
this.linkedAmt = linkedAmt;
}
public ArInvoiceOpenApiResponse mailStatus(String mailStatus) {
this.mailStatus = mailStatus;
return this;
}
/**
* 发票开出后的邮寄状态,具体状态说明 01:待邮寄,02:已邮寄,03:退回中,04:已退回
* @return mailStatus
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "发票开出后的邮寄状态,具体状态说明 01:待邮寄,02:已邮寄,03:退回中,04:已退回")
public String getMailStatus() {
return mailStatus;
}
public void setMailStatus(String mailStatus) {
this.mailStatus = mailStatus;
}
public ArInvoiceOpenApiResponse memo(String memo) {
this.memo = memo;
return this;
}
/**
* 备注
* @return memo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "备注")
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public ArInvoiceOpenApiResponse noBillInvoiceFlag(String noBillInvoiceFlag) {
this.noBillInvoiceFlag = noBillInvoiceFlag;
return this;
}
/**
* 是否是无账单发票 Y:是 N:不是
* @return noBillInvoiceFlag
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "是否是无账单发票 Y:是 N:不是")
public String getNoBillInvoiceFlag() {
return noBillInvoiceFlag;
}
public void setNoBillInvoiceFlag(String noBillInvoiceFlag) {
this.noBillInvoiceFlag = noBillInvoiceFlag;
}
public ArInvoiceOpenApiResponse online(Boolean online) {
this.online = online;
return this;
}
/**
* 是否为点在发票 true:是, false:不是
* @return online
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "是否为点在发票 true:是, false:不是")
public Boolean getOnline() {
return online;
}
public void setOnline(Boolean online) {
this.online = online;
}
public ArInvoiceOpenApiResponse payee(String payee) {
this.payee = payee;
return this;
}
/**
* 收款人
* @return payee
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "收款人")
public String getPayee() {
return payee;
}
public void setPayee(String payee) {
this.payee = payee;
}
public ArInvoiceOpenApiResponse recentMailId(String recentMailId) {
this.recentMailId = recentMailId;
return this;
}
/**
* 邮件信息的主键,用于‘根据发票邮寄ID获取当前的邮寄信息’的查询输入。
* @return recentMailId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "邮件信息的主键,用于‘根据发票邮寄ID获取当前的邮寄信息’的查询输入。")
public String getRecentMailId() {
return recentMailId;
}
public void setRecentMailId(String recentMailId) {
this.recentMailId = recentMailId;
}
public ArInvoiceOpenApiResponse red(String red) {
this.red = red;
return this;
}
/**
* 是否红字 Y:红字, N:蓝字
* @return red
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "是否红字 Y:红字, N:蓝字")
public String getRed() {
return red;
}
public void setRed(String red) {
this.red = red;
}
public ArInvoiceOpenApiResponse redAmt(MultiCurrencyMoneyOpenApi redAmt) {
this.redAmt = redAmt;
return this;
}
/**
* Get redAmt
* @return redAmt
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public MultiCurrencyMoneyOpenApi getRedAmt() {
return redAmt;
}
public void setRedAmt(MultiCurrencyMoneyOpenApi redAmt) {
this.redAmt = redAmt;
}
public ArInvoiceOpenApiResponse relBlueInvoices(List relBlueInvoices) {
this.relBlueInvoices = relBlueInvoices;
return this;
}
public ArInvoiceOpenApiResponse addRelBlueInvoicesItem(ArRelInvoiceOpenApiResponse relBlueInvoicesItem) {
if (this.relBlueInvoices == null) {
this.relBlueInvoices = new ArrayList<>();
}
this.relBlueInvoices.add(relBlueInvoicesItem);
return this;
}
/**
* 发票如果有关联的蓝票则显示发票关联的蓝票信息
* @return relBlueInvoices
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "发票如果有关联的蓝票则显示发票关联的蓝票信息")
public List getRelBlueInvoices() {
return relBlueInvoices;
}
public void setRelBlueInvoices(List relBlueInvoices) {
this.relBlueInvoices = relBlueInvoices;
}
public ArInvoiceOpenApiResponse relRedInvoices(List relRedInvoices) {
this.relRedInvoices = relRedInvoices;
return this;
}
public ArInvoiceOpenApiResponse addRelRedInvoicesItem(ArRelInvoiceOpenApiResponse relRedInvoicesItem) {
if (this.relRedInvoices == null) {
this.relRedInvoices = new ArrayList<>();
}
this.relRedInvoices.add(relRedInvoicesItem);
return this;
}
/**
* 如果发票有关联的红票则为关联的红票的信息
* @return relRedInvoices
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "如果发票有关联的红票则为关联的红票的信息")
public List getRelRedInvoices() {
return relRedInvoices;
}
public void setRelRedInvoices(List relRedInvoices) {
this.relRedInvoices = relRedInvoices;
}
public ArInvoiceOpenApiResponse reviewer(String reviewer) {
this.reviewer = reviewer;
return this;
}
/**
* 复核人
* @return reviewer
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "复核人")
public String getReviewer() {
return reviewer;
}
public void setReviewer(String reviewer) {
this.reviewer = reviewer;
}
public ArInvoiceOpenApiResponse sellerAddress(String sellerAddress) {
this.sellerAddress = sellerAddress;
return this;
}
/**
* 销方公司地址
* @return sellerAddress
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "销方公司地址")
public String getSellerAddress() {
return sellerAddress;
}
public void setSellerAddress(String sellerAddress) {
this.sellerAddress = sellerAddress;
}
public ArInvoiceOpenApiResponse sellerBankAccount(String sellerBankAccount) {
this.sellerBankAccount = sellerBankAccount;
return this;
}
/**
* 销方银行账号
* @return sellerBankAccount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "销方银行账号")
public String getSellerBankAccount() {
return sellerBankAccount;
}
public void setSellerBankAccount(String sellerBankAccount) {
this.sellerBankAccount = sellerBankAccount;
}
public ArInvoiceOpenApiResponse sellerBankName(String sellerBankName) {
this.sellerBankName = sellerBankName;
return this;
}
/**
* 销方开户行名称
* @return sellerBankName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "销方开户行名称")
public String getSellerBankName() {
return sellerBankName;
}
public void setSellerBankName(String sellerBankName) {
this.sellerBankName = sellerBankName;
}
public ArInvoiceOpenApiResponse sellerCompanyName(String sellerCompanyName) {
this.sellerCompanyName = sellerCompanyName;
return this;
}
/**
* 销方公司名称
* @return sellerCompanyName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "销方公司名称")
public String getSellerCompanyName() {
return sellerCompanyName;
}
public void setSellerCompanyName(String sellerCompanyName) {
this.sellerCompanyName = sellerCompanyName;
}
public ArInvoiceOpenApiResponse sellerTaxNo(String sellerTaxNo) {
this.sellerTaxNo = sellerTaxNo;
return this;
}
/**
* 销方税号,用于打印在发票上
* @return sellerTaxNo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "销方税号,用于打印在发票上")
public String getSellerTaxNo() {
return sellerTaxNo;
}
public void setSellerTaxNo(String sellerTaxNo) {
this.sellerTaxNo = sellerTaxNo;
}
public ArInvoiceOpenApiResponse sellerTelephone(String sellerTelephone) {
this.sellerTelephone = sellerTelephone;
return this;
}
/**
* 销方公司电话
* @return sellerTelephone
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "销方公司电话")
public String getSellerTelephone() {
return sellerTelephone;
}
public void setSellerTelephone(String sellerTelephone) {
this.sellerTelephone = sellerTelephone;
}
public ArInvoiceOpenApiResponse tntInstId(String tntInstId) {
this.tntInstId = tntInstId;
return this;
}
/**
* 租户id
* @return tntInstId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "租户id")
public String getTntInstId() {
return tntInstId;
}
public void setTntInstId(String tntInstId) {
this.tntInstId = tntInstId;
}
/**
* 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 ArInvoiceOpenApiResponse instance itself
*/
public ArInvoiceOpenApiResponse 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;
}
ArInvoiceOpenApiResponse arInvoiceOpenApiResponse = (ArInvoiceOpenApiResponse) o;
return Objects.equals(this.arInvoiceLines, arInvoiceOpenApiResponse.arInvoiceLines) &&
Objects.equals(this.buyerAddress, arInvoiceOpenApiResponse.buyerAddress) &&
Objects.equals(this.buyerBankAccount, arInvoiceOpenApiResponse.buyerBankAccount) &&
Objects.equals(this.buyerBankName, arInvoiceOpenApiResponse.buyerBankName) &&
Objects.equals(this.buyerInvoiceTitle, arInvoiceOpenApiResponse.buyerInvoiceTitle) &&
Objects.equals(this.buyerTaxNo, arInvoiceOpenApiResponse.buyerTaxNo) &&
Objects.equals(this.buyerTelephone, arInvoiceOpenApiResponse.buyerTelephone) &&
Objects.equals(this.canLink, arInvoiceOpenApiResponse.canLink) &&
Objects.equals(this.creator, arInvoiceOpenApiResponse.creator) &&
Objects.equals(this.drawer, arInvoiceOpenApiResponse.drawer) &&
Objects.equals(this.elcInvoiceUrl, arInvoiceOpenApiResponse.elcInvoiceUrl) &&
Objects.equals(this.gmtCreate, arInvoiceOpenApiResponse.gmtCreate) &&
Objects.equals(this.gmtModified, arInvoiceOpenApiResponse.gmtModified) &&
Objects.equals(this.instId, arInvoiceOpenApiResponse.instId) &&
Objects.equals(this.invoiceAmt, arInvoiceOpenApiResponse.invoiceAmt) &&
Objects.equals(this.invoiceChannel, arInvoiceOpenApiResponse.invoiceChannel) &&
Objects.equals(this.invoiceCode, arInvoiceOpenApiResponse.invoiceCode) &&
Objects.equals(this.invoiceDate, arInvoiceOpenApiResponse.invoiceDate) &&
Objects.equals(this.invoiceId, arInvoiceOpenApiResponse.invoiceId) &&
Objects.equals(this.invoiceMaterial, arInvoiceOpenApiResponse.invoiceMaterial) &&
Objects.equals(this.invoiceNo, arInvoiceOpenApiResponse.invoiceNo) &&
Objects.equals(this.invoiceNote, arInvoiceOpenApiResponse.invoiceNote) &&
Objects.equals(this.invoiceStatus, arInvoiceOpenApiResponse.invoiceStatus) &&
Objects.equals(this.invoiceType, arInvoiceOpenApiResponse.invoiceType) &&
Objects.equals(this.ipId, arInvoiceOpenApiResponse.ipId) &&
Objects.equals(this.ipRoleId, arInvoiceOpenApiResponse.ipRoleId) &&
Objects.equals(this.lastModer, arInvoiceOpenApiResponse.lastModer) &&
Objects.equals(this.linkedAmt, arInvoiceOpenApiResponse.linkedAmt) &&
Objects.equals(this.mailStatus, arInvoiceOpenApiResponse.mailStatus) &&
Objects.equals(this.memo, arInvoiceOpenApiResponse.memo) &&
Objects.equals(this.noBillInvoiceFlag, arInvoiceOpenApiResponse.noBillInvoiceFlag) &&
Objects.equals(this.online, arInvoiceOpenApiResponse.online) &&
Objects.equals(this.payee, arInvoiceOpenApiResponse.payee) &&
Objects.equals(this.recentMailId, arInvoiceOpenApiResponse.recentMailId) &&
Objects.equals(this.red, arInvoiceOpenApiResponse.red) &&
Objects.equals(this.redAmt, arInvoiceOpenApiResponse.redAmt) &&
Objects.equals(this.relBlueInvoices, arInvoiceOpenApiResponse.relBlueInvoices) &&
Objects.equals(this.relRedInvoices, arInvoiceOpenApiResponse.relRedInvoices) &&
Objects.equals(this.reviewer, arInvoiceOpenApiResponse.reviewer) &&
Objects.equals(this.sellerAddress, arInvoiceOpenApiResponse.sellerAddress) &&
Objects.equals(this.sellerBankAccount, arInvoiceOpenApiResponse.sellerBankAccount) &&
Objects.equals(this.sellerBankName, arInvoiceOpenApiResponse.sellerBankName) &&
Objects.equals(this.sellerCompanyName, arInvoiceOpenApiResponse.sellerCompanyName) &&
Objects.equals(this.sellerTaxNo, arInvoiceOpenApiResponse.sellerTaxNo) &&
Objects.equals(this.sellerTelephone, arInvoiceOpenApiResponse.sellerTelephone) &&
Objects.equals(this.tntInstId, arInvoiceOpenApiResponse.tntInstId)&&
Objects.equals(this.additionalProperties, arInvoiceOpenApiResponse.additionalProperties);
}
@Override
public int hashCode() {
return Objects.hash(arInvoiceLines, buyerAddress, buyerBankAccount, buyerBankName, buyerInvoiceTitle, buyerTaxNo, buyerTelephone, canLink, creator, drawer, elcInvoiceUrl, gmtCreate, gmtModified, instId, invoiceAmt, invoiceChannel, invoiceCode, invoiceDate, invoiceId, invoiceMaterial, invoiceNo, invoiceNote, invoiceStatus, invoiceType, ipId, ipRoleId, lastModer, linkedAmt, mailStatus, memo, noBillInvoiceFlag, online, payee, recentMailId, red, redAmt, relBlueInvoices, relRedInvoices, reviewer, sellerAddress, sellerBankAccount, sellerBankName, sellerCompanyName, sellerTaxNo, sellerTelephone, tntInstId, additionalProperties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArInvoiceOpenApiResponse {\n");
sb.append(" arInvoiceLines: ").append(toIndentedString(arInvoiceLines)).append("\n");
sb.append(" buyerAddress: ").append(toIndentedString(buyerAddress)).append("\n");
sb.append(" buyerBankAccount: ").append(toIndentedString(buyerBankAccount)).append("\n");
sb.append(" buyerBankName: ").append(toIndentedString(buyerBankName)).append("\n");
sb.append(" buyerInvoiceTitle: ").append(toIndentedString(buyerInvoiceTitle)).append("\n");
sb.append(" buyerTaxNo: ").append(toIndentedString(buyerTaxNo)).append("\n");
sb.append(" buyerTelephone: ").append(toIndentedString(buyerTelephone)).append("\n");
sb.append(" canLink: ").append(toIndentedString(canLink)).append("\n");
sb.append(" creator: ").append(toIndentedString(creator)).append("\n");
sb.append(" drawer: ").append(toIndentedString(drawer)).append("\n");
sb.append(" elcInvoiceUrl: ").append(toIndentedString(elcInvoiceUrl)).append("\n");
sb.append(" gmtCreate: ").append(toIndentedString(gmtCreate)).append("\n");
sb.append(" gmtModified: ").append(toIndentedString(gmtModified)).append("\n");
sb.append(" instId: ").append(toIndentedString(instId)).append("\n");
sb.append(" invoiceAmt: ").append(toIndentedString(invoiceAmt)).append("\n");
sb.append(" invoiceChannel: ").append(toIndentedString(invoiceChannel)).append("\n");
sb.append(" invoiceCode: ").append(toIndentedString(invoiceCode)).append("\n");
sb.append(" invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n");
sb.append(" invoiceId: ").append(toIndentedString(invoiceId)).append("\n");
sb.append(" invoiceMaterial: ").append(toIndentedString(invoiceMaterial)).append("\n");
sb.append(" invoiceNo: ").append(toIndentedString(invoiceNo)).append("\n");
sb.append(" invoiceNote: ").append(toIndentedString(invoiceNote)).append("\n");
sb.append(" invoiceStatus: ").append(toIndentedString(invoiceStatus)).append("\n");
sb.append(" invoiceType: ").append(toIndentedString(invoiceType)).append("\n");
sb.append(" ipId: ").append(toIndentedString(ipId)).append("\n");
sb.append(" ipRoleId: ").append(toIndentedString(ipRoleId)).append("\n");
sb.append(" lastModer: ").append(toIndentedString(lastModer)).append("\n");
sb.append(" linkedAmt: ").append(toIndentedString(linkedAmt)).append("\n");
sb.append(" mailStatus: ").append(toIndentedString(mailStatus)).append("\n");
sb.append(" memo: ").append(toIndentedString(memo)).append("\n");
sb.append(" noBillInvoiceFlag: ").append(toIndentedString(noBillInvoiceFlag)).append("\n");
sb.append(" online: ").append(toIndentedString(online)).append("\n");
sb.append(" payee: ").append(toIndentedString(payee)).append("\n");
sb.append(" recentMailId: ").append(toIndentedString(recentMailId)).append("\n");
sb.append(" red: ").append(toIndentedString(red)).append("\n");
sb.append(" redAmt: ").append(toIndentedString(redAmt)).append("\n");
sb.append(" relBlueInvoices: ").append(toIndentedString(relBlueInvoices)).append("\n");
sb.append(" relRedInvoices: ").append(toIndentedString(relRedInvoices)).append("\n");
sb.append(" reviewer: ").append(toIndentedString(reviewer)).append("\n");
sb.append(" sellerAddress: ").append(toIndentedString(sellerAddress)).append("\n");
sb.append(" sellerBankAccount: ").append(toIndentedString(sellerBankAccount)).append("\n");
sb.append(" sellerBankName: ").append(toIndentedString(sellerBankName)).append("\n");
sb.append(" sellerCompanyName: ").append(toIndentedString(sellerCompanyName)).append("\n");
sb.append(" sellerTaxNo: ").append(toIndentedString(sellerTaxNo)).append("\n");
sb.append(" sellerTelephone: ").append(toIndentedString(sellerTelephone)).append("\n");
sb.append(" tntInstId: ").append(toIndentedString(tntInstId)).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("ar_invoice_lines");
openapiFields.add("buyer_address");
openapiFields.add("buyer_bank_account");
openapiFields.add("buyer_bank_name");
openapiFields.add("buyer_invoice_title");
openapiFields.add("buyer_tax_no");
openapiFields.add("buyer_telephone");
openapiFields.add("can_link");
openapiFields.add("creator");
openapiFields.add("drawer");
openapiFields.add("elc_invoice_url");
openapiFields.add("gmt_create");
openapiFields.add("gmt_modified");
openapiFields.add("inst_id");
openapiFields.add("invoice_amt");
openapiFields.add("invoice_channel");
openapiFields.add("invoice_code");
openapiFields.add("invoice_date");
openapiFields.add("invoice_id");
openapiFields.add("invoice_material");
openapiFields.add("invoice_no");
openapiFields.add("invoice_note");
openapiFields.add("invoice_status");
openapiFields.add("invoice_type");
openapiFields.add("ip_id");
openapiFields.add("ip_role_id");
openapiFields.add("last_moder");
openapiFields.add("linked_amt");
openapiFields.add("mail_status");
openapiFields.add("memo");
openapiFields.add("no_bill_invoice_flag");
openapiFields.add("online");
openapiFields.add("payee");
openapiFields.add("recent_mail_id");
openapiFields.add("red");
openapiFields.add("red_amt");
openapiFields.add("rel_blue_invoices");
openapiFields.add("rel_red_invoices");
openapiFields.add("reviewer");
openapiFields.add("seller_address");
openapiFields.add("seller_bank_account");
openapiFields.add("seller_bank_name");
openapiFields.add("seller_company_name");
openapiFields.add("seller_tax_no");
openapiFields.add("seller_telephone");
openapiFields.add("tnt_inst_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 ArInvoiceOpenApiResponse
*/
public static void validateJsonObject(JsonObject jsonObj) throws IOException {
if (jsonObj == null) {
if (ArInvoiceOpenApiResponse.openapiRequiredFields.isEmpty()) {
return;
} else { // has required fields
throw new IllegalArgumentException(String.format("The required field(s) %s in ArInvoiceOpenApiResponse is not found in the empty JSON string", ArInvoiceOpenApiResponse.openapiRequiredFields.toString()));
}
}
JsonArray jsonArrayarInvoiceLines = jsonObj.getAsJsonArray("ar_invoice_lines");
if (jsonArrayarInvoiceLines != null) {
// ensure the json data is an array
if (!jsonObj.get("ar_invoice_lines").isJsonArray()) {
throw new IllegalArgumentException(String.format("Expected the field `ar_invoice_lines` to be an array in the JSON string but got `%s`", jsonObj.get("ar_invoice_lines").toString()));
}
// validate the optional field `ar_invoice_lines` (array)
for (int i = 0; i < jsonArrayarInvoiceLines.size(); i++) {
ArInvoiceLineOpenApiResponse.validateJsonObject(jsonArrayarInvoiceLines.get(i).getAsJsonObject());
};
}
if (jsonObj.get("buyer_address") != null && !jsonObj.get("buyer_address").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `buyer_address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_address").toString()));
}
if (jsonObj.get("buyer_bank_account") != null && !jsonObj.get("buyer_bank_account").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `buyer_bank_account` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_bank_account").toString()));
}
if (jsonObj.get("buyer_bank_name") != null && !jsonObj.get("buyer_bank_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `buyer_bank_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_bank_name").toString()));
}
if (jsonObj.get("buyer_invoice_title") != null && !jsonObj.get("buyer_invoice_title").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `buyer_invoice_title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_invoice_title").toString()));
}
if (jsonObj.get("buyer_tax_no") != null && !jsonObj.get("buyer_tax_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `buyer_tax_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_tax_no").toString()));
}
if (jsonObj.get("buyer_telephone") != null && !jsonObj.get("buyer_telephone").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `buyer_telephone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_telephone").toString()));
}
if (jsonObj.get("creator") != null && !jsonObj.get("creator").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `creator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creator").toString()));
}
if (jsonObj.get("drawer") != null && !jsonObj.get("drawer").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `drawer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("drawer").toString()));
}
if (jsonObj.get("elc_invoice_url") != null && !jsonObj.get("elc_invoice_url").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `elc_invoice_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("elc_invoice_url").toString()));
}
if (jsonObj.get("gmt_create") != null && !jsonObj.get("gmt_create").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `gmt_create` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gmt_create").toString()));
}
if (jsonObj.get("gmt_modified") != null && !jsonObj.get("gmt_modified").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `gmt_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gmt_modified").toString()));
}
if (jsonObj.get("inst_id") != null && !jsonObj.get("inst_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `inst_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inst_id").toString()));
}
// validate the optional field `invoice_amt`
if (jsonObj.getAsJsonObject("invoice_amt") != null) {
MultiCurrencyMoneyOpenApi.validateJsonObject(jsonObj.getAsJsonObject("invoice_amt"));
}
if (jsonObj.get("invoice_channel") != null && !jsonObj.get("invoice_channel").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_channel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_channel").toString()));
}
if (jsonObj.get("invoice_code") != null && !jsonObj.get("invoice_code").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_code").toString()));
}
if (jsonObj.get("invoice_date") != null && !jsonObj.get("invoice_date").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_date").toString()));
}
if (jsonObj.get("invoice_id") != null && !jsonObj.get("invoice_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_id").toString()));
}
if (jsonObj.get("invoice_material") != null && !jsonObj.get("invoice_material").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_material` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_material").toString()));
}
if (jsonObj.get("invoice_no") != null && !jsonObj.get("invoice_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_no").toString()));
}
if (jsonObj.get("invoice_note") != null && !jsonObj.get("invoice_note").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_note").toString()));
}
if (jsonObj.get("invoice_status") != null && !jsonObj.get("invoice_status").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_status").toString()));
}
if (jsonObj.get("invoice_type") != null && !jsonObj.get("invoice_type").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_type").toString()));
}
if (jsonObj.get("ip_id") != null && !jsonObj.get("ip_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `ip_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip_id").toString()));
}
if (jsonObj.get("ip_role_id") != null && !jsonObj.get("ip_role_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `ip_role_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip_role_id").toString()));
}
if (jsonObj.get("last_moder") != null && !jsonObj.get("last_moder").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `last_moder` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_moder").toString()));
}
// validate the optional field `linked_amt`
if (jsonObj.getAsJsonObject("linked_amt") != null) {
MultiCurrencyMoneyOpenApi.validateJsonObject(jsonObj.getAsJsonObject("linked_amt"));
}
if (jsonObj.get("mail_status") != null && !jsonObj.get("mail_status").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `mail_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mail_status").toString()));
}
if (jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString()));
}
if (jsonObj.get("no_bill_invoice_flag") != null && !jsonObj.get("no_bill_invoice_flag").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `no_bill_invoice_flag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("no_bill_invoice_flag").toString()));
}
if (jsonObj.get("payee") != null && !jsonObj.get("payee").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payee` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payee").toString()));
}
if (jsonObj.get("recent_mail_id") != null && !jsonObj.get("recent_mail_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `recent_mail_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recent_mail_id").toString()));
}
if (jsonObj.get("red") != null && !jsonObj.get("red").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `red` to be a primitive type in the JSON string but got `%s`", jsonObj.get("red").toString()));
}
// validate the optional field `red_amt`
if (jsonObj.getAsJsonObject("red_amt") != null) {
MultiCurrencyMoneyOpenApi.validateJsonObject(jsonObj.getAsJsonObject("red_amt"));
}
JsonArray jsonArrayrelBlueInvoices = jsonObj.getAsJsonArray("rel_blue_invoices");
if (jsonArrayrelBlueInvoices != null) {
// ensure the json data is an array
if (!jsonObj.get("rel_blue_invoices").isJsonArray()) {
throw new IllegalArgumentException(String.format("Expected the field `rel_blue_invoices` to be an array in the JSON string but got `%s`", jsonObj.get("rel_blue_invoices").toString()));
}
// validate the optional field `rel_blue_invoices` (array)
for (int i = 0; i < jsonArrayrelBlueInvoices.size(); i++) {
ArRelInvoiceOpenApiResponse.validateJsonObject(jsonArrayrelBlueInvoices.get(i).getAsJsonObject());
};
}
JsonArray jsonArrayrelRedInvoices = jsonObj.getAsJsonArray("rel_red_invoices");
if (jsonArrayrelRedInvoices != null) {
// ensure the json data is an array
if (!jsonObj.get("rel_red_invoices").isJsonArray()) {
throw new IllegalArgumentException(String.format("Expected the field `rel_red_invoices` to be an array in the JSON string but got `%s`", jsonObj.get("rel_red_invoices").toString()));
}
// validate the optional field `rel_red_invoices` (array)
for (int i = 0; i < jsonArrayrelRedInvoices.size(); i++) {
ArRelInvoiceOpenApiResponse.validateJsonObject(jsonArrayrelRedInvoices.get(i).getAsJsonObject());
};
}
if (jsonObj.get("reviewer") != null && !jsonObj.get("reviewer").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `reviewer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reviewer").toString()));
}
if (jsonObj.get("seller_address") != null && !jsonObj.get("seller_address").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `seller_address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("seller_address").toString()));
}
if (jsonObj.get("seller_bank_account") != null && !jsonObj.get("seller_bank_account").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `seller_bank_account` to be a primitive type in the JSON string but got `%s`", jsonObj.get("seller_bank_account").toString()));
}
if (jsonObj.get("seller_bank_name") != null && !jsonObj.get("seller_bank_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `seller_bank_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("seller_bank_name").toString()));
}
if (jsonObj.get("seller_company_name") != null && !jsonObj.get("seller_company_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `seller_company_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("seller_company_name").toString()));
}
if (jsonObj.get("seller_tax_no") != null && !jsonObj.get("seller_tax_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `seller_tax_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("seller_tax_no").toString()));
}
if (jsonObj.get("seller_telephone") != null && !jsonObj.get("seller_telephone").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `seller_telephone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("seller_telephone").toString()));
}
if (jsonObj.get("tnt_inst_id") != null && !jsonObj.get("tnt_inst_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `tnt_inst_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tnt_inst_id").toString()));
}
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
if (!ArInvoiceOpenApiResponse.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'ArInvoiceOpenApiResponse' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter thisAdapter
= gson.getDelegateAdapter(this, TypeToken.get(ArInvoiceOpenApiResponse.class));
return (TypeAdapter) new TypeAdapter() {
@Override
public void write(JsonWriter out, ArInvoiceOpenApiResponse 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 ArInvoiceOpenApiResponse read(JsonReader in) throws IOException {
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
validateJsonObject(jsonObj);
// store additional fields in the deserialized instance
ArInvoiceOpenApiResponse 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 ArInvoiceOpenApiResponse given an JSON string
*
* @param jsonString JSON string
* @return An instance of ArInvoiceOpenApiResponse
* @throws IOException if the JSON string is invalid with respect to ArInvoiceOpenApiResponse
*/
public static ArInvoiceOpenApiResponse fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, ArInvoiceOpenApiResponse.class);
}
/**
* Convert an instance of ArInvoiceOpenApiResponse to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}