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

com.adyen.model.balanceplatform.PaymentInstrumentRevealInfo Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * Configuration API
 *
 * The version of the OpenAPI document: 2
 * 
 *
 * 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.balanceplatform;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.balanceplatform.Expiry;
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.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * PaymentInstrumentRevealInfo
 */
@JsonPropertyOrder({
  PaymentInstrumentRevealInfo.JSON_PROPERTY_CVC,
  PaymentInstrumentRevealInfo.JSON_PROPERTY_EXPIRATION,
  PaymentInstrumentRevealInfo.JSON_PROPERTY_PAN
})

public class PaymentInstrumentRevealInfo {
  public static final String JSON_PROPERTY_CVC = "cvc";
  private String cvc;

  public static final String JSON_PROPERTY_EXPIRATION = "expiration";
  private Expiry expiration;

  public static final String JSON_PROPERTY_PAN = "pan";
  private String pan;

  public PaymentInstrumentRevealInfo() { 
  }

  /**
   * The CVC2 value of the card.
   *
   * @param cvc The CVC2 value of the card.
   * @return the current {@code PaymentInstrumentRevealInfo} instance, allowing for method chaining
   */
  public PaymentInstrumentRevealInfo cvc(String cvc) {
    this.cvc = cvc;
    return this;
  }

  /**
   * The CVC2 value of the card.
   * @return cvc The CVC2 value of the card.
   */
  @JsonProperty(JSON_PROPERTY_CVC)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getCvc() {
    return cvc;
  }

  /**
   * The CVC2 value of the card.
   *
   * @param cvc The CVC2 value of the card.
   */
  @JsonProperty(JSON_PROPERTY_CVC)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCvc(String cvc) {
    this.cvc = cvc;
  }

  /**
   * expiration
   *
   * @param expiration 
   * @return the current {@code PaymentInstrumentRevealInfo} instance, allowing for method chaining
   */
  public PaymentInstrumentRevealInfo expiration(Expiry expiration) {
    this.expiration = expiration;
    return this;
  }

  /**
   * Get expiration
   * @return expiration 
   */
  @JsonProperty(JSON_PROPERTY_EXPIRATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Expiry getExpiration() {
    return expiration;
  }

  /**
   * expiration
   *
   * @param expiration 
   */
  @JsonProperty(JSON_PROPERTY_EXPIRATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setExpiration(Expiry expiration) {
    this.expiration = expiration;
  }

  /**
   * The primary account number (PAN) of the card.
   *
   * @param pan The primary account number (PAN) of the card.
   * @return the current {@code PaymentInstrumentRevealInfo} instance, allowing for method chaining
   */
  public PaymentInstrumentRevealInfo pan(String pan) {
    this.pan = pan;
    return this;
  }

  /**
   * The primary account number (PAN) of the card.
   * @return pan The primary account number (PAN) of the card.
   */
  @JsonProperty(JSON_PROPERTY_PAN)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getPan() {
    return pan;
  }

  /**
   * The primary account number (PAN) of the card.
   *
   * @param pan The primary account number (PAN) of the card.
   */
  @JsonProperty(JSON_PROPERTY_PAN)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setPan(String pan) {
    this.pan = pan;
  }

  /**
   * Return true if this PaymentInstrumentRevealInfo object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentInstrumentRevealInfo paymentInstrumentRevealInfo = (PaymentInstrumentRevealInfo) o;
    return Objects.equals(this.cvc, paymentInstrumentRevealInfo.cvc) &&
        Objects.equals(this.expiration, paymentInstrumentRevealInfo.expiration) &&
        Objects.equals(this.pan, paymentInstrumentRevealInfo.pan);
  }

  @Override
  public int hashCode() {
    return Objects.hash(cvc, expiration, pan);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentInstrumentRevealInfo {\n");
    sb.append("    cvc: ").append(toIndentedString(cvc)).append("\n");
    sb.append("    expiration: ").append(toIndentedString(expiration)).append("\n");
    sb.append("    pan: ").append(toIndentedString(pan)).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 PaymentInstrumentRevealInfo given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of PaymentInstrumentRevealInfo
   * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentInstrumentRevealInfo
   */
  public static PaymentInstrumentRevealInfo fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, PaymentInstrumentRevealInfo.class);
  }
/**
  * Convert an instance of PaymentInstrumentRevealInfo to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy