
com.adyen.model.checkout.CheckoutSessionThreeDS2RequestData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adyen-java-api-library Show documentation
Show all versions of adyen-java-api-library Show documentation
Adyen API Client Library for Java
/*
* Adyen Checkout API
*
* The version of the OpenAPI document: 71
*
*
* 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.checkout;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.checkout.Phone;
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;
/**
* CheckoutSessionThreeDS2RequestData
*/
@JsonPropertyOrder({
CheckoutSessionThreeDS2RequestData.JSON_PROPERTY_HOME_PHONE,
CheckoutSessionThreeDS2RequestData.JSON_PROPERTY_MOBILE_PHONE,
CheckoutSessionThreeDS2RequestData.JSON_PROPERTY_THREE_D_S_REQUESTOR_CHALLENGE_IND,
CheckoutSessionThreeDS2RequestData.JSON_PROPERTY_WORK_PHONE
})
public class CheckoutSessionThreeDS2RequestData {
public static final String JSON_PROPERTY_HOME_PHONE = "homePhone";
private Phone homePhone;
public static final String JSON_PROPERTY_MOBILE_PHONE = "mobilePhone";
private Phone mobilePhone;
/**
* Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only
*/
public enum ThreeDSRequestorChallengeIndEnum {
_01(String.valueOf("01")),
_02(String.valueOf("02")),
_03(String.valueOf("03")),
_04(String.valueOf("04")),
_05(String.valueOf("05")),
_06(String.valueOf("06"));
private String value;
ThreeDSRequestorChallengeIndEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ThreeDSRequestorChallengeIndEnum fromValue(String value) {
for (ThreeDSRequestorChallengeIndEnum b : ThreeDSRequestorChallengeIndEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_THREE_D_S_REQUESTOR_CHALLENGE_IND = "threeDSRequestorChallengeInd";
private ThreeDSRequestorChallengeIndEnum threeDSRequestorChallengeInd;
public static final String JSON_PROPERTY_WORK_PHONE = "workPhone";
private Phone workPhone;
public CheckoutSessionThreeDS2RequestData() {
}
/**
* homePhone
*
* @param homePhone
* @return the current {@code CheckoutSessionThreeDS2RequestData} instance, allowing for method chaining
*/
public CheckoutSessionThreeDS2RequestData homePhone(Phone homePhone) {
this.homePhone = homePhone;
return this;
}
/**
* Get homePhone
* @return homePhone
*/
@JsonProperty(JSON_PROPERTY_HOME_PHONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Phone getHomePhone() {
return homePhone;
}
/**
* homePhone
*
* @param homePhone
*/
@JsonProperty(JSON_PROPERTY_HOME_PHONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHomePhone(Phone homePhone) {
this.homePhone = homePhone;
}
/**
* mobilePhone
*
* @param mobilePhone
* @return the current {@code CheckoutSessionThreeDS2RequestData} instance, allowing for method chaining
*/
public CheckoutSessionThreeDS2RequestData mobilePhone(Phone mobilePhone) {
this.mobilePhone = mobilePhone;
return this;
}
/**
* Get mobilePhone
* @return mobilePhone
*/
@JsonProperty(JSON_PROPERTY_MOBILE_PHONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Phone getMobilePhone() {
return mobilePhone;
}
/**
* mobilePhone
*
* @param mobilePhone
*/
@JsonProperty(JSON_PROPERTY_MOBILE_PHONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMobilePhone(Phone mobilePhone) {
this.mobilePhone = mobilePhone;
}
/**
* Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only
*
* @param threeDSRequestorChallengeInd Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only
* @return the current {@code CheckoutSessionThreeDS2RequestData} instance, allowing for method chaining
*/
public CheckoutSessionThreeDS2RequestData threeDSRequestorChallengeInd(ThreeDSRequestorChallengeIndEnum threeDSRequestorChallengeInd) {
this.threeDSRequestorChallengeInd = threeDSRequestorChallengeInd;
return this;
}
/**
* Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only
* @return threeDSRequestorChallengeInd Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only
*/
@JsonProperty(JSON_PROPERTY_THREE_D_S_REQUESTOR_CHALLENGE_IND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ThreeDSRequestorChallengeIndEnum getThreeDSRequestorChallengeInd() {
return threeDSRequestorChallengeInd;
}
/**
* Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only
*
* @param threeDSRequestorChallengeInd Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only
*/
@JsonProperty(JSON_PROPERTY_THREE_D_S_REQUESTOR_CHALLENGE_IND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setThreeDSRequestorChallengeInd(ThreeDSRequestorChallengeIndEnum threeDSRequestorChallengeInd) {
this.threeDSRequestorChallengeInd = threeDSRequestorChallengeInd;
}
/**
* workPhone
*
* @param workPhone
* @return the current {@code CheckoutSessionThreeDS2RequestData} instance, allowing for method chaining
*/
public CheckoutSessionThreeDS2RequestData workPhone(Phone workPhone) {
this.workPhone = workPhone;
return this;
}
/**
* Get workPhone
* @return workPhone
*/
@JsonProperty(JSON_PROPERTY_WORK_PHONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Phone getWorkPhone() {
return workPhone;
}
/**
* workPhone
*
* @param workPhone
*/
@JsonProperty(JSON_PROPERTY_WORK_PHONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setWorkPhone(Phone workPhone) {
this.workPhone = workPhone;
}
/**
* Return true if this CheckoutSessionThreeDS2RequestData object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CheckoutSessionThreeDS2RequestData checkoutSessionThreeDS2RequestData = (CheckoutSessionThreeDS2RequestData) o;
return Objects.equals(this.homePhone, checkoutSessionThreeDS2RequestData.homePhone) &&
Objects.equals(this.mobilePhone, checkoutSessionThreeDS2RequestData.mobilePhone) &&
Objects.equals(this.threeDSRequestorChallengeInd, checkoutSessionThreeDS2RequestData.threeDSRequestorChallengeInd) &&
Objects.equals(this.workPhone, checkoutSessionThreeDS2RequestData.workPhone);
}
@Override
public int hashCode() {
return Objects.hash(homePhone, mobilePhone, threeDSRequestorChallengeInd, workPhone);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CheckoutSessionThreeDS2RequestData {\n");
sb.append(" homePhone: ").append(toIndentedString(homePhone)).append("\n");
sb.append(" mobilePhone: ").append(toIndentedString(mobilePhone)).append("\n");
sb.append(" threeDSRequestorChallengeInd: ").append(toIndentedString(threeDSRequestorChallengeInd)).append("\n");
sb.append(" workPhone: ").append(toIndentedString(workPhone)).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 CheckoutSessionThreeDS2RequestData given an JSON string
*
* @param jsonString JSON string
* @return An instance of CheckoutSessionThreeDS2RequestData
* @throws JsonProcessingException if the JSON string is invalid with respect to CheckoutSessionThreeDS2RequestData
*/
public static CheckoutSessionThreeDS2RequestData fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, CheckoutSessionThreeDS2RequestData.class);
}
/**
* Convert an instance of CheckoutSessionThreeDS2RequestData to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy