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

org.openapitools.client.model.SubscriptionPreviewBillingDocumentTaxationItemResponse 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;
/**
 * SubscriptionPreviewBillingDocumentTaxationItemResponse
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubscriptionPreviewBillingDocumentTaxationItemResponse {
  public static final String SERIALIZED_NAME_AMOUNT_EXEMPT = "amount_exempt";
  @SerializedName(SERIALIZED_NAME_AMOUNT_EXEMPT)
  private BigDecimal amountExempt;

  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private String id;

  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_DATE = "date";
  @SerializedName(SERIALIZED_NAME_DATE)
  private LocalDate date;

  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 SubscriptionPreviewBillingDocumentTaxationItemResponse() { 
  }

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

   /**
   * Identifier of the taxation item related to the invoice. Only applicable for credit memos created from invoices.
   * @return id
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Identifier of the taxation item related to the invoice. Only applicable for credit memos created from invoices.")

  public String getId() {
    return id;
  }


  public void setId(String id) {
    this.id = id;
  }


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

   /**
   * The name of the taxation item.
   * @return name
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The name of the taxation item.")

  public String getName() {
    return name;
  }


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


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

   /**
   * The amount of the tax applied to the total price.
   * @return amount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(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 SubscriptionPreviewBillingDocumentTaxationItemResponse 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.Nullable
  @ApiModelProperty(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 SubscriptionPreviewBillingDocumentTaxationItemResponse 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 SubscriptionPreviewBillingDocumentTaxationItemResponse date(LocalDate date) {
    
    this.date = date;
    return this;
  }

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

  public LocalDate getDate() {
    return date;
  }


  public void setDate(LocalDate date) {
    this.date = date;
  }


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

   /**
   * The amount of the tax applied to the total price.
   * @return taxRate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(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 SubscriptionPreviewBillingDocumentTaxationItemResponse 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 SubscriptionPreviewBillingDocumentTaxationItemResponse 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;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SubscriptionPreviewBillingDocumentTaxationItemResponse subscriptionPreviewBillingDocumentTaxationItemResponse = (SubscriptionPreviewBillingDocumentTaxationItemResponse) o;
    return Objects.equals(this.amountExempt, subscriptionPreviewBillingDocumentTaxationItemResponse.amountExempt) &&
        Objects.equals(this.id, subscriptionPreviewBillingDocumentTaxationItemResponse.id) &&
        Objects.equals(this.jurisdiction, subscriptionPreviewBillingDocumentTaxationItemResponse.jurisdiction) &&
        Objects.equals(this.locationCode, subscriptionPreviewBillingDocumentTaxationItemResponse.locationCode) &&
        Objects.equals(this.name, subscriptionPreviewBillingDocumentTaxationItemResponse.name) &&
        Objects.equals(this.amount, subscriptionPreviewBillingDocumentTaxationItemResponse.amount) &&
        Objects.equals(this.taxCode, subscriptionPreviewBillingDocumentTaxationItemResponse.taxCode) &&
        Objects.equals(this.taxCodeName, subscriptionPreviewBillingDocumentTaxationItemResponse.taxCodeName) &&
        Objects.equals(this.date, subscriptionPreviewBillingDocumentTaxationItemResponse.date) &&
        Objects.equals(this.taxRate, subscriptionPreviewBillingDocumentTaxationItemResponse.taxRate) &&
        Objects.equals(this.taxRateName, subscriptionPreviewBillingDocumentTaxationItemResponse.taxRateName) &&
        Objects.equals(this.taxRateType, subscriptionPreviewBillingDocumentTaxationItemResponse.taxRateType);
  }

  @Override
  public int hashCode() {
    return Objects.hash(amountExempt, id, jurisdiction, locationCode, name, amount, taxCode, taxCodeName, date, taxRate, taxRateName, taxRateType);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SubscriptionPreviewBillingDocumentTaxationItemResponse {\n");
    sb.append("    amountExempt: ").append(toIndentedString(amountExempt)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).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("    date: ").append(toIndentedString(date)).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("}");
    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