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

com.adyen.model.payment.ForexQuote Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * Adyen Payment API
 *
 * The version of the OpenAPI document: 68
 * 
 *
 * 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.adyen.model.payment;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.payment.Amount;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.time.OffsetDateTime;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * ForexQuote
 */
@JsonPropertyOrder({
  ForexQuote.JSON_PROPERTY_ACCOUNT,
  ForexQuote.JSON_PROPERTY_ACCOUNT_TYPE,
  ForexQuote.JSON_PROPERTY_BASE_AMOUNT,
  ForexQuote.JSON_PROPERTY_BASE_POINTS,
  ForexQuote.JSON_PROPERTY_BUY,
  ForexQuote.JSON_PROPERTY_INTERBANK,
  ForexQuote.JSON_PROPERTY_REFERENCE,
  ForexQuote.JSON_PROPERTY_SELL,
  ForexQuote.JSON_PROPERTY_SIGNATURE,
  ForexQuote.JSON_PROPERTY_SOURCE,
  ForexQuote.JSON_PROPERTY_TYPE,
  ForexQuote.JSON_PROPERTY_VALID_TILL
})

public class ForexQuote {
  public static final String JSON_PROPERTY_ACCOUNT = "account";
  private String account;

  public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType";
  private String accountType;

  public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount";
  private Amount baseAmount;

  public static final String JSON_PROPERTY_BASE_POINTS = "basePoints";
  private Integer basePoints;

  public static final String JSON_PROPERTY_BUY = "buy";
  private Amount buy;

  public static final String JSON_PROPERTY_INTERBANK = "interbank";
  private Amount interbank;

  public static final String JSON_PROPERTY_REFERENCE = "reference";
  private String reference;

  public static final String JSON_PROPERTY_SELL = "sell";
  private Amount sell;

  public static final String JSON_PROPERTY_SIGNATURE = "signature";
  private String signature;

  public static final String JSON_PROPERTY_SOURCE = "source";
  private String source;

  public static final String JSON_PROPERTY_TYPE = "type";
  private String type;

  public static final String JSON_PROPERTY_VALID_TILL = "validTill";
  private OffsetDateTime validTill;

  public ForexQuote() { 
  }

