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

org.openapitools.client.model.InvoiceItem Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
* 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.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.CustomObject;
import org.openapitools.client.model.Invoice;
import org.openapitools.client.model.LineItem;
import org.openapitools.client.model.ListCustomObjectResponse;
import org.openapitools.client.model.Subscription;
import org.openapitools.client.model.SubscriptionItem;
import org.openapitools.client.model.TaxationItemListResponse;
import org.openapitools.jackson.nullable.JsonNullable;
import org.threeten.bp.OffsetDateTime;

import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * InvoiceItem
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class InvoiceItem {
  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private String id;

  public static final String SERIALIZED_NAME_UPDATED_BY_ID = "updated_by_id";
  @SerializedName(SERIALIZED_NAME_UPDATED_BY_ID)
  private String updatedById;

  public static final String SERIALIZED_NAME_UPDATED_TIME = "updated_time";
  @SerializedName(SERIALIZED_NAME_UPDATED_TIME)
  private OffsetDateTime updatedTime;

  public static final String SERIALIZED_NAME_CREATED_BY_ID = "created_by_id";
  @SerializedName(SERIALIZED_NAME_CREATED_BY_ID)
  private String createdById;

  public static final String SERIALIZED_NAME_CREATED_TIME = "created_time";
  @SerializedName(SERIALIZED_NAME_CREATED_TIME)
  private OffsetDateTime createdTime;

  public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "custom_fields";
  @SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
  @JsonAdapter(CustomFieldAdapter.class)
  private Map customFields = null;

  public static final String SERIALIZED_NAME_CUSTOM_OBJECTS = "custom_objects";
  @SerializedName(SERIALIZED_NAME_CUSTOM_OBJECTS)
  private Map customObjects = null;

  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_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 String serviceEnd;

  public static final String SERIALIZED_NAME_ACCOUNTS_RECEIVABLE_ACCOUNT = "accounts_receivable_account";
  @SerializedName(SERIALIZED_NAME_ACCOUNTS_RECEIVABLE_ACCOUNT)
  private String accountsReceivableAccount;

  public static final String SERIALIZED_NAME_DISCOUNT_ITEM = "discount_item";
  @SerializedName(SERIALIZED_NAME_DISCOUNT_ITEM)
  private Boolean discountItem;

  public static final String SERIALIZED_NAME_APPLIED_TO_ITEM_ID = "applied_to_item_id";
  @SerializedName(SERIALIZED_NAME_APPLIED_TO_ITEM_ID)
  private String appliedToItemId;

  public static final String SERIALIZED_NAME_SERVICE_START = "service_start";
  @SerializedName(SERIALIZED_NAME_SERVICE_START)
  private String serviceStart;

  public static final String SERIALIZED_NAME_ACCOUNTING_CODE = "accounting_code";
  @SerializedName(SERIALIZED_NAME_ACCOUNTING_CODE)
  private String accountingCode;

  public static final String SERIALIZED_NAME_INVOICE_ID = "invoice_id";
  @SerializedName(SERIALIZED_NAME_INVOICE_ID)
  private String invoiceId;

  public static final String SERIALIZED_NAME_SKU = "sku";
  @SerializedName(SERIALIZED_NAME_SKU)
  private String sku;

  public static final String SERIALIZED_NAME_SUBSCRIPTION_ID = "subscription_id";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ID)
  private String subscriptionId;

  public static final String SERIALIZED_NAME_TAX_INCLUSIVE = "tax_inclusive";
  @SerializedName(SERIALIZED_NAME_TAX_INCLUSIVE)
  private Boolean taxInclusive;

  public static final String SERIALIZED_NAME_REMAINING_BALANCE = "remaining_balance";
  @SerializedName(SERIALIZED_NAME_REMAINING_BALANCE)
  private BigDecimal remainingBalance;

  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_UNIT_AMOUNT = "unit_amount";
  @SerializedName(SERIALIZED_NAME_UNIT_AMOUNT)
  private BigDecimal unitAmount;

  public static final String SERIALIZED_NAME_BOOKING_REFERENCE = "booking_reference";
  @SerializedName(SERIALIZED_NAME_BOOKING_REFERENCE)
  private String bookingReference;

  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name;

  public static final String SERIALIZED_NAME_DOCUMENT_ITEM_DATE = "document_item_date";
  @SerializedName(SERIALIZED_NAME_DOCUMENT_ITEM_DATE)
  private OffsetDateTime documentItemDate;

  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 = "tax";
  @SerializedName(SERIALIZED_NAME_TAX)
  private BigDecimal tax;

  public static final String SERIALIZED_NAME_TAX_CODE = "tax_code";
  @SerializedName(SERIALIZED_NAME_TAX_CODE)
  private String taxCode;

  public static final String SERIALIZED_NAME_SUBSCRIPTION_ITEM_ID = "subscription_item_id";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ITEM_ID)
  private String subscriptionItemId;

  public static final String SERIALIZED_NAME_TAXATION_ITEMS = "taxation_items";
  @SerializedName(SERIALIZED_NAME_TAXATION_ITEMS)
  private TaxationItemListResponse taxationItems;

  public static final String SERIALIZED_NAME_INVOICE = "invoice";
  @SerializedName(SERIALIZED_NAME_INVOICE)
  private Invoice invoice;

  public static final String SERIALIZED_NAME_LINE_ITEM = "line_item";
  @SerializedName(SERIALIZED_NAME_LINE_ITEM)
  private LineItem lineItem;

  public static final String SERIALIZED_NAME_SUBSCRIPTION = "subscription";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION)
  private Subscription subscription;

  public static final String SERIALIZED_NAME_SUBSCRIPTION_ITEM = "subscription_item";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ITEM)
  private SubscriptionItem subscriptionItem;

  public InvoiceItem() { 
  }

  
  public InvoiceItem(
     String id, 
     String updatedById, 
     OffsetDateTime updatedTime, 
     String createdById, 
     OffsetDateTime createdTime, 
     Map customObjects, 
     OffsetDateTime documentItemDate, 
     Subscription subscription
  ) {
    this();
    this.id = id;
    this.updatedById = updatedById;
    this.updatedTime = updatedTime;
    this.createdById = createdById;
    this.createdTime = createdTime;
    this.customObjects = customObjects;
    this.documentItemDate = documentItemDate;
    this.subscription = subscription;
  }

   /**
   * Unique identifier for the object.
   * @return id
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Unique identifier for the object.")

  public String getId() {
    return id;
  }




   /**
   * Unique identifier of the Zuora user who last updated the object
   * @return updatedById
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Unique identifier of the Zuora user who last updated the object")

  public String getUpdatedById() {
    return updatedById;
  }




   /**
   * The date and time when the object was last updated in ISO 8601 UTC format.
   * @return updatedTime
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The date and time when the object was last updated in ISO 8601 UTC format.")

  public OffsetDateTime getUpdatedTime() {
    return updatedTime;
  }




   /**
   * Unique identifier of the Zuora user who created the object
   * @return createdById
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Unique identifier of the Zuora user who created the object")

  public String getCreatedById() {
    return createdById;
  }




   /**
   * The date and time when the object was created in ISO 8601 UTC format.
   * @return createdTime
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The date and time when the object was created in ISO 8601 UTC format.")

  public OffsetDateTime getCreatedTime() {
    return createdTime;
  }




  public InvoiceItem customFields(Map customFields) {
    
    this.customFields = customFields;
    return this;
  }

  public InvoiceItem 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;
  }


   /**
   * The custom objects associated with a Zuora standard object.
   * @return customObjects
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The custom objects associated with a Zuora standard object.")

  public Map getCustomObjects() {
    return customObjects;
  }




  public InvoiceItem amount(BigDecimal amount) {
    
    this.amount = amount;
    return this;
  }

   /**
   * The total amount of this invoice item.
   * @return amount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The total amount of this invoice item.")

  public BigDecimal getAmount() {
    return amount;
  }


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


  public InvoiceItem 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 InvoiceItem deferredRevenueAccount(String deferredRevenueAccount) {
    
    this.deferredRevenueAccount = deferredRevenueAccount;
    return this;
  }

   /**
   * The accounting code for the deferred revenue, such as Monthly Recurring Liability.
   * @return deferredRevenueAccount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The accounting code for the deferred revenue, such as Monthly Recurring Liability.")

  public String getDeferredRevenueAccount() {
    return deferredRevenueAccount;
  }


  public void setDeferredRevenueAccount(String deferredRevenueAccount) {
    this.deferredRevenueAccount = deferredRevenueAccount;
  }


  public InvoiceItem recognizedRevenueAccount(String recognizedRevenueAccount) {
    
    this.recognizedRevenueAccount = recognizedRevenueAccount;
    return this;
  }

   /**
   * The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
   * @return recognizedRevenueAccount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.")

  public String getRecognizedRevenueAccount() {
    return recognizedRevenueAccount;
  }


  public void setRecognizedRevenueAccount(String recognizedRevenueAccount) {
    this.recognizedRevenueAccount = recognizedRevenueAccount;
  }


  public InvoiceItem 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 InvoiceItem 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 InvoiceItem serviceEnd(String serviceEnd) {
    
    this.serviceEnd = serviceEnd;
    return this;
  }

   /**
   * The end date of the service period associated with this invoice item. If the associated charge is a one-time fee, then this date is the date of that charge.
   * @return serviceEnd
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The end date of the service period associated with this invoice item. If the associated charge is a one-time fee, then this date is the date of that charge.")

  public String getServiceEnd() {
    return serviceEnd;
  }


  public void setServiceEnd(String serviceEnd) {
    this.serviceEnd = serviceEnd;
  }


  public InvoiceItem accountsReceivableAccount(String accountsReceivableAccount) {
    
    this.accountsReceivableAccount = accountsReceivableAccount;
    return this;
  }

   /**
   * An active account in your Zuora Chart of Accounts.
   * @return accountsReceivableAccount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "An active account in your Zuora Chart of Accounts.")

  public String getAccountsReceivableAccount() {
    return accountsReceivableAccount;
  }


  public void setAccountsReceivableAccount(String accountsReceivableAccount) {
    this.accountsReceivableAccount = accountsReceivableAccount;
  }


  public InvoiceItem discountItem(Boolean discountItem) {
    
    this.discountItem = discountItem;
    return this;
  }

   /**
   * If true, indicates that the item is a discount item.
   * @return discountItem
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If true, indicates that the item is a discount item.")

  public Boolean getDiscountItem() {
    return discountItem;
  }


  public void setDiscountItem(Boolean discountItem) {
    this.discountItem = discountItem;
  }


  public InvoiceItem appliedToItemId(String appliedToItemId) {
    
    this.appliedToItemId = appliedToItemId;
    return this;
  }

   /**
   * Identifier of an invoice item or a debit memo item that this discount item or credit memo item is applied to.
   * @return appliedToItemId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Identifier of an invoice item or a debit memo item that this discount item or credit memo item is applied to.")

  public String getAppliedToItemId() {
    return appliedToItemId;
  }


  public void setAppliedToItemId(String appliedToItemId) {
    this.appliedToItemId = appliedToItemId;
  }


  public InvoiceItem serviceStart(String serviceStart) {
    
    this.serviceStart = serviceStart;
    return this;
  }

   /**
   * The start date of the service period associated with this invoice item. If the associated charge is a one-time fee, then this date is the date of that charge.
   * @return serviceStart
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The start date of the service period associated with this invoice item. If the associated charge is a one-time fee, then this date is the date of that charge.")

  public String getServiceStart() {
    return serviceStart;
  }


  public void setServiceStart(String serviceStart) {
    this.serviceStart = serviceStart;
  }


  public InvoiceItem accountingCode(String accountingCode) {
    
    this.accountingCode = accountingCode;
    return this;
  }

   /**
   * Get accountingCode
   * @return accountingCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getAccountingCode() {
    return accountingCode;
  }


  public void setAccountingCode(String accountingCode) {
    this.accountingCode = accountingCode;
  }


  public InvoiceItem invoiceId(String invoiceId) {
    
    this.invoiceId = invoiceId;
    return this;
  }

   /**
   * The identifier of the invoice associated with this invoice item.
   * @return invoiceId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier of the invoice associated with this invoice item.")

  public String getInvoiceId() {
    return invoiceId;
  }


  public void setInvoiceId(String invoiceId) {
    this.invoiceId = invoiceId;
  }


  public InvoiceItem 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 InvoiceItem subscriptionId(String subscriptionId) {
    
    this.subscriptionId = subscriptionId;
    return this;
  }

   /**
   * The identifier of the subscription associated with the invoice item.
   * @return subscriptionId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier of the subscription associated with the invoice item.")

  public String getSubscriptionId() {
    return subscriptionId;
  }


  public void setSubscriptionId(String subscriptionId) {
    this.subscriptionId = subscriptionId;
  }


  public InvoiceItem taxInclusive(Boolean taxInclusive) {
    
    this.taxInclusive = taxInclusive;
    return this;
  }

   /**
   * This specifies if the invoice item amount is inclusive or exclusive of tax.
   * @return taxInclusive
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "This specifies if the invoice item amount is inclusive or exclusive of tax.")

  public Boolean getTaxInclusive() {
    return taxInclusive;
  }


  public void setTaxInclusive(Boolean taxInclusive) {
    this.taxInclusive = taxInclusive;
  }


  public InvoiceItem remainingBalance(BigDecimal remainingBalance) {
    
    this.remainingBalance = remainingBalance;
    return this;
  }

   /**
   * The remaining balance of this invoice item.
   * @return remainingBalance
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The remaining balance of this invoice item.")

  public BigDecimal getRemainingBalance() {
    return remainingBalance;
  }


  public void setRemainingBalance(BigDecimal remainingBalance) {
    this.remainingBalance = remainingBalance;
  }


  public InvoiceItem 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 InvoiceItem unitAmount(BigDecimal unitAmount) {
    
    this.unitAmount = unitAmount;
    return this;
  }

   /**
   * Unit amount (in the currency specified) of the invoice item.
   * @return unitAmount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Unit amount (in the currency specified) of the invoice item.")

  public BigDecimal getUnitAmount() {
    return unitAmount;
  }


  public void setUnitAmount(BigDecimal unitAmount) {
    this.unitAmount = unitAmount;
  }


  public InvoiceItem bookingReference(String bookingReference) {
    
    this.bookingReference = bookingReference;
    return this;
  }

   /**
   * The booking reference for this invoice item.
   * @return bookingReference
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The booking reference for this invoice item.")

  public String getBookingReference() {
    return bookingReference;
  }


  public void setBookingReference(String bookingReference) {
    this.bookingReference = bookingReference;
  }


  public InvoiceItem name(String name) {
    
    this.name = name;
    return this;
  }

   /**
   * Name of the invoice item displayed to customers on billing documents.
   * @return name
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Name of the invoice item displayed to customers on billing documents.")

  public String getName() {
    return name;
  }


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


   /**
   * The date and time when the invoice item was created in ISO 8601 UTC format.
   * @return documentItemDate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The date and time when the invoice item was created in ISO 8601 UTC format.")

  public OffsetDateTime getDocumentItemDate() {
    return documentItemDate;
  }




  public InvoiceItem priceId(String priceId) {
    
    this.priceId = priceId;
    return this;
  }

   /**
   * The identifier of the price this invoice item is associated with.
   * @return priceId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier of the price this invoice item is associated with.")

  public String getPriceId() {
    return priceId;
  }


  public void setPriceId(String priceId) {
    this.priceId = priceId;
  }


  public InvoiceItem purchaseOrderNumber(String purchaseOrderNumber) {
    
    this.purchaseOrderNumber = purchaseOrderNumber;
    return this;
  }

   /**
   * The purchase order number associated with this invoice item.
   * @return purchaseOrderNumber
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The purchase order number associated with this invoice item.")

  public String getPurchaseOrderNumber() {
    return purchaseOrderNumber;
  }


  public void setPurchaseOrderNumber(String purchaseOrderNumber) {
    this.purchaseOrderNumber = purchaseOrderNumber;
  }


  public InvoiceItem tax(BigDecimal tax) {
    
    this.tax = tax;
    return this;
  }

   /**
   * The amount of tax applied to the invoice item.
   * @return tax
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The amount of tax applied to the invoice item.")

  public BigDecimal getTax() {
    return tax;
  }


  public void setTax(BigDecimal tax) {
    this.tax = tax;
  }


  public InvoiceItem 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 InvoiceItem subscriptionItemId(String subscriptionItemId) {
    
    this.subscriptionItemId = subscriptionItemId;
    return this;
  }

   /**
   * The identifier the subscription item associated with this invoice item.
   * @return subscriptionItemId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier the subscription item associated with this invoice item.")

  public String getSubscriptionItemId() {
    return subscriptionItemId;
  }


  public void setSubscriptionItemId(String subscriptionItemId) {
    this.subscriptionItemId = subscriptionItemId;
  }


  public InvoiceItem taxationItems(TaxationItemListResponse taxationItems) {
    
    this.taxationItems = taxationItems;
    return this;
  }

   /**
   * Get taxationItems
   * @return taxationItems
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public TaxationItemListResponse getTaxationItems() {
    return taxationItems;
  }


  public void setTaxationItems(TaxationItemListResponse taxationItems) {
    this.taxationItems = taxationItems;
  }


  public InvoiceItem invoice(Invoice invoice) {
    
    this.invoice = invoice;
    return this;
  }

   /**
   * The invoice the item belongs to. EXPANDABLE
   * @return invoice
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The invoice the item belongs to. EXPANDABLE")

  public Invoice getInvoice() {
    return invoice;
  }


  public void setInvoice(Invoice invoice) {
    this.invoice = invoice;
  }


  public InvoiceItem lineItem(LineItem lineItem) {
    
    this.lineItem = lineItem;
    return this;
  }

   /**
   * The order line item associated with this invoice item. EXPANDABLE
   * @return lineItem
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The order line item associated with this invoice item. EXPANDABLE")

  public LineItem getLineItem() {
    return lineItem;
  }


  public void setLineItem(LineItem lineItem) {
    this.lineItem = lineItem;
  }


   /**
   * List of customer subscriptions.
   * @return subscription
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "List of customer subscriptions.")

  public Subscription getSubscription() {
    return subscription;
  }




  public InvoiceItem subscriptionItem(SubscriptionItem subscriptionItem) {
    
    this.subscriptionItem = subscriptionItem;
    return this;
  }

   /**
   * The expandable subscription item associated with this billing document item.
   * @return subscriptionItem
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The expandable subscription item associated with this billing document item.")

  public SubscriptionItem getSubscriptionItem() {
    return subscriptionItem;
  }


  public void setSubscriptionItem(SubscriptionItem subscriptionItem) {
    this.subscriptionItem = subscriptionItem;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    InvoiceItem invoiceItem = (InvoiceItem) o;
    return Objects.equals(this.id, invoiceItem.id) &&
        Objects.equals(this.updatedById, invoiceItem.updatedById) &&
        Objects.equals(this.updatedTime, invoiceItem.updatedTime) &&
        Objects.equals(this.createdById, invoiceItem.createdById) &&
        Objects.equals(this.createdTime, invoiceItem.createdTime) &&
        Objects.equals(this.customFields, invoiceItem.customFields) &&
        Objects.equals(this.customObjects, invoiceItem.customObjects) &&
        Objects.equals(this.amount, invoiceItem.amount) &&
        Objects.equals(this.description, invoiceItem.description) &&
        Objects.equals(this.deferredRevenueAccount, invoiceItem.deferredRevenueAccount) &&
        Objects.equals(this.recognizedRevenueAccount, invoiceItem.recognizedRevenueAccount) &&
        Objects.equals(this.revenueRecognitionRuleName, invoiceItem.revenueRecognitionRuleName) &&
        Objects.equals(this.quantity, invoiceItem.quantity) &&
        Objects.equals(this.serviceEnd, invoiceItem.serviceEnd) &&
        Objects.equals(this.accountsReceivableAccount, invoiceItem.accountsReceivableAccount) &&
        Objects.equals(this.discountItem, invoiceItem.discountItem) &&
        Objects.equals(this.appliedToItemId, invoiceItem.appliedToItemId) &&
        Objects.equals(this.serviceStart, invoiceItem.serviceStart) &&
        Objects.equals(this.accountingCode, invoiceItem.accountingCode) &&
        Objects.equals(this.invoiceId, invoiceItem.invoiceId) &&
        Objects.equals(this.sku, invoiceItem.sku) &&
        Objects.equals(this.subscriptionId, invoiceItem.subscriptionId) &&
        Objects.equals(this.taxInclusive, invoiceItem.taxInclusive) &&
        Objects.equals(this.remainingBalance, invoiceItem.remainingBalance) &&
        Objects.equals(this.unitOfMeasure, invoiceItem.unitOfMeasure) &&
        Objects.equals(this.unitAmount, invoiceItem.unitAmount) &&
        Objects.equals(this.bookingReference, invoiceItem.bookingReference) &&
        Objects.equals(this.name, invoiceItem.name) &&
        Objects.equals(this.documentItemDate, invoiceItem.documentItemDate) &&
        Objects.equals(this.priceId, invoiceItem.priceId) &&
        Objects.equals(this.purchaseOrderNumber, invoiceItem.purchaseOrderNumber) &&
        Objects.equals(this.tax, invoiceItem.tax) &&
        Objects.equals(this.taxCode, invoiceItem.taxCode) &&
        Objects.equals(this.subscriptionItemId, invoiceItem.subscriptionItemId) &&
        Objects.equals(this.taxationItems, invoiceItem.taxationItems) &&
        Objects.equals(this.invoice, invoiceItem.invoice) &&
        Objects.equals(this.lineItem, invoiceItem.lineItem) &&
        Objects.equals(this.subscription, invoiceItem.subscription) &&
        Objects.equals(this.subscriptionItem, invoiceItem.subscriptionItem);
  }

  private static  boolean equalsNullable(JsonNullable a, JsonNullable b) {
    return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, updatedById, updatedTime, createdById, createdTime, customFields, customObjects, amount, description, deferredRevenueAccount, recognizedRevenueAccount, revenueRecognitionRuleName, quantity, serviceEnd, accountsReceivableAccount, discountItem, appliedToItemId, serviceStart, accountingCode, invoiceId, sku, subscriptionId, taxInclusive, remainingBalance, unitOfMeasure, unitAmount, bookingReference, name, documentItemDate, priceId, purchaseOrderNumber, tax, taxCode, subscriptionItemId, taxationItems, invoice, lineItem, subscription, subscriptionItem);
  }

  private static  int hashCodeNullable(JsonNullable a) {
    if (a == null) {
      return 1;
    }
    return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class InvoiceItem {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    updatedById: ").append(toIndentedString(updatedById)).append("\n");
    sb.append("    updatedTime: ").append(toIndentedString(updatedTime)).append("\n");
    sb.append("    createdById: ").append(toIndentedString(createdById)).append("\n");
    sb.append("    createdTime: ").append(toIndentedString(createdTime)).append("\n");
    sb.append("    customFields: ").append(toIndentedString(customFields)).append("\n");
    sb.append("    customObjects: ").append(toIndentedString(customObjects)).append("\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("    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("    accountsReceivableAccount: ").append(toIndentedString(accountsReceivableAccount)).append("\n");
    sb.append("    discountItem: ").append(toIndentedString(discountItem)).append("\n");
    sb.append("    appliedToItemId: ").append(toIndentedString(appliedToItemId)).append("\n");
    sb.append("    serviceStart: ").append(toIndentedString(serviceStart)).append("\n");
    sb.append("    accountingCode: ").append(toIndentedString(accountingCode)).append("\n");
    sb.append("    invoiceId: ").append(toIndentedString(invoiceId)).append("\n");
    sb.append("    sku: ").append(toIndentedString(sku)).append("\n");
    sb.append("    subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n");
    sb.append("    taxInclusive: ").append(toIndentedString(taxInclusive)).append("\n");
    sb.append("    remainingBalance: ").append(toIndentedString(remainingBalance)).append("\n");
    sb.append("    unitOfMeasure: ").append(toIndentedString(unitOfMeasure)).append("\n");
    sb.append("    unitAmount: ").append(toIndentedString(unitAmount)).append("\n");
    sb.append("    bookingReference: ").append(toIndentedString(bookingReference)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    documentItemDate: ").append(toIndentedString(documentItemDate)).append("\n");
    sb.append("    priceId: ").append(toIndentedString(priceId)).append("\n");
    sb.append("    purchaseOrderNumber: ").append(toIndentedString(purchaseOrderNumber)).append("\n");
    sb.append("    tax: ").append(toIndentedString(tax)).append("\n");
    sb.append("    taxCode: ").append(toIndentedString(taxCode)).append("\n");
    sb.append("    subscriptionItemId: ").append(toIndentedString(subscriptionItemId)).append("\n");
    sb.append("    taxationItems: ").append(toIndentedString(taxationItems)).append("\n");
    sb.append("    invoice: ").append(toIndentedString(invoice)).append("\n");
    sb.append("    lineItem: ").append(toIndentedString(lineItem)).append("\n");
    sb.append("    subscription: ").append(toIndentedString(subscription)).append("\n");
    sb.append("    subscriptionItem: ").append(toIndentedString(subscriptionItem)).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