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

org.openapitools.client.model.SubscriptionPreviewAccountRequest 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.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.AccountContactCreateRequest;
import org.openapitools.client.model.TaxCertificate;
import org.openapitools.client.model.TaxIdentifier;
import org.openapitools.jackson.nullable.JsonNullable;

import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * Account data that is used for the subscription preview. If you specify this field, do not specify `account_id`. Note that this operation is only for preview and no subscription is created.
 */
@ApiModel(description = "Account data that is used for the subscription preview. If you specify this field, do not specify `account_id`. Note that this operation is only for preview and no subscription is created.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubscriptionPreviewAccountRequest {
  public static final String SERIALIZED_NAME_SOLD_TO = "sold_to";
  @SerializedName(SERIALIZED_NAME_SOLD_TO)
  private AccountContactCreateRequest soldTo;

  public static final String SERIALIZED_NAME_TAX_CERTIFICATE = "tax_certificate";
  @SerializedName(SERIALIZED_NAME_TAX_CERTIFICATE)
  private TaxCertificate taxCertificate;

  public static final String SERIALIZED_NAME_BILL_CYCLE_DAY = "bill_cycle_day";
  @SerializedName(SERIALIZED_NAME_BILL_CYCLE_DAY)
  private Integer billCycleDay;

  public static final String SERIALIZED_NAME_CURRENCY = "currency";
  @SerializedName(SERIALIZED_NAME_CURRENCY)
  private String currency;

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

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

  public SubscriptionPreviewAccountRequest() { 
  }

  public SubscriptionPreviewAccountRequest soldTo(AccountContactCreateRequest soldTo) {
    
    this.soldTo = soldTo;
    return this;
  }

   /**
   * Customer address used for calculating tax.
   * @return soldTo
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Customer address used for calculating tax.")

  public AccountContactCreateRequest getSoldTo() {
    return soldTo;
  }


  public void setSoldTo(AccountContactCreateRequest soldTo) {
    this.soldTo = soldTo;
  }


  public SubscriptionPreviewAccountRequest taxCertificate(TaxCertificate taxCertificate) {
    
    this.taxCertificate = taxCertificate;
    return this;
  }

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

  public TaxCertificate getTaxCertificate() {
    return taxCertificate;
  }


  public void setTaxCertificate(TaxCertificate taxCertificate) {
    this.taxCertificate = taxCertificate;
  }


  public SubscriptionPreviewAccountRequest billCycleDay(Integer billCycleDay) {
    
    this.billCycleDay = billCycleDay;
    return this;
  }

   /**
   * The day of the month on which your customer will be invoiced. For month-end specify 31.
   * minimum: 0
   * maximum: 31
   * @return billCycleDay
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "The day of the month on which your customer will be invoiced. For month-end specify 31.")

  public Integer getBillCycleDay() {
    return billCycleDay;
  }


  public void setBillCycleDay(Integer billCycleDay) {
    this.billCycleDay = billCycleDay;
  }


  public SubscriptionPreviewAccountRequest currency(String currency) {
    
    this.currency = currency;
    return this;
  }

   /**
   * Three-letter ISO currency code. Once the currency is set for an account, it cannot be updated.
   * @return currency
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "USD", required = true, value = "Three-letter ISO currency code. Once the currency is set for an account, it cannot be updated.")

  public String getCurrency() {
    return currency;
  }


  public void setCurrency(String currency) {
    this.currency = currency;
  }


  public SubscriptionPreviewAccountRequest taxIdentifier(TaxIdentifier taxIdentifier) {
    
    this.taxIdentifier = taxIdentifier;
    return this;
  }

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

  public TaxIdentifier getTaxIdentifier() {
    return taxIdentifier;
  }


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


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

  public SubscriptionPreviewAccountRequest 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;
    }
    SubscriptionPreviewAccountRequest subscriptionPreviewAccountRequest = (SubscriptionPreviewAccountRequest) o;
    return Objects.equals(this.soldTo, subscriptionPreviewAccountRequest.soldTo) &&
        Objects.equals(this.taxCertificate, subscriptionPreviewAccountRequest.taxCertificate) &&
        Objects.equals(this.billCycleDay, subscriptionPreviewAccountRequest.billCycleDay) &&
        Objects.equals(this.currency, subscriptionPreviewAccountRequest.currency) &&
        Objects.equals(this.taxIdentifier, subscriptionPreviewAccountRequest.taxIdentifier) &&
        Objects.equals(this.customFields, subscriptionPreviewAccountRequest.customFields);
  }

  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(soldTo, taxCertificate, billCycleDay, currency, taxIdentifier, customFields);
  }

  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 SubscriptionPreviewAccountRequest {\n");
    sb.append("    soldTo: ").append(toIndentedString(soldTo)).append("\n");
    sb.append("    taxCertificate: ").append(toIndentedString(taxCertificate)).append("\n");
    sb.append("    billCycleDay: ").append(toIndentedString(billCycleDay)).append("\n");
    sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
    sb.append("    taxIdentifier: ").append(toIndentedString(taxIdentifier)).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