  /**
   * The account name.
   *
   * @param account The account name.
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote account(String account) {
    this.account = account;
    return this;
  }

  /**
   * The account name.
   * @return account The account name.
   */
  @JsonProperty(JSON_PROPERTY_ACCOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getAccount() {
    return account;
  }

  /**
   * The account name.
   *
   * @param account The account name.
   */
  @JsonProperty(JSON_PROPERTY_ACCOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAccount(String account) {
    this.account = account;
  }

  /**
   * The account type.
   *
   * @param accountType The account type.
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote accountType(String accountType) {
    this.accountType = accountType;
    return this;
  }

  /**
   * The account type.
   * @return accountType The account type.
   */
  @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getAccountType() {
    return accountType;
  }

  /**
   * The account type.
   *
   * @param accountType The account type.
   */
  @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAccountType(String accountType) {
    this.accountType = accountType;
  }

  /**
   * baseAmount
   *
   * @param baseAmount 
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote baseAmount(Amount baseAmount) {
    this.baseAmount = baseAmount;
    return this;
  }

  /**
   * Get baseAmount
   * @return baseAmount 
   */
  @JsonProperty(JSON_PROPERTY_BASE_AMOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Amount getBaseAmount() {
    return baseAmount;
  }

  /**
   * baseAmount
   *
   * @param baseAmount 
   */
  @JsonProperty(JSON_PROPERTY_BASE_AMOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBaseAmount(Amount baseAmount) {
    this.baseAmount = baseAmount;
  }

  /**
   * The base points.
   *
   * @param basePoints The base points.
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote basePoints(Integer basePoints) {
    this.basePoints = basePoints;
    return this;
  }

  /**
   * The base points.
   * @return basePoints The base points.
   */
  @JsonProperty(JSON_PROPERTY_BASE_POINTS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Integer getBasePoints() {
    return basePoints;
  }

  /**
   * The base points.
   *
   * @param basePoints The base points.
   */
  @JsonProperty(JSON_PROPERTY_BASE_POINTS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBasePoints(Integer basePoints) {
    this.basePoints = basePoints;
  }

  /**
   * buy
   *
   * @param buy 
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote buy(Amount buy) {
    this.buy = buy;
    return this;
  }

  /**
   * Get buy
   * @return buy 
   */
  @JsonProperty(JSON_PROPERTY_BUY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Amount getBuy() {
    return buy;
  }

  /**
   * buy
   *
   * @param buy 
   */
  @JsonProperty(JSON_PROPERTY_BUY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBuy(Amount buy) {
    this.buy = buy;
  }

  /**
   * interbank
   *
   * @param interbank 
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote interbank(Amount interbank) {
    this.interbank = interbank;
    return this;
  }

  /**
   * Get interbank
   * @return interbank 
   */
  @JsonProperty(JSON_PROPERTY_INTERBANK)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Amount getInterbank() {
    return interbank;
  }

  /**
   * interbank
   *
   * @param interbank 
   */
  @JsonProperty(JSON_PROPERTY_INTERBANK)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setInterbank(Amount interbank) {
    this.interbank = interbank;
  }

  /**
   * The reference assigned to the forex quote request.
   *
   * @param reference The reference assigned to the forex quote request.
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote reference(String reference) {
    this.reference = reference;
    return this;
  }

  /**
   * The reference assigned to the forex quote request.
   * @return reference The reference assigned to the forex quote request.
   */
  @JsonProperty(JSON_PROPERTY_REFERENCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getReference() {
    return reference;
  }

  /**
   * The reference assigned to the forex quote request.
   *
   * @param reference The reference assigned to the forex quote request.
   */
  @JsonProperty(JSON_PROPERTY_REFERENCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setReference(String reference) {
    this.reference = reference;
  }

  /**
   * sell
   *
   * @param sell 
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote sell(Amount sell) {
    this.sell = sell;
    return this;
  }

  /**
   * Get sell
   * @return sell 
   */
  @JsonProperty(JSON_PROPERTY_SELL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Amount getSell() {
    return sell;
  }

  /**
   * sell
   *
   * @param sell 
   */
  @JsonProperty(JSON_PROPERTY_SELL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSell(Amount sell) {
    this.sell = sell;
  }

  /**
   * The signature to validate the integrity.
   *
   * @param signature The signature to validate the integrity.
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote signature(String signature) {
    this.signature = signature;
    return this;
  }

  /**
   * The signature to validate the integrity.
   * @return signature The signature to validate the integrity.
   */
  @JsonProperty(JSON_PROPERTY_SIGNATURE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getSignature() {
    return signature;
  }

  /**
   * The signature to validate the integrity.
   *
   * @param signature The signature to validate the integrity.
   */
  @JsonProperty(JSON_PROPERTY_SIGNATURE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSignature(String signature) {
    this.signature = signature;
  }

  /**
   * The source of the forex quote.
   *
   * @param source The source of the forex quote.
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote source(String source) {
    this.source = source;
    return this;
  }

  /**
   * The source of the forex quote.
   * @return source The source of the forex quote.
   */
  @JsonProperty(JSON_PROPERTY_SOURCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getSource() {
    return source;
  }

  /**
   * The source of the forex quote.
   *
   * @param source The source of the forex quote.
   */
  @JsonProperty(JSON_PROPERTY_SOURCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSource(String source) {
    this.source = source;
  }

  /**
   * The type of forex.
   *
   * @param type The type of forex.
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote type(String type) {
    this.type = type;
    return this;
  }

  /**
   * The type of forex.
   * @return type The type of forex.
   */
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getType() {
    return type;
  }

  /**
   * The type of forex.
   *
   * @param type The type of forex.
   */
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setType(String type) {
    this.type = type;
  }

  /**
   * The date until which the forex quote is valid.
   *
   * @param validTill The date until which the forex quote is valid.
   * @return the current {@code ForexQuote} instance, allowing for method chaining
   */
  public ForexQuote validTill(OffsetDateTime validTill) {
    this.validTill = validTill;
    return this;
  }

  /**
   * The date until which the forex quote is valid.
   * @return validTill The date until which the forex quote is valid.
   */
  @JsonProperty(JSON_PROPERTY_VALID_TILL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public OffsetDateTime getValidTill() {
    return validTill;
  }

  /**
   * The date until which the forex quote is valid.
   *
   * @param validTill The date until which the forex quote is valid.
   */
  @JsonProperty(JSON_PROPERTY_VALID_TILL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setValidTill(OffsetDateTime validTill) {
    this.validTill = validTill;
  }

  /**
   * Return true if this ForexQuote object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ForexQuote forexQuote = (ForexQuote) o;
    return Objects.equals(this.account, forexQuote.account) &&
        Objects.equals(this.accountType, forexQuote.accountType) &&
        Objects.equals(this.baseAmount, forexQuote.baseAmount) &&
        Objects.equals(this.basePoints, forexQuote.basePoints) &&
        Objects.equals(this.buy, forexQuote.buy) &&
        Objects.equals(this.interbank, forexQuote.interbank) &&
        Objects.equals(this.reference, forexQuote.reference) &&
        Objects.equals(this.sell, forexQuote.sell) &&
        Objects.equals(this.signature, forexQuote.signature) &&
        Objects.equals(this.source, forexQuote.source) &&
        Objects.equals(this.type, forexQuote.type) &&
        Objects.equals(this.validTill, forexQuote.validTill);
  }

  @Override
  public int hashCode() {
    return Objects.hash(account, accountType, baseAmount, basePoints, buy, interbank, reference, sell, signature, source, type, validTill);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ForexQuote {\n");
    sb.append("    account: ").append(toIndentedString(account)).append("\n");
    sb.append("    accountType: ").append(toIndentedString(accountType)).append("\n");
    sb.append("    baseAmount: ").append(toIndentedString(baseAmount)).append("\n");
    sb.append("    basePoints: ").append(toIndentedString(basePoints)).append("\n");
    sb.append("    buy: ").append(toIndentedString(buy)).append("\n");
    sb.append("    interbank: ").append(toIndentedString(interbank)).append("\n");
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
    sb.append("    sell: ").append(toIndentedString(sell)).append("\n");
    sb.append("    signature: ").append(toIndentedString(signature)).append("\n");
    sb.append("    source: ").append(toIndentedString(source)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    validTill: ").append(toIndentedString(validTill)).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    ");
  }

/**
   * Create an instance of ForexQuote given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of ForexQuote
   * @throws JsonProcessingException if the JSON string is invalid with respect to ForexQuote
   */
  public static ForexQuote fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, ForexQuote.class);
  }
/**
  * Convert an instance of ForexQuote to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy