Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 248 additions & 2 deletions src/main/java/com/adyen/model/checkout/AccountInfo.java

Large diffs are not rendered by default.

213 changes: 211 additions & 2 deletions src/main/java/com/adyen/model/checkout/AcctInfo.java

Large diffs are not rendered by default.

187 changes: 185 additions & 2 deletions src/main/java/com/adyen/model/checkout/AchDetails.java

Large diffs are not rendered by default.

115 changes: 113 additions & 2 deletions src/main/java/com/adyen/model/checkout/AdditionalData3DSecure.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

package com.adyen.model.checkout;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Expand All @@ -36,6 +38,9 @@ public class AdditionalData3DSecure {
// `authenticationData.threeDSRequestData.nativeThreeDS` instead.
private String allow3DS2;

/** Mark when the attribute has been explicitly set. */
private boolean isSetAllow3DS2 = false;

/**
* Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: *
* **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size
Expand Down Expand Up @@ -90,20 +95,41 @@ public static ChallengeWindowSizeEnum fromValue(String value) {
public static final String JSON_PROPERTY_CHALLENGE_WINDOW_SIZE = "challengeWindowSize";
private ChallengeWindowSizeEnum challengeWindowSize;

/** Mark when the attribute has been explicitly set. */
private boolean isSetChallengeWindowSize = false;

public static final String JSON_PROPERTY_EXECUTE_THREE_D = "executeThreeD";
@Deprecated // deprecated since Adyen Checkout API v69: Use
// [`authenticationData.attemptAuthentication`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments?target=_blank#request-authenticationData-attemptAuthentication) instead
private String executeThreeD;

/** Mark when the attribute has been explicitly set. */
private boolean isSetExecuteThreeD = false;

public static final String JSON_PROPERTY_MPI_IMPLEMENTATION_TYPE = "mpiImplementationType";
private String mpiImplementationType;

/** Mark when the attribute has been explicitly set. */
private boolean isSetMpiImplementationType = false;

public static final String JSON_PROPERTY_SCA_EXEMPTION = "scaExemption";
private String scaExemption;

/** Mark when the attribute has been explicitly set. */
private boolean isSetScaExemption = false;

public static final String JSON_PROPERTY_THREE_D_S_VERSION = "threeDSVersion";
private String threeDSVersion;

/** Mark when the attribute has been explicitly set. */
private boolean isSetThreeDSVersion = false;

/**
* Sets whether attributes with null values should be explicitly included in the JSON payload.
* Default is false.
*/
@JsonIgnore private boolean includeNullValues = false;

public AdditionalData3DSecure() {}

/**
Expand Down Expand Up @@ -140,6 +166,7 @@ public AdditionalData3DSecure() {}
// `authenticationData.threeDSRequestData.nativeThreeDS` instead.
public AdditionalData3DSecure allow3DS2(String allow3DS2) {
this.allow3DS2 = allow3DS2;
isSetAllow3DS2 = true; // mark as set
return this;
}

Expand Down Expand Up @@ -215,6 +242,7 @@ public String getAllow3DS2() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAllow3DS2(String allow3DS2) {
this.allow3DS2 = allow3DS2;
isSetAllow3DS2 = true; // mark as set
}

/**
Expand All @@ -229,6 +257,7 @@ public void setAllow3DS2(String allow3DS2) {
*/
public AdditionalData3DSecure challengeWindowSize(ChallengeWindowSizeEnum challengeWindowSize) {
this.challengeWindowSize = challengeWindowSize;
isSetChallengeWindowSize = true; // mark as set
return this;
}

Expand Down Expand Up @@ -260,6 +289,7 @@ public ChallengeWindowSizeEnum getChallengeWindowSize() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setChallengeWindowSize(ChallengeWindowSizeEnum challengeWindowSize) {
this.challengeWindowSize = challengeWindowSize;
isSetChallengeWindowSize = true; // mark as set
}

/**
Expand All @@ -284,6 +314,7 @@ public void setChallengeWindowSize(ChallengeWindowSizeEnum challengeWindowSize)
// [`authenticationData.attemptAuthentication`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments?target=_blank#request-authenticationData-attemptAuthentication) instead
public AdditionalData3DSecure executeThreeD(String executeThreeD) {
this.executeThreeD = executeThreeD;
isSetExecuteThreeD = true; // mark as set
return this;
}

Expand Down Expand Up @@ -335,6 +366,7 @@ public String getExecuteThreeD() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setExecuteThreeD(String executeThreeD) {
this.executeThreeD = executeThreeD;
isSetExecuteThreeD = true; // mark as set
}

/**
Expand All @@ -345,6 +377,7 @@ public void setExecuteThreeD(String executeThreeD) {
*/
public AdditionalData3DSecure mpiImplementationType(String mpiImplementationType) {
this.mpiImplementationType = mpiImplementationType;
isSetMpiImplementationType = true; // mark as set
return this;
}

Expand All @@ -368,6 +401,7 @@ public String getMpiImplementationType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMpiImplementationType(String mpiImplementationType) {
this.mpiImplementationType = mpiImplementationType;
isSetMpiImplementationType = true; // mark as set
}

/**
Expand All @@ -384,6 +418,7 @@ public void setMpiImplementationType(String mpiImplementationType) {
*/
public AdditionalData3DSecure scaExemption(String scaExemption) {
this.scaExemption = scaExemption;
isSetScaExemption = true; // mark as set
return this;
}

Expand Down Expand Up @@ -419,6 +454,7 @@ public String getScaExemption() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setScaExemption(String scaExemption) {
this.scaExemption = scaExemption;
isSetScaExemption = true; // mark as set
}

/**
Expand All @@ -443,6 +479,7 @@ public void setScaExemption(String scaExemption) {
*/
public AdditionalData3DSecure threeDSVersion(String threeDSVersion) {
this.threeDSVersion = threeDSVersion;
isSetThreeDSVersion = true; // mark as set
return this;
}

Expand Down Expand Up @@ -494,6 +531,27 @@ public String getThreeDSVersion() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setThreeDSVersion(String threeDSVersion) {
this.threeDSVersion = threeDSVersion;
isSetThreeDSVersion = true; // mark as set
}

/**
* Configures whether null values are explicitly serialized in the JSON payload. Default is false.
*/
public AdditionalData3DSecure includeNullValues(boolean includeNullValues) {
this.includeNullValues = includeNullValues;
return this;
}

/** Returns whether null values are explicitly serialized in the JSON payload. */
public boolean isIncludeNullValues() {
return includeNullValues;
}

/**
* Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
*/
public void setIncludeNullValues(boolean includeNullValues) {
this.includeNullValues = includeNullValues;
}

/** Return true if this AdditionalData3DSecure object is equal to o. */
Expand All @@ -507,22 +565,36 @@ public boolean equals(Object o) {
}
AdditionalData3DSecure additionalData3DSecure = (AdditionalData3DSecure) o;
return Objects.equals(this.allow3DS2, additionalData3DSecure.allow3DS2)
&& Objects.equals(this.isSetAllow3DS2, additionalData3DSecure.isSetAllow3DS2)
&& Objects.equals(this.challengeWindowSize, additionalData3DSecure.challengeWindowSize)
&& Objects.equals(
this.isSetChallengeWindowSize, additionalData3DSecure.isSetChallengeWindowSize)
&& Objects.equals(this.executeThreeD, additionalData3DSecure.executeThreeD)
&& Objects.equals(this.isSetExecuteThreeD, additionalData3DSecure.isSetExecuteThreeD)
&& Objects.equals(this.mpiImplementationType, additionalData3DSecure.mpiImplementationType)
&& Objects.equals(
this.isSetMpiImplementationType, additionalData3DSecure.isSetMpiImplementationType)
&& Objects.equals(this.scaExemption, additionalData3DSecure.scaExemption)
&& Objects.equals(this.threeDSVersion, additionalData3DSecure.threeDSVersion);
&& Objects.equals(this.isSetScaExemption, additionalData3DSecure.isSetScaExemption)
&& Objects.equals(this.threeDSVersion, additionalData3DSecure.threeDSVersion)
&& Objects.equals(this.isSetThreeDSVersion, additionalData3DSecure.isSetThreeDSVersion);
}

