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

org.openapitools.client.model.TaxationItemCreateRequest 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 org.threeten.bp.LocalDate;

import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * TaxationItemCreateRequest
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class TaxationItemCreateRequest {
  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_AMOUNT_EXEMPT = "amount_exempt";
  @SerializedName(SERIALIZED_NAME_AMOUNT_EXEMPT)
  private BigDecimal amountExempt;

  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_JURISDICTION = "jurisdiction";
  @SerializedName(SERIALIZED_NAME_JURISDICTION)
  private String jurisdiction;

  public static final String SERIALIZED_NAME_LOCATION_CODE = "location_code";
  @SerializedName(SERIALIZED_NAME_LOCATION_CODE)
  private String locationCode;

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

  public static final String SERIALIZED_NAME_AMOUNT = "amount";
  @SerializedName(SERIALIZED_NAME_AMOUNT)
  private BigDecimal amount;

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

  public static final String SERIALIZED_NAME_TAX_CODE_NAME = "tax_code_name";
  @SerializedName(SERIALIZED_NAME_TAX_CODE_NAME)
  private String taxCodeName;

  public static final String SERIALIZED_NAME_TAX_DATE = "tax_date";
  @SerializedName(SERIALIZED_NAME_TAX_DATE)
  private LocalDate taxDate;

  public static final String SERIALIZED_NAME_TAX_RATE = "tax_rate";
  @SerializedName(SERIALIZED_NAME_TAX_RATE)
  private BigDecimal taxRate;

  public static final String SERIALIZED_NAME_TAX_RATE_NAME = "tax_rate_name";
  @SerializedName(SERIALIZED_NAME_TAX_RATE_NAME)
  private String taxRateName;

  /**
   * Indicates whether the tax rate is an amount or a percentage.
   */
  @JsonAdapter(TaxRateTypeEnum.Adapter.class)
  public enum TaxRateTypeEnum {
    PERCENT("percent"),
    
    AMOUNT("amount"),
    
    UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

    private String value;

    TaxRateTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static TaxRateTypeEnum fromValue(String value) {
      for (TaxRateTypeEnum b : TaxRateTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final TaxRateTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public TaxRateTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return TaxRateTypeEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_TAX_RATE_TYPE = "tax_rate_type";
  @SerializedName(SERIALIZED_NAME_TAX_RATE_TYPE)
  private TaxRateTypeEnum taxRateType;

  public static final String SERIALIZED_NAME_SOURCE_TAX_ITEM_ID = "source_tax_item_id";
  @SerializedName(SERIALIZED_NAME_SOURCE_TAX_ITEM_ID)
  private String sourceTaxItemId;

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

  public TaxationItemCreateRequest() { 
  }

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

   /**
   * The calculated tax amount excluded due to the exemption.
   * @return amountExempt
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The calculated tax amount excluded due to the exemption.")

  public BigDecimal getAmountExempt() {
    return amountExempt;
  }


  public void setAmountExempt(BigDecimal amountExempt) {
    this.amountExempt = amountExempt;
  }


  public TaxationItemCreateRequest invoiceItemId(String invoiceItemId) {
    
    this.invoiceItemId = invoiceItemId;
    return this;
  }

   /**
   * Unique identifier of the invoice item to which the taxation item applies. **This field is required if you are creating a credit memo or debit memo from an invoice, and is not applicable if you are creating an invoice.**.     
   * @return invoiceItemId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Unique identifier of the invoice item to which the taxation item applies. **This field is required if you are creating a credit memo or debit memo from an invoice, and is not applicable if you are creating an invoice.**.     ")

  public String getInvoiceItemId() {
    return invoiceItemId;
  }


  public void setInvoiceItemId(String invoiceItemId) {
    this.invoiceItemId = invoiceItemId;
  }


  public TaxationItemCreateRequest jurisdiction(String jurisdiction) {
    
    this.jurisdiction = jurisdiction;
    return this;
  }

   /**
   * The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
   * @return jurisdiction
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.")

  public String getJurisdiction() {
    return jurisdiction;
  }


  public void setJurisdiction(String jurisdiction) {
    this.jurisdiction = jurisdiction;
  }


  public TaxationItemCreateRequest locationCode(String locationCode) {
    
    this.locationCode = locationCode;
    return this;
  }

   /**
   * The identifier for the location based on the value of the `tax_code` field.
   * @return locationCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier for the location based on the value of the `tax_code` field.")

  public String getLocationCode() {
    return locationCode;
  }


  public void setLocationCode(String locationCode) {
    this.locationCode = locationCode;
  }


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

   /**
   * The name of the taxation item.
   * @return name
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "The name of the taxation item.")

  public String getName() {
    return name;
  }


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


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

   /**
   * The amount of the tax applied to the total price.
   * @return amount
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "The amount of the tax applied to the total price.")

  public BigDecimal getAmount() {
    return amount;
  }


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


  public TaxationItemCreateRequest taxCode(String taxCode) {
    
    this.taxCode = taxCode;
    return this;
  }

   /**
   * A tax code identifier. If a `tax_code` of a price is not provided when you create or update a price, Zuora will treat the charged amount as non-taxable. If this code is provide, Zuora considers that this price is taxable and the charged amount will be handled accordingly.
   * @return taxCode
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "A tax code identifier. If a `tax_code` of a price is not provided when you create or update a price, Zuora will treat the charged amount as non-taxable. If this code is provide, Zuora considers that this price is taxable and the charged amount will be handled accordingly.")

  public String getTaxCode() {
    return taxCode;
  }


  public void setTaxCode(String taxCode) {
    this.taxCode = taxCode;
  }


  public TaxationItemCreateRequest taxCodeName(String taxCodeName) {
    
    this.taxCodeName = taxCodeName;
    return this;
  }

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

  public String getTaxCodeName() {
    return taxCodeName;
  }


  public void setTaxCodeName(String taxCodeName) {
    this.taxCodeName = taxCodeName;
  }


  public TaxationItemCreateRequest taxDate(LocalDate taxDate) {
    
    this.taxDate = taxDate;
    return this;
  }

   /**
   * The date on which the tax is applied.
   * @return taxDate
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "Sat Jan 01 00:00:00 GMT 2022", required = true, value = "The date on which the tax is applied.")

  public LocalDate getTaxDate() {
    return taxDate;
  }


  public void setTaxDate(LocalDate taxDate) {
    this.taxDate = taxDate;
  }


  public TaxationItemCreateRequest taxRate(BigDecimal taxRate) {
    
    this.taxRate = taxRate;
    return this;
  }

   /**
   * The amount of the tax applied to the total price.
   * @return taxRate
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "The amount of the tax applied to the total price.")

  public BigDecimal getTaxRate() {
    return taxRate;
  }


  public void setTaxRate(BigDecimal taxRate) {
    this.taxRate = taxRate;
  }


  public TaxationItemCreateRequest taxRateName(String taxRateName) {
    
    this.taxRateName = taxRateName;
    return this;
  }

   /**
   * The name of the tax rate, such as sales tax or GST. This name is displayed on billing documents.
   * @return taxRateName
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The name of the tax rate, such as sales tax or GST. This name is displayed on billing documents.")

  public String getTaxRateName() {
    return taxRateName;
  }


  public void setTaxRateName(String taxRateName) {
    this.taxRateName = taxRateName;
  }


  public TaxationItemCreateRequest taxRateType(TaxRateTypeEnum taxRateType) {
    
    this.taxRateType = taxRateType;
    return this;
  }

   /**
   * Indicates whether the tax rate is an amount or a percentage.
   * @return taxRateType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Indicates whether the tax rate is an amount or a percentage.")

  public TaxRateTypeEnum getTaxRateType() {
    return taxRateType;
  }


  public void setTaxRateType(TaxRateTypeEnum taxRateType) {
    this.taxRateType = taxRateType;
  }


  public TaxationItemCreateRequest sourceTaxItemId(String sourceTaxItemId) {
    
    this.sourceTaxItemId = sourceTaxItemId;
    return this;
  }

   /**
   * The ID of the taxation item of the invoice, from which the credit or debit memo is created. This field is only applicable when the `type` of the billing document is `credit_memo` and `debit_memo`.
   * @return sourceTaxItemId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The ID of the taxation item of the invoice, from which the credit or debit memo is created. This field is only applicable when the `type` of the billing document is `credit_memo` and `debit_memo`.")

  public String getSourceTaxItemId() {
    return sourceTaxItemId;
  }


  public void setSourceTaxItemId(String sourceTaxItemId) {
    this.sourceTaxItemId = sourceTaxItemId;
  }


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

   /**
   * If set to `true`, it indicates that amounts are inclusive of tax.
   * @return taxInclusive
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If set to `true`, it indicates that amounts are inclusive of tax.")

  public Boolean getTaxInclusive() {
    return taxInclusive;
  }


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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TaxationItemCreateRequest taxationItemCreateRequest = (TaxationItemCreateRequest) o;
    return Objects.equals(this.onAccountAccount, taxationItemCreateRequest.onAccountAccount) &&
        Objects.equals(this.amountExempt, taxationItemCreateRequest.amountExempt) &&
        Objects.equals(this.invoiceItemId, taxationItemCreateRequest.invoiceItemId) &&
        Objects.equals(this.jurisdiction, taxationItemCreateRequest.jurisdiction) &&
        Objects.equals(this.locationCode, taxationItemCreateRequest.locationCode) &&
        Objects.equals(this.name, taxationItemCreateRequest.name) &&
        Objects.equals(this.amount, taxationItemCreateRequest.amount) &&
        Objects.equals(this.taxCode, taxationItemCreateRequest.taxCode) &&
        Objects.equals(this.taxCodeName, taxationItemCreateRequest.taxCodeName) &&
        Objects.equals(this.taxDate, taxationItemCreateRequest.taxDate) &&
        Objects.equals(this.taxRate, taxationItemCreateRequest.taxRate) &&
        Objects.equals(this.taxRateName, taxationItemCreateRequest.taxRateName) &&
        Objects.equals(this.taxRateType, taxationItemCreateRequest.taxRateType) &&
        Objects.equals(this.sourceTaxItemId, taxationItemCreateRequest.sourceTaxItemId) &&
        Objects.equals(this.taxInclusive, taxationItemCreateRequest.taxInclusive);
  }

  @Override
  public int hashCode() {
    return Objects.hash(onAccountAccount, amountExempt, invoiceItemId, jurisdiction, locationCode, name, amount, taxCode, taxCodeName, taxDate, taxRate, taxRateName, taxRateType, sourceTaxItemId, taxInclusive);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TaxationItemCreateRequest {\n");
    sb.append("    onAccountAccount: ").append(toIndentedString(onAccountAccount)).append("\n");
    sb.append("    amountExempt: ").append(toIndentedString(amountExempt)).append("\n");
    sb.append("    invoiceItemId: ").append(toIndentedString(invoiceItemId)).append("\n");
    sb.append("    jurisdiction: ").append(toIndentedString(jurisdiction)).append("\n");
    sb.append("    locationCode: ").append(toIndentedString(locationCode)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    taxCode: ").append(toIndentedString(taxCode)).append("\n");
    sb.append("    taxCodeName: ").append(toIndentedString(taxCodeName)).append("\n");
    sb.append("    taxDate: ").append(toIndentedString(taxDate)).append("\n");
    sb.append("    taxRate: ").append(toIndentedString(taxRate)).append("\n");
    sb.append("    taxRateName: ").append(toIndentedString(taxRateName)).append("\n");
    sb.append("    taxRateType: ").append(toIndentedString(taxRateType)).append("\n");
    sb.append("    sourceTaxItemId: ").append(toIndentedString(sourceTaxItemId)).append("\n");
    sb.append("    taxInclusive: ").append(toIndentedString(taxInclusive)).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