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

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

import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * The tax certificate information.
 */
@ApiModel(description = "The tax certificate information.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class TaxCertificate {
  public static final String SERIALIZED_NAME_COMPANY_CODE = "company_code";
  @SerializedName(SERIALIZED_NAME_COMPANY_CODE)
  private String companyCode;

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

  public static final String SERIALIZED_NAME_START_DATE = "start_date";
  @SerializedName(SERIALIZED_NAME_START_DATE)
  private LocalDate startDate;

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  public static final String SERIALIZED_NAME_ENTITY_USE_CODE = "entity_use_code";
  @SerializedName(SERIALIZED_NAME_ENTITY_USE_CODE)
  private String entityUseCode;

  public static final String SERIALIZED_NAME_END_DATE = "end_date";
  @SerializedName(SERIALIZED_NAME_END_DATE)
  private LocalDate endDate;

  public static final String SERIALIZED_NAME_ISSUING_JURISDICTION = "issuing_jurisdiction";
  @SerializedName(SERIALIZED_NAME_ISSUING_JURISDICTION)
  private String issuingJurisdiction;

  /**
   * Status of the tax exemption certificate, indication whether the certificate has been verified.
   */
  @JsonAdapter(StateEnum.Adapter.class)
  public enum StateEnum {
    PENDING("pending"),
    
    VERIFIED("verified"),
    
    NOT_VALID("not_valid"),
    
    UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static StateEnum fromValue(String value) {
      for (StateEnum b : StateEnum.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 StateEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

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

  public static final String SERIALIZED_NAME_STATE = "state";
  @SerializedName(SERIALIZED_NAME_STATE)
  private StateEnum state;

  public static final String SERIALIZED_NAME_TAX_IDENTIFIER = "tax_identifier";
  @SerializedName(SERIALIZED_NAME_TAX_IDENTIFIER)
  private String taxIdentifier;

  public TaxCertificate() { 
  }

  public TaxCertificate companyCode(String companyCode) {
    
    this.companyCode = companyCode;
    return this;
  }

   /**
   * Unique code that identifies a company account in Avalara. Use this field to calculate taxes based on country of origin and sold-to addresses in Avalara.
   * @return companyCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "ABC", value = "Unique code that identifies a company account in Avalara. Use this field to calculate taxes based on country of origin and sold-to addresses in Avalara.")

  public String getCompanyCode() {
    return companyCode;
  }


  public void setCompanyCode(String companyCode) {
    this.companyCode = companyCode;
  }


  public TaxCertificate id(String id) {
    
    this.id = id;
    return this;
  }

   /**
   * Identifier of the tax exemption certificate.
   * @return id
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Identifier of the tax exemption certificate.")

  public String getId() {
    return id;
  }


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


  public TaxCertificate startDate(LocalDate startDate) {
    
    this.startDate = startDate;
    return this;
  }

   /**
   * The tax certificate start date.
   * @return startDate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "Sat Jan 01 00:00:00 GMT 2022", value = "The tax certificate start date.")

  public LocalDate getStartDate() {
    return startDate;
  }


  public void setStartDate(LocalDate startDate) {
    this.startDate = startDate;
  }


  public TaxCertificate description(String description) {
    
    this.description = description;
    return this;
  }

   /**
   * Description of the tax exemption certificate.
   * @return description
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Description of the tax exemption certificate.")

  public String getDescription() {
    return description;
  }


  public void setDescription(String description) {
    this.description = description;
  }


  public TaxCertificate entityUseCode(String entityUseCode) {
    
    this.entityUseCode = entityUseCode;
    return this;
  }

   /**
   * A unique entity use code used by Avalara to apply exemptions. This field is required only when you choose Avalara as your tax engine. See [Exempt Transactions](https://developer.avalara.com/avatax/handling-tax-exempt-customers/) for more information.
   * @return entityUseCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "A unique entity use code used by Avalara to apply exemptions. This field is required only when you choose Avalara as your tax engine. See [Exempt Transactions](https://developer.avalara.com/avatax/handling-tax-exempt-customers/) for more information.")

  public String getEntityUseCode() {
    return entityUseCode;
  }


  public void setEntityUseCode(String entityUseCode) {
    this.entityUseCode = entityUseCode;
  }


  public TaxCertificate endDate(LocalDate endDate) {
    
    this.endDate = endDate;
    return this;
  }

   /**
   * The tax certificate end date.
   * @return endDate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "Sun Jan 01 00:00:00 GMT 2023", value = "The tax certificate end date.")

  public LocalDate getEndDate() {
    return endDate;
  }


  public void setEndDate(LocalDate endDate) {
    this.endDate = endDate;
  }


  public TaxCertificate issuingJurisdiction(String issuingJurisdiction) {
    
    this.issuingJurisdiction = issuingJurisdiction;
    return this;
  }

   /**
   * Typically, this is a state or government agency
   * @return issuingJurisdiction
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "Georgia", value = "Typically, this is a state or government agency")

  public String getIssuingJurisdiction() {
    return issuingJurisdiction;
  }


  public void setIssuingJurisdiction(String issuingJurisdiction) {
    this.issuingJurisdiction = issuingJurisdiction;
  }


  public TaxCertificate state(StateEnum state) {
    
    this.state = state;
    return this;
  }

   /**
   * Status of the tax exemption certificate, indication whether the certificate has been verified.
   * @return state
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Status of the tax exemption certificate, indication whether the certificate has been verified.")

  public StateEnum getState() {
    return state;
  }


  public void setState(StateEnum state) {
    this.state = state;
  }


  public TaxCertificate taxIdentifier(String taxIdentifier) {
    
    this.taxIdentifier = taxIdentifier;
    return this;
  }

   /**
   * Value Added Tax (VAT) ID. Each VAT ID must begin with the code of the country code and followed by a block of digits or characters.
   * @return taxIdentifier
   * @deprecated
  **/
  @Deprecated
  @javax.annotation.Nullable
  @ApiModelProperty(example = "DE123456789", value = "Value Added Tax (VAT) ID. Each VAT ID must begin with the code of the country code and followed by a block of digits or characters.")

  public String getTaxIdentifier() {
    return taxIdentifier;
  }


  public void setTaxIdentifier(String taxIdentifier) {
    this.taxIdentifier = taxIdentifier;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TaxCertificate taxCertificate = (TaxCertificate) o;
    return Objects.equals(this.companyCode, taxCertificate.companyCode) &&
        Objects.equals(this.id, taxCertificate.id) &&
        Objects.equals(this.startDate, taxCertificate.startDate) &&
        Objects.equals(this.description, taxCertificate.description) &&
        Objects.equals(this.entityUseCode, taxCertificate.entityUseCode) &&
        Objects.equals(this.endDate, taxCertificate.endDate) &&
        Objects.equals(this.issuingJurisdiction, taxCertificate.issuingJurisdiction) &&
        Objects.equals(this.state, taxCertificate.state) &&
        Objects.equals(this.taxIdentifier, taxCertificate.taxIdentifier);
  }

  @Override
  public int hashCode() {
    return Objects.hash(companyCode, id, startDate, description, entityUseCode, endDate, issuingJurisdiction, state, taxIdentifier);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TaxCertificate {\n");
    sb.append("    companyCode: ").append(toIndentedString(companyCode)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    startDate: ").append(toIndentedString(startDate)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    entityUseCode: ").append(toIndentedString(entityUseCode)).append("\n");
    sb.append("    endDate: ").append(toIndentedString(endDate)).append("\n");
    sb.append("    issuingJurisdiction: ").append(toIndentedString(issuingJurisdiction)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    taxIdentifier: ").append(toIndentedString(taxIdentifier)).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