Skip to content
Closed
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
100 changes: 0 additions & 100 deletions src/main/java/com/adyen/model/acswebhooks/AcsWebhooksHandler.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/java/com/adyen/model/acswebhooks/JSON.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.adyen.model.acswebhooks;
package com.adyen.model.java;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The package for this file has been updated to com.adyen.model.java, but the file itself was not moved or renamed from src/main/java/com/adyen/model/acswebhooks/JSON.java. This mismatch between the package declaration and the file path will cause a compilation error. To fix this, the file should be moved to src/main/java/com/adyen/model/java/JSON.java to match the new package structure.


import com.adyen.serializer.ByteArrayDeserializer;
import com.adyen.serializer.ByteArraySerializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Do not edit the class manually.
*/

package com.adyen.model.acswebhooks;
package com.adyen.model.java;

import com.fasterxml.jackson.annotation.JsonValue;
import jakarta.ws.rs.core.GenericType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
* Do not edit the class manually.
*/

package com.adyen.model.acswebhooks;
package com.adyen.model.java;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
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 @@ -23,9 +25,21 @@ public class Amount {
public static final String JSON_PROPERTY_CURRENCY = "currency";
private String currency;

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

public static final String JSON_PROPERTY_VALUE = "value";
private Long value;

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

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

public Amount() {}

/**
Expand All @@ -40,6 +54,7 @@ public Amount() {}
*/
public Amount currency(String currency) {
this.currency = currency;
isSetCurrency = true; // mark as set
return this;
}

Expand Down Expand Up @@ -71,6 +86,7 @@ public String getCurrency() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCurrency(String currency) {
this.currency = currency;
isSetCurrency = true; // mark as set
}

/**
Expand All @@ -83,6 +99,7 @@ public void setCurrency(String currency) {
*/
public Amount value(Long value) {
this.value = value;
isSetValue = true; // mark as set
return this;
}

Expand Down Expand Up @@ -110,6 +127,27 @@ public Long getValue() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setValue(Long value) {
this.value = value;
isSetValue = true; // mark as set
}

/**
* Configures whether null values are explicitly serialized in the JSON payload. Default is false.
*/
public Amount 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 Amount object is equal to o. */
Expand All @@ -123,12 +161,14 @@ public boolean equals(Object o) {
}
Amount amount = (Amount) o;
return Objects.equals(this.currency, amount.currency)
&& Objects.equals(this.value, amount.value);
&& Objects.equals(this.isSetCurrency, amount.isSetCurrency)
&& Objects.equals(this.value, amount.value)
&& Objects.equals(this.isSetValue, amount.isSetValue);
}

@Override
public int hashCode() {
return Objects.hash(currency, value);
return Objects.hash(currency, isSetCurrency, value, isSetValue);
}

@Override
Expand All @@ -151,6 +191,33 @@ 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 (isSetCurrency) {
addIfNull(nulls, JSON_PROPERTY_CURRENCY, this.currency);
}
if (isSetValue) {
addIfNull(nulls, JSON_PROPERTY_VALUE, this.value);
}

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 Amount given an JSON string
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
* Do not edit the class manually.
*/

package com.adyen.model.acswebhooks;
package com.adyen.model.java;

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 Down Expand Up @@ -72,6 +74,15 @@ public static StatusEnum fromValue(String value) {
public static final String JSON_PROPERTY_STATUS = "status";
private StatusEnum status;

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

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

public AuthenticationDecision() {}

/**
Expand All @@ -86,6 +97,7 @@ public AuthenticationDecision() {}
*/
public AuthenticationDecision status(StatusEnum status) {
this.status = status;
isSetStatus = true; // mark as set
return this;
}

Expand Down Expand Up @@ -117,6 +129,27 @@ public StatusEnum getStatus() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatus(StatusEnum status) {
this.status = status;
isSetStatus = true; // mark as set
}

/**
* Configures whether null values are explicitly serialized in the JSON payload. Default is false.
*/
public AuthenticationDecision 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 AuthenticationDecision object is equal to o. */
Expand All @@ -129,12 +162,13 @@ public boolean equals(Object o) {
return false;
}
AuthenticationDecision authenticationDecision = (AuthenticationDecision) o;
return Objects.equals(this.status, authenticationDecision.status);
return Objects.equals(this.status, authenticationDecision.status)
&& Objects.equals(this.isSetStatus, authenticationDecision.isSetStatus);
}

@Override
public int hashCode() {
return Objects.hash(status);
return Objects.hash(status, isSetStatus);
}

@Override
Expand All @@ -156,6 +190,30 @@ 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 (isSetStatus) {
addIfNull(nulls, JSON_PROPERTY_STATUS, this.status);
}

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 AuthenticationDecision given an JSON string
*
Expand Down
Loading
Loading