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

com.adyen.model.binlookup.ThreeDSAvailabilityResponse Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * Adyen BinLookup API
 *
 * The version of the OpenAPI document: 54
 * 
 *
 * 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.binlookup;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.binlookup.BinDetail;
import com.adyen.model.binlookup.DSPublicKeyDetail;
import com.adyen.model.binlookup.ThreeDS2CardRangeDetail;
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.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * ThreeDSAvailabilityResponse
 */
@JsonPropertyOrder({
  ThreeDSAvailabilityResponse.JSON_PROPERTY_BIN_DETAILS,
  ThreeDSAvailabilityResponse.JSON_PROPERTY_DS_PUBLIC_KEYS,
  ThreeDSAvailabilityResponse.JSON_PROPERTY_THREE_D_S1_SUPPORTED,
  ThreeDSAvailabilityResponse.JSON_PROPERTY_THREE_D_S2_CARD_RANGE_DETAILS,
  ThreeDSAvailabilityResponse.JSON_PROPERTY_THREE_D_S2SUPPORTED
})

public class ThreeDSAvailabilityResponse {
  public static final String JSON_PROPERTY_BIN_DETAILS = "binDetails";
  private BinDetail binDetails;

  public static final String JSON_PROPERTY_DS_PUBLIC_KEYS = "dsPublicKeys";
  private List dsPublicKeys;

  public static final String JSON_PROPERTY_THREE_D_S1_SUPPORTED = "threeDS1Supported";
  private Boolean threeDS1Supported;

  public static final String JSON_PROPERTY_THREE_D_S2_CARD_RANGE_DETAILS = "threeDS2CardRangeDetails";
  private List threeDS2CardRangeDetails;

  public static final String JSON_PROPERTY_THREE_D_S2SUPPORTED = "threeDS2supported";
  private Boolean threeDS2supported;

  public ThreeDSAvailabilityResponse() { 
  }

  /**
   * binDetails
   *
   * @param binDetails 
   * @return the current {@code ThreeDSAvailabilityResponse} instance, allowing for method chaining
   */
  public ThreeDSAvailabilityResponse binDetails(BinDetail binDetails) {
    this.binDetails = binDetails;
    return this;
  }

