org.openapitools.client.model.CreditMemoItemCreateRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zuora-sdk-java Show documentation
Show all versions of zuora-sdk-java Show documentation
The SDK of JAVA language for Zuora pricing system
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/
package org.openapitools.client.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 java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.TaxationItemCreateRequest;
import org.threeten.bp.LocalDate;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* CreditMemoItemCreateRequest
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class CreditMemoItemCreateRequest {
public static final String SERIALIZED_NAME_AMOUNT = "amount";
@SerializedName(SERIALIZED_NAME_AMOUNT)
private BigDecimal amount;
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description;
public static final String SERIALIZED_NAME_DEFERRED_REVENUE_ACCOUNT = "deferred_revenue_account";
@SerializedName(SERIALIZED_NAME_DEFERRED_REVENUE_ACCOUNT)
private String deferredRevenueAccount;
public static final String SERIALIZED_NAME_ON_ACCOUNT_ACCOUNT = "on_account_account";
@SerializedName(SERIALIZED_NAME_ON_ACCOUNT_ACCOUNT)
private String onAccountAccount;
public static final String SERIALIZED_NAME_RECOGNIZED_REVENUE_ACCOUNT = "recognized_revenue_account";
@SerializedName(SERIALIZED_NAME_RECOGNIZED_REVENUE_ACCOUNT)
private String recognizedRevenueAccount;
public static final String SERIALIZED_NAME_REVENUE_RECOGNITION_RULE_NAME = "revenue_recognition_rule_name";
@SerializedName(SERIALIZED_NAME_REVENUE_RECOGNITION_RULE_NAME)
private String revenueRecognitionRuleName;
public static final String SERIALIZED_NAME_QUANTITY = "quantity";
@SerializedName(SERIALIZED_NAME_QUANTITY)
private BigDecimal quantity;
public static final String SERIALIZED_NAME_SERVICE_END = "service_end";
@SerializedName(SERIALIZED_NAME_SERVICE_END)
private LocalDate serviceEnd;
public static final String SERIALIZED_NAME_SERVICE_START = "service_start";
@SerializedName(SERIALIZED_NAME_SERVICE_START)
private LocalDate serviceStart;
public static final String SERIALIZED_NAME_SKU = "sku";
@SerializedName(SERIALIZED_NAME_SKU)
private String sku;
public static final String SERIALIZED_NAME_TAX_INCLUSIVE = "tax_inclusive";
@SerializedName(SERIALIZED_NAME_TAX_INCLUSIVE)
private Boolean taxInclusive;
public static final String SERIALIZED_NAME_UNIT_OF_MEASURE = "unit_of_measure";
@SerializedName(SERIALIZED_NAME_UNIT_OF_MEASURE)
private String unitOfMeasure;
public static final String SERIALIZED_NAME_TAXATION_ITEMS = "taxation_items";
@SerializedName(SERIALIZED_NAME_TAXATION_ITEMS)
private List taxationItems = null;
public static final String SERIALIZED_NAME_UNIT_AMOUNT = "unit_amount";
@SerializedName(SERIALIZED_NAME_UNIT_AMOUNT)
private BigDecimal unitAmount;
public static final String SERIALIZED_NAME_PRICE_ID = "price_id";
@SerializedName(SERIALIZED_NAME_PRICE_ID)
private String priceId;
public static final String SERIALIZED_NAME_PURCHASE_ORDER_NUMBER = "purchase_order_number";
@SerializedName(SERIALIZED_NAME_PURCHASE_ORDER_NUMBER)
private String purchaseOrderNumber;
public static final String SERIALIZED_NAME_TAX_CODE = "tax_code";
@SerializedName(SERIALIZED_NAME_TAX_CODE)
private String taxCode;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public static final String SERIALIZED_NAME_INVOICE_ITEM_ID = "invoice_item_id";
@SerializedName(SERIALIZED_NAME_INVOICE_ITEM_ID)
private String invoiceItemId;
public static final String SERIALIZED_NAME_ACCOUNTING_CODE = "accounting_code";
@SerializedName(SERIALIZED_NAME_ACCOUNTING_CODE)
private String accountingCode;
public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "custom_fields";
@SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
@JsonAdapter(CustomFieldAdapter.class)
private Map customFields = null;
public CreditMemoItemCreateRequest() {
}
public CreditMemoItemCreateRequest amount(BigDecimal amount) {
this.amount = amount;
return this;
}
/**
* Amount of the credit memo item. This should always be equal to unit_amount * quantity. Required when creating credit memos from an invoice.
* @return amount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Amount of the credit memo item. This should always be equal to unit_amount * quantity. Required when creating credit memos from an invoice.")
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public CreditMemoItemCreateRequest description(String description) {
this.description = description;
return this;
}
/**
* An arbitrary string associated with the object. Often useful for displaying to users.
* @return description
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "An arbitrary string associated with the object. Often useful for displaying to users.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public CreditMemoItemCreateRequest deferredRevenueAccount(String deferredRevenueAccount) {
this.deferredRevenueAccount = deferredRevenueAccount;
return this;
}
/**
* An active account in your Zuora Chart of Accounts.
* @return deferredRevenueAccount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "An active account in your Zuora Chart of Accounts.")
public String getDeferredRevenueAccount() {
return deferredRevenueAccount;
}
public void setDeferredRevenueAccount(String deferredRevenueAccount) {
this.deferredRevenueAccount = deferredRevenueAccount;
}
public CreditMemoItemCreateRequest onAccountAccount(String onAccountAccount) {
this.onAccountAccount = onAccountAccount;
return this;
}
/**
* An active account in your Zuora Chart of Accounts.
* @return onAccountAccount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "An active account in your Zuora Chart of Accounts.")
public String getOnAccountAccount() {
return onAccountAccount;
}
public void setOnAccountAccount(String onAccountAccount) {
this.onAccountAccount = onAccountAccount;
}
public CreditMemoItemCreateRequest recognizedRevenueAccount(String recognizedRevenueAccount) {
this.recognizedRevenueAccount = recognizedRevenueAccount;
return this;
}
/**
* An active account in your Zuora Chart of Accounts.
* @return recognizedRevenueAccount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "An active account in your Zuora Chart of Accounts.")
public String getRecognizedRevenueAccount() {
return recognizedRevenueAccount;
}
public void setRecognizedRevenueAccount(String recognizedRevenueAccount) {
this.recognizedRevenueAccount = recognizedRevenueAccount;
}
public CreditMemoItemCreateRequest revenueRecognitionRuleName(String revenueRecognitionRuleName) {
this.revenueRecognitionRuleName = revenueRecognitionRuleName;
return this;
}
/**
* The name of the revenue recognition rule governing the revenue schedule.
* @return revenueRecognitionRuleName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The name of the revenue recognition rule governing the revenue schedule.")
public String getRevenueRecognitionRuleName() {
return revenueRecognitionRuleName;
}
public void setRevenueRecognitionRuleName(String revenueRecognitionRuleName) {
this.revenueRecognitionRuleName = revenueRecognitionRuleName;
}
public CreditMemoItemCreateRequest quantity(BigDecimal quantity) {
this.quantity = quantity;
return this;
}
/**
* The number of units of this item.
* @return quantity
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The number of units of this item.")
public BigDecimal getQuantity() {
return quantity;
}
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
public CreditMemoItemCreateRequest serviceEnd(LocalDate serviceEnd) {
this.serviceEnd = serviceEnd;
return this;
}
/**
* The end date of the service period associated with this credit memo item. If the price for the associated subscription item is a one-time fee, then this date is the date of that subscription item.
* @return serviceEnd
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "Sat Jan 01 00:00:00 GMT 2022", value = "The end date of the service period associated with this credit memo item. If the price for the associated subscription item is a one-time fee, then this date is the date of that subscription item.")
public LocalDate getServiceEnd() {
return serviceEnd;
}
public void setServiceEnd(LocalDate serviceEnd) {
this.serviceEnd = serviceEnd;
}
public CreditMemoItemCreateRequest serviceStart(LocalDate serviceStart) {
this.serviceStart = serviceStart;
return this;
}
/**
* The start date of the service period associated with this credit memo item. If the price for the associated subscription item is a one-time fee, then this date is the date of that subscription item.
* @return serviceStart
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "Sat Jan 01 00:00:00 GMT 2022", required = true, value = "The start date of the service period associated with this credit memo item. If the price for the associated subscription item is a one-time fee, then this date is the date of that subscription item.")
public LocalDate getServiceStart() {
return serviceStart;
}
public void setServiceStart(LocalDate serviceStart) {
this.serviceStart = serviceStart;
}
public CreditMemoItemCreateRequest sku(String sku) {
this.sku = sku;
return this;
}
/**
* The unique SKU (stock keeping unit) of the product associated with this item.
* @return sku
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The unique SKU (stock keeping unit) of the product associated with this item.")
public String getSku() {
return sku;
}
public void setSku(String sku) {
this.sku = sku;
}
public CreditMemoItemCreateRequest taxInclusive(Boolean taxInclusive) {
this.taxInclusive = taxInclusive;
return this;
}
/**
* Indicates whether the credit memo item amount is inclusive or exclusive of tax.
* @return taxInclusive
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Indicates whether the credit memo item amount is inclusive or exclusive of tax.")
public Boolean getTaxInclusive() {
return taxInclusive;
}
public void setTaxInclusive(Boolean taxInclusive) {
this.taxInclusive = taxInclusive;
}
public CreditMemoItemCreateRequest unitOfMeasure(String unitOfMeasure) {
this.unitOfMeasure = unitOfMeasure;
return this;
}
/**
* Specifies the units used to measure usage.
* @return unitOfMeasure
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Specifies the units used to measure usage.")
public String getUnitOfMeasure() {
return unitOfMeasure;
}
public void setUnitOfMeasure(String unitOfMeasure) {
this.unitOfMeasure = unitOfMeasure;
}
public CreditMemoItemCreateRequest taxationItems(List taxationItems) {
this.taxationItems = taxationItems;
return this;
}
public CreditMemoItemCreateRequest addTaxationItemsItem(TaxationItemCreateRequest taxationItemsItem) {
if (this.taxationItems == null) {
this.taxationItems = new ArrayList();
}
this.taxationItems.add(taxationItemsItem);
return this;
}
/**
* List of taxation items.
* @return taxationItems
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "List of taxation items.")
public List getTaxationItems() {
return taxationItems;
}
public void setTaxationItems(List taxationItems) {
this.taxationItems = taxationItems;
}
public CreditMemoItemCreateRequest unitAmount(BigDecimal unitAmount) {
this.unitAmount = unitAmount;
return this;
}
/**
* Unit amount of the credit memo item.
* @return unitAmount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Unit amount of the credit memo item.")
public BigDecimal getUnitAmount() {
return unitAmount;
}
public void setUnitAmount(BigDecimal unitAmount) {
this.unitAmount = unitAmount;
}
public CreditMemoItemCreateRequest priceId(String priceId) {
this.priceId = priceId;
return this;
}
/**
* The identifier of the price this credit memo item is associated with. Required when creating credit memos from a price(charge in the v1 API).
* @return priceId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The identifier of the price this credit memo item is associated with. Required when creating credit memos from a price(charge in the v1 API).")
public String getPriceId() {
return priceId;
}
public void setPriceId(String priceId) {
this.priceId = priceId;
}
public CreditMemoItemCreateRequest purchaseOrderNumber(String purchaseOrderNumber) {
this.purchaseOrderNumber = purchaseOrderNumber;
return this;
}
/**
* The purchase order number associated with this billing document item.
* @return purchaseOrderNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The purchase order number associated with this billing document item.")
public String getPurchaseOrderNumber() {
return purchaseOrderNumber;
}
public void setPurchaseOrderNumber(String purchaseOrderNumber) {
this.purchaseOrderNumber = purchaseOrderNumber;
}
public CreditMemoItemCreateRequest taxCode(String taxCode) {
this.taxCode = taxCode;
return this;
}
/**
* The designated tax code.
* @return taxCode
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The designated tax code.")
public String getTaxCode() {
return taxCode;
}
public void setTaxCode(String taxCode) {
this.taxCode = taxCode;
}
public CreditMemoItemCreateRequest name(String name) {
this.name = name;
return this;
}
/**
* Name of the billing document item displayed to customers on the billing document. **Required when creating credit memos from an invoice**
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Name of the billing document item displayed to customers on the billing document. **Required when creating credit memos from an invoice**")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CreditMemoItemCreateRequest invoiceItemId(String invoiceItemId) {
this.invoiceItemId = invoiceItemId;
return this;
}
/**
* The identifier of the invoice item associated with this credit memo item. **Required when creating credit memos from an invoice.**
* @return invoiceItemId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The identifier of the invoice item associated with this credit memo item. **Required when creating credit memos from an invoice.**")
public String getInvoiceItemId() {
return invoiceItemId;
}
public void setInvoiceItemId(String invoiceItemId) {
this.invoiceItemId = invoiceItemId;
}
public CreditMemoItemCreateRequest accountingCode(String accountingCode) {
this.accountingCode = accountingCode;
return this;
}
/**
* An active account in your Zuora Chart of Accounts.
* @return accountingCode
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "An active account in your Zuora Chart of Accounts.")
public String getAccountingCode() {
return accountingCode;
}
public void setAccountingCode(String accountingCode) {
this.accountingCode = accountingCode;
}
public CreditMemoItemCreateRequest customFields(Map customFields) {
this.customFields = customFields;
return this;
}
public CreditMemoItemCreateRequest putCustomFieldsItem(String key, String customFieldsItem) {
if (this.customFields == null) {
this.customFields = new HashMap();
}
this.customFields.put(key, customFieldsItem);
return this;
}
/**
* Set of user-defined fields associated with this object. Useful for storing additional information about the object in a structured format.
* @return customFields
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Set of user-defined fields associated with this object. Useful for storing additional information about the object in a structured format.")
public Map getCustomFields() {
return customFields;
}
public void setCustomFields(Map customFields) {
this.customFields = customFields;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreditMemoItemCreateRequest creditMemoItemCreateRequest = (CreditMemoItemCreateRequest) o;
return Objects.equals(this.amount, creditMemoItemCreateRequest.amount) &&
Objects.equals(this.description, creditMemoItemCreateRequest.description) &&
Objects.equals(this.deferredRevenueAccount, creditMemoItemCreateRequest.deferredRevenueAccount) &&
Objects.equals(this.onAccountAccount, creditMemoItemCreateRequest.onAccountAccount) &&
Objects.equals(this.recognizedRevenueAccount, creditMemoItemCreateRequest.recognizedRevenueAccount) &&
Objects.equals(this.revenueRecognitionRuleName, creditMemoItemCreateRequest.revenueRecognitionRuleName) &&
Objects.equals(this.quantity, creditMemoItemCreateRequest.quantity) &&
Objects.equals(this.serviceEnd, creditMemoItemCreateRequest.serviceEnd) &&
Objects.equals(this.serviceStart, creditMemoItemCreateRequest.serviceStart) &&
Objects.equals(this.sku, creditMemoItemCreateRequest.sku) &&
Objects.equals(this.taxInclusive, creditMemoItemCreateRequest.taxInclusive) &&
Objects.equals(this.unitOfMeasure, creditMemoItemCreateRequest.unitOfMeasure) &&
Objects.equals(this.taxationItems, creditMemoItemCreateRequest.taxationItems) &&
Objects.equals(this.unitAmount, creditMemoItemCreateRequest.unitAmount) &&
Objects.equals(this.priceId, creditMemoItemCreateRequest.priceId) &&
Objects.equals(this.purchaseOrderNumber, creditMemoItemCreateRequest.purchaseOrderNumber) &&
Objects.equals(this.taxCode, creditMemoItemCreateRequest.taxCode) &&
Objects.equals(this.name, creditMemoItemCreateRequest.name) &&
Objects.equals(this.invoiceItemId, creditMemoItemCreateRequest.invoiceItemId) &&
Objects.equals(this.accountingCode, creditMemoItemCreateRequest.accountingCode) &&
Objects.equals(this.customFields, creditMemoItemCreateRequest.customFields);
}
@Override
public int hashCode() {
return Objects.hash(amount, description, deferredRevenueAccount, onAccountAccount, recognizedRevenueAccount, revenueRecognitionRuleName, quantity, serviceEnd, serviceStart, sku, taxInclusive, unitOfMeasure, taxationItems, unitAmount, priceId, purchaseOrderNumber, taxCode, name, invoiceItemId, accountingCode, customFields);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreditMemoItemCreateRequest {\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" deferredRevenueAccount: ").append(toIndentedString(deferredRevenueAccount)).append("\n");
sb.append(" onAccountAccount: ").append(toIndentedString(onAccountAccount)).append("\n");
sb.append(" recognizedRevenueAccount: ").append(toIndentedString(recognizedRevenueAccount)).append("\n");
sb.append(" revenueRecognitionRuleName: ").append(toIndentedString(revenueRecognitionRuleName)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" serviceEnd: ").append(toIndentedString(serviceEnd)).append("\n");
sb.append(" serviceStart: ").append(toIndentedString(serviceStart)).append("\n");
sb.append(" sku: ").append(toIndentedString(sku)).append("\n");
sb.append(" taxInclusive: ").append(toIndentedString(taxInclusive)).append("\n");
sb.append(" unitOfMeasure: ").append(toIndentedString(unitOfMeasure)).append("\n");
sb.append(" taxationItems: ").append(toIndentedString(taxationItems)).append("\n");
sb.append(" unitAmount: ").append(toIndentedString(unitAmount)).append("\n");
sb.append(" priceId: ").append(toIndentedString(priceId)).append("\n");
sb.append(" purchaseOrderNumber: ").append(toIndentedString(purchaseOrderNumber)).append("\n");
sb.append(" taxCode: ").append(toIndentedString(taxCode)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" invoiceItemId: ").append(toIndentedString(invoiceItemId)).append("\n");
sb.append(" accountingCode: ").append(toIndentedString(accountingCode)).append("\n");
sb.append(" customFields: ").append(toIndentedString(customFields)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy