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

com.xero.models.appstore.Price Maven / Gradle / Ivy

/*
 * Xero AppStore API
 * These endpoints are for Xero Partners to interact with the App Store Billing platform
 *
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package com.xero.models.appstore;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.xero.api.StringUtil;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
import java.util.UUID;

/** Price */
public class Price {
  StringUtil util = new StringUtil();

  @JsonProperty("amount")
  private Double amount;

  @JsonProperty("currency")
  private String currency;

  @JsonProperty("id")
  private UUID id;
  /**
   * The net (before tax) amount.
   *
   * @param amount Double
   * @return Price
   */
  public Price amount(Double amount) {
    this.amount = amount;
    return this;
  }

  /**
   * The net (before tax) amount.
   *
   * @return amount
   */
  @ApiModelProperty(required = true, value = "The net (before tax) amount.")
  /**
   * The net (before tax) amount.
   *
   * @return amount Double
   */
  public Double getAmount() {
    return amount;
  }

  /**
   * The net (before tax) amount.
   *
   * @param amount Double
   */
  public void setAmount(Double amount) {
    this.amount = amount;
  }

  /**
   * The currency of the price.
   *
   * @param currency String
   * @return Price
   */
  public Price currency(String currency) {
    this.currency = currency;
    return this;
  }

  /**
   * The currency of the price.
   *
   * @return currency
   */
  @ApiModelProperty(required = true, value = "The currency of the price.")
  /**
   * The currency of the price.
   *
   * @return currency String
   */
  public String getCurrency() {
    return currency;
  }

  /**
   * The currency of the price.
   *
   * @param currency String
   */
  public void setCurrency(String currency) {
    this.currency = currency;
  }

  /**
   * The unique identifier of the price.
   *
   * @param id UUID
   * @return Price
   */
  public Price id(UUID id) {
    this.id = id;
    return this;
  }

  /**
   * The unique identifier of the price.
   *
   * @return id
   */
  @ApiModelProperty(required = true, value = "The unique identifier of the price.")
  /**
   * The unique identifier of the price.
   *
   * @return id UUID
   */
  public UUID getId() {
    return id;
  }

  /**
   * The unique identifier of the price.
   *
   * @param id UUID
   */
  public void setId(UUID id) {
    this.id = id;
  }

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Price price = (Price) o;
    return Objects.equals(this.amount, price.amount)
        && Objects.equals(this.currency, price.currency)
        && Objects.equals(this.id, price.id);
  }

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Price {\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy