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

org.openapitools.client.model.ItemTier 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.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * Tiers information of the billing document items.
 */
@ApiModel(description = "Tiers information of the billing document items.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ItemTier {
  public static final String SERIALIZED_NAME_UP_TO = "up_to";
  @SerializedName(SERIALIZED_NAME_UP_TO)
  private BigDecimal upTo;

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

  public static final String SERIALIZED_NAME_UNIT_AMOUNT = "unit_amount";
  @SerializedName(SERIALIZED_NAME_UNIT_AMOUNT)
  private BigDecimal unitAmount;

  public ItemTier() { 
  }

  public ItemTier upTo(BigDecimal upTo) {
    
    this.upTo = upTo;
    return this;
  }

   /**
   * Specifies the upper bound of the tier. The lower bound of a tier is the upper bound of the previous tier plus one.
   * @return upTo
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Specifies the upper bound of the tier. The lower bound of a tier is the upper bound of the previous tier plus one.")

  public BigDecimal getUpTo() {
    return upTo;
  }


  public void setUpTo(BigDecimal upTo) {
    this.upTo = upTo;
  }


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

   /**
   * The amount of the price. Specify this field if you want to override the original price with a flat-fee price.
   * @return amount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The amount of the price. Specify this field if you want to override the original price with a flat-fee price.")

  public BigDecimal getAmount() {
    return amount;
  }


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


  public ItemTier unitAmount(BigDecimal unitAmount) {
    
    this.unitAmount = unitAmount;
    return this;
  }

   /**
   * The unit amount of the price. Specify this field if you want to override the original price with a per-unit price.
   * @return unitAmount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The unit amount of the price. Specify this field if you want to override the original price with a per-unit price.")

  public BigDecimal getUnitAmount() {
    return unitAmount;
  }


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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ItemTier itemTier = (ItemTier) o;
    return Objects.equals(this.upTo, itemTier.upTo) &&
        Objects.equals(this.amount, itemTier.amount) &&
        Objects.equals(this.unitAmount, itemTier.unitAmount);
  }

  @Override
  public int hashCode() {
    return Objects.hash(upTo, amount, unitAmount);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ItemTier {\n");
    sb.append("    upTo: ").append(toIndentedString(upTo)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    unitAmount: ").append(toIndentedString(unitAmount)).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