@Override
public int hashCode() {
return Objects.hash(
allow3DS2,
isSetAllow3DS2,
challengeWindowSize,
isSetChallengeWindowSize,
executeThreeD,
isSetExecuteThreeD,
mpiImplementationType,
isSetMpiImplementationType,
scaExemption,
threeDSVersion);
isSetScaExemption,
threeDSVersion,
isSetThreeDSVersion);
}

@Override
Expand Down Expand Up @@ -553,6 +625,45 @@ private String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}

/** Returns a map of properties to be merged into the JSON payload as explicit null values. */
@JsonInclude(JsonInclude.Include.ALWAYS)
@JsonAnyGetter
public Map<String, Object> getExplicitNulls() {
if (!this.includeNullValues) {
return Collections.emptyMap();
}

Map<String, Object> nulls = new HashMap<>();

if (isSetAllow3DS2) {
addIfNull(nulls, JSON_PROPERTY_ALLOW3_D_S2, this.allow3DS2);
}
if (isSetChallengeWindowSize) {
addIfNull(nulls, JSON_PROPERTY_CHALLENGE_WINDOW_SIZE, this.challengeWindowSize);
}
if (isSetExecuteThreeD) {
addIfNull(nulls, JSON_PROPERTY_EXECUTE_THREE_D, this.executeThreeD);
}
if (isSetMpiImplementationType) {
addIfNull(nulls, JSON_PROPERTY_MPI_IMPLEMENTATION_TYPE, this.mpiImplementationType);
}
if (isSetScaExemption) {
addIfNull(nulls, JSON_PROPERTY_SCA_EXEMPTION, this.scaExemption);
}
if (isSetThreeDSVersion) {
addIfNull(nulls, JSON_PROPERTY_THREE_D_S_VERSION, this.threeDSVersion);
}

return nulls;
}

// add to map when value is null
private void addIfNull(Map<String, Object> map, String key, Object value) {
if (value == null) {
map.put(key, null);
}
}

/**
* Create an instance of AdditionalData3DSecure given an JSON string
*
Expand Down
Loading