  /**
   * Get binDetails
   * @return binDetails 
   */
  @JsonProperty(JSON_PROPERTY_BIN_DETAILS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public BinDetail getBinDetails() {
    return binDetails;
  }

  /**
   * binDetails
   *
   * @param binDetails 
   */
  @JsonProperty(JSON_PROPERTY_BIN_DETAILS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBinDetails(BinDetail binDetails) {
    this.binDetails = binDetails;
  }

  /**
   * List of Directory Server (DS) public keys.
   *
   * @param dsPublicKeys List of Directory Server (DS) public keys.
   * @return the current {@code ThreeDSAvailabilityResponse} instance, allowing for method chaining
   */
  public ThreeDSAvailabilityResponse dsPublicKeys(List dsPublicKeys) {
    this.dsPublicKeys = dsPublicKeys;
    return this;
  }

  public ThreeDSAvailabilityResponse addDsPublicKeysItem(DSPublicKeyDetail dsPublicKeysItem) {
    if (this.dsPublicKeys == null) {
      this.dsPublicKeys = new ArrayList<>();
    }
    this.dsPublicKeys.add(dsPublicKeysItem);
    return this;
  }

  /**
   * List of Directory Server (DS) public keys.
   * @return dsPublicKeys List of Directory Server (DS) public keys.
   */
  @JsonProperty(JSON_PROPERTY_DS_PUBLIC_KEYS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getDsPublicKeys() {
    return dsPublicKeys;
  }

  /**
   * List of Directory Server (DS) public keys.
   *
   * @param dsPublicKeys List of Directory Server (DS) public keys.
   */
  @JsonProperty(JSON_PROPERTY_DS_PUBLIC_KEYS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDsPublicKeys(List dsPublicKeys) {
    this.dsPublicKeys = dsPublicKeys;
  }

  /**
   * Indicator if 3D Secure 1 is supported.
   *
   * @param threeDS1Supported Indicator if 3D Secure 1 is supported.
   * @return the current {@code ThreeDSAvailabilityResponse} instance, allowing for method chaining
   */
  public ThreeDSAvailabilityResponse threeDS1Supported(Boolean threeDS1Supported) {
    this.threeDS1Supported = threeDS1Supported;
    return this;
  }

  /**
   * Indicator if 3D Secure 1 is supported.
   * @return threeDS1Supported Indicator if 3D Secure 1 is supported.
   */
  @JsonProperty(JSON_PROPERTY_THREE_D_S1_SUPPORTED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Boolean getThreeDS1Supported() {
    return threeDS1Supported;
  }

  /**
   * Indicator if 3D Secure 1 is supported.
   *
   * @param threeDS1Supported Indicator if 3D Secure 1 is supported.
   */
  @JsonProperty(JSON_PROPERTY_THREE_D_S1_SUPPORTED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setThreeDS1Supported(Boolean threeDS1Supported) {
    this.threeDS1Supported = threeDS1Supported;
  }

  /**
   * List of brand and card range pairs.
   *
   * @param threeDS2CardRangeDetails List of brand and card range pairs.
   * @return the current {@code ThreeDSAvailabilityResponse} instance, allowing for method chaining
   */
  public ThreeDSAvailabilityResponse threeDS2CardRangeDetails(List threeDS2CardRangeDetails) {
    this.threeDS2CardRangeDetails = threeDS2CardRangeDetails;
    return this;
  }

  public ThreeDSAvailabilityResponse addThreeDS2CardRangeDetailsItem(ThreeDS2CardRangeDetail threeDS2CardRangeDetailsItem) {
    if (this.threeDS2CardRangeDetails == null) {
      this.threeDS2CardRangeDetails = new ArrayList<>();
    }
    this.threeDS2CardRangeDetails.add(threeDS2CardRangeDetailsItem);
    return this;
  }

  /**
   * List of brand and card range pairs.
   * @return threeDS2CardRangeDetails List of brand and card range pairs.
   */
  @JsonProperty(JSON_PROPERTY_THREE_D_S2_CARD_RANGE_DETAILS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getThreeDS2CardRangeDetails() {
    return threeDS2CardRangeDetails;
  }

  /**
   * List of brand and card range pairs.
   *
   * @param threeDS2CardRangeDetails List of brand and card range pairs.
   */
  @JsonProperty(JSON_PROPERTY_THREE_D_S2_CARD_RANGE_DETAILS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setThreeDS2CardRangeDetails(List threeDS2CardRangeDetails) {
    this.threeDS2CardRangeDetails = threeDS2CardRangeDetails;
  }

  /**
   * Indicator if 3D Secure 2 is supported.
   *
   * @param threeDS2supported Indicator if 3D Secure 2 is supported.
   * @return the current {@code ThreeDSAvailabilityResponse} instance, allowing for method chaining
   */
  public ThreeDSAvailabilityResponse threeDS2supported(Boolean threeDS2supported) {
    this.threeDS2supported = threeDS2supported;
    return this;
  }

  /**
   * Indicator if 3D Secure 2 is supported.
   * @return threeDS2supported Indicator if 3D Secure 2 is supported.
   */
  @JsonProperty(JSON_PROPERTY_THREE_D_S2SUPPORTED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Boolean getThreeDS2supported() {
    return threeDS2supported;
  }

  /**
   * Indicator if 3D Secure 2 is supported.
   *
   * @param threeDS2supported Indicator if 3D Secure 2 is supported.
   */
  @JsonProperty(JSON_PROPERTY_THREE_D_S2SUPPORTED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setThreeDS2supported(Boolean threeDS2supported) {
    this.threeDS2supported = threeDS2supported;
  }

  /**
   * Return true if this ThreeDSAvailabilityResponse object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ThreeDSAvailabilityResponse threeDSAvailabilityResponse = (ThreeDSAvailabilityResponse) o;
    return Objects.equals(this.binDetails, threeDSAvailabilityResponse.binDetails) &&
        Objects.equals(this.dsPublicKeys, threeDSAvailabilityResponse.dsPublicKeys) &&
        Objects.equals(this.threeDS1Supported, threeDSAvailabilityResponse.threeDS1Supported) &&
        Objects.equals(this.threeDS2CardRangeDetails, threeDSAvailabilityResponse.threeDS2CardRangeDetails) &&
        Objects.equals(this.threeDS2supported, threeDSAvailabilityResponse.threeDS2supported);
  }

  @Override
  public int hashCode() {
    return Objects.hash(binDetails, dsPublicKeys, threeDS1Supported, threeDS2CardRangeDetails, threeDS2supported);
  }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy