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

com.sinch.sdk.domains.numbers.models.v1.Money Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
/*
 * Numbers | Sinch
 *
 * OpenAPI document version: 1.0.2
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * Do not edit the class manually.
 */

package com.sinch.sdk.domains.numbers.models.v1;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

/** An object giving details on currency code and the amount charged. */
@JsonDeserialize(builder = MoneyImpl.Builder.class)
public interface Money {

  /**
   * The 3-letter currency code defined in ISO 4217.
   *
   * @return currencyCode
   */
  String getCurrencyCode();

  /**
   * The amount in decimal form. For example 2.00. There are no guarantees on the
   * precision unless documented by the message origin. The amount cannot be updated and is
   * read-only.
   *
   * @return amount
   */
  Double getAmount();

  /**
   * Getting builder
   *
   * @return New Builder instance
   */
  static Builder builder() {
    return new MoneyImpl.Builder();
  }

  /** Dedicated Builder */
  interface Builder {

    /**
     * see getter
     *
     * @param currencyCode see getter
     * @return Current builder
     * @see #getCurrencyCode
     */
    Builder setCurrencyCode(String currencyCode);

    /**
     * see getter
     *
     * @param amount see getter
     * @return Current builder
     * @see #getAmount
     */
    Builder setAmount(Double amount);

    /**
     * Create instance
     *
     * @return The instance build with current builder values
     */
    Money build();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy