From 81051bf9c529c499d74dc16c6440ba26666f7e7c Mon Sep 17 00:00:00 2001
From: AdyenAutomationBot
<38424300+AdyenAutomationBot@users.noreply.github.com>
Date: Mon, 9 Mar 2026 13:31:56 +0000
Subject: [PATCH] [configurationwebhooks] Automated update from
Adyen/adyen-openapi@37c03ec
---
.../ConfigurationWebhooksHandler.java | 214 -----------------
.../model/configurationwebhooks/JSON.java | 2 +-
.../AbstractOpenApiSchema.java | 2 +-
.../AccountHolder.java | 187 ++++++++++++++-
.../AccountHolderCapability.java | 158 ++++++++++++-
.../AccountHolderNotificationData.java | 74 +++++-
.../AccountHolderNotificationRequest.java | 92 +++++++-
.../AccountSupportingEntityCapability.java | 135 ++++++++++-
.../Address.java | 121 +++++++++-
.../Amount.java | 73 +++++-
.../Authentication.java | 82 ++++++-
.../Balance.java | 110 ++++++++-
.../BalanceAccount.java | 168 +++++++++++++-
.../BalanceAccountNotificationData.java | 75 +++++-
.../BalanceAccountNotificationRequest.java | 92 +++++++-
.../BalancePlatformNotificationResponse.java | 66 +++++-
.../BankAccountDetails.java | 142 +++++++++++-
.../BankScoreSignalTriggeredData.java | 151 +++++++++++-
.../BulkAddress.java | 185 ++++++++++++++-
.../CapabilityProblem.java | 73 +++++-
.../CapabilityProblemEntity.java | 91 +++++++-
.../CapabilityProblemEntityRecursive.java | 82 ++++++-
.../CapabilitySettings.java | 111 ++++++++-
.../{configurationwebhooks => java}/Card.java | 195 +++++++++++++++-
.../CardConfiguration.java | 196 +++++++++++++++-
.../CardOrderItem.java | 135 ++++++++++-
.../CardOrderItemDeliveryStatus.java | 84 ++++++-
.../CardOrderNotificationRequest.java | 92 +++++++-
.../ContactDetails.java | 92 +++++++-
.../DeliveryAddress.java | 132 ++++++++++-
.../DeliveryContact.java | 132 ++++++++++-
.../Device.java | 82 ++++++-
.../Expiry.java | 74 +++++-
.../IbanAccountIdentification.java | 73 +++++-
.../{configurationwebhooks => java}/Name.java | 73 +++++-
.../NetworkTokenNotificationDataV2.java | 206 ++++++++++++++++-
.../NetworkTokenNotificationRequest.java | 92 +++++++-
.../NetworkTokenRequestor.java | 73 +++++-
.../NetworkTokenRiskRuleData.java | 110 ++++++++-
.../NetworkTokenRiskRuleSource.java | 73 +++++-
.../NetworkTokenTransactionRulesResult.java | 103 ++++++++-
.../NetworkTokenTriggeredRiskRule.java | 91 +++++++-
.../PaymentInstrument.java | 211 ++++++++++++++++-
...tionalBankAccountIdentificationsInner.java | 2 +-
.../PaymentInstrumentNotificationData.java | 76 +++++-
.../PaymentNotificationRequest.java | 92 +++++++-
.../Phone.java | 74 +++++-
.../PhoneNumber.java | 88 ++++++-
.../PlatformPaymentConfiguration.java | 79 ++++++-
.../RemediatingAction.java | 73 +++++-
.../Resource.java | 83 ++++++-
.../ResourceReference.java | 82 ++++++-
.../ScoreNotificationRequest.java | 92 +++++++-
.../SweepConfigurationNotificationData.java | 84 ++++++-
...SweepConfigurationNotificationRequest.java | 93 +++++++-
.../SweepConfigurationV2.java | 216 +++++++++++++++++-
.../SweepCounterparty.java | 89 +++++++-
.../SweepSchedule.java | 73 +++++-
.../TokenAuthentication.java | 73 +++++-
.../ValidationFacts.java | 82 ++++++-
.../VerificationDeadline.java | 83 ++++++-
.../VerificationError.java | 121 +++++++++-
.../VerificationErrorRecursive.java | 111 ++++++++-
.../Wallet.java | 120 +++++++++-
64 files changed, 6294 insertions(+), 397 deletions(-)
delete mode 100644 src/main/java/com/adyen/model/configurationwebhooks/ConfigurationWebhooksHandler.java
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/AbstractOpenApiSchema.java (98%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/AccountHolder.java (83%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/AccountHolderCapability.java (82%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/AccountHolderNotificationData.java (66%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/AccountHolderNotificationRequest.java (73%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/AccountSupportingEntityCapability.java (83%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/Address.java (75%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/Amount.java (69%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/Authentication.java (72%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/Balance.java (70%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/BalanceAccount.java (80%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/BalanceAccountNotificationData.java (66%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/BalanceAccountNotificationRequest.java (73%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/BalancePlatformNotificationResponse.java (67%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/BankAccountDetails.java (77%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/BankScoreSignalTriggeredData.java (74%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/BulkAddress.java (74%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/CapabilityProblem.java (67%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/CapabilityProblemEntity.java (74%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/CapabilityProblemEntityRecursive.java (75%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/CapabilitySettings.java (73%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/Card.java (77%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/CardConfiguration.java (81%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/CardOrderItem.java (72%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/CardOrderItemDeliveryStatus.java (71%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/CardOrderNotificationRequest.java (72%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/ContactDetails.java (67%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/DeliveryAddress.java (76%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/DeliveryContact.java (71%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/Device.java (70%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/Expiry.java (63%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/IbanAccountIdentification.java (72%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/Name.java (62%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/NetworkTokenNotificationDataV2.java (76%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/NetworkTokenNotificationRequest.java (73%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/NetworkTokenRequestor.java (66%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/NetworkTokenRiskRuleData.java (70%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/NetworkTokenRiskRuleSource.java (73%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/NetworkTokenTransactionRulesResult.java (72%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/NetworkTokenTriggeredRiskRule.java (67%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/PaymentInstrument.java (82%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java (99%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/PaymentInstrumentNotificationData.java (66%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/PaymentNotificationRequest.java (72%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/Phone.java (72%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/PhoneNumber.java (74%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/PlatformPaymentConfiguration.java (73%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/RemediatingAction.java (66%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/Resource.java (68%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/ResourceReference.java (67%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/ScoreNotificationRequest.java (72%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/SweepConfigurationNotificationData.java (69%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/SweepConfigurationNotificationRequest.java (73%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/SweepConfigurationV2.java (86%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/SweepCounterparty.java (82%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/SweepSchedule.java (83%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/TokenAuthentication.java (68%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/ValidationFacts.java (76%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/VerificationDeadline.java (81%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/VerificationError.java (81%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/VerificationErrorRecursive.java (81%)
rename src/main/java/com/adyen/model/{configurationwebhooks => java}/Wallet.java (83%)
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/ConfigurationWebhooksHandler.java b/src/main/java/com/adyen/model/configurationwebhooks/ConfigurationWebhooksHandler.java
deleted file mode 100644
index 6cd42a068..000000000
--- a/src/main/java/com/adyen/model/configurationwebhooks/ConfigurationWebhooksHandler.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Configuration webhooks
- *
- * 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.configurationwebhooks;
-
-import java.util.Optional;
-import java.util.logging.Logger;
-
-/**
- * Handler for processing ConfigurationWebhooks.
- *
- *
This class provides functionality to deserialize the payload of ConfigurationWebhooks events.
- */
-public class ConfigurationWebhooksHandler {
-
- private static final Logger LOG = Logger.getLogger(ConfigurationWebhooksHandler.class.getName());
-
- private final String payload;
-
- /**
- * Constructs a new handler for the given webhook payload
- *
- * @param payload the raw JSON payload from the webhook
- */
- public ConfigurationWebhooksHandler(String payload) {
- this.payload = payload;
- }
-
- /**
- * Attempts to deserialize the webhook payload into a AccountHolderNotificationRequest
- *
- * @return an Optional containing the deserialized object, or empty if deserialization fails
- */
- public Optional getAccountHolderNotificationRequest() {
-
- var optionalAccountHolderNotificationRequest =
- getOptionalField(AccountHolderNotificationRequest.class);
-
- if (optionalAccountHolderNotificationRequest.isPresent()) {
- // verify event type
- for (var value : AccountHolderNotificationRequest.TypeEnum.values()) {
- if (value.equals(optionalAccountHolderNotificationRequest.get().getType())) {
- // found matching event type
- return optionalAccountHolderNotificationRequest;
- }
- }
- }
-
- return Optional.empty();
- }
-
- /**
- * Attempts to deserialize the webhook payload into a BalanceAccountNotificationRequest
- *
- * @return an Optional containing the deserialized object, or empty if deserialization fails
- */
- public Optional getBalanceAccountNotificationRequest() {
-
- var optionalBalanceAccountNotificationRequest =
- getOptionalField(BalanceAccountNotificationRequest.class);
-
- if (optionalBalanceAccountNotificationRequest.isPresent()) {
- // verify event type
- for (var value : BalanceAccountNotificationRequest.TypeEnum.values()) {
- if (value.equals(optionalBalanceAccountNotificationRequest.get().getType())) {
- // found matching event type
- return optionalBalanceAccountNotificationRequest;
- }
- }
- }
-
- return Optional.empty();
- }
-
- /**
- * Attempts to deserialize the webhook payload into a CardOrderNotificationRequest
- *
- * @return an Optional containing the deserialized object, or empty if deserialization fails
- */
- public Optional getCardOrderNotificationRequest() {
-
- var optionalCardOrderNotificationRequest = getOptionalField(CardOrderNotificationRequest.class);
-
- if (optionalCardOrderNotificationRequest.isPresent()) {
- // verify event type
- for (var value : CardOrderNotificationRequest.TypeEnum.values()) {
- if (value.equals(optionalCardOrderNotificationRequest.get().getType())) {
- // found matching event type
- return optionalCardOrderNotificationRequest;
- }
- }
- }
-
- return Optional.empty();
- }
-
- /**
- * Attempts to deserialize the webhook payload into a NetworkTokenNotificationRequest
- *
- * @return an Optional containing the deserialized object, or empty if deserialization fails
- */
- public Optional getNetworkTokenNotificationRequest() {
-
- var optionalNetworkTokenNotificationRequest =
- getOptionalField(NetworkTokenNotificationRequest.class);
-
- if (optionalNetworkTokenNotificationRequest.isPresent()) {
- // verify event type
- for (var value : NetworkTokenNotificationRequest.TypeEnum.values()) {
- if (value.equals(optionalNetworkTokenNotificationRequest.get().getType())) {
- // found matching event type
- return optionalNetworkTokenNotificationRequest;
- }
- }
- }
-
- return Optional.empty();
- }
-
- /**
- * Attempts to deserialize the webhook payload into a PaymentNotificationRequest
- *
- * @return an Optional containing the deserialized object, or empty if deserialization fails
- */
- public Optional getPaymentNotificationRequest() {
-
- var optionalPaymentNotificationRequest = getOptionalField(PaymentNotificationRequest.class);
-
- if (optionalPaymentNotificationRequest.isPresent()) {
- // verify event type
- for (var value : PaymentNotificationRequest.TypeEnum.values()) {
- if (value.equals(optionalPaymentNotificationRequest.get().getType())) {
- // found matching event type
- return optionalPaymentNotificationRequest;
- }
- }
- }
-
- return Optional.empty();
- }
-
- /**
- * Attempts to deserialize the webhook payload into a ScoreNotificationRequest
- *
- * @return an Optional containing the deserialized object, or empty if deserialization fails
- */
- public Optional getScoreNotificationRequest() {
-
- var optionalScoreNotificationRequest = getOptionalField(ScoreNotificationRequest.class);
-
- if (optionalScoreNotificationRequest.isPresent()) {
- // verify event type
- for (var value : ScoreNotificationRequest.TypeEnum.values()) {
- if (value.equals(optionalScoreNotificationRequest.get().getType())) {
- // found matching event type
- return optionalScoreNotificationRequest;
- }
- }
- }
-
- return Optional.empty();
- }
-
- /**
- * Attempts to deserialize the webhook payload into a SweepConfigurationNotificationRequest
- *
- * @return an Optional containing the deserialized object, or empty if deserialization fails
- */
- public Optional
- getSweepConfigurationNotificationRequest() {
-
- var optionalSweepConfigurationNotificationRequest =
- getOptionalField(SweepConfigurationNotificationRequest.class);
-
- if (optionalSweepConfigurationNotificationRequest.isPresent()) {
- // verify event type
- for (var value : SweepConfigurationNotificationRequest.TypeEnum.values()) {
- if (value.equals(optionalSweepConfigurationNotificationRequest.get().getType())) {
- // found matching event type
- return optionalSweepConfigurationNotificationRequest;
- }
- }
- }
-
- return Optional.empty();
- }
-
- /**
- * Deserializes the payload into the specified class type.
- *
- * @param clazz the class to deserialize into
- * @param the type of the class
- * @return an Optional containing the deserialized object, or empty if an error occurs
- */
- private Optional getOptionalField(Class clazz) {
- try {
- T val = JSON.getMapper().readValue(payload, clazz);
- return Optional.ofNullable(val);
- } catch (Exception e) {
- // an error has occurred during deserialization (object not found, deserialization error)
- LOG.warning("Object not found or unexpected error trying to access: " + clazz.getName());
- LOG.warning("Deserialization error: " + e.getMessage());
- return Optional.empty();
- }
- }
-}
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/JSON.java b/src/main/java/com/adyen/model/configurationwebhooks/JSON.java
index a7359241d..abe09e65a 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/JSON.java
+++ b/src/main/java/com/adyen/model/configurationwebhooks/JSON.java
@@ -1,4 +1,4 @@
-package com.adyen.model.configurationwebhooks;
+package com.adyen.model.java;
import com.adyen.serializer.ByteArrayDeserializer;
import com.adyen.serializer.ByteArraySerializer;
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/java/AbstractOpenApiSchema.java
similarity index 98%
rename from src/main/java/com/adyen/model/configurationwebhooks/AbstractOpenApiSchema.java
rename to src/main/java/com/adyen/model/java/AbstractOpenApiSchema.java
index 3cfc72ea4..4217c62f3 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/AbstractOpenApiSchema.java
+++ b/src/main/java/com/adyen/model/java/AbstractOpenApiSchema.java
@@ -9,7 +9,7 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+package com.adyen.model.java;
import com.fasterxml.jackson.annotation.JsonValue;
import jakarta.ws.rs.core.GenericType;
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/AccountHolder.java b/src/main/java/com/adyen/model/java/AccountHolder.java
similarity index 83%
rename from src/main/java/com/adyen/model/configurationwebhooks/AccountHolder.java
rename to src/main/java/com/adyen/model/java/AccountHolder.java
index 7b41ee8d7..98810b0bc 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/AccountHolder.java
+++ b/src/main/java/com/adyen/model/java/AccountHolder.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -45,35 +47,65 @@ public class AccountHolder {
public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
private String balancePlatform;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalancePlatform = false;
+
public static final String JSON_PROPERTY_CAPABILITIES = "capabilities";
private Map capabilities;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCapabilities = false;
+
public static final String JSON_PROPERTY_CONTACT_DETAILS = "contactDetails";
@Deprecated // deprecated
private ContactDetails contactDetails;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetContactDetails = false;
+
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDescription = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_LEGAL_ENTITY_ID = "legalEntityId";
private String legalEntityId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetLegalEntityId = false;
+
public static final String JSON_PROPERTY_METADATA = "metadata";
private Map metadata;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetMetadata = false;
+
public static final String JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE =
"migratedAccountHolderCode";
private String migratedAccountHolderCode;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetMigratedAccountHolderCode = false;
+
public static final String JSON_PROPERTY_PRIMARY_BALANCE_ACCOUNT = "primaryBalanceAccount";
private String primaryBalanceAccount;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPrimaryBalanceAccount = false;
+
public static final String JSON_PROPERTY_REFERENCE = "reference";
private String reference;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReference = false;
+
/**
* The status of the account holder. Possible values: * **active**: The account holder is active
* and allowed to use its capabilities. This is the initial status for account holders and balance
@@ -127,12 +159,27 @@ 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;
+
public static final String JSON_PROPERTY_TIME_ZONE = "timeZone";
private String timeZone;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTimeZone = false;
+
public static final String JSON_PROPERTY_VERIFICATION_DEADLINES = "verificationDeadlines";
private List verificationDeadlines;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetVerificationDeadlines = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public AccountHolder() {}
/**
@@ -149,6 +196,7 @@ public AccountHolder() {}
*/
public AccountHolder balancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
return this;
}
@@ -184,6 +232,7 @@ public String getBalancePlatform() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
}
/**
@@ -199,6 +248,7 @@ public void setBalancePlatform(String balancePlatform) {
*/
public AccountHolder capabilities(Map capabilities) {
this.capabilities = capabilities;
+ isSetCapabilities = true; // mark as set
return this;
}
@@ -240,6 +290,7 @@ public Map getCapabilities() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCapabilities(Map capabilities) {
this.capabilities = capabilities;
+ isSetCapabilities = true; // mark as set
}
/**
@@ -252,6 +303,7 @@ public void setCapabilities(Map capabilities) {
@Deprecated // deprecated
public AccountHolder contactDetails(ContactDetails contactDetails) {
this.contactDetails = contactDetails;
+ isSetContactDetails = true; // mark as set
return this;
}
@@ -279,6 +331,7 @@ public ContactDetails getContactDetails() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setContactDetails(ContactDetails contactDetails) {
this.contactDetails = contactDetails;
+ isSetContactDetails = true; // mark as set
}
/**
@@ -289,6 +342,7 @@ public void setContactDetails(ContactDetails contactDetails) {
*/
public AccountHolder description(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
return this;
}
@@ -312,6 +366,7 @@ public String getDescription() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
}
/**
@@ -322,6 +377,7 @@ public void setDescription(String description) {
*/
public AccountHolder id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -345,6 +401,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -361,6 +418,7 @@ public void setId(String id) {
*/
public AccountHolder legalEntityId(String legalEntityId) {
this.legalEntityId = legalEntityId;
+ isSetLegalEntityId = true; // mark as set
return this;
}
@@ -396,6 +454,7 @@ public String getLegalEntityId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLegalEntityId(String legalEntityId) {
this.legalEntityId = legalEntityId;
+ isSetLegalEntityId = true; // mark as set
}
/**
@@ -411,6 +470,7 @@ public void setLegalEntityId(String legalEntityId) {
*/
public AccountHolder metadata(Map metadata) {
this.metadata = metadata;
+ isSetMetadata = true; // mark as set
return this;
}
@@ -452,6 +512,7 @@ public Map getMetadata() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMetadata(Map metadata) {
this.metadata = metadata;
+ isSetMetadata = true; // mark as set
}
/**
@@ -463,6 +524,7 @@ public void setMetadata(Map metadata) {
*/
public AccountHolder migratedAccountHolderCode(String migratedAccountHolderCode) {
this.migratedAccountHolderCode = migratedAccountHolderCode;
+ isSetMigratedAccountHolderCode = true; // mark as set
return this;
}
@@ -488,6 +550,7 @@ public String getMigratedAccountHolderCode() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMigratedAccountHolderCode(String migratedAccountHolderCode) {
this.migratedAccountHolderCode = migratedAccountHolderCode;
+ isSetMigratedAccountHolderCode = true; // mark as set
}
/**
@@ -502,6 +565,7 @@ public void setMigratedAccountHolderCode(String migratedAccountHolderCode) {
*/
public AccountHolder primaryBalanceAccount(String primaryBalanceAccount) {
this.primaryBalanceAccount = primaryBalanceAccount;
+ isSetPrimaryBalanceAccount = true; // mark as set
return this;
}
@@ -533,6 +597,7 @@ public String getPrimaryBalanceAccount() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPrimaryBalanceAccount(String primaryBalanceAccount) {
this.primaryBalanceAccount = primaryBalanceAccount;
+ isSetPrimaryBalanceAccount = true; // mark as set
}
/**
@@ -543,6 +608,7 @@ public void setPrimaryBalanceAccount(String primaryBalanceAccount) {
*/
public AccountHolder reference(String reference) {
this.reference = reference;
+ isSetReference = true; // mark as set
return this;
}
@@ -566,6 +632,7 @@ public String getReference() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReference(String reference) {
this.reference = reference;
+ isSetReference = true; // mark as set
}
/**
@@ -587,6 +654,7 @@ public void setReference(String reference) {
*/
public AccountHolder status(StatusEnum status) {
this.status = status;
+ isSetStatus = true; // mark as set
return this;
}
@@ -632,6 +700,7 @@ public StatusEnum getStatus() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatus(StatusEnum status) {
this.status = status;
+ isSetStatus = true; // mark as set
}
/**
@@ -647,6 +716,7 @@ public void setStatus(StatusEnum status) {
*/
public AccountHolder timeZone(String timeZone) {
this.timeZone = timeZone;
+ isSetTimeZone = true; // mark as set
return this;
}
@@ -680,6 +750,7 @@ public String getTimeZone() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTimeZone(String timeZone) {
this.timeZone = timeZone;
+ isSetTimeZone = true; // mark as set
}
/**
@@ -692,6 +763,7 @@ public void setTimeZone(String timeZone) {
*/
public AccountHolder verificationDeadlines(List verificationDeadlines) {
this.verificationDeadlines = verificationDeadlines;
+ isSetVerificationDeadlines = true; // mark as set
return this;
}
@@ -728,6 +800,27 @@ public List getVerificationDeadlines() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setVerificationDeadlines(List verificationDeadlines) {
this.verificationDeadlines = verificationDeadlines;
+ isSetVerificationDeadlines = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public AccountHolder 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 AccountHolder object is equal to o. */
@@ -741,36 +834,64 @@ public boolean equals(Object o) {
}
AccountHolder accountHolder = (AccountHolder) o;
return Objects.equals(this.balancePlatform, accountHolder.balancePlatform)
+ && Objects.equals(this.isSetBalancePlatform, accountHolder.isSetBalancePlatform)
&& Objects.equals(this.capabilities, accountHolder.capabilities)
+ && Objects.equals(this.isSetCapabilities, accountHolder.isSetCapabilities)
&& Objects.equals(this.contactDetails, accountHolder.contactDetails)
+ && Objects.equals(this.isSetContactDetails, accountHolder.isSetContactDetails)
&& Objects.equals(this.description, accountHolder.description)
+ && Objects.equals(this.isSetDescription, accountHolder.isSetDescription)
&& Objects.equals(this.id, accountHolder.id)
+ && Objects.equals(this.isSetId, accountHolder.isSetId)
&& Objects.equals(this.legalEntityId, accountHolder.legalEntityId)
+ && Objects.equals(this.isSetLegalEntityId, accountHolder.isSetLegalEntityId)
&& Objects.equals(this.metadata, accountHolder.metadata)
+ && Objects.equals(this.isSetMetadata, accountHolder.isSetMetadata)
&& Objects.equals(this.migratedAccountHolderCode, accountHolder.migratedAccountHolderCode)
+ && Objects.equals(
+ this.isSetMigratedAccountHolderCode, accountHolder.isSetMigratedAccountHolderCode)
&& Objects.equals(this.primaryBalanceAccount, accountHolder.primaryBalanceAccount)
+ && Objects.equals(this.isSetPrimaryBalanceAccount, accountHolder.isSetPrimaryBalanceAccount)
&& Objects.equals(this.reference, accountHolder.reference)
+ && Objects.equals(this.isSetReference, accountHolder.isSetReference)
&& Objects.equals(this.status, accountHolder.status)
+ && Objects.equals(this.isSetStatus, accountHolder.isSetStatus)
&& Objects.equals(this.timeZone, accountHolder.timeZone)
- && Objects.equals(this.verificationDeadlines, accountHolder.verificationDeadlines);
+ && Objects.equals(this.isSetTimeZone, accountHolder.isSetTimeZone)
+ && Objects.equals(this.verificationDeadlines, accountHolder.verificationDeadlines)
+ && Objects.equals(
+ this.isSetVerificationDeadlines, accountHolder.isSetVerificationDeadlines);
}
@Override
public int hashCode() {
return Objects.hash(
balancePlatform,
+ isSetBalancePlatform,
capabilities,
+ isSetCapabilities,
contactDetails,
+ isSetContactDetails,
description,
+ isSetDescription,
id,
+ isSetId,
legalEntityId,
+ isSetLegalEntityId,
metadata,
+ isSetMetadata,
migratedAccountHolderCode,
+ isSetMigratedAccountHolderCode,
primaryBalanceAccount,
+ isSetPrimaryBalanceAccount,
reference,
+ isSetReference,
status,
+ isSetStatus,
timeZone,
- verificationDeadlines);
+ isSetTimeZone,
+ verificationDeadlines,
+ isSetVerificationDeadlines);
}
@Override
@@ -810,6 +931,66 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetBalancePlatform) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE_PLATFORM, this.balancePlatform);
+ }
+ if (isSetCapabilities) {
+ addIfNull(nulls, JSON_PROPERTY_CAPABILITIES, this.capabilities);
+ }
+ if (isSetContactDetails) {
+ addIfNull(nulls, JSON_PROPERTY_CONTACT_DETAILS, this.contactDetails);
+ }
+ if (isSetDescription) {
+ addIfNull(nulls, JSON_PROPERTY_DESCRIPTION, this.description);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetLegalEntityId) {
+ addIfNull(nulls, JSON_PROPERTY_LEGAL_ENTITY_ID, this.legalEntityId);
+ }
+ if (isSetMetadata) {
+ addIfNull(nulls, JSON_PROPERTY_METADATA, this.metadata);
+ }
+ if (isSetMigratedAccountHolderCode) {
+ addIfNull(nulls, JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE, this.migratedAccountHolderCode);
+ }
+ if (isSetPrimaryBalanceAccount) {
+ addIfNull(nulls, JSON_PROPERTY_PRIMARY_BALANCE_ACCOUNT, this.primaryBalanceAccount);
+ }
+ if (isSetReference) {
+ addIfNull(nulls, JSON_PROPERTY_REFERENCE, this.reference);
+ }
+ if (isSetStatus) {
+ addIfNull(nulls, JSON_PROPERTY_STATUS, this.status);
+ }
+ if (isSetTimeZone) {
+ addIfNull(nulls, JSON_PROPERTY_TIME_ZONE, this.timeZone);
+ }
+ if (isSetVerificationDeadlines) {
+ addIfNull(nulls, JSON_PROPERTY_VERIFICATION_DEADLINES, this.verificationDeadlines);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of AccountHolder given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/AccountHolderCapability.java b/src/main/java/com/adyen/model/java/AccountHolderCapability.java
similarity index 82%
rename from src/main/java/com/adyen/model/configurationwebhooks/AccountHolderCapability.java
rename to src/main/java/com/adyen/model/java/AccountHolderCapability.java
index f4919a926..aeca560c0 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/AccountHolderCapability.java
+++ b/src/main/java/com/adyen/model/java/AccountHolderCapability.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -40,6 +42,9 @@ public class AccountHolderCapability {
public static final String JSON_PROPERTY_ALLOWED = "allowed";
private Boolean allowed;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAllowed = false;
+
/**
* The capability level that is allowed for the account holder. Possible values:
* **notApplicable**, **low**, **medium**, **high**.
@@ -91,18 +96,33 @@ public static AllowedLevelEnum fromValue(String value) {
public static final String JSON_PROPERTY_ALLOWED_LEVEL = "allowedLevel";
private AllowedLevelEnum allowedLevel;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAllowedLevel = false;
+
public static final String JSON_PROPERTY_ALLOWED_SETTINGS = "allowedSettings";
private CapabilitySettings allowedSettings;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAllowedSettings = false;
+
public static final String JSON_PROPERTY_ENABLED = "enabled";
private Boolean enabled;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEnabled = false;
+
public static final String JSON_PROPERTY_PROBLEMS = "problems";
private List problems;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetProblems = false;
+
public static final String JSON_PROPERTY_REQUESTED = "requested";
private Boolean requested;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetRequested = false;
+
/**
* The requested level of the capability. Some capabilities, such as those used in [card
* issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different
@@ -156,12 +176,21 @@ public static RequestedLevelEnum fromValue(String value) {
public static final String JSON_PROPERTY_REQUESTED_LEVEL = "requestedLevel";
private RequestedLevelEnum requestedLevel;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetRequestedLevel = false;
+
public static final String JSON_PROPERTY_REQUESTED_SETTINGS = "requestedSettings";
private CapabilitySettings requestedSettings;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetRequestedSettings = false;
+
public static final String JSON_PROPERTY_TRANSFER_INSTRUMENTS = "transferInstruments";
private List transferInstruments;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTransferInstruments = false;
+
/**
* The status of the verification checks for the capability. Possible values: * **pending**: Adyen
* is running the verification. * **invalid**: The verification failed. Check if the
@@ -216,6 +245,15 @@ public static VerificationStatusEnum fromValue(String value) {
public static final String JSON_PROPERTY_VERIFICATION_STATUS = "verificationStatus";
private VerificationStatusEnum verificationStatus;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetVerificationStatus = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public AccountHolderCapability() {}
/**
@@ -228,6 +266,7 @@ public AccountHolderCapability() {}
*/
public AccountHolderCapability allowed(Boolean allowed) {
this.allowed = allowed;
+ isSetAllowed = true; // mark as set
return this;
}
@@ -255,6 +294,7 @@ public Boolean getAllowed() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAllowed(Boolean allowed) {
this.allowed = allowed;
+ isSetAllowed = true; // mark as set
}
/**
@@ -267,6 +307,7 @@ public void setAllowed(Boolean allowed) {
*/
public AccountHolderCapability allowedLevel(AllowedLevelEnum allowedLevel) {
this.allowedLevel = allowedLevel;
+ isSetAllowedLevel = true; // mark as set
return this;
}
@@ -294,6 +335,7 @@ public AllowedLevelEnum getAllowedLevel() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAllowedLevel(AllowedLevelEnum allowedLevel) {
this.allowedLevel = allowedLevel;
+ isSetAllowedLevel = true; // mark as set
}
/**
@@ -304,6 +346,7 @@ public void setAllowedLevel(AllowedLevelEnum allowedLevel) {
*/
public AccountHolderCapability allowedSettings(CapabilitySettings allowedSettings) {
this.allowedSettings = allowedSettings;
+ isSetAllowedSettings = true; // mark as set
return this;
}
@@ -327,6 +370,7 @@ public CapabilitySettings getAllowedSettings() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAllowedSettings(CapabilitySettings allowedSettings) {
this.allowedSettings = allowedSettings;
+ isSetAllowedSettings = true; // mark as set
}
/**
@@ -339,6 +383,7 @@ public void setAllowedSettings(CapabilitySettings allowedSettings) {
*/
public AccountHolderCapability enabled(Boolean enabled) {
this.enabled = enabled;
+ isSetEnabled = true; // mark as set
return this;
}
@@ -366,6 +411,7 @@ public Boolean getEnabled() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
+ isSetEnabled = true; // mark as set
}
/**
@@ -376,6 +422,7 @@ public void setEnabled(Boolean enabled) {
*/
public AccountHolderCapability problems(List problems) {
this.problems = problems;
+ isSetProblems = true; // mark as set
return this;
}
@@ -408,6 +455,7 @@ public List getProblems() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setProblems(List problems) {
this.problems = problems;
+ isSetProblems = true; // mark as set
}
/**
@@ -420,6 +468,7 @@ public void setProblems(List problems) {
*/
public AccountHolderCapability requested(Boolean requested) {
this.requested = requested;
+ isSetRequested = true; // mark as set
return this;
}
@@ -447,6 +496,7 @@ public Boolean getRequested() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRequested(Boolean requested) {
this.requested = requested;
+ isSetRequested = true; // mark as set
}
/**
@@ -464,6 +514,7 @@ public void setRequested(Boolean requested) {
*/
public AccountHolderCapability requestedLevel(RequestedLevelEnum requestedLevel) {
this.requestedLevel = requestedLevel;
+ isSetRequestedLevel = true; // mark as set
return this;
}
@@ -501,6 +552,7 @@ public RequestedLevelEnum getRequestedLevel() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRequestedLevel(RequestedLevelEnum requestedLevel) {
this.requestedLevel = requestedLevel;
+ isSetRequestedLevel = true; // mark as set
}
/**
@@ -511,6 +563,7 @@ public void setRequestedLevel(RequestedLevelEnum requestedLevel) {
*/
public AccountHolderCapability requestedSettings(CapabilitySettings requestedSettings) {
this.requestedSettings = requestedSettings;
+ isSetRequestedSettings = true; // mark as set
return this;
}
@@ -534,6 +587,7 @@ public CapabilitySettings getRequestedSettings() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRequestedSettings(CapabilitySettings requestedSettings) {
this.requestedSettings = requestedSettings;
+ isSetRequestedSettings = true; // mark as set
}
/**
@@ -546,6 +600,7 @@ public void setRequestedSettings(CapabilitySettings requestedSettings) {
public AccountHolderCapability transferInstruments(
List transferInstruments) {
this.transferInstruments = transferInstruments;
+ isSetTransferInstruments = true; // mark as set
return this;
}
@@ -580,6 +635,7 @@ public List getTransferInstruments() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTransferInstruments(List transferInstruments) {
this.transferInstruments = transferInstruments;
+ isSetTransferInstruments = true; // mark as set
}
/**
@@ -598,6 +654,7 @@ public void setTransferInstruments(List trans
*/
public AccountHolderCapability verificationStatus(VerificationStatusEnum verificationStatus) {
this.verificationStatus = verificationStatus;
+ isSetVerificationStatus = true; // mark as set
return this;
}
@@ -637,6 +694,27 @@ public VerificationStatusEnum getVerificationStatus() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setVerificationStatus(VerificationStatusEnum verificationStatus) {
this.verificationStatus = verificationStatus;
+ isSetVerificationStatus = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public AccountHolderCapability 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 AccountHolderCapability object is equal to o. */
@@ -650,30 +728,53 @@ public boolean equals(Object o) {
}
AccountHolderCapability accountHolderCapability = (AccountHolderCapability) o;
return Objects.equals(this.allowed, accountHolderCapability.allowed)
+ && Objects.equals(this.isSetAllowed, accountHolderCapability.isSetAllowed)
&& Objects.equals(this.allowedLevel, accountHolderCapability.allowedLevel)
+ && Objects.equals(this.isSetAllowedLevel, accountHolderCapability.isSetAllowedLevel)
&& Objects.equals(this.allowedSettings, accountHolderCapability.allowedSettings)
+ && Objects.equals(this.isSetAllowedSettings, accountHolderCapability.isSetAllowedSettings)
&& Objects.equals(this.enabled, accountHolderCapability.enabled)
+ && Objects.equals(this.isSetEnabled, accountHolderCapability.isSetEnabled)
&& Objects.equals(this.problems, accountHolderCapability.problems)
+ && Objects.equals(this.isSetProblems, accountHolderCapability.isSetProblems)
&& Objects.equals(this.requested, accountHolderCapability.requested)
+ && Objects.equals(this.isSetRequested, accountHolderCapability.isSetRequested)
&& Objects.equals(this.requestedLevel, accountHolderCapability.requestedLevel)
+ && Objects.equals(this.isSetRequestedLevel, accountHolderCapability.isSetRequestedLevel)
&& Objects.equals(this.requestedSettings, accountHolderCapability.requestedSettings)
+ && Objects.equals(
+ this.isSetRequestedSettings, accountHolderCapability.isSetRequestedSettings)
&& Objects.equals(this.transferInstruments, accountHolderCapability.transferInstruments)
- && Objects.equals(this.verificationStatus, accountHolderCapability.verificationStatus);
+ && Objects.equals(
+ this.isSetTransferInstruments, accountHolderCapability.isSetTransferInstruments)
+ && Objects.equals(this.verificationStatus, accountHolderCapability.verificationStatus)
+ && Objects.equals(
+ this.isSetVerificationStatus, accountHolderCapability.isSetVerificationStatus);
}
@Override
public int hashCode() {
return Objects.hash(
allowed,
+ isSetAllowed,
allowedLevel,
+ isSetAllowedLevel,
allowedSettings,
+ isSetAllowedSettings,
enabled,
+ isSetEnabled,
problems,
+ isSetProblems,
requested,
+ isSetRequested,
requestedLevel,
+ isSetRequestedLevel,
requestedSettings,
+ isSetRequestedSettings,
transferInstruments,
- verificationStatus);
+ isSetTransferInstruments,
+ verificationStatus,
+ isSetVerificationStatus);
}
@Override
@@ -706,6 +807,57 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAllowed) {
+ addIfNull(nulls, JSON_PROPERTY_ALLOWED, this.allowed);
+ }
+ if (isSetAllowedLevel) {
+ addIfNull(nulls, JSON_PROPERTY_ALLOWED_LEVEL, this.allowedLevel);
+ }
+ if (isSetAllowedSettings) {
+ addIfNull(nulls, JSON_PROPERTY_ALLOWED_SETTINGS, this.allowedSettings);
+ }
+ if (isSetEnabled) {
+ addIfNull(nulls, JSON_PROPERTY_ENABLED, this.enabled);
+ }
+ if (isSetProblems) {
+ addIfNull(nulls, JSON_PROPERTY_PROBLEMS, this.problems);
+ }
+ if (isSetRequested) {
+ addIfNull(nulls, JSON_PROPERTY_REQUESTED, this.requested);
+ }
+ if (isSetRequestedLevel) {
+ addIfNull(nulls, JSON_PROPERTY_REQUESTED_LEVEL, this.requestedLevel);
+ }
+ if (isSetRequestedSettings) {
+ addIfNull(nulls, JSON_PROPERTY_REQUESTED_SETTINGS, this.requestedSettings);
+ }
+ if (isSetTransferInstruments) {
+ addIfNull(nulls, JSON_PROPERTY_TRANSFER_INSTRUMENTS, this.transferInstruments);
+ }
+ if (isSetVerificationStatus) {
+ addIfNull(nulls, JSON_PROPERTY_VERIFICATION_STATUS, this.verificationStatus);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of AccountHolderCapability given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/AccountHolderNotificationData.java b/src/main/java/com/adyen/model/java/AccountHolderNotificationData.java
similarity index 66%
rename from src/main/java/com/adyen/model/configurationwebhooks/AccountHolderNotificationData.java
rename to src/main/java/com/adyen/model/java/AccountHolderNotificationData.java
index d85544171..11584889c 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/AccountHolderNotificationData.java
+++ b/src/main/java/com/adyen/model/java/AccountHolderNotificationData.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -26,9 +28,21 @@ public class AccountHolderNotificationData {
public static final String JSON_PROPERTY_ACCOUNT_HOLDER = "accountHolder";
private AccountHolder accountHolder;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAccountHolder = false;
+
public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
private String balancePlatform;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalancePlatform = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public AccountHolderNotificationData() {}
/**
@@ -40,6 +54,7 @@ public AccountHolderNotificationData() {}
*/
public AccountHolderNotificationData accountHolder(AccountHolder accountHolder) {
this.accountHolder = accountHolder;
+ isSetAccountHolder = true; // mark as set
return this;
}
@@ -63,6 +78,7 @@ public AccountHolder getAccountHolder() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountHolder(AccountHolder accountHolder) {
this.accountHolder = accountHolder;
+ isSetAccountHolder = true; // mark as set
}
/**
@@ -74,6 +90,7 @@ public void setAccountHolder(AccountHolder accountHolder) {
*/
public AccountHolderNotificationData balancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
return this;
}
@@ -97,6 +114,27 @@ public String getBalancePlatform() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public AccountHolderNotificationData 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 AccountHolderNotificationData object is equal to o. */
@@ -110,12 +148,15 @@ public boolean equals(Object o) {
}
AccountHolderNotificationData accountHolderNotificationData = (AccountHolderNotificationData) o;
return Objects.equals(this.accountHolder, accountHolderNotificationData.accountHolder)
- && Objects.equals(this.balancePlatform, accountHolderNotificationData.balancePlatform);
+ && Objects.equals(this.isSetAccountHolder, accountHolderNotificationData.isSetAccountHolder)
+ && Objects.equals(this.balancePlatform, accountHolderNotificationData.balancePlatform)
+ && Objects.equals(
+ this.isSetBalancePlatform, accountHolderNotificationData.isSetBalancePlatform);
}
@Override
public int hashCode() {
- return Objects.hash(accountHolder, balancePlatform);
+ return Objects.hash(accountHolder, isSetAccountHolder, balancePlatform, isSetBalancePlatform);
}
@Override
@@ -138,6 +179,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAccountHolder) {
+ addIfNull(nulls, JSON_PROPERTY_ACCOUNT_HOLDER, this.accountHolder);
+ }
+ if (isSetBalancePlatform) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE_PLATFORM, this.balancePlatform);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of AccountHolderNotificationData given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/AccountHolderNotificationRequest.java b/src/main/java/com/adyen/model/java/AccountHolderNotificationRequest.java
similarity index 73%
rename from src/main/java/com/adyen/model/configurationwebhooks/AccountHolderNotificationRequest.java
rename to src/main/java/com/adyen/model/java/AccountHolderNotificationRequest.java
index 437fb8cb1..1d502d9cf 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/AccountHolderNotificationRequest.java
+++ b/src/main/java/com/adyen/model/java/AccountHolderNotificationRequest.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -33,12 +35,21 @@ public class AccountHolderNotificationRequest {
public static final String JSON_PROPERTY_DATA = "data";
private AccountHolderNotificationData data;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetData = false;
+
public static final String JSON_PROPERTY_ENVIRONMENT = "environment";
private String environment;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEnvironment = false;
+
public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
private OffsetDateTime timestamp;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTimestamp = false;
+
/** Type of webhook. */
public enum TypeEnum {
BALANCEPLATFORM_ACCOUNTHOLDER_UPDATED(String.valueOf("balancePlatform.accountHolder.updated")),
@@ -83,6 +94,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public AccountHolderNotificationRequest() {}
/**
@@ -94,6 +114,7 @@ public AccountHolderNotificationRequest() {}
*/
public AccountHolderNotificationRequest data(AccountHolderNotificationData data) {
this.data = data;
+ isSetData = true; // mark as set
return this;
}
@@ -117,6 +138,7 @@ public AccountHolderNotificationData getData() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setData(AccountHolderNotificationData data) {
this.data = data;
+ isSetData = true; // mark as set
}
/**
@@ -129,6 +151,7 @@ public void setData(AccountHolderNotificationData data) {
*/
public AccountHolderNotificationRequest environment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
return this;
}
@@ -154,6 +177,7 @@ public String getEnvironment() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnvironment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
}
/**
@@ -165,6 +189,7 @@ public void setEnvironment(String environment) {
*/
public AccountHolderNotificationRequest timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
return this;
}
@@ -188,6 +213,7 @@ public OffsetDateTime getTimestamp() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTimestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
}
/**
@@ -199,6 +225,7 @@ public void setTimestamp(OffsetDateTime timestamp) {
*/
public AccountHolderNotificationRequest type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -222,6 +249,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public AccountHolderNotificationRequest 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 AccountHolderNotificationRequest object is equal to o. */
@@ -236,14 +284,19 @@ public boolean equals(Object o) {
AccountHolderNotificationRequest accountHolderNotificationRequest =
(AccountHolderNotificationRequest) o;
return Objects.equals(this.data, accountHolderNotificationRequest.data)
+ && Objects.equals(this.isSetData, accountHolderNotificationRequest.isSetData)
&& Objects.equals(this.environment, accountHolderNotificationRequest.environment)
+ && Objects.equals(this.isSetEnvironment, accountHolderNotificationRequest.isSetEnvironment)
&& Objects.equals(this.timestamp, accountHolderNotificationRequest.timestamp)
- && Objects.equals(this.type, accountHolderNotificationRequest.type);
+ && Objects.equals(this.isSetTimestamp, accountHolderNotificationRequest.isSetTimestamp)
+ && Objects.equals(this.type, accountHolderNotificationRequest.type)
+ && Objects.equals(this.isSetType, accountHolderNotificationRequest.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(data, environment, timestamp, type);
+ return Objects.hash(
+ data, isSetData, environment, isSetEnvironment, timestamp, isSetTimestamp, type, isSetType);
}
@Override
@@ -268,6 +321,39 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetData) {
+ addIfNull(nulls, JSON_PROPERTY_DATA, this.data);
+ }
+ if (isSetEnvironment) {
+ addIfNull(nulls, JSON_PROPERTY_ENVIRONMENT, this.environment);
+ }
+ if (isSetTimestamp) {
+ addIfNull(nulls, JSON_PROPERTY_TIMESTAMP, this.timestamp);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of AccountHolderNotificationRequest given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/AccountSupportingEntityCapability.java b/src/main/java/com/adyen/model/java/AccountSupportingEntityCapability.java
similarity index 83%
rename from src/main/java/com/adyen/model/configurationwebhooks/AccountSupportingEntityCapability.java
rename to src/main/java/com/adyen/model/java/AccountSupportingEntityCapability.java
index a433c3279..6d97bb071 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/AccountSupportingEntityCapability.java
+++ b/src/main/java/com/adyen/model/java/AccountSupportingEntityCapability.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -35,6 +37,9 @@ public class AccountSupportingEntityCapability {
public static final String JSON_PROPERTY_ALLOWED = "allowed";
private Boolean allowed;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAllowed = false;
+
/**
* The capability level that is allowed for the account holder. Possible values:
* **notApplicable**, **low**, **medium**, **high**.
@@ -86,15 +91,27 @@ public static AllowedLevelEnum fromValue(String value) {
public static final String JSON_PROPERTY_ALLOWED_LEVEL = "allowedLevel";
private AllowedLevelEnum allowedLevel;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAllowedLevel = false;
+
public static final String JSON_PROPERTY_ENABLED = "enabled";
private Boolean enabled;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEnabled = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_REQUESTED = "requested";
private Boolean requested;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetRequested = false;
+
/**
* The requested level of the capability. Some capabilities, such as those used in [card
* issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different
@@ -148,6 +165,9 @@ public static RequestedLevelEnum fromValue(String value) {
public static final String JSON_PROPERTY_REQUESTED_LEVEL = "requestedLevel";
private RequestedLevelEnum requestedLevel;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetRequestedLevel = false;
+
/**
* The status of the verification checks for the supporting entity capability. Possible values: *
* **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check
@@ -202,6 +222,15 @@ public static VerificationStatusEnum fromValue(String value) {
public static final String JSON_PROPERTY_VERIFICATION_STATUS = "verificationStatus";
private VerificationStatusEnum verificationStatus;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetVerificationStatus = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public AccountSupportingEntityCapability() {}
/**
@@ -216,6 +245,7 @@ public AccountSupportingEntityCapability() {}
*/
public AccountSupportingEntityCapability allowed(Boolean allowed) {
this.allowed = allowed;
+ isSetAllowed = true; // mark as set
return this;
}
@@ -245,6 +275,7 @@ public Boolean getAllowed() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAllowed(Boolean allowed) {
this.allowed = allowed;
+ isSetAllowed = true; // mark as set
}
/**
@@ -258,6 +289,7 @@ public void setAllowed(Boolean allowed) {
*/
public AccountSupportingEntityCapability allowedLevel(AllowedLevelEnum allowedLevel) {
this.allowedLevel = allowedLevel;
+ isSetAllowedLevel = true; // mark as set
return this;
}
@@ -285,6 +317,7 @@ public AllowedLevelEnum getAllowedLevel() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAllowedLevel(AllowedLevelEnum allowedLevel) {
this.allowedLevel = allowedLevel;
+ isSetAllowedLevel = true; // mark as set
}
/**
@@ -298,6 +331,7 @@ public void setAllowedLevel(AllowedLevelEnum allowedLevel) {
*/
public AccountSupportingEntityCapability enabled(Boolean enabled) {
this.enabled = enabled;
+ isSetEnabled = true; // mark as set
return this;
}
@@ -325,6 +359,7 @@ public Boolean getEnabled() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
+ isSetEnabled = true; // mark as set
}
/**
@@ -336,6 +371,7 @@ public void setEnabled(Boolean enabled) {
*/
public AccountSupportingEntityCapability id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -359,6 +395,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -372,6 +409,7 @@ public void setId(String id) {
*/
public AccountSupportingEntityCapability requested(Boolean requested) {
this.requested = requested;
+ isSetRequested = true; // mark as set
return this;
}
@@ -399,6 +437,7 @@ public Boolean getRequested() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRequested(Boolean requested) {
this.requested = requested;
+ isSetRequested = true; // mark as set
}
/**
@@ -417,6 +456,7 @@ public void setRequested(Boolean requested) {
*/
public AccountSupportingEntityCapability requestedLevel(RequestedLevelEnum requestedLevel) {
this.requestedLevel = requestedLevel;
+ isSetRequestedLevel = true; // mark as set
return this;
}
@@ -454,6 +494,7 @@ public RequestedLevelEnum getRequestedLevel() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRequestedLevel(RequestedLevelEnum requestedLevel) {
this.requestedLevel = requestedLevel;
+ isSetRequestedLevel = true; // mark as set
}
/**
@@ -474,6 +515,7 @@ public void setRequestedLevel(RequestedLevelEnum requestedLevel) {
public AccountSupportingEntityCapability verificationStatus(
VerificationStatusEnum verificationStatus) {
this.verificationStatus = verificationStatus;
+ isSetVerificationStatus = true; // mark as set
return this;
}
@@ -513,6 +555,27 @@ public VerificationStatusEnum getVerificationStatus() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setVerificationStatus(VerificationStatusEnum verificationStatus) {
this.verificationStatus = verificationStatus;
+ isSetVerificationStatus = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public AccountSupportingEntityCapability 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 AccountSupportingEntityCapability object is equal to o. */
@@ -527,19 +590,43 @@ public boolean equals(Object o) {
AccountSupportingEntityCapability accountSupportingEntityCapability =
(AccountSupportingEntityCapability) o;
return Objects.equals(this.allowed, accountSupportingEntityCapability.allowed)
+ && Objects.equals(this.isSetAllowed, accountSupportingEntityCapability.isSetAllowed)
&& Objects.equals(this.allowedLevel, accountSupportingEntityCapability.allowedLevel)
+ && Objects.equals(
+ this.isSetAllowedLevel, accountSupportingEntityCapability.isSetAllowedLevel)
&& Objects.equals(this.enabled, accountSupportingEntityCapability.enabled)
+ && Objects.equals(this.isSetEnabled, accountSupportingEntityCapability.isSetEnabled)
&& Objects.equals(this.id, accountSupportingEntityCapability.id)
+ && Objects.equals(this.isSetId, accountSupportingEntityCapability.isSetId)
&& Objects.equals(this.requested, accountSupportingEntityCapability.requested)
+ && Objects.equals(this.isSetRequested, accountSupportingEntityCapability.isSetRequested)
&& Objects.equals(this.requestedLevel, accountSupportingEntityCapability.requestedLevel)
&& Objects.equals(
- this.verificationStatus, accountSupportingEntityCapability.verificationStatus);
+ this.isSetRequestedLevel, accountSupportingEntityCapability.isSetRequestedLevel)
+ && Objects.equals(
+ this.verificationStatus, accountSupportingEntityCapability.verificationStatus)
+ && Objects.equals(
+ this.isSetVerificationStatus,
+ accountSupportingEntityCapability.isSetVerificationStatus);
}
@Override
public int hashCode() {
return Objects.hash(
- allowed, allowedLevel, enabled, id, requested, requestedLevel, verificationStatus);
+ allowed,
+ isSetAllowed,
+ allowedLevel,
+ isSetAllowedLevel,
+ enabled,
+ isSetEnabled,
+ id,
+ isSetId,
+ requested,
+ isSetRequested,
+ requestedLevel,
+ isSetRequestedLevel,
+ verificationStatus,
+ isSetVerificationStatus);
}
@Override
@@ -567,6 +654,48 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAllowed) {
+ addIfNull(nulls, JSON_PROPERTY_ALLOWED, this.allowed);
+ }
+ if (isSetAllowedLevel) {
+ addIfNull(nulls, JSON_PROPERTY_ALLOWED_LEVEL, this.allowedLevel);
+ }
+ if (isSetEnabled) {
+ addIfNull(nulls, JSON_PROPERTY_ENABLED, this.enabled);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetRequested) {
+ addIfNull(nulls, JSON_PROPERTY_REQUESTED, this.requested);
+ }
+ if (isSetRequestedLevel) {
+ addIfNull(nulls, JSON_PROPERTY_REQUESTED_LEVEL, this.requestedLevel);
+ }
+ if (isSetVerificationStatus) {
+ addIfNull(nulls, JSON_PROPERTY_VERIFICATION_STATUS, this.verificationStatus);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of AccountSupportingEntityCapability given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/Address.java b/src/main/java/com/adyen/model/java/Address.java
similarity index 75%
rename from src/main/java/com/adyen/model/configurationwebhooks/Address.java
rename to src/main/java/com/adyen/model/java/Address.java
index 5acb96d00..fd042227e 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/Address.java
+++ b/src/main/java/com/adyen/model/java/Address.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -30,21 +32,45 @@ public class Address {
public static final String JSON_PROPERTY_CITY = "city";
private String city;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCity = false;
+
public static final String JSON_PROPERTY_COUNTRY = "country";
private String country;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCountry = false;
+
public static final String JSON_PROPERTY_HOUSE_NUMBER_OR_NAME = "houseNumberOrName";
private String houseNumberOrName;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetHouseNumberOrName = false;
+
public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode";
private String postalCode;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPostalCode = false;
+
public static final String JSON_PROPERTY_STATE_OR_PROVINCE = "stateOrProvince";
private String stateOrProvince;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetStateOrProvince = false;
+
public static final String JSON_PROPERTY_STREET = "street";
private String street;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetStreet = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public Address() {}
/**
@@ -55,6 +81,7 @@ public Address() {}
*/
public Address city(String city) {
this.city = city;
+ isSetCity = true; // mark as set
return this;
}
@@ -78,6 +105,7 @@ public String getCity() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCity(String city) {
this.city = city;
+ isSetCity = true; // mark as set
}
/**
@@ -92,6 +120,7 @@ public void setCity(String city) {
*/
public Address country(String country) {
this.country = country;
+ isSetCountry = true; // mark as set
return this;
}
@@ -123,6 +152,7 @@ public String getCountry() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCountry(String country) {
this.country = country;
+ isSetCountry = true; // mark as set
}
/**
@@ -133,6 +163,7 @@ public void setCountry(String country) {
*/
public Address houseNumberOrName(String houseNumberOrName) {
this.houseNumberOrName = houseNumberOrName;
+ isSetHouseNumberOrName = true; // mark as set
return this;
}
@@ -156,6 +187,7 @@ public String getHouseNumberOrName() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHouseNumberOrName(String houseNumberOrName) {
this.houseNumberOrName = houseNumberOrName;
+ isSetHouseNumberOrName = true; // mark as set
}
/**
@@ -168,6 +200,7 @@ public void setHouseNumberOrName(String houseNumberOrName) {
*/
public Address postalCode(String postalCode) {
this.postalCode = postalCode;
+ isSetPostalCode = true; // mark as set
return this;
}
@@ -195,6 +228,7 @@ public String getPostalCode() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
+ isSetPostalCode = true; // mark as set
}
/**
@@ -207,6 +241,7 @@ public void setPostalCode(String postalCode) {
*/
public Address stateOrProvince(String stateOrProvince) {
this.stateOrProvince = stateOrProvince;
+ isSetStateOrProvince = true; // mark as set
return this;
}
@@ -234,6 +269,7 @@ public String getStateOrProvince() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStateOrProvince(String stateOrProvince) {
this.stateOrProvince = stateOrProvince;
+ isSetStateOrProvince = true; // mark as set
}
/**
@@ -247,6 +283,7 @@ public void setStateOrProvince(String stateOrProvince) {
*/
public Address street(String street) {
this.street = street;
+ isSetStreet = true; // mark as set
return this;
}
@@ -276,6 +313,27 @@ public String getStreet() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStreet(String street) {
this.street = street;
+ isSetStreet = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public Address 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 Address object is equal to o. */
@@ -289,16 +347,34 @@ public boolean equals(Object o) {
}
Address address = (Address) o;
return Objects.equals(this.city, address.city)
+ && Objects.equals(this.isSetCity, address.isSetCity)
&& Objects.equals(this.country, address.country)
+ && Objects.equals(this.isSetCountry, address.isSetCountry)
&& Objects.equals(this.houseNumberOrName, address.houseNumberOrName)
+ && Objects.equals(this.isSetHouseNumberOrName, address.isSetHouseNumberOrName)
&& Objects.equals(this.postalCode, address.postalCode)
+ && Objects.equals(this.isSetPostalCode, address.isSetPostalCode)
&& Objects.equals(this.stateOrProvince, address.stateOrProvince)
- && Objects.equals(this.street, address.street);
+ && Objects.equals(this.isSetStateOrProvince, address.isSetStateOrProvince)
+ && Objects.equals(this.street, address.street)
+ && Objects.equals(this.isSetStreet, address.isSetStreet);
}
@Override
public int hashCode() {
- return Objects.hash(city, country, houseNumberOrName, postalCode, stateOrProvince, street);
+ return Objects.hash(
+ city,
+ isSetCity,
+ country,
+ isSetCountry,
+ houseNumberOrName,
+ isSetHouseNumberOrName,
+ postalCode,
+ isSetPostalCode,
+ stateOrProvince,
+ isSetStateOrProvince,
+ street,
+ isSetStreet);
}
@Override
@@ -325,6 +401,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetCity) {
+ addIfNull(nulls, JSON_PROPERTY_CITY, this.city);
+ }
+ if (isSetCountry) {
+ addIfNull(nulls, JSON_PROPERTY_COUNTRY, this.country);
+ }
+ if (isSetHouseNumberOrName) {
+ addIfNull(nulls, JSON_PROPERTY_HOUSE_NUMBER_OR_NAME, this.houseNumberOrName);
+ }
+ if (isSetPostalCode) {
+ addIfNull(nulls, JSON_PROPERTY_POSTAL_CODE, this.postalCode);
+ }
+ if (isSetStateOrProvince) {
+ addIfNull(nulls, JSON_PROPERTY_STATE_OR_PROVINCE, this.stateOrProvince);
+ }
+ if (isSetStreet) {
+ addIfNull(nulls, JSON_PROPERTY_STREET, this.street);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of Address given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/Amount.java b/src/main/java/com/adyen/model/java/Amount.java
similarity index 69%
rename from src/main/java/com/adyen/model/configurationwebhooks/Amount.java
rename to src/main/java/com/adyen/model/java/Amount.java
index 35f0c4c76..702da79ac 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/Amount.java
+++ b/src/main/java/com/adyen/model/java/Amount.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -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() {}
/**
@@ -40,6 +54,7 @@ public Amount() {}
*/
public Amount currency(String currency) {
this.currency = currency;
+ isSetCurrency = true; // mark as set
return this;
}
@@ -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
}
/**
@@ -83,6 +99,7 @@ public void setCurrency(String currency) {
*/
public Amount value(Long value) {
this.value = value;
+ isSetValue = true; // mark as set
return this;
}
@@ -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. */
@@ -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
@@ -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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map 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 map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of Amount given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/Authentication.java b/src/main/java/com/adyen/model/java/Authentication.java
similarity index 72%
rename from src/main/java/com/adyen/model/configurationwebhooks/Authentication.java
rename to src/main/java/com/adyen/model/java/Authentication.java
index 940164259..840a2385b 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/Authentication.java
+++ b/src/main/java/com/adyen/model/java/Authentication.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -27,12 +29,27 @@ public class Authentication {
public static final String JSON_PROPERTY_EMAIL = "email";
private String email;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEmail = false;
+
public static final String JSON_PROPERTY_PASSWORD = "password";
private String password;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPassword = false;
+
public static final String JSON_PROPERTY_PHONE = "phone";
private Phone phone;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPhone = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public Authentication() {}
/**
@@ -43,6 +60,7 @@ public Authentication() {}
*/
public Authentication email(String email) {
this.email = email;
+ isSetEmail = true; // mark as set
return this;
}
@@ -66,6 +84,7 @@ public String getEmail() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEmail(String email) {
this.email = email;
+ isSetEmail = true; // mark as set
}
/**
@@ -82,6 +101,7 @@ public void setEmail(String email) {
*/
public Authentication password(String password) {
this.password = password;
+ isSetPassword = true; // mark as set
return this;
}
@@ -117,6 +137,7 @@ public String getPassword() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPassword(String password) {
this.password = password;
+ isSetPassword = true; // mark as set
}
/**
@@ -127,6 +148,7 @@ public void setPassword(String password) {
*/
public Authentication phone(Phone phone) {
this.phone = phone;
+ isSetPhone = true; // mark as set
return this;
}
@@ -150,6 +172,27 @@ public Phone getPhone() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPhone(Phone phone) {
this.phone = phone;
+ isSetPhone = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public Authentication 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 Authentication object is equal to o. */
@@ -163,13 +206,16 @@ public boolean equals(Object o) {
}
Authentication authentication = (Authentication) o;
return Objects.equals(this.email, authentication.email)
+ && Objects.equals(this.isSetEmail, authentication.isSetEmail)
&& Objects.equals(this.password, authentication.password)
- && Objects.equals(this.phone, authentication.phone);
+ && Objects.equals(this.isSetPassword, authentication.isSetPassword)
+ && Objects.equals(this.phone, authentication.phone)
+ && Objects.equals(this.isSetPhone, authentication.isSetPhone);
}
@Override
public int hashCode() {
- return Objects.hash(email, password, phone);
+ return Objects.hash(email, isSetEmail, password, isSetPassword, phone, isSetPhone);
}
@Override
@@ -193,6 +239,36 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetEmail) {
+ addIfNull(nulls, JSON_PROPERTY_EMAIL, this.email);
+ }
+ if (isSetPassword) {
+ addIfNull(nulls, JSON_PROPERTY_PASSWORD, this.password);
+ }
+ if (isSetPhone) {
+ addIfNull(nulls, JSON_PROPERTY_PHONE, this.phone);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of Authentication given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/Balance.java b/src/main/java/com/adyen/model/java/Balance.java
similarity index 70%
rename from src/main/java/com/adyen/model/configurationwebhooks/Balance.java
rename to src/main/java/com/adyen/model/java/Balance.java
index 6f9b28e06..12183c02c 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/Balance.java
+++ b/src/main/java/com/adyen/model/java/Balance.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -29,18 +31,39 @@ public class Balance {
public static final String JSON_PROPERTY_AVAILABLE = "available";
private Long available;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAvailable = false;
+
public static final String JSON_PROPERTY_BALANCE = "balance";
private Long balance;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalance = false;
+
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_PENDING = "pending";
private Long pending;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPending = false;
+
public static final String JSON_PROPERTY_RESERVED = "reserved";
private Long reserved;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReserved = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public Balance() {}
/**
@@ -51,6 +74,7 @@ public Balance() {}
*/
public Balance available(Long available) {
this.available = available;
+ isSetAvailable = true; // mark as set
return this;
}
@@ -74,6 +98,7 @@ public Long getAvailable() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAvailable(Long available) {
this.available = available;
+ isSetAvailable = true; // mark as set
}
/**
@@ -84,6 +109,7 @@ public void setAvailable(Long available) {
*/
public Balance balance(Long balance) {
this.balance = balance;
+ isSetBalance = true; // mark as set
return this;
}
@@ -107,6 +133,7 @@ public Long getBalance() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalance(Long balance) {
this.balance = balance;
+ isSetBalance = true; // mark as set
}
/**
@@ -119,6 +146,7 @@ public void setBalance(Long balance) {
*/
public Balance currency(String currency) {
this.currency = currency;
+ isSetCurrency = true; // mark as set
return this;
}
@@ -146,6 +174,7 @@ public String getCurrency() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCurrency(String currency) {
this.currency = currency;
+ isSetCurrency = true; // mark as set
}
/**
@@ -156,6 +185,7 @@ public void setCurrency(String currency) {
*/
public Balance pending(Long pending) {
this.pending = pending;
+ isSetPending = true; // mark as set
return this;
}
@@ -179,6 +209,7 @@ public Long getPending() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPending(Long pending) {
this.pending = pending;
+ isSetPending = true; // mark as set
}
/**
@@ -189,6 +220,7 @@ public void setPending(Long pending) {
*/
public Balance reserved(Long reserved) {
this.reserved = reserved;
+ isSetReserved = true; // mark as set
return this;
}
@@ -212,6 +244,27 @@ public Long getReserved() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReserved(Long reserved) {
this.reserved = reserved;
+ isSetReserved = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public Balance 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 Balance object is equal to o. */
@@ -225,15 +278,30 @@ public boolean equals(Object o) {
}
Balance balance = (Balance) o;
return Objects.equals(this.available, balance.available)
+ && Objects.equals(this.isSetAvailable, balance.isSetAvailable)
&& Objects.equals(this.balance, balance.balance)
+ && Objects.equals(this.isSetBalance, balance.isSetBalance)
&& Objects.equals(this.currency, balance.currency)
+ && Objects.equals(this.isSetCurrency, balance.isSetCurrency)
&& Objects.equals(this.pending, balance.pending)
- && Objects.equals(this.reserved, balance.reserved);
+ && Objects.equals(this.isSetPending, balance.isSetPending)
+ && Objects.equals(this.reserved, balance.reserved)
+ && Objects.equals(this.isSetReserved, balance.isSetReserved);
}
@Override
public int hashCode() {
- return Objects.hash(available, balance, currency, pending, reserved);
+ return Objects.hash(
+ available,
+ isSetAvailable,
+ balance,
+ isSetBalance,
+ currency,
+ isSetCurrency,
+ pending,
+ isSetPending,
+ reserved,
+ isSetReserved);
}
@Override
@@ -259,6 +327,42 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAvailable) {
+ addIfNull(nulls, JSON_PROPERTY_AVAILABLE, this.available);
+ }
+ if (isSetBalance) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE, this.balance);
+ }
+ if (isSetCurrency) {
+ addIfNull(nulls, JSON_PROPERTY_CURRENCY, this.currency);
+ }
+ if (isSetPending) {
+ addIfNull(nulls, JSON_PROPERTY_PENDING, this.pending);
+ }
+ if (isSetReserved) {
+ addIfNull(nulls, JSON_PROPERTY_RESERVED, this.reserved);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of Balance given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/BalanceAccount.java b/src/main/java/com/adyen/model/java/BalanceAccount.java
similarity index 80%
rename from src/main/java/com/adyen/model/configurationwebhooks/BalanceAccount.java
rename to src/main/java/com/adyen/model/java/BalanceAccount.java
index fe5eb468f..cb5d04809 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/BalanceAccount.java
+++ b/src/main/java/com/adyen/model/java/BalanceAccount.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -43,31 +45,58 @@ public class BalanceAccount {
public static final String JSON_PROPERTY_ACCOUNT_HOLDER_ID = "accountHolderId";
private String accountHolderId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAccountHolderId = false;
+
public static final String JSON_PROPERTY_BALANCES = "balances";
private List balances;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalances = false;
+
public static final String JSON_PROPERTY_DEFAULT_CURRENCY_CODE = "defaultCurrencyCode";
private String defaultCurrencyCode;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDefaultCurrencyCode = false;
+
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDescription = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_METADATA = "metadata";
private Map metadata;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetMetadata = false;
+
public static final String JSON_PROPERTY_MIGRATED_ACCOUNT_CODE = "migratedAccountCode";
private String migratedAccountCode;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetMigratedAccountCode = false;
+
public static final String JSON_PROPERTY_PLATFORM_PAYMENT_CONFIGURATION =
"platformPaymentConfiguration";
private PlatformPaymentConfiguration platformPaymentConfiguration;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPlatformPaymentConfiguration = false;
+
public static final String JSON_PROPERTY_REFERENCE = "reference";
private String reference;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReference = false;
+
/** The status of the balance account, set to **active** by default. */
public enum StatusEnum {
ACTIVE(String.valueOf("active")),
@@ -116,9 +145,21 @@ 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;
+
public static final String JSON_PROPERTY_TIME_ZONE = "timeZone";
private String timeZone;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTimeZone = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public BalanceAccount() {}
/**
@@ -133,6 +174,7 @@ public BalanceAccount() {}
*/
public BalanceAccount accountHolderId(String accountHolderId) {
this.accountHolderId = accountHolderId;
+ isSetAccountHolderId = true; // mark as set
return this;
}
@@ -164,6 +206,7 @@ public String getAccountHolderId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountHolderId(String accountHolderId) {
this.accountHolderId = accountHolderId;
+ isSetAccountHolderId = true; // mark as set
}
/**
@@ -174,6 +217,7 @@ public void setAccountHolderId(String accountHolderId) {
*/
public BalanceAccount balances(List balances) {
this.balances = balances;
+ isSetBalances = true; // mark as set
return this;
}
@@ -205,6 +249,7 @@ public List getBalances() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalances(List balances) {
this.balances = balances;
+ isSetBalances = true; // mark as set
}
/**
@@ -223,6 +268,7 @@ public void setBalances(List balances) {
*/
public BalanceAccount defaultCurrencyCode(String defaultCurrencyCode) {
this.defaultCurrencyCode = defaultCurrencyCode;
+ isSetDefaultCurrencyCode = true; // mark as set
return this;
}
@@ -262,6 +308,7 @@ public String getDefaultCurrencyCode() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDefaultCurrencyCode(String defaultCurrencyCode) {
this.defaultCurrencyCode = defaultCurrencyCode;
+ isSetDefaultCurrencyCode = true; // mark as set
}
/**
@@ -275,6 +322,7 @@ public void setDefaultCurrencyCode(String defaultCurrencyCode) {
*/
public BalanceAccount description(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
return this;
}
@@ -304,6 +352,7 @@ public String getDescription() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
}
/**
@@ -314,6 +363,7 @@ public void setDescription(String description) {
*/
public BalanceAccount id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -337,6 +387,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -352,6 +403,7 @@ public void setId(String id) {
*/
public BalanceAccount metadata(Map metadata) {
this.metadata = metadata;
+ isSetMetadata = true; // mark as set
return this;
}
@@ -393,6 +445,7 @@ public Map getMetadata() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMetadata(Map metadata) {
this.metadata = metadata;
+ isSetMetadata = true; // mark as set
}
/**
@@ -404,6 +457,7 @@ public void setMetadata(Map metadata) {
*/
public BalanceAccount migratedAccountCode(String migratedAccountCode) {
this.migratedAccountCode = migratedAccountCode;
+ isSetMigratedAccountCode = true; // mark as set
return this;
}
@@ -429,6 +483,7 @@ public String getMigratedAccountCode() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMigratedAccountCode(String migratedAccountCode) {
this.migratedAccountCode = migratedAccountCode;
+ isSetMigratedAccountCode = true; // mark as set
}
/**
@@ -440,6 +495,7 @@ public void setMigratedAccountCode(String migratedAccountCode) {
public BalanceAccount platformPaymentConfiguration(
PlatformPaymentConfiguration platformPaymentConfiguration) {
this.platformPaymentConfiguration = platformPaymentConfiguration;
+ isSetPlatformPaymentConfiguration = true; // mark as set
return this;
}
@@ -464,6 +520,7 @@ public PlatformPaymentConfiguration getPlatformPaymentConfiguration() {
public void setPlatformPaymentConfiguration(
PlatformPaymentConfiguration platformPaymentConfiguration) {
this.platformPaymentConfiguration = platformPaymentConfiguration;
+ isSetPlatformPaymentConfiguration = true; // mark as set
}
/**
@@ -474,6 +531,7 @@ public void setPlatformPaymentConfiguration(
*/
public BalanceAccount reference(String reference) {
this.reference = reference;
+ isSetReference = true; // mark as set
return this;
}
@@ -497,6 +555,7 @@ public String getReference() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReference(String reference) {
this.reference = reference;
+ isSetReference = true; // mark as set
}
/**
@@ -507,6 +566,7 @@ public void setReference(String reference) {
*/
public BalanceAccount status(StatusEnum status) {
this.status = status;
+ isSetStatus = true; // mark as set
return this;
}
@@ -530,6 +590,7 @@ public StatusEnum getStatus() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatus(StatusEnum status) {
this.status = status;
+ isSetStatus = true; // mark as set
}
/**
@@ -545,6 +606,7 @@ public void setStatus(StatusEnum status) {
*/
public BalanceAccount timeZone(String timeZone) {
this.timeZone = timeZone;
+ isSetTimeZone = true; // mark as set
return this;
}
@@ -578,6 +640,27 @@ public String getTimeZone() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTimeZone(String timeZone) {
this.timeZone = timeZone;
+ isSetTimeZone = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public BalanceAccount 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 BalanceAccount object is equal to o. */
@@ -591,33 +674,57 @@ public boolean equals(Object o) {
}
BalanceAccount balanceAccount = (BalanceAccount) o;
return Objects.equals(this.accountHolderId, balanceAccount.accountHolderId)
+ && Objects.equals(this.isSetAccountHolderId, balanceAccount.isSetAccountHolderId)
&& Objects.equals(this.balances, balanceAccount.balances)
+ && Objects.equals(this.isSetBalances, balanceAccount.isSetBalances)
&& Objects.equals(this.defaultCurrencyCode, balanceAccount.defaultCurrencyCode)
+ && Objects.equals(this.isSetDefaultCurrencyCode, balanceAccount.isSetDefaultCurrencyCode)
&& Objects.equals(this.description, balanceAccount.description)
+ && Objects.equals(this.isSetDescription, balanceAccount.isSetDescription)
&& Objects.equals(this.id, balanceAccount.id)
+ && Objects.equals(this.isSetId, balanceAccount.isSetId)
&& Objects.equals(this.metadata, balanceAccount.metadata)
+ && Objects.equals(this.isSetMetadata, balanceAccount.isSetMetadata)
&& Objects.equals(this.migratedAccountCode, balanceAccount.migratedAccountCode)
+ && Objects.equals(this.isSetMigratedAccountCode, balanceAccount.isSetMigratedAccountCode)
&& Objects.equals(
this.platformPaymentConfiguration, balanceAccount.platformPaymentConfiguration)
+ && Objects.equals(
+ this.isSetPlatformPaymentConfiguration,
+ balanceAccount.isSetPlatformPaymentConfiguration)
&& Objects.equals(this.reference, balanceAccount.reference)
+ && Objects.equals(this.isSetReference, balanceAccount.isSetReference)
&& Objects.equals(this.status, balanceAccount.status)
- && Objects.equals(this.timeZone, balanceAccount.timeZone);
+ && Objects.equals(this.isSetStatus, balanceAccount.isSetStatus)
+ && Objects.equals(this.timeZone, balanceAccount.timeZone)
+ && Objects.equals(this.isSetTimeZone, balanceAccount.isSetTimeZone);
}
@Override
public int hashCode() {
return Objects.hash(
accountHolderId,
+ isSetAccountHolderId,
balances,
+ isSetBalances,
defaultCurrencyCode,
+ isSetDefaultCurrencyCode,
description,
+ isSetDescription,
id,
+ isSetId,
metadata,
+ isSetMetadata,
migratedAccountCode,
+ isSetMigratedAccountCode,
platformPaymentConfiguration,
+ isSetPlatformPaymentConfiguration,
reference,
+ isSetReference,
status,
- timeZone);
+ isSetStatus,
+ timeZone,
+ isSetTimeZone);
}
@Override
@@ -655,6 +762,61 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAccountHolderId) {
+ addIfNull(nulls, JSON_PROPERTY_ACCOUNT_HOLDER_ID, this.accountHolderId);
+ }
+ if (isSetBalances) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCES, this.balances);
+ }
+ if (isSetDefaultCurrencyCode) {
+ addIfNull(nulls, JSON_PROPERTY_DEFAULT_CURRENCY_CODE, this.defaultCurrencyCode);
+ }
+ if (isSetDescription) {
+ addIfNull(nulls, JSON_PROPERTY_DESCRIPTION, this.description);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetMetadata) {
+ addIfNull(nulls, JSON_PROPERTY_METADATA, this.metadata);
+ }
+ if (isSetMigratedAccountCode) {
+ addIfNull(nulls, JSON_PROPERTY_MIGRATED_ACCOUNT_CODE, this.migratedAccountCode);
+ }
+ if (isSetPlatformPaymentConfiguration) {
+ addIfNull(
+ nulls, JSON_PROPERTY_PLATFORM_PAYMENT_CONFIGURATION, this.platformPaymentConfiguration);
+ }
+ if (isSetReference) {
+ addIfNull(nulls, JSON_PROPERTY_REFERENCE, this.reference);
+ }
+ if (isSetStatus) {
+ addIfNull(nulls, JSON_PROPERTY_STATUS, this.status);
+ }
+ if (isSetTimeZone) {
+ addIfNull(nulls, JSON_PROPERTY_TIME_ZONE, this.timeZone);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of BalanceAccount given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/BalanceAccountNotificationData.java b/src/main/java/com/adyen/model/java/BalanceAccountNotificationData.java
similarity index 66%
rename from src/main/java/com/adyen/model/configurationwebhooks/BalanceAccountNotificationData.java
rename to src/main/java/com/adyen/model/java/BalanceAccountNotificationData.java
index 98f88d5a1..8a8ab13b7 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/BalanceAccountNotificationData.java
+++ b/src/main/java/com/adyen/model/java/BalanceAccountNotificationData.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -26,9 +28,21 @@ public class BalanceAccountNotificationData {
public static final String JSON_PROPERTY_BALANCE_ACCOUNT = "balanceAccount";
private BalanceAccount balanceAccount;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalanceAccount = false;
+
public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
private String balancePlatform;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalancePlatform = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public BalanceAccountNotificationData() {}
/**
@@ -40,6 +54,7 @@ public BalanceAccountNotificationData() {}
*/
public BalanceAccountNotificationData balanceAccount(BalanceAccount balanceAccount) {
this.balanceAccount = balanceAccount;
+ isSetBalanceAccount = true; // mark as set
return this;
}
@@ -63,6 +78,7 @@ public BalanceAccount getBalanceAccount() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalanceAccount(BalanceAccount balanceAccount) {
this.balanceAccount = balanceAccount;
+ isSetBalanceAccount = true; // mark as set
}
/**
@@ -74,6 +90,7 @@ public void setBalanceAccount(BalanceAccount balanceAccount) {
*/
public BalanceAccountNotificationData balancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
return this;
}
@@ -97,6 +114,27 @@ public String getBalancePlatform() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public BalanceAccountNotificationData 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 BalanceAccountNotificationData object is equal to o. */
@@ -111,12 +149,16 @@ public boolean equals(Object o) {
BalanceAccountNotificationData balanceAccountNotificationData =
(BalanceAccountNotificationData) o;
return Objects.equals(this.balanceAccount, balanceAccountNotificationData.balanceAccount)
- && Objects.equals(this.balancePlatform, balanceAccountNotificationData.balancePlatform);
+ && Objects.equals(
+ this.isSetBalanceAccount, balanceAccountNotificationData.isSetBalanceAccount)
+ && Objects.equals(this.balancePlatform, balanceAccountNotificationData.balancePlatform)
+ && Objects.equals(
+ this.isSetBalancePlatform, balanceAccountNotificationData.isSetBalancePlatform);
}
@Override
public int hashCode() {
- return Objects.hash(balanceAccount, balancePlatform);
+ return Objects.hash(balanceAccount, isSetBalanceAccount, balancePlatform, isSetBalancePlatform);
}
@Override
@@ -139,6 +181,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetBalanceAccount) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE_ACCOUNT, this.balanceAccount);
+ }
+ if (isSetBalancePlatform) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE_PLATFORM, this.balancePlatform);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of BalanceAccountNotificationData given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/BalanceAccountNotificationRequest.java b/src/main/java/com/adyen/model/java/BalanceAccountNotificationRequest.java
similarity index 73%
rename from src/main/java/com/adyen/model/configurationwebhooks/BalanceAccountNotificationRequest.java
rename to src/main/java/com/adyen/model/java/BalanceAccountNotificationRequest.java
index 36906dadb..550a593e3 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/BalanceAccountNotificationRequest.java
+++ b/src/main/java/com/adyen/model/java/BalanceAccountNotificationRequest.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -33,12 +35,21 @@ public class BalanceAccountNotificationRequest {
public static final String JSON_PROPERTY_DATA = "data";
private BalanceAccountNotificationData data;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetData = false;
+
public static final String JSON_PROPERTY_ENVIRONMENT = "environment";
private String environment;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEnvironment = false;
+
public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
private OffsetDateTime timestamp;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTimestamp = false;
+
/** Type of webhook. */
public enum TypeEnum {
BALANCEPLATFORM_BALANCEACCOUNT_UPDATED(
@@ -85,6 +96,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public BalanceAccountNotificationRequest() {}
/**
@@ -96,6 +116,7 @@ public BalanceAccountNotificationRequest() {}
*/
public BalanceAccountNotificationRequest data(BalanceAccountNotificationData data) {
this.data = data;
+ isSetData = true; // mark as set
return this;
}
@@ -119,6 +140,7 @@ public BalanceAccountNotificationData getData() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setData(BalanceAccountNotificationData data) {
this.data = data;
+ isSetData = true; // mark as set
}
/**
@@ -131,6 +153,7 @@ public void setData(BalanceAccountNotificationData data) {
*/
public BalanceAccountNotificationRequest environment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
return this;
}
@@ -156,6 +179,7 @@ public String getEnvironment() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnvironment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
}
/**
@@ -167,6 +191,7 @@ public void setEnvironment(String environment) {
*/
public BalanceAccountNotificationRequest timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
return this;
}
@@ -190,6 +215,7 @@ public OffsetDateTime getTimestamp() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTimestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
}
/**
@@ -201,6 +227,7 @@ public void setTimestamp(OffsetDateTime timestamp) {
*/
public BalanceAccountNotificationRequest type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -224,6 +251,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public BalanceAccountNotificationRequest 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 BalanceAccountNotificationRequest object is equal to o. */
@@ -238,14 +286,19 @@ public boolean equals(Object o) {
BalanceAccountNotificationRequest balanceAccountNotificationRequest =
(BalanceAccountNotificationRequest) o;
return Objects.equals(this.data, balanceAccountNotificationRequest.data)
+ && Objects.equals(this.isSetData, balanceAccountNotificationRequest.isSetData)
&& Objects.equals(this.environment, balanceAccountNotificationRequest.environment)
+ && Objects.equals(this.isSetEnvironment, balanceAccountNotificationRequest.isSetEnvironment)
&& Objects.equals(this.timestamp, balanceAccountNotificationRequest.timestamp)
- && Objects.equals(this.type, balanceAccountNotificationRequest.type);
+ && Objects.equals(this.isSetTimestamp, balanceAccountNotificationRequest.isSetTimestamp)
+ && Objects.equals(this.type, balanceAccountNotificationRequest.type)
+ && Objects.equals(this.isSetType, balanceAccountNotificationRequest.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(data, environment, timestamp, type);
+ return Objects.hash(
+ data, isSetData, environment, isSetEnvironment, timestamp, isSetTimestamp, type, isSetType);
}
@Override
@@ -270,6 +323,39 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetData) {
+ addIfNull(nulls, JSON_PROPERTY_DATA, this.data);
+ }
+ if (isSetEnvironment) {
+ addIfNull(nulls, JSON_PROPERTY_ENVIRONMENT, this.environment);
+ }
+ if (isSetTimestamp) {
+ addIfNull(nulls, JSON_PROPERTY_TIMESTAMP, this.timestamp);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of BalanceAccountNotificationRequest given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/BalancePlatformNotificationResponse.java b/src/main/java/com/adyen/model/java/BalancePlatformNotificationResponse.java
similarity index 67%
rename from src/main/java/com/adyen/model/configurationwebhooks/BalancePlatformNotificationResponse.java
rename to src/main/java/com/adyen/model/java/BalancePlatformNotificationResponse.java
index c004a6522..836096e00 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/BalancePlatformNotificationResponse.java
+++ b/src/main/java/com/adyen/model/java/BalancePlatformNotificationResponse.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -23,6 +25,15 @@ public class BalancePlatformNotificationResponse {
public static final String JSON_PROPERTY_NOTIFICATION_RESPONSE = "notificationResponse";
private String notificationResponse;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetNotificationResponse = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public BalancePlatformNotificationResponse() {}
/**
@@ -36,6 +47,7 @@ public BalancePlatformNotificationResponse() {}
*/
public BalancePlatformNotificationResponse notificationResponse(String notificationResponse) {
this.notificationResponse = notificationResponse;
+ isSetNotificationResponse = true; // mark as set
return this;
}
@@ -63,6 +75,27 @@ public String getNotificationResponse() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNotificationResponse(String notificationResponse) {
this.notificationResponse = notificationResponse;
+ isSetNotificationResponse = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public BalancePlatformNotificationResponse 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 BalancePlatformNotificationResponse object is equal to o. */
@@ -77,12 +110,15 @@ public boolean equals(Object o) {
BalancePlatformNotificationResponse balancePlatformNotificationResponse =
(BalancePlatformNotificationResponse) o;
return Objects.equals(
- this.notificationResponse, balancePlatformNotificationResponse.notificationResponse);
+ this.notificationResponse, balancePlatformNotificationResponse.notificationResponse)
+ && Objects.equals(
+ this.isSetNotificationResponse,
+ balancePlatformNotificationResponse.isSetNotificationResponse);
}
@Override
public int hashCode() {
- return Objects.hash(notificationResponse);
+ return Objects.hash(notificationResponse, isSetNotificationResponse);
}
@Override
@@ -106,6 +142,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetNotificationResponse) {
+ addIfNull(nulls, JSON_PROPERTY_NOTIFICATION_RESPONSE, this.notificationResponse);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of BalancePlatformNotificationResponse given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/BankAccountDetails.java b/src/main/java/com/adyen/model/java/BankAccountDetails.java
similarity index 77%
rename from src/main/java/com/adyen/model/configurationwebhooks/BankAccountDetails.java
rename to src/main/java/com/adyen/model/java/BankAccountDetails.java
index a23641709..1d4b5b69f 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/BankAccountDetails.java
+++ b/src/main/java/com/adyen/model/java/BankAccountDetails.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -32,27 +34,57 @@ public class BankAccountDetails {
public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber";
private String accountNumber;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAccountNumber = false;
+
public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType";
private String accountType;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAccountType = false;
+
public static final String JSON_PROPERTY_BRANCH_NUMBER = "branchNumber";
private String branchNumber;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBranchNumber = false;
+
public static final String JSON_PROPERTY_FORM_FACTOR = "formFactor";
private String formFactor;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetFormFactor = false;
+
public static final String JSON_PROPERTY_IBAN = "iban";
private String iban;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetIban = false;
+
public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber";
private String routingNumber;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetRoutingNumber = false;
+
public static final String JSON_PROPERTY_SORT_CODE = "sortCode";
private String sortCode;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetSortCode = false;
+
public static final String JSON_PROPERTY_TYPE = "type";
private String type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public BankAccountDetails() {}
/**
@@ -63,6 +95,7 @@ public BankAccountDetails() {}
*/
public BankAccountDetails accountNumber(String accountNumber) {
this.accountNumber = accountNumber;
+ isSetAccountNumber = true; // mark as set
return this;
}
@@ -86,6 +119,7 @@ public String getAccountNumber() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
+ isSetAccountNumber = true; // mark as set
}
/**
@@ -97,6 +131,7 @@ public void setAccountNumber(String accountNumber) {
*/
public BankAccountDetails accountType(String accountType) {
this.accountType = accountType;
+ isSetAccountType = true; // mark as set
return this;
}
@@ -122,6 +157,7 @@ public String getAccountType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountType(String accountType) {
this.accountType = accountType;
+ isSetAccountType = true; // mark as set
}
/**
@@ -132,6 +168,7 @@ public void setAccountType(String accountType) {
*/
public BankAccountDetails branchNumber(String branchNumber) {
this.branchNumber = branchNumber;
+ isSetBranchNumber = true; // mark as set
return this;
}
@@ -155,6 +192,7 @@ public String getBranchNumber() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBranchNumber(String branchNumber) {
this.branchNumber = branchNumber;
+ isSetBranchNumber = true; // mark as set
}
/**
@@ -175,6 +213,7 @@ public void setBranchNumber(String branchNumber) {
*/
public BankAccountDetails formFactor(String formFactor) {
this.formFactor = formFactor;
+ isSetFormFactor = true; // mark as set
return this;
}
@@ -218,6 +257,7 @@ public String getFormFactor() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFormFactor(String formFactor) {
this.formFactor = formFactor;
+ isSetFormFactor = true; // mark as set
}
/**
@@ -230,6 +270,7 @@ public void setFormFactor(String formFactor) {
*/
public BankAccountDetails iban(String iban) {
this.iban = iban;
+ isSetIban = true; // mark as set
return this;
}
@@ -257,6 +298,7 @@ public String getIban() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setIban(String iban) {
this.iban = iban;
+ isSetIban = true; // mark as set
}
/**
@@ -270,6 +312,7 @@ public void setIban(String iban) {
*/
public BankAccountDetails routingNumber(String routingNumber) {
this.routingNumber = routingNumber;
+ isSetRoutingNumber = true; // mark as set
return this;
}
@@ -299,6 +342,7 @@ public String getRoutingNumber() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRoutingNumber(String routingNumber) {
this.routingNumber = routingNumber;
+ isSetRoutingNumber = true; // mark as set
}
/**
@@ -310,6 +354,7 @@ public void setRoutingNumber(String routingNumber) {
*/
public BankAccountDetails sortCode(String sortCode) {
this.sortCode = sortCode;
+ isSetSortCode = true; // mark as set
return this;
}
@@ -335,6 +380,7 @@ public String getSortCode() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSortCode(String sortCode) {
this.sortCode = sortCode;
+ isSetSortCode = true; // mark as set
}
/**
@@ -345,6 +391,7 @@ public void setSortCode(String sortCode) {
*/
public BankAccountDetails type(String type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -368,6 +415,27 @@ public String getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(String type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public BankAccountDetails 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 BankAccountDetails object is equal to o. */
@@ -381,19 +449,42 @@ public boolean equals(Object o) {
}
BankAccountDetails bankAccountDetails = (BankAccountDetails) o;
return Objects.equals(this.accountNumber, bankAccountDetails.accountNumber)
+ && Objects.equals(this.isSetAccountNumber, bankAccountDetails.isSetAccountNumber)
&& Objects.equals(this.accountType, bankAccountDetails.accountType)
+ && Objects.equals(this.isSetAccountType, bankAccountDetails.isSetAccountType)
&& Objects.equals(this.branchNumber, bankAccountDetails.branchNumber)
+ && Objects.equals(this.isSetBranchNumber, bankAccountDetails.isSetBranchNumber)
&& Objects.equals(this.formFactor, bankAccountDetails.formFactor)
+ && Objects.equals(this.isSetFormFactor, bankAccountDetails.isSetFormFactor)
&& Objects.equals(this.iban, bankAccountDetails.iban)
+ && Objects.equals(this.isSetIban, bankAccountDetails.isSetIban)
&& Objects.equals(this.routingNumber, bankAccountDetails.routingNumber)
+ && Objects.equals(this.isSetRoutingNumber, bankAccountDetails.isSetRoutingNumber)
&& Objects.equals(this.sortCode, bankAccountDetails.sortCode)
- && Objects.equals(this.type, bankAccountDetails.type);
+ && Objects.equals(this.isSetSortCode, bankAccountDetails.isSetSortCode)
+ && Objects.equals(this.type, bankAccountDetails.type)
+ && Objects.equals(this.isSetType, bankAccountDetails.isSetType);
}
@Override
public int hashCode() {
return Objects.hash(
- accountNumber, accountType, branchNumber, formFactor, iban, routingNumber, sortCode, type);
+ accountNumber,
+ isSetAccountNumber,
+ accountType,
+ isSetAccountType,
+ branchNumber,
+ isSetBranchNumber,
+ formFactor,
+ isSetFormFactor,
+ iban,
+ isSetIban,
+ routingNumber,
+ isSetRoutingNumber,
+ sortCode,
+ isSetSortCode,
+ type,
+ isSetType);
}
@Override
@@ -422,6 +513,51 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAccountNumber) {
+ addIfNull(nulls, JSON_PROPERTY_ACCOUNT_NUMBER, this.accountNumber);
+ }
+ if (isSetAccountType) {
+ addIfNull(nulls, JSON_PROPERTY_ACCOUNT_TYPE, this.accountType);
+ }
+ if (isSetBranchNumber) {
+ addIfNull(nulls, JSON_PROPERTY_BRANCH_NUMBER, this.branchNumber);
+ }
+ if (isSetFormFactor) {
+ addIfNull(nulls, JSON_PROPERTY_FORM_FACTOR, this.formFactor);
+ }
+ if (isSetIban) {
+ addIfNull(nulls, JSON_PROPERTY_IBAN, this.iban);
+ }
+ if (isSetRoutingNumber) {
+ addIfNull(nulls, JSON_PROPERTY_ROUTING_NUMBER, this.routingNumber);
+ }
+ if (isSetSortCode) {
+ addIfNull(nulls, JSON_PROPERTY_SORT_CODE, this.sortCode);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of BankAccountDetails given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/BankScoreSignalTriggeredData.java b/src/main/java/com/adyen/model/java/BankScoreSignalTriggeredData.java
similarity index 74%
rename from src/main/java/com/adyen/model/configurationwebhooks/BankScoreSignalTriggeredData.java
rename to src/main/java/com/adyen/model/java/BankScoreSignalTriggeredData.java
index 51cabd168..351cf414f 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/BankScoreSignalTriggeredData.java
+++ b/src/main/java/com/adyen/model/java/BankScoreSignalTriggeredData.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -36,30 +38,63 @@ public class BankScoreSignalTriggeredData {
public static final String JSON_PROPERTY_ACCOUNT_HOLDER = "accountHolder";
private ResourceReference accountHolder;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAccountHolder = false;
+
public static final String JSON_PROPERTY_ACCOUNT_HOLDER_STATUS = "accountHolderStatus";
private String accountHolderStatus;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAccountHolderStatus = false;
+
public static final String JSON_PROPERTY_AUTOMATED_ACTIONS = "automatedActions";
private List automatedActions;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAutomatedActions = false;
+
public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
private String balancePlatform;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalancePlatform = false;
+
public static final String JSON_PROPERTY_CREATION_DATE = "creationDate";
private OffsetDateTime creationDate;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCreationDate = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_RISK_SCORE = "riskScore";
private Integer riskScore;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetRiskScore = false;
+
public static final String JSON_PROPERTY_SCORE_SIGNALS_TRIGGERED = "scoreSignalsTriggered";
private List scoreSignalsTriggered;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetScoreSignalsTriggered = false;
+
public static final String JSON_PROPERTY_SIGNAL_SOURCE_TYPES = "signalSourceTypes";
private List signalSourceTypes;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetSignalSourceTypes = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public BankScoreSignalTriggeredData() {}
/**
@@ -70,6 +105,7 @@ public BankScoreSignalTriggeredData() {}
*/
public BankScoreSignalTriggeredData accountHolder(ResourceReference accountHolder) {
this.accountHolder = accountHolder;
+ isSetAccountHolder = true; // mark as set
return this;
}
@@ -93,6 +129,7 @@ public ResourceReference getAccountHolder() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountHolder(ResourceReference accountHolder) {
this.accountHolder = accountHolder;
+ isSetAccountHolder = true; // mark as set
}
/**
@@ -103,6 +140,7 @@ public void setAccountHolder(ResourceReference accountHolder) {
*/
public BankScoreSignalTriggeredData accountHolderStatus(String accountHolderStatus) {
this.accountHolderStatus = accountHolderStatus;
+ isSetAccountHolderStatus = true; // mark as set
return this;
}
@@ -126,6 +164,7 @@ public String getAccountHolderStatus() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountHolderStatus(String accountHolderStatus) {
this.accountHolderStatus = accountHolderStatus;
+ isSetAccountHolderStatus = true; // mark as set
}
/**
@@ -137,6 +176,7 @@ public void setAccountHolderStatus(String accountHolderStatus) {
*/
public BankScoreSignalTriggeredData automatedActions(List automatedActions) {
this.automatedActions = automatedActions;
+ isSetAutomatedActions = true; // mark as set
return this;
}
@@ -170,6 +210,7 @@ public List getAutomatedActions() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAutomatedActions(List automatedActions) {
this.automatedActions = automatedActions;
+ isSetAutomatedActions = true; // mark as set
}
/**
@@ -180,6 +221,7 @@ public void setAutomatedActions(List automatedActions) {
*/
public BankScoreSignalTriggeredData balancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
return this;
}
@@ -203,6 +245,7 @@ public String getBalancePlatform() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
}
/**
@@ -215,6 +258,7 @@ public void setBalancePlatform(String balancePlatform) {
*/
public BankScoreSignalTriggeredData creationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
+ isSetCreationDate = true; // mark as set
return this;
}
@@ -242,6 +286,7 @@ public OffsetDateTime getCreationDate() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCreationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
+ isSetCreationDate = true; // mark as set
}
/**
@@ -252,6 +297,7 @@ public void setCreationDate(OffsetDateTime creationDate) {
*/
public BankScoreSignalTriggeredData id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -275,6 +321,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -285,6 +332,7 @@ public void setId(String id) {
*/
public BankScoreSignalTriggeredData riskScore(Integer riskScore) {
this.riskScore = riskScore;
+ isSetRiskScore = true; // mark as set
return this;
}
@@ -308,6 +356,7 @@ public Integer getRiskScore() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRiskScore(Integer riskScore) {
this.riskScore = riskScore;
+ isSetRiskScore = true; // mark as set
}
/**
@@ -318,6 +367,7 @@ public void setRiskScore(Integer riskScore) {
*/
public BankScoreSignalTriggeredData scoreSignalsTriggered(List scoreSignalsTriggered) {
this.scoreSignalsTriggered = scoreSignalsTriggered;
+ isSetScoreSignalsTriggered = true; // mark as set
return this;
}
@@ -350,6 +400,7 @@ public List getScoreSignalsTriggered() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setScoreSignalsTriggered(List scoreSignalsTriggered) {
this.scoreSignalsTriggered = scoreSignalsTriggered;
+ isSetScoreSignalsTriggered = true; // mark as set
}
/**
@@ -360,6 +411,7 @@ public void setScoreSignalsTriggered(List scoreSignalsTriggered) {
*/
public BankScoreSignalTriggeredData signalSourceTypes(List signalSourceTypes) {
this.signalSourceTypes = signalSourceTypes;
+ isSetSignalSourceTypes = true; // mark as set
return this;
}
@@ -391,6 +443,27 @@ public List getSignalSourceTypes() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSignalSourceTypes(List signalSourceTypes) {
this.signalSourceTypes = signalSourceTypes;
+ isSetSignalSourceTypes = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public BankScoreSignalTriggeredData 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 BankScoreSignalTriggeredData object is equal to o. */
@@ -404,30 +477,54 @@ public boolean equals(Object o) {
}
BankScoreSignalTriggeredData bankScoreSignalTriggeredData = (BankScoreSignalTriggeredData) o;
return Objects.equals(this.accountHolder, bankScoreSignalTriggeredData.accountHolder)
+ && Objects.equals(this.isSetAccountHolder, bankScoreSignalTriggeredData.isSetAccountHolder)
&& Objects.equals(
this.accountHolderStatus, bankScoreSignalTriggeredData.accountHolderStatus)
+ && Objects.equals(
+ this.isSetAccountHolderStatus, bankScoreSignalTriggeredData.isSetAccountHolderStatus)
&& Objects.equals(this.automatedActions, bankScoreSignalTriggeredData.automatedActions)
+ && Objects.equals(
+ this.isSetAutomatedActions, bankScoreSignalTriggeredData.isSetAutomatedActions)
&& Objects.equals(this.balancePlatform, bankScoreSignalTriggeredData.balancePlatform)
+ && Objects.equals(
+ this.isSetBalancePlatform, bankScoreSignalTriggeredData.isSetBalancePlatform)
&& Objects.equals(this.creationDate, bankScoreSignalTriggeredData.creationDate)
+ && Objects.equals(this.isSetCreationDate, bankScoreSignalTriggeredData.isSetCreationDate)
&& Objects.equals(this.id, bankScoreSignalTriggeredData.id)
+ && Objects.equals(this.isSetId, bankScoreSignalTriggeredData.isSetId)
&& Objects.equals(this.riskScore, bankScoreSignalTriggeredData.riskScore)
+ && Objects.equals(this.isSetRiskScore, bankScoreSignalTriggeredData.isSetRiskScore)
&& Objects.equals(
this.scoreSignalsTriggered, bankScoreSignalTriggeredData.scoreSignalsTriggered)
- && Objects.equals(this.signalSourceTypes, bankScoreSignalTriggeredData.signalSourceTypes);
+ && Objects.equals(
+ this.isSetScoreSignalsTriggered,
+ bankScoreSignalTriggeredData.isSetScoreSignalsTriggered)
+ && Objects.equals(this.signalSourceTypes, bankScoreSignalTriggeredData.signalSourceTypes)
+ && Objects.equals(
+ this.isSetSignalSourceTypes, bankScoreSignalTriggeredData.isSetSignalSourceTypes);
}
@Override
public int hashCode() {
return Objects.hash(
accountHolder,
+ isSetAccountHolder,
accountHolderStatus,
+ isSetAccountHolderStatus,
automatedActions,
+ isSetAutomatedActions,
balancePlatform,
+ isSetBalancePlatform,
creationDate,
+ isSetCreationDate,
id,
+ isSetId,
riskScore,
+ isSetRiskScore,
scoreSignalsTriggered,
- signalSourceTypes);
+ isSetScoreSignalsTriggered,
+ signalSourceTypes,
+ isSetSignalSourceTypes);
}
@Override
@@ -461,6 +558,54 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAccountHolder) {
+ addIfNull(nulls, JSON_PROPERTY_ACCOUNT_HOLDER, this.accountHolder);
+ }
+ if (isSetAccountHolderStatus) {
+ addIfNull(nulls, JSON_PROPERTY_ACCOUNT_HOLDER_STATUS, this.accountHolderStatus);
+ }
+ if (isSetAutomatedActions) {
+ addIfNull(nulls, JSON_PROPERTY_AUTOMATED_ACTIONS, this.automatedActions);
+ }
+ if (isSetBalancePlatform) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE_PLATFORM, this.balancePlatform);
+ }
+ if (isSetCreationDate) {
+ addIfNull(nulls, JSON_PROPERTY_CREATION_DATE, this.creationDate);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetRiskScore) {
+ addIfNull(nulls, JSON_PROPERTY_RISK_SCORE, this.riskScore);
+ }
+ if (isSetScoreSignalsTriggered) {
+ addIfNull(nulls, JSON_PROPERTY_SCORE_SIGNALS_TRIGGERED, this.scoreSignalsTriggered);
+ }
+ if (isSetSignalSourceTypes) {
+ addIfNull(nulls, JSON_PROPERTY_SIGNAL_SOURCE_TYPES, this.signalSourceTypes);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of BankScoreSignalTriggeredData given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/BulkAddress.java b/src/main/java/com/adyen/model/java/BulkAddress.java
similarity index 74%
rename from src/main/java/com/adyen/model/configurationwebhooks/BulkAddress.java
rename to src/main/java/com/adyen/model/java/BulkAddress.java
index 2c7962a33..cb87efdd8 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/BulkAddress.java
+++ b/src/main/java/com/adyen/model/java/BulkAddress.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -37,42 +39,87 @@ public class BulkAddress {
public static final String JSON_PROPERTY_CITY = "city";
private String city;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCity = false;
+
public static final String JSON_PROPERTY_COMPANY = "company";
private String company;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCompany = false;
+
public static final String JSON_PROPERTY_COUNTRY = "country";
private String country;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCountry = false;
+
public static final String JSON_PROPERTY_EMAIL = "email";
private String email;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEmail = false;
+
public static final String JSON_PROPERTY_HOUSE_NUMBER_OR_NAME = "houseNumberOrName";
private String houseNumberOrName;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetHouseNumberOrName = false;
+
public static final String JSON_PROPERTY_LINE1 = "line1";
private String line1;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetLine1 = false;
+
public static final String JSON_PROPERTY_LINE2 = "line2";
private String line2;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetLine2 = false;
+
public static final String JSON_PROPERTY_LINE3 = "line3";
private String line3;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetLine3 = false;
+
public static final String JSON_PROPERTY_MOBILE = "mobile";
private String mobile;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetMobile = false;
+
public static final String JSON_PROPERTY_NAME = "name";
private String name;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetName = false;
+
public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode";
private String postalCode;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPostalCode = false;
+
public static final String JSON_PROPERTY_STATE_OR_PROVINCE = "stateOrProvince";
private String stateOrProvince;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetStateOrProvince = false;
+
public static final String JSON_PROPERTY_STREET = "street";
private String street;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetStreet = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public BulkAddress() {}
/**
@@ -83,6 +130,7 @@ public BulkAddress() {}
*/
public BulkAddress city(String city) {
this.city = city;
+ isSetCity = true; // mark as set
return this;
}
@@ -106,6 +154,7 @@ public String getCity() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCity(String city) {
this.city = city;
+ isSetCity = true; // mark as set
}
/**
@@ -116,6 +165,7 @@ public void setCity(String city) {
*/
public BulkAddress company(String company) {
this.company = company;
+ isSetCompany = true; // mark as set
return this;
}
@@ -139,6 +189,7 @@ public String getCompany() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCompany(String company) {
this.company = company;
+ isSetCompany = true; // mark as set
}
/**
@@ -149,6 +200,7 @@ public void setCompany(String company) {
*/
public BulkAddress country(String country) {
this.country = country;
+ isSetCountry = true; // mark as set
return this;
}
@@ -172,6 +224,7 @@ public String getCountry() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCountry(String country) {
this.country = country;
+ isSetCountry = true; // mark as set
}
/**
@@ -182,6 +235,7 @@ public void setCountry(String country) {
*/
public BulkAddress email(String email) {
this.email = email;
+ isSetEmail = true; // mark as set
return this;
}
@@ -205,6 +259,7 @@ public String getEmail() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEmail(String email) {
this.email = email;
+ isSetEmail = true; // mark as set
}
/**
@@ -215,6 +270,7 @@ public void setEmail(String email) {
*/
public BulkAddress houseNumberOrName(String houseNumberOrName) {
this.houseNumberOrName = houseNumberOrName;
+ isSetHouseNumberOrName = true; // mark as set
return this;
}
@@ -238,6 +294,7 @@ public String getHouseNumberOrName() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHouseNumberOrName(String houseNumberOrName) {
this.houseNumberOrName = houseNumberOrName;
+ isSetHouseNumberOrName = true; // mark as set
}
/**
@@ -250,6 +307,7 @@ public void setHouseNumberOrName(String houseNumberOrName) {
*/
public BulkAddress line1(String line1) {
this.line1 = line1;
+ isSetLine1 = true; // mark as set
return this;
}
@@ -277,6 +335,7 @@ public String getLine1() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLine1(String line1) {
this.line1 = line1;
+ isSetLine1 = true; // mark as set
}
/**
@@ -288,6 +347,7 @@ public void setLine1(String line1) {
*/
public BulkAddress line2(String line2) {
this.line2 = line2;
+ isSetLine2 = true; // mark as set
return this;
}
@@ -313,6 +373,7 @@ public String getLine2() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLine2(String line2) {
this.line2 = line2;
+ isSetLine2 = true; // mark as set
}
/**
@@ -323,6 +384,7 @@ public void setLine2(String line2) {
*/
public BulkAddress line3(String line3) {
this.line3 = line3;
+ isSetLine3 = true; // mark as set
return this;
}
@@ -346,6 +408,7 @@ public String getLine3() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLine3(String line3) {
this.line3 = line3;
+ isSetLine3 = true; // mark as set
}
/**
@@ -356,6 +419,7 @@ public void setLine3(String line3) {
*/
public BulkAddress mobile(String mobile) {
this.mobile = mobile;
+ isSetMobile = true; // mark as set
return this;
}
@@ -379,6 +443,7 @@ public String getMobile() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMobile(String mobile) {
this.mobile = mobile;
+ isSetMobile = true; // mark as set
}
/**
@@ -389,6 +454,7 @@ public void setMobile(String mobile) {
*/
public BulkAddress name(String name) {
this.name = name;
+ isSetName = true; // mark as set
return this;
}
@@ -412,6 +478,7 @@ public String getName() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
+ isSetName = true; // mark as set
}
/**
@@ -424,6 +491,7 @@ public void setName(String name) {
*/
public BulkAddress postalCode(String postalCode) {
this.postalCode = postalCode;
+ isSetPostalCode = true; // mark as set
return this;
}
@@ -451,6 +519,7 @@ public String getPostalCode() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
+ isSetPostalCode = true; // mark as set
}
/**
@@ -463,6 +532,7 @@ public void setPostalCode(String postalCode) {
*/
public BulkAddress stateOrProvince(String stateOrProvince) {
this.stateOrProvince = stateOrProvince;
+ isSetStateOrProvince = true; // mark as set
return this;
}
@@ -490,6 +560,7 @@ public String getStateOrProvince() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStateOrProvince(String stateOrProvince) {
this.stateOrProvince = stateOrProvince;
+ isSetStateOrProvince = true; // mark as set
}
/**
@@ -500,6 +571,7 @@ public void setStateOrProvince(String stateOrProvince) {
*/
public BulkAddress street(String street) {
this.street = street;
+ isSetStreet = true; // mark as set
return this;
}
@@ -523,6 +595,27 @@ public String getStreet() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStreet(String street) {
this.street = street;
+ isSetStreet = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public BulkAddress 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 BulkAddress object is equal to o. */
@@ -536,36 +629,62 @@ public boolean equals(Object o) {
}
BulkAddress bulkAddress = (BulkAddress) o;
return Objects.equals(this.city, bulkAddress.city)
+ && Objects.equals(this.isSetCity, bulkAddress.isSetCity)
&& Objects.equals(this.company, bulkAddress.company)
+ && Objects.equals(this.isSetCompany, bulkAddress.isSetCompany)
&& Objects.equals(this.country, bulkAddress.country)
+ && Objects.equals(this.isSetCountry, bulkAddress.isSetCountry)
&& Objects.equals(this.email, bulkAddress.email)
+ && Objects.equals(this.isSetEmail, bulkAddress.isSetEmail)
&& Objects.equals(this.houseNumberOrName, bulkAddress.houseNumberOrName)
+ && Objects.equals(this.isSetHouseNumberOrName, bulkAddress.isSetHouseNumberOrName)
&& Objects.equals(this.line1, bulkAddress.line1)
+ && Objects.equals(this.isSetLine1, bulkAddress.isSetLine1)
&& Objects.equals(this.line2, bulkAddress.line2)
+ && Objects.equals(this.isSetLine2, bulkAddress.isSetLine2)
&& Objects.equals(this.line3, bulkAddress.line3)
+ && Objects.equals(this.isSetLine3, bulkAddress.isSetLine3)
&& Objects.equals(this.mobile, bulkAddress.mobile)
+ && Objects.equals(this.isSetMobile, bulkAddress.isSetMobile)
&& Objects.equals(this.name, bulkAddress.name)
+ && Objects.equals(this.isSetName, bulkAddress.isSetName)
&& Objects.equals(this.postalCode, bulkAddress.postalCode)
+ && Objects.equals(this.isSetPostalCode, bulkAddress.isSetPostalCode)
&& Objects.equals(this.stateOrProvince, bulkAddress.stateOrProvince)
- && Objects.equals(this.street, bulkAddress.street);
+ && Objects.equals(this.isSetStateOrProvince, bulkAddress.isSetStateOrProvince)
+ && Objects.equals(this.street, bulkAddress.street)
+ && Objects.equals(this.isSetStreet, bulkAddress.isSetStreet);
}
@Override
public int hashCode() {
return Objects.hash(
city,
+ isSetCity,
company,
+ isSetCompany,
country,
+ isSetCountry,
email,
+ isSetEmail,
houseNumberOrName,
+ isSetHouseNumberOrName,
line1,
+ isSetLine1,
line2,
+ isSetLine2,
line3,
+ isSetLine3,
mobile,
+ isSetMobile,
name,
+ isSetName,
postalCode,
+ isSetPostalCode,
stateOrProvince,
- street);
+ isSetStateOrProvince,
+ street,
+ isSetStreet);
}
@Override
@@ -599,6 +718,66 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetCity) {
+ addIfNull(nulls, JSON_PROPERTY_CITY, this.city);
+ }
+ if (isSetCompany) {
+ addIfNull(nulls, JSON_PROPERTY_COMPANY, this.company);
+ }
+ if (isSetCountry) {
+ addIfNull(nulls, JSON_PROPERTY_COUNTRY, this.country);
+ }
+ if (isSetEmail) {
+ addIfNull(nulls, JSON_PROPERTY_EMAIL, this.email);
+ }
+ if (isSetHouseNumberOrName) {
+ addIfNull(nulls, JSON_PROPERTY_HOUSE_NUMBER_OR_NAME, this.houseNumberOrName);
+ }
+ if (isSetLine1) {
+ addIfNull(nulls, JSON_PROPERTY_LINE1, this.line1);
+ }
+ if (isSetLine2) {
+ addIfNull(nulls, JSON_PROPERTY_LINE2, this.line2);
+ }
+ if (isSetLine3) {
+ addIfNull(nulls, JSON_PROPERTY_LINE3, this.line3);
+ }
+ if (isSetMobile) {
+ addIfNull(nulls, JSON_PROPERTY_MOBILE, this.mobile);
+ }
+ if (isSetName) {
+ addIfNull(nulls, JSON_PROPERTY_NAME, this.name);
+ }
+ if (isSetPostalCode) {
+ addIfNull(nulls, JSON_PROPERTY_POSTAL_CODE, this.postalCode);
+ }
+ if (isSetStateOrProvince) {
+ addIfNull(nulls, JSON_PROPERTY_STATE_OR_PROVINCE, this.stateOrProvince);
+ }
+ if (isSetStreet) {
+ addIfNull(nulls, JSON_PROPERTY_STREET, this.street);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of BulkAddress given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/CapabilityProblem.java b/src/main/java/com/adyen/model/java/CapabilityProblem.java
similarity index 67%
rename from src/main/java/com/adyen/model/configurationwebhooks/CapabilityProblem.java
rename to src/main/java/com/adyen/model/java/CapabilityProblem.java
index 405a147aa..5001d370c 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/CapabilityProblem.java
+++ b/src/main/java/com/adyen/model/java/CapabilityProblem.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -28,9 +30,21 @@ public class CapabilityProblem {
public static final String JSON_PROPERTY_ENTITY = "entity";
private CapabilityProblemEntity entity;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEntity = false;
+
public static final String JSON_PROPERTY_VERIFICATION_ERRORS = "verificationErrors";
private List verificationErrors;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetVerificationErrors = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public CapabilityProblem() {}
/**
@@ -41,6 +55,7 @@ public CapabilityProblem() {}
*/
public CapabilityProblem entity(CapabilityProblemEntity entity) {
this.entity = entity;
+ isSetEntity = true; // mark as set
return this;
}
@@ -64,6 +79,7 @@ public CapabilityProblemEntity getEntity() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEntity(CapabilityProblemEntity entity) {
this.entity = entity;
+ isSetEntity = true; // mark as set
}
/**
@@ -74,6 +90,7 @@ public void setEntity(CapabilityProblemEntity entity) {
*/
public CapabilityProblem verificationErrors(List verificationErrors) {
this.verificationErrors = verificationErrors;
+ isSetVerificationErrors = true; // mark as set
return this;
}
@@ -105,6 +122,27 @@ public List getVerificationErrors() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setVerificationErrors(List verificationErrors) {
this.verificationErrors = verificationErrors;
+ isSetVerificationErrors = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public CapabilityProblem 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 CapabilityProblem object is equal to o. */
@@ -118,12 +156,14 @@ public boolean equals(Object o) {
}
CapabilityProblem capabilityProblem = (CapabilityProblem) o;
return Objects.equals(this.entity, capabilityProblem.entity)
- && Objects.equals(this.verificationErrors, capabilityProblem.verificationErrors);
+ && Objects.equals(this.isSetEntity, capabilityProblem.isSetEntity)
+ && Objects.equals(this.verificationErrors, capabilityProblem.verificationErrors)
+ && Objects.equals(this.isSetVerificationErrors, capabilityProblem.isSetVerificationErrors);
}
@Override
public int hashCode() {
- return Objects.hash(entity, verificationErrors);
+ return Objects.hash(entity, isSetEntity, verificationErrors, isSetVerificationErrors);
}
@Override
@@ -146,6 +186,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetEntity) {
+ addIfNull(nulls, JSON_PROPERTY_ENTITY, this.entity);
+ }
+ if (isSetVerificationErrors) {
+ addIfNull(nulls, JSON_PROPERTY_VERIFICATION_ERRORS, this.verificationErrors);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of CapabilityProblem given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/CapabilityProblemEntity.java b/src/main/java/com/adyen/model/java/CapabilityProblemEntity.java
similarity index 74%
rename from src/main/java/com/adyen/model/configurationwebhooks/CapabilityProblemEntity.java
rename to src/main/java/com/adyen/model/java/CapabilityProblemEntity.java
index 9e69b916a..da4330471 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/CapabilityProblemEntity.java
+++ b/src/main/java/com/adyen/model/java/CapabilityProblemEntity.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -34,12 +36,21 @@ public class CapabilityProblemEntity {
public static final String JSON_PROPERTY_DOCUMENTS = "documents";
private List documents;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDocuments = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_OWNER = "owner";
private CapabilityProblemEntityRecursive owner;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetOwner = false;
+
/** Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. */
public enum TypeEnum {
BANKACCOUNT(String.valueOf("BankAccount")),
@@ -86,6 +97,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public CapabilityProblemEntity() {}
/**
@@ -98,6 +118,7 @@ public CapabilityProblemEntity() {}
*/
public CapabilityProblemEntity documents(List documents) {
this.documents = documents;
+ isSetDocuments = true; // mark as set
return this;
}
@@ -133,6 +154,7 @@ public List getDocuments() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDocuments(List documents) {
this.documents = documents;
+ isSetDocuments = true; // mark as set
}
/**
@@ -143,6 +165,7 @@ public void setDocuments(List documents) {
*/
public CapabilityProblemEntity id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -166,6 +189,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -176,6 +200,7 @@ public void setId(String id) {
*/
public CapabilityProblemEntity owner(CapabilityProblemEntityRecursive owner) {
this.owner = owner;
+ isSetOwner = true; // mark as set
return this;
}
@@ -199,6 +224,7 @@ public CapabilityProblemEntityRecursive getOwner() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOwner(CapabilityProblemEntityRecursive owner) {
this.owner = owner;
+ isSetOwner = true; // mark as set
}
/**
@@ -209,6 +235,7 @@ public void setOwner(CapabilityProblemEntityRecursive owner) {
*/
public CapabilityProblemEntity type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -232,6 +259,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public CapabilityProblemEntity 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 CapabilityProblemEntity object is equal to o. */
@@ -245,14 +293,18 @@ public boolean equals(Object o) {
}
CapabilityProblemEntity capabilityProblemEntity = (CapabilityProblemEntity) o;
return Objects.equals(this.documents, capabilityProblemEntity.documents)
+ && Objects.equals(this.isSetDocuments, capabilityProblemEntity.isSetDocuments)
&& Objects.equals(this.id, capabilityProblemEntity.id)
+ && Objects.equals(this.isSetId, capabilityProblemEntity.isSetId)
&& Objects.equals(this.owner, capabilityProblemEntity.owner)
- && Objects.equals(this.type, capabilityProblemEntity.type);
+ && Objects.equals(this.isSetOwner, capabilityProblemEntity.isSetOwner)
+ && Objects.equals(this.type, capabilityProblemEntity.type)
+ && Objects.equals(this.isSetType, capabilityProblemEntity.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(documents, id, owner, type);
+ return Objects.hash(documents, isSetDocuments, id, isSetId, owner, isSetOwner, type, isSetType);
}
@Override
@@ -277,6 +329,39 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetDocuments) {
+ addIfNull(nulls, JSON_PROPERTY_DOCUMENTS, this.documents);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetOwner) {
+ addIfNull(nulls, JSON_PROPERTY_OWNER, this.owner);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of CapabilityProblemEntity given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/CapabilityProblemEntityRecursive.java b/src/main/java/com/adyen/model/java/CapabilityProblemEntityRecursive.java
similarity index 75%
rename from src/main/java/com/adyen/model/configurationwebhooks/CapabilityProblemEntityRecursive.java
rename to src/main/java/com/adyen/model/java/CapabilityProblemEntityRecursive.java
index f553e8278..f7c16cc70 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/CapabilityProblemEntityRecursive.java
+++ b/src/main/java/com/adyen/model/java/CapabilityProblemEntityRecursive.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -35,9 +37,15 @@ public class CapabilityProblemEntityRecursive {
public static final String JSON_PROPERTY_DOCUMENTS = "documents";
private List documents;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDocuments = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
/** Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. */
public enum TypeEnum {
BANKACCOUNT(String.valueOf("BankAccount")),
@@ -84,6 +92,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public CapabilityProblemEntityRecursive() {}
/**
@@ -97,6 +114,7 @@ public CapabilityProblemEntityRecursive() {}
*/
public CapabilityProblemEntityRecursive documents(List documents) {
this.documents = documents;
+ isSetDocuments = true; // mark as set
return this;
}
@@ -132,6 +150,7 @@ public List getDocuments() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDocuments(List documents) {
this.documents = documents;
+ isSetDocuments = true; // mark as set
}
/**
@@ -143,6 +162,7 @@ public void setDocuments(List documents) {
*/
public CapabilityProblemEntityRecursive id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -166,6 +186,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -177,6 +198,7 @@ public void setId(String id) {
*/
public CapabilityProblemEntityRecursive type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -200,6 +222,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public CapabilityProblemEntityRecursive 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 CapabilityProblemEntity-recursive object is equal to o. */
@@ -214,13 +257,16 @@ public boolean equals(Object o) {
CapabilityProblemEntityRecursive capabilityProblemEntityRecursive =
(CapabilityProblemEntityRecursive) o;
return Objects.equals(this.documents, capabilityProblemEntityRecursive.documents)
+ && Objects.equals(this.isSetDocuments, capabilityProblemEntityRecursive.isSetDocuments)
&& Objects.equals(this.id, capabilityProblemEntityRecursive.id)
- && Objects.equals(this.type, capabilityProblemEntityRecursive.type);
+ && Objects.equals(this.isSetId, capabilityProblemEntityRecursive.isSetId)
+ && Objects.equals(this.type, capabilityProblemEntityRecursive.type)
+ && Objects.equals(this.isSetType, capabilityProblemEntityRecursive.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(documents, id, type);
+ return Objects.hash(documents, isSetDocuments, id, isSetId, type, isSetType);
}
@Override
@@ -244,6 +290,36 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetDocuments) {
+ addIfNull(nulls, JSON_PROPERTY_DOCUMENTS, this.documents);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of CapabilityProblemEntityRecursive given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/CapabilitySettings.java b/src/main/java/com/adyen/model/java/CapabilitySettings.java
similarity index 73%
rename from src/main/java/com/adyen/model/configurationwebhooks/CapabilitySettings.java
rename to src/main/java/com/adyen/model/java/CapabilitySettings.java
index 816edc10c..0a019a26d 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/CapabilitySettings.java
+++ b/src/main/java/com/adyen/model/java/CapabilitySettings.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -37,9 +39,15 @@ public class CapabilitySettings {
public static final String JSON_PROPERTY_AMOUNT_PER_INDUSTRY = "amountPerIndustry";
private Map amountPerIndustry;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAmountPerIndustry = false;
+
public static final String JSON_PROPERTY_AUTHORIZED_CARD_USERS = "authorizedCardUsers";
private Boolean authorizedCardUsers;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAuthorizedCardUsers = false;
+
/** Gets or Sets fundingSource */
public enum FundingSourceEnum {
CREDIT(String.valueOf("credit")),
@@ -86,6 +94,9 @@ public static FundingSourceEnum fromValue(String value) {
public static final String JSON_PROPERTY_FUNDING_SOURCE = "fundingSource";
private List fundingSource;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetFundingSource = false;
+
/** */
public enum IntervalEnum {
DAILY(String.valueOf("daily")),
@@ -132,9 +143,21 @@ public static IntervalEnum fromValue(String value) {
public static final String JSON_PROPERTY_INTERVAL = "interval";
private IntervalEnum interval;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetInterval = false;
+
public static final String JSON_PROPERTY_MAX_AMOUNT = "maxAmount";
private Amount maxAmount;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetMaxAmount = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public CapabilitySettings() {}
/**
@@ -143,6 +166,7 @@ public CapabilitySettings() {}
*/
public CapabilitySettings amountPerIndustry(Map amountPerIndustry) {
this.amountPerIndustry = amountPerIndustry;
+ isSetAmountPerIndustry = true; // mark as set
return this;
}
@@ -170,6 +194,7 @@ public Map getAmountPerIndustry() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAmountPerIndustry(Map amountPerIndustry) {
this.amountPerIndustry = amountPerIndustry;
+ isSetAmountPerIndustry = true; // mark as set
}
/**
@@ -178,6 +203,7 @@ public void setAmountPerIndustry(Map amountPerIndustry) {
*/
public CapabilitySettings authorizedCardUsers(Boolean authorizedCardUsers) {
this.authorizedCardUsers = authorizedCardUsers;
+ isSetAuthorizedCardUsers = true; // mark as set
return this;
}
@@ -197,6 +223,7 @@ public Boolean getAuthorizedCardUsers() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAuthorizedCardUsers(Boolean authorizedCardUsers) {
this.authorizedCardUsers = authorizedCardUsers;
+ isSetAuthorizedCardUsers = true; // mark as set
}
/**
@@ -205,6 +232,7 @@ public void setAuthorizedCardUsers(Boolean authorizedCardUsers) {
*/
public CapabilitySettings fundingSource(List fundingSource) {
this.fundingSource = fundingSource;
+ isSetFundingSource = true; // mark as set
return this;
}
@@ -232,6 +260,7 @@ public List getFundingSource() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFundingSource(List fundingSource) {
this.fundingSource = fundingSource;
+ isSetFundingSource = true; // mark as set
}
/**
@@ -240,6 +269,7 @@ public void setFundingSource(List fundingSource) {
*/
public CapabilitySettings interval(IntervalEnum interval) {
this.interval = interval;
+ isSetInterval = true; // mark as set
return this;
}
@@ -259,6 +289,7 @@ public IntervalEnum getInterval() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setInterval(IntervalEnum interval) {
this.interval = interval;
+ isSetInterval = true; // mark as set
}
/**
@@ -269,6 +300,7 @@ public void setInterval(IntervalEnum interval) {
*/
public CapabilitySettings maxAmount(Amount maxAmount) {
this.maxAmount = maxAmount;
+ isSetMaxAmount = true; // mark as set
return this;
}
@@ -292,6 +324,27 @@ public Amount getMaxAmount() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMaxAmount(Amount maxAmount) {
this.maxAmount = maxAmount;
+ isSetMaxAmount = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public CapabilitySettings 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 CapabilitySettings object is equal to o. */
@@ -305,15 +358,31 @@ public boolean equals(Object o) {
}
CapabilitySettings capabilitySettings = (CapabilitySettings) o;
return Objects.equals(this.amountPerIndustry, capabilitySettings.amountPerIndustry)
+ && Objects.equals(this.isSetAmountPerIndustry, capabilitySettings.isSetAmountPerIndustry)
&& Objects.equals(this.authorizedCardUsers, capabilitySettings.authorizedCardUsers)
+ && Objects.equals(
+ this.isSetAuthorizedCardUsers, capabilitySettings.isSetAuthorizedCardUsers)
&& Objects.equals(this.fundingSource, capabilitySettings.fundingSource)
+ && Objects.equals(this.isSetFundingSource, capabilitySettings.isSetFundingSource)
&& Objects.equals(this.interval, capabilitySettings.interval)
- && Objects.equals(this.maxAmount, capabilitySettings.maxAmount);
+ && Objects.equals(this.isSetInterval, capabilitySettings.isSetInterval)
+ && Objects.equals(this.maxAmount, capabilitySettings.maxAmount)
+ && Objects.equals(this.isSetMaxAmount, capabilitySettings.isSetMaxAmount);
}
@Override
public int hashCode() {
- return Objects.hash(amountPerIndustry, authorizedCardUsers, fundingSource, interval, maxAmount);
+ return Objects.hash(
+ amountPerIndustry,
+ isSetAmountPerIndustry,
+ authorizedCardUsers,
+ isSetAuthorizedCardUsers,
+ fundingSource,
+ isSetFundingSource,
+ interval,
+ isSetInterval,
+ maxAmount,
+ isSetMaxAmount);
}
@Override
@@ -341,6 +410,42 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAmountPerIndustry) {
+ addIfNull(nulls, JSON_PROPERTY_AMOUNT_PER_INDUSTRY, this.amountPerIndustry);
+ }
+ if (isSetAuthorizedCardUsers) {
+ addIfNull(nulls, JSON_PROPERTY_AUTHORIZED_CARD_USERS, this.authorizedCardUsers);
+ }
+ if (isSetFundingSource) {
+ addIfNull(nulls, JSON_PROPERTY_FUNDING_SOURCE, this.fundingSource);
+ }
+ if (isSetInterval) {
+ addIfNull(nulls, JSON_PROPERTY_INTERVAL, this.interval);
+ }
+ if (isSetMaxAmount) {
+ addIfNull(nulls, JSON_PROPERTY_MAX_AMOUNT, this.maxAmount);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of CapabilitySettings given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/Card.java b/src/main/java/com/adyen/model/java/Card.java
similarity index 77%
rename from src/main/java/com/adyen/model/configurationwebhooks/Card.java
rename to src/main/java/com/adyen/model/java/Card.java
index e2086496b..3d112f4e2 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/Card.java
+++ b/src/main/java/com/adyen/model/java/Card.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -42,30 +44,57 @@ public class Card {
public static final String JSON_PROPERTY_AUTHENTICATION = "authentication";
private Authentication authentication;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAuthentication = false;
+
public static final String JSON_PROPERTY_BIN = "bin";
private String bin;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBin = false;
+
public static final String JSON_PROPERTY_BRAND = "brand";
private String brand;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBrand = false;
+
public static final String JSON_PROPERTY_BRAND_VARIANT = "brandVariant";
private String brandVariant;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBrandVariant = false;
+
public static final String JSON_PROPERTY_CARDHOLDER_NAME = "cardholderName";
private String cardholderName;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCardholderName = false;
+
public static final String JSON_PROPERTY_CONFIGURATION = "configuration";
private CardConfiguration configuration;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetConfiguration = false;
+
public static final String JSON_PROPERTY_CVC = "cvc";
private String cvc;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCvc = false;
+
public static final String JSON_PROPERTY_DELIVERY_CONTACT = "deliveryContact";
private DeliveryContact deliveryContact;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDeliveryContact = false;
+
public static final String JSON_PROPERTY_EXPIRATION = "expiration";
private Expiry expiration;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetExpiration = false;
+
/** The form factor of the card. Possible values: **virtual**, **physical**. */
public enum FormFactorEnum {
PHYSICAL(String.valueOf("physical")),
@@ -112,18 +141,39 @@ public static FormFactorEnum fromValue(String value) {
public static final String JSON_PROPERTY_FORM_FACTOR = "formFactor";
private FormFactorEnum formFactor;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetFormFactor = false;
+
public static final String JSON_PROPERTY_LAST_FOUR = "lastFour";
private String lastFour;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetLastFour = false;
+
public static final String JSON_PROPERTY_NUMBER = "number";
private String number;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetNumber = false;
+
public static final String JSON_PROPERTY_THREE_D_SECURE = "threeDSecure";
private String threeDSecure;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetThreeDSecure = false;
+
public static final String JSON_PROPERTY_USAGE = "usage";
private String usage;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetUsage = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public Card() {}
/**
@@ -134,6 +184,7 @@ public Card() {}
*/
public Card authentication(Authentication authentication) {
this.authentication = authentication;
+ isSetAuthentication = true; // mark as set
return this;
}
@@ -157,6 +208,7 @@ public Authentication getAuthentication() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAuthentication(Authentication authentication) {
this.authentication = authentication;
+ isSetAuthentication = true; // mark as set
}
/**
@@ -167,6 +219,7 @@ public void setAuthentication(Authentication authentication) {
*/
public Card bin(String bin) {
this.bin = bin;
+ isSetBin = true; // mark as set
return this;
}
@@ -190,6 +243,7 @@ public String getBin() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBin(String bin) {
this.bin = bin;
+ isSetBin = true; // mark as set
}
/**
@@ -200,6 +254,7 @@ public void setBin(String bin) {
*/
public Card brand(String brand) {
this.brand = brand;
+ isSetBrand = true; // mark as set
return this;
}
@@ -223,6 +278,7 @@ public String getBrand() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBrand(String brand) {
this.brand = brand;
+ isSetBrand = true; // mark as set
}
/**
@@ -237,6 +293,7 @@ public void setBrand(String brand) {
*/
public Card brandVariant(String brandVariant) {
this.brandVariant = brandVariant;
+ isSetBrandVariant = true; // mark as set
return this;
}
@@ -268,6 +325,7 @@ public String getBrandVariant() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBrandVariant(String brandVariant) {
this.brandVariant = brandVariant;
+ isSetBrandVariant = true; // mark as set
}
/**
@@ -278,6 +336,7 @@ public void setBrandVariant(String brandVariant) {
*/
public Card cardholderName(String cardholderName) {
this.cardholderName = cardholderName;
+ isSetCardholderName = true; // mark as set
return this;
}
@@ -301,6 +360,7 @@ public String getCardholderName() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCardholderName(String cardholderName) {
this.cardholderName = cardholderName;
+ isSetCardholderName = true; // mark as set
}
/**
@@ -311,6 +371,7 @@ public void setCardholderName(String cardholderName) {
*/
public Card configuration(CardConfiguration configuration) {
this.configuration = configuration;
+ isSetConfiguration = true; // mark as set
return this;
}
@@ -334,6 +395,7 @@ public CardConfiguration getConfiguration() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setConfiguration(CardConfiguration configuration) {
this.configuration = configuration;
+ isSetConfiguration = true; // mark as set
}
/**
@@ -346,6 +408,7 @@ public void setConfiguration(CardConfiguration configuration) {
*/
public Card cvc(String cvc) {
this.cvc = cvc;
+ isSetCvc = true; // mark as set
return this;
}
@@ -373,6 +436,7 @@ public String getCvc() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCvc(String cvc) {
this.cvc = cvc;
+ isSetCvc = true; // mark as set
}
/**
@@ -383,6 +447,7 @@ public void setCvc(String cvc) {
*/
public Card deliveryContact(DeliveryContact deliveryContact) {
this.deliveryContact = deliveryContact;
+ isSetDeliveryContact = true; // mark as set
return this;
}
@@ -406,6 +471,7 @@ public DeliveryContact getDeliveryContact() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeliveryContact(DeliveryContact deliveryContact) {
this.deliveryContact = deliveryContact;
+ isSetDeliveryContact = true; // mark as set
}
/**
@@ -416,6 +482,7 @@ public void setDeliveryContact(DeliveryContact deliveryContact) {
*/
public Card expiration(Expiry expiration) {
this.expiration = expiration;
+ isSetExpiration = true; // mark as set
return this;
}
@@ -439,6 +506,7 @@ public Expiry getExpiration() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setExpiration(Expiry expiration) {
this.expiration = expiration;
+ isSetExpiration = true; // mark as set
}
/**
@@ -449,6 +517,7 @@ public void setExpiration(Expiry expiration) {
*/
public Card formFactor(FormFactorEnum formFactor) {
this.formFactor = formFactor;
+ isSetFormFactor = true; // mark as set
return this;
}
@@ -472,6 +541,7 @@ public FormFactorEnum getFormFactor() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFormFactor(FormFactorEnum formFactor) {
this.formFactor = formFactor;
+ isSetFormFactor = true; // mark as set
}
/**
@@ -482,6 +552,7 @@ public void setFormFactor(FormFactorEnum formFactor) {
*/
public Card lastFour(String lastFour) {
this.lastFour = lastFour;
+ isSetLastFour = true; // mark as set
return this;
}
@@ -505,6 +576,7 @@ public String getLastFour() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLastFour(String lastFour) {
this.lastFour = lastFour;
+ isSetLastFour = true; // mark as set
}
/**
@@ -517,6 +589,7 @@ public void setLastFour(String lastFour) {
*/
public Card number(String number) {
this.number = number;
+ isSetNumber = true; // mark as set
return this;
}
@@ -544,6 +617,7 @@ public String getNumber() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNumber(String number) {
this.number = number;
+ isSetNumber = true; // mark as set
}
/**
@@ -558,6 +632,7 @@ public void setNumber(String number) {
*/
public Card threeDSecure(String threeDSecure) {
this.threeDSecure = threeDSecure;
+ isSetThreeDSecure = true; // mark as set
return this;
}
@@ -589,6 +664,7 @@ public String getThreeDSecure() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setThreeDSecure(String threeDSecure) {
this.threeDSecure = threeDSecure;
+ isSetThreeDSecure = true; // mark as set
}
/**
@@ -602,6 +678,7 @@ public void setThreeDSecure(String threeDSecure) {
*/
public Card usage(String usage) {
this.usage = usage;
+ isSetUsage = true; // mark as set
return this;
}
@@ -631,6 +708,27 @@ public String getUsage() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUsage(String usage) {
this.usage = usage;
+ isSetUsage = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public Card 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 Card object is equal to o. */
@@ -644,38 +742,66 @@ public boolean equals(Object o) {
}
Card card = (Card) o;
return Objects.equals(this.authentication, card.authentication)
+ && Objects.equals(this.isSetAuthentication, card.isSetAuthentication)
&& Objects.equals(this.bin, card.bin)
+ && Objects.equals(this.isSetBin, card.isSetBin)
&& Objects.equals(this.brand, card.brand)
+ && Objects.equals(this.isSetBrand, card.isSetBrand)
&& Objects.equals(this.brandVariant, card.brandVariant)
+ && Objects.equals(this.isSetBrandVariant, card.isSetBrandVariant)
&& Objects.equals(this.cardholderName, card.cardholderName)
+ && Objects.equals(this.isSetCardholderName, card.isSetCardholderName)
&& Objects.equals(this.configuration, card.configuration)
+ && Objects.equals(this.isSetConfiguration, card.isSetConfiguration)
&& Objects.equals(this.cvc, card.cvc)
+ && Objects.equals(this.isSetCvc, card.isSetCvc)
&& Objects.equals(this.deliveryContact, card.deliveryContact)
+ && Objects.equals(this.isSetDeliveryContact, card.isSetDeliveryContact)
&& Objects.equals(this.expiration, card.expiration)
+ && Objects.equals(this.isSetExpiration, card.isSetExpiration)
&& Objects.equals(this.formFactor, card.formFactor)
+ && Objects.equals(this.isSetFormFactor, card.isSetFormFactor)
&& Objects.equals(this.lastFour, card.lastFour)
+ && Objects.equals(this.isSetLastFour, card.isSetLastFour)
&& Objects.equals(this.number, card.number)
+ && Objects.equals(this.isSetNumber, card.isSetNumber)
&& Objects.equals(this.threeDSecure, card.threeDSecure)
- && Objects.equals(this.usage, card.usage);
+ && Objects.equals(this.isSetThreeDSecure, card.isSetThreeDSecure)
+ && Objects.equals(this.usage, card.usage)
+ && Objects.equals(this.isSetUsage, card.isSetUsage);
}
@Override
public int hashCode() {
return Objects.hash(
authentication,
+ isSetAuthentication,
bin,
+ isSetBin,
brand,
+ isSetBrand,
brandVariant,
+ isSetBrandVariant,
cardholderName,
+ isSetCardholderName,
configuration,
+ isSetConfiguration,
cvc,
+ isSetCvc,
deliveryContact,
+ isSetDeliveryContact,
expiration,
+ isSetExpiration,
formFactor,
+ isSetFormFactor,
lastFour,
+ isSetLastFour,
number,
+ isSetNumber,
threeDSecure,
- usage);
+ isSetThreeDSecure,
+ usage,
+ isSetUsage);
}
@Override
@@ -710,6 +836,69 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAuthentication) {
+ addIfNull(nulls, JSON_PROPERTY_AUTHENTICATION, this.authentication);
+ }
+ if (isSetBin) {
+ addIfNull(nulls, JSON_PROPERTY_BIN, this.bin);
+ }
+ if (isSetBrand) {
+ addIfNull(nulls, JSON_PROPERTY_BRAND, this.brand);
+ }
+ if (isSetBrandVariant) {
+ addIfNull(nulls, JSON_PROPERTY_BRAND_VARIANT, this.brandVariant);
+ }
+ if (isSetCardholderName) {
+ addIfNull(nulls, JSON_PROPERTY_CARDHOLDER_NAME, this.cardholderName);
+ }
+ if (isSetConfiguration) {
+ addIfNull(nulls, JSON_PROPERTY_CONFIGURATION, this.configuration);
+ }
+ if (isSetCvc) {
+ addIfNull(nulls, JSON_PROPERTY_CVC, this.cvc);
+ }
+ if (isSetDeliveryContact) {
+ addIfNull(nulls, JSON_PROPERTY_DELIVERY_CONTACT, this.deliveryContact);
+ }
+ if (isSetExpiration) {
+ addIfNull(nulls, JSON_PROPERTY_EXPIRATION, this.expiration);
+ }
+ if (isSetFormFactor) {
+ addIfNull(nulls, JSON_PROPERTY_FORM_FACTOR, this.formFactor);
+ }
+ if (isSetLastFour) {
+ addIfNull(nulls, JSON_PROPERTY_LAST_FOUR, this.lastFour);
+ }
+ if (isSetNumber) {
+ addIfNull(nulls, JSON_PROPERTY_NUMBER, this.number);
+ }
+ if (isSetThreeDSecure) {
+ addIfNull(nulls, JSON_PROPERTY_THREE_D_SECURE, this.threeDSecure);
+ }
+ if (isSetUsage) {
+ addIfNull(nulls, JSON_PROPERTY_USAGE, this.usage);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of Card given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/CardConfiguration.java b/src/main/java/com/adyen/model/java/CardConfiguration.java
similarity index 81%
rename from src/main/java/com/adyen/model/configurationwebhooks/CardConfiguration.java
rename to src/main/java/com/adyen/model/java/CardConfiguration.java
index 9f2b92731..4de064467 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/CardConfiguration.java
+++ b/src/main/java/com/adyen/model/java/CardConfiguration.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -38,45 +40,93 @@ public class CardConfiguration {
public static final String JSON_PROPERTY_ACTIVATION = "activation";
private String activation;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetActivation = false;
+
public static final String JSON_PROPERTY_ACTIVATION_URL = "activationUrl";
private String activationUrl;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetActivationUrl = false;
+
public static final String JSON_PROPERTY_BULK_ADDRESS = "bulkAddress";
private BulkAddress bulkAddress;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBulkAddress = false;
+
public static final String JSON_PROPERTY_CARD_IMAGE_ID = "cardImageId";
private String cardImageId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCardImageId = false;
+
public static final String JSON_PROPERTY_CARRIER = "carrier";
private String carrier;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCarrier = false;
+
public static final String JSON_PROPERTY_CARRIER_IMAGE_ID = "carrierImageId";
private String carrierImageId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCarrierImageId = false;
+
public static final String JSON_PROPERTY_CONFIGURATION_PROFILE_ID = "configurationProfileId";
private String configurationProfileId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetConfigurationProfileId = false;
+
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_ENVELOPE = "envelope";
private String envelope;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEnvelope = false;
+
public static final String JSON_PROPERTY_INSERT = "insert";
private String insert;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetInsert = false;
+
public static final String JSON_PROPERTY_LANGUAGE = "language";
private String language;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetLanguage = false;
+
public static final String JSON_PROPERTY_LOGO_IMAGE_ID = "logoImageId";
private String logoImageId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetLogoImageId = false;
+
public static final String JSON_PROPERTY_PIN_MAILER = "pinMailer";
private String pinMailer;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPinMailer = false;
+
public static final String JSON_PROPERTY_SHIPMENT_METHOD = "shipmentMethod";
private String shipmentMethod;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetShipmentMethod = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public CardConfiguration() {}
/**
@@ -90,6 +140,7 @@ public CardConfiguration() {}
*/
public CardConfiguration activation(String activation) {
this.activation = activation;
+ isSetActivation = true; // mark as set
return this;
}
@@ -119,6 +170,7 @@ public String getActivation() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setActivation(String activation) {
this.activation = activation;
+ isSetActivation = true; // mark as set
}
/**
@@ -135,6 +187,7 @@ public void setActivation(String activation) {
*/
public CardConfiguration activationUrl(String activationUrl) {
this.activationUrl = activationUrl;
+ isSetActivationUrl = true; // mark as set
return this;
}
@@ -170,6 +223,7 @@ public String getActivationUrl() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setActivationUrl(String activationUrl) {
this.activationUrl = activationUrl;
+ isSetActivationUrl = true; // mark as set
}
/**
@@ -180,6 +234,7 @@ public void setActivationUrl(String activationUrl) {
*/
public CardConfiguration bulkAddress(BulkAddress bulkAddress) {
this.bulkAddress = bulkAddress;
+ isSetBulkAddress = true; // mark as set
return this;
}
@@ -203,6 +258,7 @@ public BulkAddress getBulkAddress() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBulkAddress(BulkAddress bulkAddress) {
this.bulkAddress = bulkAddress;
+ isSetBulkAddress = true; // mark as set
}
/**
@@ -214,6 +270,7 @@ public void setBulkAddress(BulkAddress bulkAddress) {
*/
public CardConfiguration cardImageId(String cardImageId) {
this.cardImageId = cardImageId;
+ isSetCardImageId = true; // mark as set
return this;
}
@@ -239,6 +296,7 @@ public String getCardImageId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCardImageId(String cardImageId) {
this.cardImageId = cardImageId;
+ isSetCardImageId = true; // mark as set
}
/**
@@ -251,6 +309,7 @@ public void setCardImageId(String cardImageId) {
*/
public CardConfiguration carrier(String carrier) {
this.carrier = carrier;
+ isSetCarrier = true; // mark as set
return this;
}
@@ -278,6 +337,7 @@ public String getCarrier() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCarrier(String carrier) {
this.carrier = carrier;
+ isSetCarrier = true; // mark as set
}
/**
@@ -290,6 +350,7 @@ public void setCarrier(String carrier) {
*/
public CardConfiguration carrierImageId(String carrierImageId) {
this.carrierImageId = carrierImageId;
+ isSetCarrierImageId = true; // mark as set
return this;
}
@@ -317,6 +378,7 @@ public String getCarrierImageId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCarrierImageId(String carrierImageId) {
this.carrierImageId = carrierImageId;
+ isSetCarrierImageId = true; // mark as set
}
/**
@@ -337,6 +399,7 @@ public void setCarrierImageId(String carrierImageId) {
*/
public CardConfiguration configurationProfileId(String configurationProfileId) {
this.configurationProfileId = configurationProfileId;
+ isSetConfigurationProfileId = true; // mark as set
return this;
}
@@ -380,6 +443,7 @@ public String getConfigurationProfileId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setConfigurationProfileId(String configurationProfileId) {
this.configurationProfileId = configurationProfileId;
+ isSetConfigurationProfileId = true; // mark as set
}
/**
@@ -394,6 +458,7 @@ public void setConfigurationProfileId(String configurationProfileId) {
*/
public CardConfiguration currency(String currency) {
this.currency = currency;
+ isSetCurrency = true; // mark as set
return this;
}
@@ -425,6 +490,7 @@ public String getCurrency() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCurrency(String currency) {
this.currency = currency;
+ isSetCurrency = true; // mark as set
}
/**
@@ -435,6 +501,7 @@ public void setCurrency(String currency) {
*/
public CardConfiguration envelope(String envelope) {
this.envelope = envelope;
+ isSetEnvelope = true; // mark as set
return this;
}
@@ -458,6 +525,7 @@ public String getEnvelope() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnvelope(String envelope) {
this.envelope = envelope;
+ isSetEnvelope = true; // mark as set
}
/**
@@ -471,6 +539,7 @@ public void setEnvelope(String envelope) {
*/
public CardConfiguration insert(String insert) {
this.insert = insert;
+ isSetInsert = true; // mark as set
return this;
}
@@ -500,6 +569,7 @@ public String getInsert() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setInsert(String insert) {
this.insert = insert;
+ isSetInsert = true; // mark as set
}
/**
@@ -513,6 +583,7 @@ public void setInsert(String insert) {
*/
public CardConfiguration language(String language) {
this.language = language;
+ isSetLanguage = true; // mark as set
return this;
}
@@ -542,6 +613,7 @@ public String getLanguage() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLanguage(String language) {
this.language = language;
+ isSetLanguage = true; // mark as set
}
/**
@@ -554,6 +626,7 @@ public void setLanguage(String language) {
*/
public CardConfiguration logoImageId(String logoImageId) {
this.logoImageId = logoImageId;
+ isSetLogoImageId = true; // mark as set
return this;
}
@@ -581,6 +654,7 @@ public String getLogoImageId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLogoImageId(String logoImageId) {
this.logoImageId = logoImageId;
+ isSetLogoImageId = true; // mark as set
}
/**
@@ -593,6 +667,7 @@ public void setLogoImageId(String logoImageId) {
*/
public CardConfiguration pinMailer(String pinMailer) {
this.pinMailer = pinMailer;
+ isSetPinMailer = true; // mark as set
return this;
}
@@ -620,6 +695,7 @@ public String getPinMailer() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPinMailer(String pinMailer) {
this.pinMailer = pinMailer;
+ isSetPinMailer = true; // mark as set
}
/**
@@ -632,6 +708,7 @@ public void setPinMailer(String pinMailer) {
*/
public CardConfiguration shipmentMethod(String shipmentMethod) {
this.shipmentMethod = shipmentMethod;
+ isSetShipmentMethod = true; // mark as set
return this;
}
@@ -659,6 +736,27 @@ public String getShipmentMethod() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setShipmentMethod(String shipmentMethod) {
this.shipmentMethod = shipmentMethod;
+ isSetShipmentMethod = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public CardConfiguration 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 CardConfiguration object is equal to o. */
@@ -672,38 +770,67 @@ public boolean equals(Object o) {
}
CardConfiguration cardConfiguration = (CardConfiguration) o;
return Objects.equals(this.activation, cardConfiguration.activation)
+ && Objects.equals(this.isSetActivation, cardConfiguration.isSetActivation)
&& Objects.equals(this.activationUrl, cardConfiguration.activationUrl)
+ && Objects.equals(this.isSetActivationUrl, cardConfiguration.isSetActivationUrl)
&& Objects.equals(this.bulkAddress, cardConfiguration.bulkAddress)
+ && Objects.equals(this.isSetBulkAddress, cardConfiguration.isSetBulkAddress)
&& Objects.equals(this.cardImageId, cardConfiguration.cardImageId)
+ && Objects.equals(this.isSetCardImageId, cardConfiguration.isSetCardImageId)
&& Objects.equals(this.carrier, cardConfiguration.carrier)
+ && Objects.equals(this.isSetCarrier, cardConfiguration.isSetCarrier)
&& Objects.equals(this.carrierImageId, cardConfiguration.carrierImageId)
+ && Objects.equals(this.isSetCarrierImageId, cardConfiguration.isSetCarrierImageId)
&& Objects.equals(this.configurationProfileId, cardConfiguration.configurationProfileId)
+ && Objects.equals(
+ this.isSetConfigurationProfileId, cardConfiguration.isSetConfigurationProfileId)
&& Objects.equals(this.currency, cardConfiguration.currency)
+ && Objects.equals(this.isSetCurrency, cardConfiguration.isSetCurrency)
&& Objects.equals(this.envelope, cardConfiguration.envelope)
+ && Objects.equals(this.isSetEnvelope, cardConfiguration.isSetEnvelope)
&& Objects.equals(this.insert, cardConfiguration.insert)
+ && Objects.equals(this.isSetInsert, cardConfiguration.isSetInsert)
&& Objects.equals(this.language, cardConfiguration.language)
+ && Objects.equals(this.isSetLanguage, cardConfiguration.isSetLanguage)
&& Objects.equals(this.logoImageId, cardConfiguration.logoImageId)
+ && Objects.equals(this.isSetLogoImageId, cardConfiguration.isSetLogoImageId)
&& Objects.equals(this.pinMailer, cardConfiguration.pinMailer)
- && Objects.equals(this.shipmentMethod, cardConfiguration.shipmentMethod);
+ && Objects.equals(this.isSetPinMailer, cardConfiguration.isSetPinMailer)
+ && Objects.equals(this.shipmentMethod, cardConfiguration.shipmentMethod)
+ && Objects.equals(this.isSetShipmentMethod, cardConfiguration.isSetShipmentMethod);
}
@Override
public int hashCode() {
return Objects.hash(
activation,
+ isSetActivation,
activationUrl,
+ isSetActivationUrl,
bulkAddress,
+ isSetBulkAddress,
cardImageId,
+ isSetCardImageId,
carrier,
+ isSetCarrier,
carrierImageId,
+ isSetCarrierImageId,
configurationProfileId,
+ isSetConfigurationProfileId,
currency,
+ isSetCurrency,
envelope,
+ isSetEnvelope,
insert,
+ isSetInsert,
language,
+ isSetLanguage,
logoImageId,
+ isSetLogoImageId,
pinMailer,
- shipmentMethod);
+ isSetPinMailer,
+ shipmentMethod,
+ isSetShipmentMethod);
}
@Override
@@ -740,6 +867,69 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetActivation) {
+ addIfNull(nulls, JSON_PROPERTY_ACTIVATION, this.activation);
+ }
+ if (isSetActivationUrl) {
+ addIfNull(nulls, JSON_PROPERTY_ACTIVATION_URL, this.activationUrl);
+ }
+ if (isSetBulkAddress) {
+ addIfNull(nulls, JSON_PROPERTY_BULK_ADDRESS, this.bulkAddress);
+ }
+ if (isSetCardImageId) {
+ addIfNull(nulls, JSON_PROPERTY_CARD_IMAGE_ID, this.cardImageId);
+ }
+ if (isSetCarrier) {
+ addIfNull(nulls, JSON_PROPERTY_CARRIER, this.carrier);
+ }
+ if (isSetCarrierImageId) {
+ addIfNull(nulls, JSON_PROPERTY_CARRIER_IMAGE_ID, this.carrierImageId);
+ }
+ if (isSetConfigurationProfileId) {
+ addIfNull(nulls, JSON_PROPERTY_CONFIGURATION_PROFILE_ID, this.configurationProfileId);
+ }
+ if (isSetCurrency) {
+ addIfNull(nulls, JSON_PROPERTY_CURRENCY, this.currency);
+ }
+ if (isSetEnvelope) {
+ addIfNull(nulls, JSON_PROPERTY_ENVELOPE, this.envelope);
+ }
+ if (isSetInsert) {
+ addIfNull(nulls, JSON_PROPERTY_INSERT, this.insert);
+ }
+ if (isSetLanguage) {
+ addIfNull(nulls, JSON_PROPERTY_LANGUAGE, this.language);
+ }
+ if (isSetLogoImageId) {
+ addIfNull(nulls, JSON_PROPERTY_LOGO_IMAGE_ID, this.logoImageId);
+ }
+ if (isSetPinMailer) {
+ addIfNull(nulls, JSON_PROPERTY_PIN_MAILER, this.pinMailer);
+ }
+ if (isSetShipmentMethod) {
+ addIfNull(nulls, JSON_PROPERTY_SHIPMENT_METHOD, this.shipmentMethod);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of CardConfiguration given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/CardOrderItem.java b/src/main/java/com/adyen/model/java/CardOrderItem.java
similarity index 72%
rename from src/main/java/com/adyen/model/configurationwebhooks/CardOrderItem.java
rename to src/main/java/com/adyen/model/java/CardOrderItem.java
index 6b607b4d7..39d938c73 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/CardOrderItem.java
+++ b/src/main/java/com/adyen/model/java/CardOrderItem.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -33,27 +35,57 @@ public class CardOrderItem {
public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
private String balancePlatform;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalancePlatform = false;
+
public static final String JSON_PROPERTY_CARD = "card";
private CardOrderItemDeliveryStatus card;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCard = false;
+
public static final String JSON_PROPERTY_CARD_ORDER_ITEM_ID = "cardOrderItemId";
private String cardOrderItemId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCardOrderItemId = false;
+
public static final String JSON_PROPERTY_CREATION_DATE = "creationDate";
private OffsetDateTime creationDate;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCreationDate = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_ID = "paymentInstrumentId";
private String paymentInstrumentId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPaymentInstrumentId = false;
+
public static final String JSON_PROPERTY_PIN = "pin";
private CardOrderItemDeliveryStatus pin;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPin = false;
+
public static final String JSON_PROPERTY_SHIPPING_METHOD = "shippingMethod";
private String shippingMethod;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetShippingMethod = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public CardOrderItem() {}
/**
@@ -64,6 +96,7 @@ public CardOrderItem() {}
*/
public CardOrderItem balancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
return this;
}
@@ -87,6 +120,7 @@ public String getBalancePlatform() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
}
/**
@@ -97,6 +131,7 @@ public void setBalancePlatform(String balancePlatform) {
*/
public CardOrderItem card(CardOrderItemDeliveryStatus card) {
this.card = card;
+ isSetCard = true; // mark as set
return this;
}
@@ -120,6 +155,7 @@ public CardOrderItemDeliveryStatus getCard() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCard(CardOrderItemDeliveryStatus card) {
this.card = card;
+ isSetCard = true; // mark as set
}
/**
@@ -130,6 +166,7 @@ public void setCard(CardOrderItemDeliveryStatus card) {
*/
public CardOrderItem cardOrderItemId(String cardOrderItemId) {
this.cardOrderItemId = cardOrderItemId;
+ isSetCardOrderItemId = true; // mark as set
return this;
}
@@ -153,6 +190,7 @@ public String getCardOrderItemId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCardOrderItemId(String cardOrderItemId) {
this.cardOrderItemId = cardOrderItemId;
+ isSetCardOrderItemId = true; // mark as set
}
/**
@@ -165,6 +203,7 @@ public void setCardOrderItemId(String cardOrderItemId) {
*/
public CardOrderItem creationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
+ isSetCreationDate = true; // mark as set
return this;
}
@@ -192,6 +231,7 @@ public OffsetDateTime getCreationDate() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCreationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
+ isSetCreationDate = true; // mark as set
}
/**
@@ -202,6 +242,7 @@ public void setCreationDate(OffsetDateTime creationDate) {
*/
public CardOrderItem id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -225,6 +266,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -236,6 +278,7 @@ public void setId(String id) {
*/
public CardOrderItem paymentInstrumentId(String paymentInstrumentId) {
this.paymentInstrumentId = paymentInstrumentId;
+ isSetPaymentInstrumentId = true; // mark as set
return this;
}
@@ -261,6 +304,7 @@ public String getPaymentInstrumentId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPaymentInstrumentId(String paymentInstrumentId) {
this.paymentInstrumentId = paymentInstrumentId;
+ isSetPaymentInstrumentId = true; // mark as set
}
/**
@@ -271,6 +315,7 @@ public void setPaymentInstrumentId(String paymentInstrumentId) {
*/
public CardOrderItem pin(CardOrderItemDeliveryStatus pin) {
this.pin = pin;
+ isSetPin = true; // mark as set
return this;
}
@@ -294,6 +339,7 @@ public CardOrderItemDeliveryStatus getPin() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPin(CardOrderItemDeliveryStatus pin) {
this.pin = pin;
+ isSetPin = true; // mark as set
}
/**
@@ -304,6 +350,7 @@ public void setPin(CardOrderItemDeliveryStatus pin) {
*/
public CardOrderItem shippingMethod(String shippingMethod) {
this.shippingMethod = shippingMethod;
+ isSetShippingMethod = true; // mark as set
return this;
}
@@ -327,6 +374,27 @@ public String getShippingMethod() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setShippingMethod(String shippingMethod) {
this.shippingMethod = shippingMethod;
+ isSetShippingMethod = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public CardOrderItem 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 CardOrderItem object is equal to o. */
@@ -340,26 +408,42 @@ public boolean equals(Object o) {
}
CardOrderItem cardOrderItem = (CardOrderItem) o;
return Objects.equals(this.balancePlatform, cardOrderItem.balancePlatform)
+ && Objects.equals(this.isSetBalancePlatform, cardOrderItem.isSetBalancePlatform)
&& Objects.equals(this.card, cardOrderItem.card)
+ && Objects.equals(this.isSetCard, cardOrderItem.isSetCard)
&& Objects.equals(this.cardOrderItemId, cardOrderItem.cardOrderItemId)
+ && Objects.equals(this.isSetCardOrderItemId, cardOrderItem.isSetCardOrderItemId)
&& Objects.equals(this.creationDate, cardOrderItem.creationDate)
+ && Objects.equals(this.isSetCreationDate, cardOrderItem.isSetCreationDate)
&& Objects.equals(this.id, cardOrderItem.id)
+ && Objects.equals(this.isSetId, cardOrderItem.isSetId)
&& Objects.equals(this.paymentInstrumentId, cardOrderItem.paymentInstrumentId)
+ && Objects.equals(this.isSetPaymentInstrumentId, cardOrderItem.isSetPaymentInstrumentId)
&& Objects.equals(this.pin, cardOrderItem.pin)
- && Objects.equals(this.shippingMethod, cardOrderItem.shippingMethod);
+ && Objects.equals(this.isSetPin, cardOrderItem.isSetPin)
+ && Objects.equals(this.shippingMethod, cardOrderItem.shippingMethod)
+ && Objects.equals(this.isSetShippingMethod, cardOrderItem.isSetShippingMethod);
}
@Override
public int hashCode() {
return Objects.hash(
balancePlatform,
+ isSetBalancePlatform,
card,
+ isSetCard,
cardOrderItemId,
+ isSetCardOrderItemId,
creationDate,
+ isSetCreationDate,
id,
+ isSetId,
paymentInstrumentId,
+ isSetPaymentInstrumentId,
pin,
- shippingMethod);
+ isSetPin,
+ shippingMethod,
+ isSetShippingMethod);
}
@Override
@@ -390,6 +474,51 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetBalancePlatform) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE_PLATFORM, this.balancePlatform);
+ }
+ if (isSetCard) {
+ addIfNull(nulls, JSON_PROPERTY_CARD, this.card);
+ }
+ if (isSetCardOrderItemId) {
+ addIfNull(nulls, JSON_PROPERTY_CARD_ORDER_ITEM_ID, this.cardOrderItemId);
+ }
+ if (isSetCreationDate) {
+ addIfNull(nulls, JSON_PROPERTY_CREATION_DATE, this.creationDate);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetPaymentInstrumentId) {
+ addIfNull(nulls, JSON_PROPERTY_PAYMENT_INSTRUMENT_ID, this.paymentInstrumentId);
+ }
+ if (isSetPin) {
+ addIfNull(nulls, JSON_PROPERTY_PIN, this.pin);
+ }
+ if (isSetShippingMethod) {
+ addIfNull(nulls, JSON_PROPERTY_SHIPPING_METHOD, this.shippingMethod);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of CardOrderItem given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/CardOrderItemDeliveryStatus.java b/src/main/java/com/adyen/model/java/CardOrderItemDeliveryStatus.java
similarity index 71%
rename from src/main/java/com/adyen/model/configurationwebhooks/CardOrderItemDeliveryStatus.java
rename to src/main/java/com/adyen/model/java/CardOrderItemDeliveryStatus.java
index 23c35058f..7897912ff 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/CardOrderItemDeliveryStatus.java
+++ b/src/main/java/com/adyen/model/java/CardOrderItemDeliveryStatus.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -31,6 +33,9 @@ public class CardOrderItemDeliveryStatus {
public static final String JSON_PROPERTY_ERROR_MESSAGE = "errorMessage";
private String errorMessage;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetErrorMessage = false;
+
/** The status of the PIN delivery. */
public enum StatusEnum {
CREATED(String.valueOf("created")),
@@ -87,9 +92,21 @@ 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;
+
public static final String JSON_PROPERTY_TRACKING_NUMBER = "trackingNumber";
private String trackingNumber;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTrackingNumber = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public CardOrderItemDeliveryStatus() {}
/**
@@ -100,6 +117,7 @@ public CardOrderItemDeliveryStatus() {}
*/
public CardOrderItemDeliveryStatus errorMessage(String errorMessage) {
this.errorMessage = errorMessage;
+ isSetErrorMessage = true; // mark as set
return this;
}
@@ -123,6 +141,7 @@ public String getErrorMessage() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
+ isSetErrorMessage = true; // mark as set
}
/**
@@ -133,6 +152,7 @@ public void setErrorMessage(String errorMessage) {
*/
public CardOrderItemDeliveryStatus status(StatusEnum status) {
this.status = status;
+ isSetStatus = true; // mark as set
return this;
}
@@ -156,6 +176,7 @@ public StatusEnum getStatus() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatus(StatusEnum status) {
this.status = status;
+ isSetStatus = true; // mark as set
}
/**
@@ -166,6 +187,7 @@ public void setStatus(StatusEnum status) {
*/
public CardOrderItemDeliveryStatus trackingNumber(String trackingNumber) {
this.trackingNumber = trackingNumber;
+ isSetTrackingNumber = true; // mark as set
return this;
}
@@ -189,6 +211,27 @@ public String getTrackingNumber() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTrackingNumber(String trackingNumber) {
this.trackingNumber = trackingNumber;
+ isSetTrackingNumber = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public CardOrderItemDeliveryStatus 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 CardOrderItemDeliveryStatus object is equal to o. */
@@ -202,13 +245,18 @@ public boolean equals(Object o) {
}
CardOrderItemDeliveryStatus cardOrderItemDeliveryStatus = (CardOrderItemDeliveryStatus) o;
return Objects.equals(this.errorMessage, cardOrderItemDeliveryStatus.errorMessage)
+ && Objects.equals(this.isSetErrorMessage, cardOrderItemDeliveryStatus.isSetErrorMessage)
&& Objects.equals(this.status, cardOrderItemDeliveryStatus.status)
- && Objects.equals(this.trackingNumber, cardOrderItemDeliveryStatus.trackingNumber);
+ && Objects.equals(this.isSetStatus, cardOrderItemDeliveryStatus.isSetStatus)
+ && Objects.equals(this.trackingNumber, cardOrderItemDeliveryStatus.trackingNumber)
+ && Objects.equals(
+ this.isSetTrackingNumber, cardOrderItemDeliveryStatus.isSetTrackingNumber);
}
@Override
public int hashCode() {
- return Objects.hash(errorMessage, status, trackingNumber);
+ return Objects.hash(
+ errorMessage, isSetErrorMessage, status, isSetStatus, trackingNumber, isSetTrackingNumber);
}
@Override
@@ -232,6 +280,36 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetErrorMessage) {
+ addIfNull(nulls, JSON_PROPERTY_ERROR_MESSAGE, this.errorMessage);
+ }
+ if (isSetStatus) {
+ addIfNull(nulls, JSON_PROPERTY_STATUS, this.status);
+ }
+ if (isSetTrackingNumber) {
+ addIfNull(nulls, JSON_PROPERTY_TRACKING_NUMBER, this.trackingNumber);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of CardOrderItemDeliveryStatus given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/CardOrderNotificationRequest.java b/src/main/java/com/adyen/model/java/CardOrderNotificationRequest.java
similarity index 72%
rename from src/main/java/com/adyen/model/configurationwebhooks/CardOrderNotificationRequest.java
rename to src/main/java/com/adyen/model/java/CardOrderNotificationRequest.java
index 28b6962e0..630fee484 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/CardOrderNotificationRequest.java
+++ b/src/main/java/com/adyen/model/java/CardOrderNotificationRequest.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -33,12 +35,21 @@ public class CardOrderNotificationRequest {
public static final String JSON_PROPERTY_DATA = "data";
private CardOrderItem data;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetData = false;
+
public static final String JSON_PROPERTY_ENVIRONMENT = "environment";
private String environment;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEnvironment = false;
+
public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
private OffsetDateTime timestamp;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTimestamp = false;
+
/** Type of webhook. */
public enum TypeEnum {
BALANCEPLATFORM_CARDORDER_CREATED(String.valueOf("balancePlatform.cardorder.created")),
@@ -83,6 +94,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public CardOrderNotificationRequest() {}
/**
@@ -93,6 +113,7 @@ public CardOrderNotificationRequest() {}
*/
public CardOrderNotificationRequest data(CardOrderItem data) {
this.data = data;
+ isSetData = true; // mark as set
return this;
}
@@ -116,6 +137,7 @@ public CardOrderItem getData() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setData(CardOrderItem data) {
this.data = data;
+ isSetData = true; // mark as set
}
/**
@@ -127,6 +149,7 @@ public void setData(CardOrderItem data) {
*/
public CardOrderNotificationRequest environment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
return this;
}
@@ -152,6 +175,7 @@ public String getEnvironment() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnvironment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
}
/**
@@ -162,6 +186,7 @@ public void setEnvironment(String environment) {
*/
public CardOrderNotificationRequest timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
return this;
}
@@ -185,6 +210,7 @@ public OffsetDateTime getTimestamp() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTimestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
}
/**
@@ -195,6 +221,7 @@ public void setTimestamp(OffsetDateTime timestamp) {
*/
public CardOrderNotificationRequest type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -218,6 +245,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public CardOrderNotificationRequest 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 CardOrderNotificationRequest object is equal to o. */
@@ -231,14 +279,19 @@ public boolean equals(Object o) {
}
CardOrderNotificationRequest cardOrderNotificationRequest = (CardOrderNotificationRequest) o;
return Objects.equals(this.data, cardOrderNotificationRequest.data)
+ && Objects.equals(this.isSetData, cardOrderNotificationRequest.isSetData)
&& Objects.equals(this.environment, cardOrderNotificationRequest.environment)
+ && Objects.equals(this.isSetEnvironment, cardOrderNotificationRequest.isSetEnvironment)
&& Objects.equals(this.timestamp, cardOrderNotificationRequest.timestamp)
- && Objects.equals(this.type, cardOrderNotificationRequest.type);
+ && Objects.equals(this.isSetTimestamp, cardOrderNotificationRequest.isSetTimestamp)
+ && Objects.equals(this.type, cardOrderNotificationRequest.type)
+ && Objects.equals(this.isSetType, cardOrderNotificationRequest.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(data, environment, timestamp, type);
+ return Objects.hash(
+ data, isSetData, environment, isSetEnvironment, timestamp, isSetTimestamp, type, isSetType);
}
@Override
@@ -263,6 +316,39 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetData) {
+ addIfNull(nulls, JSON_PROPERTY_DATA, this.data);
+ }
+ if (isSetEnvironment) {
+ addIfNull(nulls, JSON_PROPERTY_ENVIRONMENT, this.environment);
+ }
+ if (isSetTimestamp) {
+ addIfNull(nulls, JSON_PROPERTY_TIMESTAMP, this.timestamp);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of CardOrderNotificationRequest given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/ContactDetails.java b/src/main/java/com/adyen/model/java/ContactDetails.java
similarity index 67%
rename from src/main/java/com/adyen/model/configurationwebhooks/ContactDetails.java
rename to src/main/java/com/adyen/model/java/ContactDetails.java
index c938ba416..ec559f6a7 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/ContactDetails.java
+++ b/src/main/java/com/adyen/model/java/ContactDetails.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -33,15 +35,33 @@ public class ContactDetails {
public static final String JSON_PROPERTY_ADDRESS = "address";
private Address address;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAddress = false;
+
public static final String JSON_PROPERTY_EMAIL = "email";
private String email;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEmail = false;
+
public static final String JSON_PROPERTY_PHONE = "phone";
private Phone phone;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPhone = false;
+
public static final String JSON_PROPERTY_WEB_ADDRESS = "webAddress";
private String webAddress;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetWebAddress = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public ContactDetails() {}
/**
@@ -52,6 +72,7 @@ public ContactDetails() {}
*/
public ContactDetails address(Address address) {
this.address = address;
+ isSetAddress = true; // mark as set
return this;
}
@@ -75,6 +96,7 @@ public Address getAddress() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAddress(Address address) {
this.address = address;
+ isSetAddress = true; // mark as set
}
/**
@@ -85,6 +107,7 @@ public void setAddress(Address address) {
*/
public ContactDetails email(String email) {
this.email = email;
+ isSetEmail = true; // mark as set
return this;
}
@@ -108,6 +131,7 @@ public String getEmail() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEmail(String email) {
this.email = email;
+ isSetEmail = true; // mark as set
}
/**
@@ -118,6 +142,7 @@ public void setEmail(String email) {
*/
public ContactDetails phone(Phone phone) {
this.phone = phone;
+ isSetPhone = true; // mark as set
return this;
}
@@ -141,6 +166,7 @@ public Phone getPhone() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPhone(Phone phone) {
this.phone = phone;
+ isSetPhone = true; // mark as set
}
/**
@@ -151,6 +177,7 @@ public void setPhone(Phone phone) {
*/
public ContactDetails webAddress(String webAddress) {
this.webAddress = webAddress;
+ isSetWebAddress = true; // mark as set
return this;
}
@@ -174,6 +201,27 @@ public String getWebAddress() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setWebAddress(String webAddress) {
this.webAddress = webAddress;
+ isSetWebAddress = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public ContactDetails 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 ContactDetails object is equal to o. */
@@ -187,14 +235,19 @@ public boolean equals(Object o) {
}
ContactDetails contactDetails = (ContactDetails) o;
return Objects.equals(this.address, contactDetails.address)
+ && Objects.equals(this.isSetAddress, contactDetails.isSetAddress)
&& Objects.equals(this.email, contactDetails.email)
+ && Objects.equals(this.isSetEmail, contactDetails.isSetEmail)
&& Objects.equals(this.phone, contactDetails.phone)
- && Objects.equals(this.webAddress, contactDetails.webAddress);
+ && Objects.equals(this.isSetPhone, contactDetails.isSetPhone)
+ && Objects.equals(this.webAddress, contactDetails.webAddress)
+ && Objects.equals(this.isSetWebAddress, contactDetails.isSetWebAddress);
}
@Override
public int hashCode() {
- return Objects.hash(address, email, phone, webAddress);
+ return Objects.hash(
+ address, isSetAddress, email, isSetEmail, phone, isSetPhone, webAddress, isSetWebAddress);
}
@Override
@@ -219,6 +272,39 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAddress) {
+ addIfNull(nulls, JSON_PROPERTY_ADDRESS, this.address);
+ }
+ if (isSetEmail) {
+ addIfNull(nulls, JSON_PROPERTY_EMAIL, this.email);
+ }
+ if (isSetPhone) {
+ addIfNull(nulls, JSON_PROPERTY_PHONE, this.phone);
+ }
+ if (isSetWebAddress) {
+ addIfNull(nulls, JSON_PROPERTY_WEB_ADDRESS, this.webAddress);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of ContactDetails given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/DeliveryAddress.java b/src/main/java/com/adyen/model/java/DeliveryAddress.java
similarity index 76%
rename from src/main/java/com/adyen/model/configurationwebhooks/DeliveryAddress.java
rename to src/main/java/com/adyen/model/java/DeliveryAddress.java
index 7a23d99ef..6df8f15fb 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/DeliveryAddress.java
+++ b/src/main/java/com/adyen/model/java/DeliveryAddress.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -31,24 +33,51 @@ public class DeliveryAddress {
public static final String JSON_PROPERTY_CITY = "city";
private String city;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCity = false;
+
public static final String JSON_PROPERTY_COUNTRY = "country";
private String country;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCountry = false;
+
public static final String JSON_PROPERTY_LINE1 = "line1";
private String line1;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetLine1 = false;
+
public static final String JSON_PROPERTY_LINE2 = "line2";
private String line2;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetLine2 = false;
+
public static final String JSON_PROPERTY_LINE3 = "line3";
private String line3;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetLine3 = false;
+
public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode";
private String postalCode;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPostalCode = false;
+
public static final String JSON_PROPERTY_STATE_OR_PROVINCE = "stateOrProvince";
private String stateOrProvince;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetStateOrProvince = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public DeliveryAddress() {}
/**
@@ -59,6 +88,7 @@ public DeliveryAddress() {}
*/
public DeliveryAddress city(String city) {
this.city = city;
+ isSetCity = true; // mark as set
return this;
}
@@ -82,6 +112,7 @@ public String getCity() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCity(String city) {
this.city = city;
+ isSetCity = true; // mark as set
}
/**
@@ -96,6 +127,7 @@ public void setCity(String city) {
*/
public DeliveryAddress country(String country) {
this.country = country;
+ isSetCountry = true; // mark as set
return this;
}
@@ -127,6 +159,7 @@ public String getCountry() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCountry(String country) {
this.country = country;
+ isSetCountry = true; // mark as set
}
/**
@@ -139,6 +172,7 @@ public void setCountry(String country) {
*/
public DeliveryAddress line1(String line1) {
this.line1 = line1;
+ isSetLine1 = true; // mark as set
return this;
}
@@ -166,6 +200,7 @@ public String getLine1() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLine1(String line1) {
this.line1 = line1;
+ isSetLine1 = true; // mark as set
}
/**
@@ -178,6 +213,7 @@ public void setLine1(String line1) {
*/
public DeliveryAddress line2(String line2) {
this.line2 = line2;
+ isSetLine2 = true; // mark as set
return this;
}
@@ -205,6 +241,7 @@ public String getLine2() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLine2(String line2) {
this.line2 = line2;
+ isSetLine2 = true; // mark as set
}
/**
@@ -215,6 +252,7 @@ public void setLine2(String line2) {
*/
public DeliveryAddress line3(String line3) {
this.line3 = line3;
+ isSetLine3 = true; // mark as set
return this;
}
@@ -238,6 +276,7 @@ public String getLine3() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLine3(String line3) {
this.line3 = line3;
+ isSetLine3 = true; // mark as set
}
/**
@@ -250,6 +289,7 @@ public void setLine3(String line3) {
*/
public DeliveryAddress postalCode(String postalCode) {
this.postalCode = postalCode;
+ isSetPostalCode = true; // mark as set
return this;
}
@@ -277,6 +317,7 @@ public String getPostalCode() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
+ isSetPostalCode = true; // mark as set
}
/**
@@ -290,6 +331,7 @@ public void setPostalCode(String postalCode) {
*/
public DeliveryAddress stateOrProvince(String stateOrProvince) {
this.stateOrProvince = stateOrProvince;
+ isSetStateOrProvince = true; // mark as set
return this;
}
@@ -319,6 +361,27 @@ public String getStateOrProvince() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStateOrProvince(String stateOrProvince) {
this.stateOrProvince = stateOrProvince;
+ isSetStateOrProvince = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public DeliveryAddress 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 DeliveryAddress object is equal to o. */
@@ -332,17 +395,38 @@ public boolean equals(Object o) {
}
DeliveryAddress deliveryAddress = (DeliveryAddress) o;
return Objects.equals(this.city, deliveryAddress.city)
+ && Objects.equals(this.isSetCity, deliveryAddress.isSetCity)
&& Objects.equals(this.country, deliveryAddress.country)
+ && Objects.equals(this.isSetCountry, deliveryAddress.isSetCountry)
&& Objects.equals(this.line1, deliveryAddress.line1)
+ && Objects.equals(this.isSetLine1, deliveryAddress.isSetLine1)
&& Objects.equals(this.line2, deliveryAddress.line2)
+ && Objects.equals(this.isSetLine2, deliveryAddress.isSetLine2)
&& Objects.equals(this.line3, deliveryAddress.line3)
+ && Objects.equals(this.isSetLine3, deliveryAddress.isSetLine3)
&& Objects.equals(this.postalCode, deliveryAddress.postalCode)
- && Objects.equals(this.stateOrProvince, deliveryAddress.stateOrProvince);
+ && Objects.equals(this.isSetPostalCode, deliveryAddress.isSetPostalCode)
+ && Objects.equals(this.stateOrProvince, deliveryAddress.stateOrProvince)
+ && Objects.equals(this.isSetStateOrProvince, deliveryAddress.isSetStateOrProvince);
}
@Override
public int hashCode() {
- return Objects.hash(city, country, line1, line2, line3, postalCode, stateOrProvince);
+ return Objects.hash(
+ city,
+ isSetCity,
+ country,
+ isSetCountry,
+ line1,
+ isSetLine1,
+ line2,
+ isSetLine2,
+ line3,
+ isSetLine3,
+ postalCode,
+ isSetPostalCode,
+ stateOrProvince,
+ isSetStateOrProvince);
}
@Override
@@ -370,6 +454,48 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetCity) {
+ addIfNull(nulls, JSON_PROPERTY_CITY, this.city);
+ }
+ if (isSetCountry) {
+ addIfNull(nulls, JSON_PROPERTY_COUNTRY, this.country);
+ }
+ if (isSetLine1) {
+ addIfNull(nulls, JSON_PROPERTY_LINE1, this.line1);
+ }
+ if (isSetLine2) {
+ addIfNull(nulls, JSON_PROPERTY_LINE2, this.line2);
+ }
+ if (isSetLine3) {
+ addIfNull(nulls, JSON_PROPERTY_LINE3, this.line3);
+ }
+ if (isSetPostalCode) {
+ addIfNull(nulls, JSON_PROPERTY_POSTAL_CODE, this.postalCode);
+ }
+ if (isSetStateOrProvince) {
+ addIfNull(nulls, JSON_PROPERTY_STATE_OR_PROVINCE, this.stateOrProvince);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of DeliveryAddress given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/DeliveryContact.java b/src/main/java/com/adyen/model/java/DeliveryContact.java
similarity index 71%
rename from src/main/java/com/adyen/model/configurationwebhooks/DeliveryContact.java
rename to src/main/java/com/adyen/model/java/DeliveryContact.java
index 4e9478cbc..1eecbab0c 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/DeliveryContact.java
+++ b/src/main/java/com/adyen/model/java/DeliveryContact.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -31,24 +33,51 @@ public class DeliveryContact {
public static final String JSON_PROPERTY_ADDRESS = "address";
private DeliveryAddress address;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAddress = false;
+
public static final String JSON_PROPERTY_COMPANY = "company";
private String company;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCompany = false;
+
public static final String JSON_PROPERTY_EMAIL = "email";
private String email;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEmail = false;
+
public static final String JSON_PROPERTY_FULL_PHONE_NUMBER = "fullPhoneNumber";
private String fullPhoneNumber;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetFullPhoneNumber = false;
+
public static final String JSON_PROPERTY_NAME = "name";
private Name name;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetName = false;
+
public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber";
private PhoneNumber phoneNumber;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPhoneNumber = false;
+
public static final String JSON_PROPERTY_WEB_ADDRESS = "webAddress";
private String webAddress;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetWebAddress = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public DeliveryContact() {}
/**
@@ -59,6 +88,7 @@ public DeliveryContact() {}
*/
public DeliveryContact address(DeliveryAddress address) {
this.address = address;
+ isSetAddress = true; // mark as set
return this;
}
@@ -82,6 +112,7 @@ public DeliveryAddress getAddress() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAddress(DeliveryAddress address) {
this.address = address;
+ isSetAddress = true; // mark as set
}
/**
@@ -92,6 +123,7 @@ public void setAddress(DeliveryAddress address) {
*/
public DeliveryContact company(String company) {
this.company = company;
+ isSetCompany = true; // mark as set
return this;
}
@@ -115,6 +147,7 @@ public String getCompany() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCompany(String company) {
this.company = company;
+ isSetCompany = true; // mark as set
}
/**
@@ -125,6 +158,7 @@ public void setCompany(String company) {
*/
public DeliveryContact email(String email) {
this.email = email;
+ isSetEmail = true; // mark as set
return this;
}
@@ -148,6 +182,7 @@ public String getEmail() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEmail(String email) {
this.email = email;
+ isSetEmail = true; // mark as set
}
/**
@@ -162,6 +197,7 @@ public void setEmail(String email) {
*/
public DeliveryContact fullPhoneNumber(String fullPhoneNumber) {
this.fullPhoneNumber = fullPhoneNumber;
+ isSetFullPhoneNumber = true; // mark as set
return this;
}
@@ -193,6 +229,7 @@ public String getFullPhoneNumber() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFullPhoneNumber(String fullPhoneNumber) {
this.fullPhoneNumber = fullPhoneNumber;
+ isSetFullPhoneNumber = true; // mark as set
}
/**
@@ -203,6 +240,7 @@ public void setFullPhoneNumber(String fullPhoneNumber) {
*/
public DeliveryContact name(Name name) {
this.name = name;
+ isSetName = true; // mark as set
return this;
}
@@ -226,6 +264,7 @@ public Name getName() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(Name name) {
this.name = name;
+ isSetName = true; // mark as set
}
/**
@@ -236,6 +275,7 @@ public void setName(Name name) {
*/
public DeliveryContact phoneNumber(PhoneNumber phoneNumber) {
this.phoneNumber = phoneNumber;
+ isSetPhoneNumber = true; // mark as set
return this;
}
@@ -259,6 +299,7 @@ public PhoneNumber getPhoneNumber() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPhoneNumber(PhoneNumber phoneNumber) {
this.phoneNumber = phoneNumber;
+ isSetPhoneNumber = true; // mark as set
}
/**
@@ -269,6 +310,7 @@ public void setPhoneNumber(PhoneNumber phoneNumber) {
*/
public DeliveryContact webAddress(String webAddress) {
this.webAddress = webAddress;
+ isSetWebAddress = true; // mark as set
return this;
}
@@ -292,6 +334,27 @@ public String getWebAddress() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setWebAddress(String webAddress) {
this.webAddress = webAddress;
+ isSetWebAddress = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public DeliveryContact 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 DeliveryContact object is equal to o. */
@@ -305,17 +368,38 @@ public boolean equals(Object o) {
}
DeliveryContact deliveryContact = (DeliveryContact) o;
return Objects.equals(this.address, deliveryContact.address)
+ && Objects.equals(this.isSetAddress, deliveryContact.isSetAddress)
&& Objects.equals(this.company, deliveryContact.company)
+ && Objects.equals(this.isSetCompany, deliveryContact.isSetCompany)
&& Objects.equals(this.email, deliveryContact.email)
+ && Objects.equals(this.isSetEmail, deliveryContact.isSetEmail)
&& Objects.equals(this.fullPhoneNumber, deliveryContact.fullPhoneNumber)
+ && Objects.equals(this.isSetFullPhoneNumber, deliveryContact.isSetFullPhoneNumber)
&& Objects.equals(this.name, deliveryContact.name)
+ && Objects.equals(this.isSetName, deliveryContact.isSetName)
&& Objects.equals(this.phoneNumber, deliveryContact.phoneNumber)
- && Objects.equals(this.webAddress, deliveryContact.webAddress);
+ && Objects.equals(this.isSetPhoneNumber, deliveryContact.isSetPhoneNumber)
+ && Objects.equals(this.webAddress, deliveryContact.webAddress)
+ && Objects.equals(this.isSetWebAddress, deliveryContact.isSetWebAddress);
}
@Override
public int hashCode() {
- return Objects.hash(address, company, email, fullPhoneNumber, name, phoneNumber, webAddress);
+ return Objects.hash(
+ address,
+ isSetAddress,
+ company,
+ isSetCompany,
+ email,
+ isSetEmail,
+ fullPhoneNumber,
+ isSetFullPhoneNumber,
+ name,
+ isSetName,
+ phoneNumber,
+ isSetPhoneNumber,
+ webAddress,
+ isSetWebAddress);
}
@Override
@@ -343,6 +427,48 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAddress) {
+ addIfNull(nulls, JSON_PROPERTY_ADDRESS, this.address);
+ }
+ if (isSetCompany) {
+ addIfNull(nulls, JSON_PROPERTY_COMPANY, this.company);
+ }
+ if (isSetEmail) {
+ addIfNull(nulls, JSON_PROPERTY_EMAIL, this.email);
+ }
+ if (isSetFullPhoneNumber) {
+ addIfNull(nulls, JSON_PROPERTY_FULL_PHONE_NUMBER, this.fullPhoneNumber);
+ }
+ if (isSetName) {
+ addIfNull(nulls, JSON_PROPERTY_NAME, this.name);
+ }
+ if (isSetPhoneNumber) {
+ addIfNull(nulls, JSON_PROPERTY_PHONE_NUMBER, this.phoneNumber);
+ }
+ if (isSetWebAddress) {
+ addIfNull(nulls, JSON_PROPERTY_WEB_ADDRESS, this.webAddress);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of DeliveryContact given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/Device.java b/src/main/java/com/adyen/model/java/Device.java
similarity index 70%
rename from src/main/java/com/adyen/model/configurationwebhooks/Device.java
rename to src/main/java/com/adyen/model/java/Device.java
index abcac2738..e29e13cc6 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/Device.java
+++ b/src/main/java/com/adyen/model/java/Device.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -27,12 +29,27 @@ public class Device {
public static final String JSON_PROPERTY_DEVICE_ID = "deviceId";
private String deviceId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDeviceId = false;
+
public static final String JSON_PROPERTY_FORM_FACTOR = "formFactor";
private String formFactor;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetFormFactor = false;
+
public static final String JSON_PROPERTY_OS_NAME = "osName";
private String osName;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetOsName = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public Device() {}
/**
@@ -43,6 +60,7 @@ public Device() {}
*/
public Device deviceId(String deviceId) {
this.deviceId = deviceId;
+ isSetDeviceId = true; // mark as set
return this;
}
@@ -66,6 +84,7 @@ public String getDeviceId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
+ isSetDeviceId = true; // mark as set
}
/**
@@ -78,6 +97,7 @@ public void setDeviceId(String deviceId) {
*/
public Device formFactor(String formFactor) {
this.formFactor = formFactor;
+ isSetFormFactor = true; // mark as set
return this;
}
@@ -105,6 +125,7 @@ public String getFormFactor() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFormFactor(String formFactor) {
this.formFactor = formFactor;
+ isSetFormFactor = true; // mark as set
}
/**
@@ -115,6 +136,7 @@ public void setFormFactor(String formFactor) {
*/
public Device osName(String osName) {
this.osName = osName;
+ isSetOsName = true; // mark as set
return this;
}
@@ -138,6 +160,27 @@ public String getOsName() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOsName(String osName) {
this.osName = osName;
+ isSetOsName = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public Device 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 Device object is equal to o. */
@@ -151,13 +194,16 @@ public boolean equals(Object o) {
}
Device device = (Device) o;
return Objects.equals(this.deviceId, device.deviceId)
+ && Objects.equals(this.isSetDeviceId, device.isSetDeviceId)
&& Objects.equals(this.formFactor, device.formFactor)
- && Objects.equals(this.osName, device.osName);
+ && Objects.equals(this.isSetFormFactor, device.isSetFormFactor)
+ && Objects.equals(this.osName, device.osName)
+ && Objects.equals(this.isSetOsName, device.isSetOsName);
}
@Override
public int hashCode() {
- return Objects.hash(deviceId, formFactor, osName);
+ return Objects.hash(deviceId, isSetDeviceId, formFactor, isSetFormFactor, osName, isSetOsName);
}
@Override
@@ -181,6 +227,36 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetDeviceId) {
+ addIfNull(nulls, JSON_PROPERTY_DEVICE_ID, this.deviceId);
+ }
+ if (isSetFormFactor) {
+ addIfNull(nulls, JSON_PROPERTY_FORM_FACTOR, this.formFactor);
+ }
+ if (isSetOsName) {
+ addIfNull(nulls, JSON_PROPERTY_OS_NAME, this.osName);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of Device given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/Expiry.java b/src/main/java/com/adyen/model/java/Expiry.java
similarity index 63%
rename from src/main/java/com/adyen/model/configurationwebhooks/Expiry.java
rename to src/main/java/com/adyen/model/java/Expiry.java
index eeaac49df..ba594b72b 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/Expiry.java
+++ b/src/main/java/com/adyen/model/java/Expiry.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -23,9 +25,21 @@ public class Expiry {
public static final String JSON_PROPERTY_MONTH = "month";
private String month;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetMonth = false;
+
public static final String JSON_PROPERTY_YEAR = "year";
private String year;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetYear = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public Expiry() {}
/**
@@ -36,6 +50,7 @@ public Expiry() {}
*/
public Expiry month(String month) {
this.month = month;
+ isSetMonth = true; // mark as set
return this;
}
@@ -59,6 +74,7 @@ public String getMonth() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMonth(String month) {
this.month = month;
+ isSetMonth = true; // mark as set
}
/**
@@ -69,6 +85,7 @@ public void setMonth(String month) {
*/
public Expiry year(String year) {
this.year = year;
+ isSetYear = true; // mark as set
return this;
}
@@ -92,6 +109,27 @@ public String getYear() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setYear(String year) {
this.year = year;
+ isSetYear = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public Expiry 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 Expiry object is equal to o. */
@@ -104,12 +142,15 @@ public boolean equals(Object o) {
return false;
}
Expiry expiry = (Expiry) o;
- return Objects.equals(this.month, expiry.month) && Objects.equals(this.year, expiry.year);
+ return Objects.equals(this.month, expiry.month)
+ && Objects.equals(this.isSetMonth, expiry.isSetMonth)
+ && Objects.equals(this.year, expiry.year)
+ && Objects.equals(this.isSetYear, expiry.isSetYear);
}
@Override
public int hashCode() {
- return Objects.hash(month, year);
+ return Objects.hash(month, isSetMonth, year, isSetYear);
}
@Override
@@ -132,6 +173,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetMonth) {
+ addIfNull(nulls, JSON_PROPERTY_MONTH, this.month);
+ }
+ if (isSetYear) {
+ addIfNull(nulls, JSON_PROPERTY_YEAR, this.year);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of Expiry given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/IbanAccountIdentification.java b/src/main/java/com/adyen/model/java/IbanAccountIdentification.java
similarity index 72%
rename from src/main/java/com/adyen/model/configurationwebhooks/IbanAccountIdentification.java
rename to src/main/java/com/adyen/model/java/IbanAccountIdentification.java
index fa9be03e0..3e4516d7a 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/IbanAccountIdentification.java
+++ b/src/main/java/com/adyen/model/java/IbanAccountIdentification.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -30,6 +32,9 @@ public class IbanAccountIdentification {
public static final String JSON_PROPERTY_IBAN = "iban";
private String iban;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetIban = false;
+
/** **iban** */
public enum TypeEnum {
IBAN(String.valueOf("iban"));
@@ -72,6 +77,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public IbanAccountIdentification() {}
/**
@@ -84,6 +98,7 @@ public IbanAccountIdentification() {}
*/
public IbanAccountIdentification iban(String iban) {
this.iban = iban;
+ isSetIban = true; // mark as set
return this;
}
@@ -111,6 +126,7 @@ public String getIban() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setIban(String iban) {
this.iban = iban;
+ isSetIban = true; // mark as set
}
/**
@@ -121,6 +137,7 @@ public void setIban(String iban) {
*/
public IbanAccountIdentification type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -144,6 +161,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public IbanAccountIdentification 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 IbanAccountIdentification object is equal to o. */
@@ -157,12 +195,14 @@ public boolean equals(Object o) {
}
IbanAccountIdentification ibanAccountIdentification = (IbanAccountIdentification) o;
return Objects.equals(this.iban, ibanAccountIdentification.iban)
- && Objects.equals(this.type, ibanAccountIdentification.type);
+ && Objects.equals(this.isSetIban, ibanAccountIdentification.isSetIban)
+ && Objects.equals(this.type, ibanAccountIdentification.type)
+ && Objects.equals(this.isSetType, ibanAccountIdentification.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(iban, type);
+ return Objects.hash(iban, isSetIban, type, isSetType);
}
@Override
@@ -185,6 +225,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetIban) {
+ addIfNull(nulls, JSON_PROPERTY_IBAN, this.iban);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of IbanAccountIdentification given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/Name.java b/src/main/java/com/adyen/model/java/Name.java
similarity index 62%
rename from src/main/java/com/adyen/model/configurationwebhooks/Name.java
rename to src/main/java/com/adyen/model/java/Name.java
index ce1fdf421..65db6713e 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/Name.java
+++ b/src/main/java/com/adyen/model/java/Name.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -23,9 +25,21 @@ public class Name {
public static final String JSON_PROPERTY_FIRST_NAME = "firstName";
private String firstName;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetFirstName = false;
+
public static final String JSON_PROPERTY_LAST_NAME = "lastName";
private String lastName;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetLastName = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public Name() {}
/**
@@ -36,6 +50,7 @@ public Name() {}
*/
public Name firstName(String firstName) {
this.firstName = firstName;
+ isSetFirstName = true; // mark as set
return this;
}
@@ -59,6 +74,7 @@ public String getFirstName() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFirstName(String firstName) {
this.firstName = firstName;
+ isSetFirstName = true; // mark as set
}
/**
@@ -69,6 +85,7 @@ public void setFirstName(String firstName) {
*/
public Name lastName(String lastName) {
this.lastName = lastName;
+ isSetLastName = true; // mark as set
return this;
}
@@ -92,6 +109,27 @@ public String getLastName() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLastName(String lastName) {
this.lastName = lastName;
+ isSetLastName = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public Name 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 Name object is equal to o. */
@@ -105,12 +143,14 @@ public boolean equals(Object o) {
}
Name name = (Name) o;
return Objects.equals(this.firstName, name.firstName)
- && Objects.equals(this.lastName, name.lastName);
+ && Objects.equals(this.isSetFirstName, name.isSetFirstName)
+ && Objects.equals(this.lastName, name.lastName)
+ && Objects.equals(this.isSetLastName, name.isSetLastName);
}
@Override
public int hashCode() {
- return Objects.hash(firstName, lastName);
+ return Objects.hash(firstName, isSetFirstName, lastName, isSetLastName);
}
@Override
@@ -133,6 +173,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetFirstName) {
+ addIfNull(nulls, JSON_PROPERTY_FIRST_NAME, this.firstName);
+ }
+ if (isSetLastName) {
+ addIfNull(nulls, JSON_PROPERTY_LAST_NAME, this.lastName);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of Name given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenNotificationDataV2.java b/src/main/java/com/adyen/model/java/NetworkTokenNotificationDataV2.java
similarity index 76%
rename from src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenNotificationDataV2.java
rename to src/main/java/com/adyen/model/java/NetworkTokenNotificationDataV2.java
index 7b908f52e..e17bd1167 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenNotificationDataV2.java
+++ b/src/main/java/com/adyen/model/java/NetworkTokenNotificationDataV2.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -40,45 +42,93 @@ public class NetworkTokenNotificationDataV2 {
public static final String JSON_PROPERTY_AUTHENTICATION = "authentication";
private TokenAuthentication authentication;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAuthentication = false;
+
public static final String JSON_PROPERTY_AUTHENTICATION_APPLIED = "authenticationApplied";
private Boolean authenticationApplied;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAuthenticationApplied = false;
+
public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
private String balancePlatform;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalancePlatform = false;
+
public static final String JSON_PROPERTY_DECISION = "decision";
private String decision;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDecision = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_ID = "paymentInstrumentId";
private String paymentInstrumentId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPaymentInstrumentId = false;
+
public static final String JSON_PROPERTY_SCHEME_RISK_SCORE = "schemeRiskScore";
private String schemeRiskScore;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetSchemeRiskScore = false;
+
public static final String JSON_PROPERTY_STATUS = "status";
private String status;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetStatus = false;
+
public static final String JSON_PROPERTY_TOKEN_LAST_FOUR = "tokenLastFour";
private String tokenLastFour;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTokenLastFour = false;
+
public static final String JSON_PROPERTY_TOKEN_REQUESTOR = "tokenRequestor";
private NetworkTokenRequestor tokenRequestor;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTokenRequestor = false;
+
public static final String JSON_PROPERTY_TRANSACTION_RULES_RESULT = "transactionRulesResult";
private NetworkTokenTransactionRulesResult transactionRulesResult;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTransactionRulesResult = false;
+
public static final String JSON_PROPERTY_TYPE = "type";
private String type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
public static final String JSON_PROPERTY_VALIDATION_FACTS = "validationFacts";
private List validationFacts;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetValidationFacts = false;
+
public static final String JSON_PROPERTY_WALLET = "wallet";
private Wallet wallet;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetWallet = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public NetworkTokenNotificationDataV2() {}
/**
@@ -90,6 +140,7 @@ public NetworkTokenNotificationDataV2() {}
*/
public NetworkTokenNotificationDataV2 authentication(TokenAuthentication authentication) {
this.authentication = authentication;
+ isSetAuthentication = true; // mark as set
return this;
}
@@ -113,6 +164,7 @@ public TokenAuthentication getAuthentication() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAuthentication(TokenAuthentication authentication) {
this.authentication = authentication;
+ isSetAuthentication = true; // mark as set
}
/**
@@ -125,6 +177,7 @@ public void setAuthentication(TokenAuthentication authentication) {
*/
public NetworkTokenNotificationDataV2 authenticationApplied(Boolean authenticationApplied) {
this.authenticationApplied = authenticationApplied;
+ isSetAuthenticationApplied = true; // mark as set
return this;
}
@@ -150,6 +203,7 @@ public Boolean getAuthenticationApplied() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAuthenticationApplied(Boolean authenticationApplied) {
this.authenticationApplied = authenticationApplied;
+ isSetAuthenticationApplied = true; // mark as set
}
/**
@@ -161,6 +215,7 @@ public void setAuthenticationApplied(Boolean authenticationApplied) {
*/
public NetworkTokenNotificationDataV2 balancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
return this;
}
@@ -184,6 +239,7 @@ public String getBalancePlatform() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
}
/**
@@ -197,6 +253,7 @@ public void setBalancePlatform(String balancePlatform) {
*/
public NetworkTokenNotificationDataV2 decision(String decision) {
this.decision = decision;
+ isSetDecision = true; // mark as set
return this;
}
@@ -224,6 +281,7 @@ public String getDecision() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDecision(String decision) {
this.decision = decision;
+ isSetDecision = true; // mark as set
}
/**
@@ -235,6 +293,7 @@ public void setDecision(String decision) {
*/
public NetworkTokenNotificationDataV2 id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -258,6 +317,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -270,6 +330,7 @@ public void setId(String id) {
*/
public NetworkTokenNotificationDataV2 paymentInstrumentId(String paymentInstrumentId) {
this.paymentInstrumentId = paymentInstrumentId;
+ isSetPaymentInstrumentId = true; // mark as set
return this;
}
@@ -295,6 +356,7 @@ public String getPaymentInstrumentId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPaymentInstrumentId(String paymentInstrumentId) {
this.paymentInstrumentId = paymentInstrumentId;
+ isSetPaymentInstrumentId = true; // mark as set
}
/**
@@ -311,6 +373,7 @@ public void setPaymentInstrumentId(String paymentInstrumentId) {
*/
public NetworkTokenNotificationDataV2 schemeRiskScore(String schemeRiskScore) {
this.schemeRiskScore = schemeRiskScore;
+ isSetSchemeRiskScore = true; // mark as set
return this;
}
@@ -344,6 +407,7 @@ public String getSchemeRiskScore() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSchemeRiskScore(String schemeRiskScore) {
this.schemeRiskScore = schemeRiskScore;
+ isSetSchemeRiskScore = true; // mark as set
}
/**
@@ -355,6 +419,7 @@ public void setSchemeRiskScore(String schemeRiskScore) {
*/
public NetworkTokenNotificationDataV2 status(String status) {
this.status = status;
+ isSetStatus = true; // mark as set
return this;
}
@@ -378,6 +443,7 @@ public String getStatus() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatus(String status) {
this.status = status;
+ isSetStatus = true; // mark as set
}
/**
@@ -391,6 +457,7 @@ public void setStatus(String status) {
*/
public NetworkTokenNotificationDataV2 tokenLastFour(String tokenLastFour) {
this.tokenLastFour = tokenLastFour;
+ isSetTokenLastFour = true; // mark as set
return this;
}
@@ -418,6 +485,7 @@ public String getTokenLastFour() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTokenLastFour(String tokenLastFour) {
this.tokenLastFour = tokenLastFour;
+ isSetTokenLastFour = true; // mark as set
}
/**
@@ -429,6 +497,7 @@ public void setTokenLastFour(String tokenLastFour) {
*/
public NetworkTokenNotificationDataV2 tokenRequestor(NetworkTokenRequestor tokenRequestor) {
this.tokenRequestor = tokenRequestor;
+ isSetTokenRequestor = true; // mark as set
return this;
}
@@ -452,6 +521,7 @@ public NetworkTokenRequestor getTokenRequestor() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTokenRequestor(NetworkTokenRequestor tokenRequestor) {
this.tokenRequestor = tokenRequestor;
+ isSetTokenRequestor = true; // mark as set
}
/**
@@ -464,6 +534,7 @@ public void setTokenRequestor(NetworkTokenRequestor tokenRequestor) {
public NetworkTokenNotificationDataV2 transactionRulesResult(
NetworkTokenTransactionRulesResult transactionRulesResult) {
this.transactionRulesResult = transactionRulesResult;
+ isSetTransactionRulesResult = true; // mark as set
return this;
}
@@ -487,6 +558,7 @@ public NetworkTokenTransactionRulesResult getTransactionRulesResult() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTransactionRulesResult(NetworkTokenTransactionRulesResult transactionRulesResult) {
this.transactionRulesResult = transactionRulesResult;
+ isSetTransactionRulesResult = true; // mark as set
}
/**
@@ -498,6 +570,7 @@ public void setTransactionRulesResult(NetworkTokenTransactionRulesResult transac
*/
public NetworkTokenNotificationDataV2 type(String type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -521,6 +594,7 @@ public String getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(String type) {
this.type = type;
+ isSetType = true; // mark as set
}
/**
@@ -533,6 +607,7 @@ public void setType(String type) {
*/
public NetworkTokenNotificationDataV2 validationFacts(List validationFacts) {
this.validationFacts = validationFacts;
+ isSetValidationFacts = true; // mark as set
return this;
}
@@ -567,6 +642,7 @@ public List getValidationFacts() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setValidationFacts(List validationFacts) {
this.validationFacts = validationFacts;
+ isSetValidationFacts = true; // mark as set
}
/**
@@ -578,6 +654,7 @@ public void setValidationFacts(List validationFacts) {
*/
public NetworkTokenNotificationDataV2 wallet(Wallet wallet) {
this.wallet = wallet;
+ isSetWallet = true; // mark as set
return this;
}
@@ -601,6 +678,27 @@ public Wallet getWallet() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setWallet(Wallet wallet) {
this.wallet = wallet;
+ isSetWallet = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public NetworkTokenNotificationDataV2 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 NetworkTokenNotificationDataV2 object is equal to o. */
@@ -615,41 +713,80 @@ public boolean equals(Object o) {
NetworkTokenNotificationDataV2 networkTokenNotificationDataV2 =
(NetworkTokenNotificationDataV2) o;
return Objects.equals(this.authentication, networkTokenNotificationDataV2.authentication)
+ && Objects.equals(
+ this.isSetAuthentication, networkTokenNotificationDataV2.isSetAuthentication)
&& Objects.equals(
this.authenticationApplied, networkTokenNotificationDataV2.authenticationApplied)
+ && Objects.equals(
+ this.isSetAuthenticationApplied,
+ networkTokenNotificationDataV2.isSetAuthenticationApplied)
&& Objects.equals(this.balancePlatform, networkTokenNotificationDataV2.balancePlatform)
+ && Objects.equals(
+ this.isSetBalancePlatform, networkTokenNotificationDataV2.isSetBalancePlatform)
&& Objects.equals(this.decision, networkTokenNotificationDataV2.decision)
+ && Objects.equals(this.isSetDecision, networkTokenNotificationDataV2.isSetDecision)
&& Objects.equals(this.id, networkTokenNotificationDataV2.id)
+ && Objects.equals(this.isSetId, networkTokenNotificationDataV2.isSetId)
&& Objects.equals(
this.paymentInstrumentId, networkTokenNotificationDataV2.paymentInstrumentId)
+ && Objects.equals(
+ this.isSetPaymentInstrumentId, networkTokenNotificationDataV2.isSetPaymentInstrumentId)
&& Objects.equals(this.schemeRiskScore, networkTokenNotificationDataV2.schemeRiskScore)
+ && Objects.equals(
+ this.isSetSchemeRiskScore, networkTokenNotificationDataV2.isSetSchemeRiskScore)
&& Objects.equals(this.status, networkTokenNotificationDataV2.status)
+ && Objects.equals(this.isSetStatus, networkTokenNotificationDataV2.isSetStatus)
&& Objects.equals(this.tokenLastFour, networkTokenNotificationDataV2.tokenLastFour)
+ && Objects.equals(
+ this.isSetTokenLastFour, networkTokenNotificationDataV2.isSetTokenLastFour)
&& Objects.equals(this.tokenRequestor, networkTokenNotificationDataV2.tokenRequestor)
+ && Objects.equals(
+ this.isSetTokenRequestor, networkTokenNotificationDataV2.isSetTokenRequestor)
&& Objects.equals(
this.transactionRulesResult, networkTokenNotificationDataV2.transactionRulesResult)
+ && Objects.equals(
+ this.isSetTransactionRulesResult,
+ networkTokenNotificationDataV2.isSetTransactionRulesResult)
&& Objects.equals(this.type, networkTokenNotificationDataV2.type)
+ && Objects.equals(this.isSetType, networkTokenNotificationDataV2.isSetType)
&& Objects.equals(this.validationFacts, networkTokenNotificationDataV2.validationFacts)
- && Objects.equals(this.wallet, networkTokenNotificationDataV2.wallet);
+ && Objects.equals(
+ this.isSetValidationFacts, networkTokenNotificationDataV2.isSetValidationFacts)
+ && Objects.equals(this.wallet, networkTokenNotificationDataV2.wallet)
+ && Objects.equals(this.isSetWallet, networkTokenNotificationDataV2.isSetWallet);
}
@Override
public int hashCode() {
return Objects.hash(
authentication,
+ isSetAuthentication,
authenticationApplied,
+ isSetAuthenticationApplied,
balancePlatform,
+ isSetBalancePlatform,
decision,
+ isSetDecision,
id,
+ isSetId,
paymentInstrumentId,
+ isSetPaymentInstrumentId,
schemeRiskScore,
+ isSetSchemeRiskScore,
status,
+ isSetStatus,
tokenLastFour,
+ isSetTokenLastFour,
tokenRequestor,
+ isSetTokenRequestor,
transactionRulesResult,
+ isSetTransactionRulesResult,
type,
+ isSetType,
validationFacts,
- wallet);
+ isSetValidationFacts,
+ wallet,
+ isSetWallet);
}
@Override
@@ -690,6 +827,69 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAuthentication) {
+ addIfNull(nulls, JSON_PROPERTY_AUTHENTICATION, this.authentication);
+ }
+ if (isSetAuthenticationApplied) {
+ addIfNull(nulls, JSON_PROPERTY_AUTHENTICATION_APPLIED, this.authenticationApplied);
+ }
+ if (isSetBalancePlatform) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE_PLATFORM, this.balancePlatform);
+ }
+ if (isSetDecision) {
+ addIfNull(nulls, JSON_PROPERTY_DECISION, this.decision);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetPaymentInstrumentId) {
+ addIfNull(nulls, JSON_PROPERTY_PAYMENT_INSTRUMENT_ID, this.paymentInstrumentId);
+ }
+ if (isSetSchemeRiskScore) {
+ addIfNull(nulls, JSON_PROPERTY_SCHEME_RISK_SCORE, this.schemeRiskScore);
+ }
+ if (isSetStatus) {
+ addIfNull(nulls, JSON_PROPERTY_STATUS, this.status);
+ }
+ if (isSetTokenLastFour) {
+ addIfNull(nulls, JSON_PROPERTY_TOKEN_LAST_FOUR, this.tokenLastFour);
+ }
+ if (isSetTokenRequestor) {
+ addIfNull(nulls, JSON_PROPERTY_TOKEN_REQUESTOR, this.tokenRequestor);
+ }
+ if (isSetTransactionRulesResult) {
+ addIfNull(nulls, JSON_PROPERTY_TRANSACTION_RULES_RESULT, this.transactionRulesResult);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+ if (isSetValidationFacts) {
+ addIfNull(nulls, JSON_PROPERTY_VALIDATION_FACTS, this.validationFacts);
+ }
+ if (isSetWallet) {
+ addIfNull(nulls, JSON_PROPERTY_WALLET, this.wallet);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of NetworkTokenNotificationDataV2 given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenNotificationRequest.java b/src/main/java/com/adyen/model/java/NetworkTokenNotificationRequest.java
similarity index 73%
rename from src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenNotificationRequest.java
rename to src/main/java/com/adyen/model/java/NetworkTokenNotificationRequest.java
index e17f650ab..aeff4d202 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenNotificationRequest.java
+++ b/src/main/java/com/adyen/model/java/NetworkTokenNotificationRequest.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -33,12 +35,21 @@ public class NetworkTokenNotificationRequest {
public static final String JSON_PROPERTY_DATA = "data";
private NetworkTokenNotificationDataV2 data;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetData = false;
+
public static final String JSON_PROPERTY_ENVIRONMENT = "environment";
private String environment;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEnvironment = false;
+
public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
private OffsetDateTime timestamp;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTimestamp = false;
+
/** The type of webhook. */
public enum TypeEnum {
BALANCEPLATFORM_NETWORKTOKEN_CREATED(String.valueOf("balancePlatform.networkToken.created")),
@@ -83,6 +94,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public NetworkTokenNotificationRequest() {}
/**
@@ -94,6 +114,7 @@ public NetworkTokenNotificationRequest() {}
*/
public NetworkTokenNotificationRequest data(NetworkTokenNotificationDataV2 data) {
this.data = data;
+ isSetData = true; // mark as set
return this;
}
@@ -117,6 +138,7 @@ public NetworkTokenNotificationDataV2 getData() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setData(NetworkTokenNotificationDataV2 data) {
this.data = data;
+ isSetData = true; // mark as set
}
/**
@@ -129,6 +151,7 @@ public void setData(NetworkTokenNotificationDataV2 data) {
*/
public NetworkTokenNotificationRequest environment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
return this;
}
@@ -154,6 +177,7 @@ public String getEnvironment() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnvironment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
}
/**
@@ -165,6 +189,7 @@ public void setEnvironment(String environment) {
*/
public NetworkTokenNotificationRequest timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
return this;
}
@@ -188,6 +213,7 @@ public OffsetDateTime getTimestamp() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTimestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
}
/**
@@ -199,6 +225,7 @@ public void setTimestamp(OffsetDateTime timestamp) {
*/
public NetworkTokenNotificationRequest type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -222,6 +249,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public NetworkTokenNotificationRequest 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 NetworkTokenNotificationRequest object is equal to o. */
@@ -236,14 +284,19 @@ public boolean equals(Object o) {
NetworkTokenNotificationRequest networkTokenNotificationRequest =
(NetworkTokenNotificationRequest) o;
return Objects.equals(this.data, networkTokenNotificationRequest.data)
+ && Objects.equals(this.isSetData, networkTokenNotificationRequest.isSetData)
&& Objects.equals(this.environment, networkTokenNotificationRequest.environment)
+ && Objects.equals(this.isSetEnvironment, networkTokenNotificationRequest.isSetEnvironment)
&& Objects.equals(this.timestamp, networkTokenNotificationRequest.timestamp)
- && Objects.equals(this.type, networkTokenNotificationRequest.type);
+ && Objects.equals(this.isSetTimestamp, networkTokenNotificationRequest.isSetTimestamp)
+ && Objects.equals(this.type, networkTokenNotificationRequest.type)
+ && Objects.equals(this.isSetType, networkTokenNotificationRequest.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(data, environment, timestamp, type);
+ return Objects.hash(
+ data, isSetData, environment, isSetEnvironment, timestamp, isSetTimestamp, type, isSetType);
}
@Override
@@ -268,6 +321,39 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetData) {
+ addIfNull(nulls, JSON_PROPERTY_DATA, this.data);
+ }
+ if (isSetEnvironment) {
+ addIfNull(nulls, JSON_PROPERTY_ENVIRONMENT, this.environment);
+ }
+ if (isSetTimestamp) {
+ addIfNull(nulls, JSON_PROPERTY_TIMESTAMP, this.timestamp);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of NetworkTokenNotificationRequest given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenRequestor.java b/src/main/java/com/adyen/model/java/NetworkTokenRequestor.java
similarity index 66%
rename from src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenRequestor.java
rename to src/main/java/com/adyen/model/java/NetworkTokenRequestor.java
index 60aa90363..3433aa4d9 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenRequestor.java
+++ b/src/main/java/com/adyen/model/java/NetworkTokenRequestor.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -26,9 +28,21 @@ public class NetworkTokenRequestor {
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_NAME = "name";
private String name;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetName = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public NetworkTokenRequestor() {}
/**
@@ -39,6 +53,7 @@ public NetworkTokenRequestor() {}
*/
public NetworkTokenRequestor id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -62,6 +77,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -72,6 +88,7 @@ public void setId(String id) {
*/
public NetworkTokenRequestor name(String name) {
this.name = name;
+ isSetName = true; // mark as set
return this;
}
@@ -95,6 +112,27 @@ public String getName() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
+ isSetName = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public NetworkTokenRequestor 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 NetworkTokenRequestor object is equal to o. */
@@ -108,12 +146,14 @@ public boolean equals(Object o) {
}
NetworkTokenRequestor networkTokenRequestor = (NetworkTokenRequestor) o;
return Objects.equals(this.id, networkTokenRequestor.id)
- && Objects.equals(this.name, networkTokenRequestor.name);
+ && Objects.equals(this.isSetId, networkTokenRequestor.isSetId)
+ && Objects.equals(this.name, networkTokenRequestor.name)
+ && Objects.equals(this.isSetName, networkTokenRequestor.isSetName);
}
@Override
public int hashCode() {
- return Objects.hash(id, name);
+ return Objects.hash(id, isSetId, name, isSetName);
}
@Override
@@ -136,6 +176,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetName) {
+ addIfNull(nulls, JSON_PROPERTY_NAME, this.name);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of NetworkTokenRequestor given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenRiskRuleData.java b/src/main/java/com/adyen/model/java/NetworkTokenRiskRuleData.java
similarity index 70%
rename from src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenRiskRuleData.java
rename to src/main/java/com/adyen/model/java/NetworkTokenRiskRuleData.java
index 6cb95aa83..b6b1aced0 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenRiskRuleData.java
+++ b/src/main/java/com/adyen/model/java/NetworkTokenRiskRuleData.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -29,18 +31,39 @@ public class NetworkTokenRiskRuleData {
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDescription = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_OUTCOME_TYPE = "outcomeType";
private String outcomeType;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetOutcomeType = false;
+
public static final String JSON_PROPERTY_REFERENCE = "reference";
private String reference;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReference = false;
+
public static final String JSON_PROPERTY_SCORE = "score";
private Integer score;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetScore = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public NetworkTokenRiskRuleData() {}
/**
@@ -51,6 +74,7 @@ public NetworkTokenRiskRuleData() {}
*/
public NetworkTokenRiskRuleData description(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
return this;
}
@@ -74,6 +98,7 @@ public String getDescription() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
}
/**
@@ -84,6 +109,7 @@ public void setDescription(String description) {
*/
public NetworkTokenRiskRuleData id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -107,6 +133,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -117,6 +144,7 @@ public void setId(String id) {
*/
public NetworkTokenRiskRuleData outcomeType(String outcomeType) {
this.outcomeType = outcomeType;
+ isSetOutcomeType = true; // mark as set
return this;
}
@@ -140,6 +168,7 @@ public String getOutcomeType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOutcomeType(String outcomeType) {
this.outcomeType = outcomeType;
+ isSetOutcomeType = true; // mark as set
}
/**
@@ -150,6 +179,7 @@ public void setOutcomeType(String outcomeType) {
*/
public NetworkTokenRiskRuleData reference(String reference) {
this.reference = reference;
+ isSetReference = true; // mark as set
return this;
}
@@ -173,6 +203,7 @@ public String getReference() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReference(String reference) {
this.reference = reference;
+ isSetReference = true; // mark as set
}
/**
@@ -183,6 +214,7 @@ public void setReference(String reference) {
*/
public NetworkTokenRiskRuleData score(Integer score) {
this.score = score;
+ isSetScore = true; // mark as set
return this;
}
@@ -206,6 +238,27 @@ public Integer getScore() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setScore(Integer score) {
this.score = score;
+ isSetScore = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public NetworkTokenRiskRuleData 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 NetworkTokenRiskRuleData object is equal to o. */
@@ -219,15 +272,30 @@ public boolean equals(Object o) {
}
NetworkTokenRiskRuleData networkTokenRiskRuleData = (NetworkTokenRiskRuleData) o;
return Objects.equals(this.description, networkTokenRiskRuleData.description)
+ && Objects.equals(this.isSetDescription, networkTokenRiskRuleData.isSetDescription)
&& Objects.equals(this.id, networkTokenRiskRuleData.id)
+ && Objects.equals(this.isSetId, networkTokenRiskRuleData.isSetId)
&& Objects.equals(this.outcomeType, networkTokenRiskRuleData.outcomeType)
+ && Objects.equals(this.isSetOutcomeType, networkTokenRiskRuleData.isSetOutcomeType)
&& Objects.equals(this.reference, networkTokenRiskRuleData.reference)
- && Objects.equals(this.score, networkTokenRiskRuleData.score);
+ && Objects.equals(this.isSetReference, networkTokenRiskRuleData.isSetReference)
+ && Objects.equals(this.score, networkTokenRiskRuleData.score)
+ && Objects.equals(this.isSetScore, networkTokenRiskRuleData.isSetScore);
}
@Override
public int hashCode() {
- return Objects.hash(description, id, outcomeType, reference, score);
+ return Objects.hash(
+ description,
+ isSetDescription,
+ id,
+ isSetId,
+ outcomeType,
+ isSetOutcomeType,
+ reference,
+ isSetReference,
+ score,
+ isSetScore);
}
@Override
@@ -253,6 +321,42 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetDescription) {
+ addIfNull(nulls, JSON_PROPERTY_DESCRIPTION, this.description);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetOutcomeType) {
+ addIfNull(nulls, JSON_PROPERTY_OUTCOME_TYPE, this.outcomeType);
+ }
+ if (isSetReference) {
+ addIfNull(nulls, JSON_PROPERTY_REFERENCE, this.reference);
+ }
+ if (isSetScore) {
+ addIfNull(nulls, JSON_PROPERTY_SCORE, this.score);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of NetworkTokenRiskRuleData given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenRiskRuleSource.java b/src/main/java/com/adyen/model/java/NetworkTokenRiskRuleSource.java
similarity index 73%
rename from src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenRiskRuleSource.java
rename to src/main/java/com/adyen/model/java/NetworkTokenRiskRuleSource.java
index 4a5f85e4f..f2232b4ce 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenRiskRuleSource.java
+++ b/src/main/java/com/adyen/model/java/NetworkTokenRiskRuleSource.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -26,9 +28,21 @@ public class NetworkTokenRiskRuleSource {
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_TYPE = "type";
private String type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public NetworkTokenRiskRuleSource() {}
/**
@@ -39,6 +53,7 @@ public NetworkTokenRiskRuleSource() {}
*/
public NetworkTokenRiskRuleSource id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -62,6 +77,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -78,6 +94,7 @@ public void setId(String id) {
*/
public NetworkTokenRiskRuleSource type(String type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -113,6 +130,27 @@ public String getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(String type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public NetworkTokenRiskRuleSource 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 NetworkTokenRiskRuleSource object is equal to o. */
@@ -126,12 +164,14 @@ public boolean equals(Object o) {
}
NetworkTokenRiskRuleSource networkTokenRiskRuleSource = (NetworkTokenRiskRuleSource) o;
return Objects.equals(this.id, networkTokenRiskRuleSource.id)
- && Objects.equals(this.type, networkTokenRiskRuleSource.type);
+ && Objects.equals(this.isSetId, networkTokenRiskRuleSource.isSetId)
+ && Objects.equals(this.type, networkTokenRiskRuleSource.type)
+ && Objects.equals(this.isSetType, networkTokenRiskRuleSource.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(id, type);
+ return Objects.hash(id, isSetId, type, isSetType);
}
@Override
@@ -154,6 +194,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of NetworkTokenRiskRuleSource given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenTransactionRulesResult.java b/src/main/java/com/adyen/model/java/NetworkTokenTransactionRulesResult.java
similarity index 72%
rename from src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenTransactionRulesResult.java
rename to src/main/java/com/adyen/model/java/NetworkTokenTransactionRulesResult.java
index 3a6444eeb..c054a4ca5 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenTransactionRulesResult.java
+++ b/src/main/java/com/adyen/model/java/NetworkTokenTransactionRulesResult.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -30,16 +32,34 @@ public class NetworkTokenTransactionRulesResult {
public static final String JSON_PROPERTY_ADVICE = "advice";
private String advice;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAdvice = false;
+
public static final String JSON_PROPERTY_ALL_HARD_BLOCK_RULES_PASSED = "allHardBlockRulesPassed";
private Boolean allHardBlockRulesPassed;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAllHardBlockRulesPassed = false;
+
public static final String JSON_PROPERTY_SCORE = "score";
private Integer score;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetScore = false;
+
public static final String JSON_PROPERTY_TRIGGERED_TRANSACTION_RULES =
"triggeredTransactionRules";
private List triggeredTransactionRules;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTriggeredTransactionRules = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public NetworkTokenTransactionRulesResult() {}
/**
@@ -51,6 +71,7 @@ public NetworkTokenTransactionRulesResult() {}
*/
public NetworkTokenTransactionRulesResult advice(String advice) {
this.advice = advice;
+ isSetAdvice = true; // mark as set
return this;
}
@@ -74,6 +95,7 @@ public String getAdvice() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAdvice(String advice) {
this.advice = advice;
+ isSetAdvice = true; // mark as set
}
/**
@@ -87,6 +109,7 @@ public void setAdvice(String advice) {
public NetworkTokenTransactionRulesResult allHardBlockRulesPassed(
Boolean allHardBlockRulesPassed) {
this.allHardBlockRulesPassed = allHardBlockRulesPassed;
+ isSetAllHardBlockRulesPassed = true; // mark as set
return this;
}
@@ -112,6 +135,7 @@ public Boolean getAllHardBlockRulesPassed() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAllHardBlockRulesPassed(Boolean allHardBlockRulesPassed) {
this.allHardBlockRulesPassed = allHardBlockRulesPassed;
+ isSetAllHardBlockRulesPassed = true; // mark as set
}
/**
@@ -123,6 +147,7 @@ public void setAllHardBlockRulesPassed(Boolean allHardBlockRulesPassed) {
*/
public NetworkTokenTransactionRulesResult score(Integer score) {
this.score = score;
+ isSetScore = true; // mark as set
return this;
}
@@ -146,6 +171,7 @@ public Integer getScore() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setScore(Integer score) {
this.score = score;
+ isSetScore = true; // mark as set
}
/**
@@ -159,6 +185,7 @@ public void setScore(Integer score) {
public NetworkTokenTransactionRulesResult triggeredTransactionRules(
List triggeredTransactionRules) {
this.triggeredTransactionRules = triggeredTransactionRules;
+ isSetTriggeredTransactionRules = true; // mark as set
return this;
}
@@ -194,6 +221,27 @@ public List getTriggeredTransactionRules() {
public void setTriggeredTransactionRules(
List triggeredTransactionRules) {
this.triggeredTransactionRules = triggeredTransactionRules;
+ isSetTriggeredTransactionRules = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public NetworkTokenTransactionRulesResult 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 NetworkTokenTransactionRulesResult object is equal to o. */
@@ -208,18 +256,34 @@ public boolean equals(Object o) {
NetworkTokenTransactionRulesResult networkTokenTransactionRulesResult =
(NetworkTokenTransactionRulesResult) o;
return Objects.equals(this.advice, networkTokenTransactionRulesResult.advice)
+ && Objects.equals(this.isSetAdvice, networkTokenTransactionRulesResult.isSetAdvice)
&& Objects.equals(
this.allHardBlockRulesPassed,
networkTokenTransactionRulesResult.allHardBlockRulesPassed)
+ && Objects.equals(
+ this.isSetAllHardBlockRulesPassed,
+ networkTokenTransactionRulesResult.isSetAllHardBlockRulesPassed)
&& Objects.equals(this.score, networkTokenTransactionRulesResult.score)
+ && Objects.equals(this.isSetScore, networkTokenTransactionRulesResult.isSetScore)
&& Objects.equals(
this.triggeredTransactionRules,
- networkTokenTransactionRulesResult.triggeredTransactionRules);
+ networkTokenTransactionRulesResult.triggeredTransactionRules)
+ && Objects.equals(
+ this.isSetTriggeredTransactionRules,
+ networkTokenTransactionRulesResult.isSetTriggeredTransactionRules);
}
@Override
public int hashCode() {
- return Objects.hash(advice, allHardBlockRulesPassed, score, triggeredTransactionRules);
+ return Objects.hash(
+ advice,
+ isSetAdvice,
+ allHardBlockRulesPassed,
+ isSetAllHardBlockRulesPassed,
+ score,
+ isSetScore,
+ triggeredTransactionRules,
+ isSetTriggeredTransactionRules);
}
@Override
@@ -248,6 +312,39 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAdvice) {
+ addIfNull(nulls, JSON_PROPERTY_ADVICE, this.advice);
+ }
+ if (isSetAllHardBlockRulesPassed) {
+ addIfNull(nulls, JSON_PROPERTY_ALL_HARD_BLOCK_RULES_PASSED, this.allHardBlockRulesPassed);
+ }
+ if (isSetScore) {
+ addIfNull(nulls, JSON_PROPERTY_SCORE, this.score);
+ }
+ if (isSetTriggeredTransactionRules) {
+ addIfNull(nulls, JSON_PROPERTY_TRIGGERED_TRANSACTION_RULES, this.triggeredTransactionRules);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of NetworkTokenTransactionRulesResult given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenTriggeredRiskRule.java b/src/main/java/com/adyen/model/java/NetworkTokenTriggeredRiskRule.java
similarity index 67%
rename from src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenTriggeredRiskRule.java
rename to src/main/java/com/adyen/model/java/NetworkTokenTriggeredRiskRule.java
index b9e7c9203..a88c665c0 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/NetworkTokenTriggeredRiskRule.java
+++ b/src/main/java/com/adyen/model/java/NetworkTokenTriggeredRiskRule.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -27,12 +29,27 @@ public class NetworkTokenTriggeredRiskRule {
public static final String JSON_PROPERTY_REASON = "reason";
private String reason;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReason = false;
+
public static final String JSON_PROPERTY_TRANSACTION_RULE = "transactionRule";
private NetworkTokenRiskRuleData transactionRule;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTransactionRule = false;
+
public static final String JSON_PROPERTY_TRANSACTION_RULE_SOURCE = "transactionRuleSource";
private NetworkTokenRiskRuleSource transactionRuleSource;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTransactionRuleSource = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public NetworkTokenTriggeredRiskRule() {}
/**
@@ -44,6 +61,7 @@ public NetworkTokenTriggeredRiskRule() {}
*/
public NetworkTokenTriggeredRiskRule reason(String reason) {
this.reason = reason;
+ isSetReason = true; // mark as set
return this;
}
@@ -67,6 +85,7 @@ public String getReason() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReason(String reason) {
this.reason = reason;
+ isSetReason = true; // mark as set
}
/**
@@ -78,6 +97,7 @@ public void setReason(String reason) {
*/
public NetworkTokenTriggeredRiskRule transactionRule(NetworkTokenRiskRuleData transactionRule) {
this.transactionRule = transactionRule;
+ isSetTransactionRule = true; // mark as set
return this;
}
@@ -101,6 +121,7 @@ public NetworkTokenRiskRuleData getTransactionRule() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTransactionRule(NetworkTokenRiskRuleData transactionRule) {
this.transactionRule = transactionRule;
+ isSetTransactionRule = true; // mark as set
}
/**
@@ -113,6 +134,7 @@ public void setTransactionRule(NetworkTokenRiskRuleData transactionRule) {
public NetworkTokenTriggeredRiskRule transactionRuleSource(
NetworkTokenRiskRuleSource transactionRuleSource) {
this.transactionRuleSource = transactionRuleSource;
+ isSetTransactionRuleSource = true; // mark as set
return this;
}
@@ -136,6 +158,27 @@ public NetworkTokenRiskRuleSource getTransactionRuleSource() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTransactionRuleSource(NetworkTokenRiskRuleSource transactionRuleSource) {
this.transactionRuleSource = transactionRuleSource;
+ isSetTransactionRuleSource = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public NetworkTokenTriggeredRiskRule 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 NetworkTokenTriggeredRiskRule object is equal to o. */
@@ -149,14 +192,26 @@ public boolean equals(Object o) {
}
NetworkTokenTriggeredRiskRule networkTokenTriggeredRiskRule = (NetworkTokenTriggeredRiskRule) o;
return Objects.equals(this.reason, networkTokenTriggeredRiskRule.reason)
+ && Objects.equals(this.isSetReason, networkTokenTriggeredRiskRule.isSetReason)
&& Objects.equals(this.transactionRule, networkTokenTriggeredRiskRule.transactionRule)
&& Objects.equals(
- this.transactionRuleSource, networkTokenTriggeredRiskRule.transactionRuleSource);
+ this.isSetTransactionRule, networkTokenTriggeredRiskRule.isSetTransactionRule)
+ && Objects.equals(
+ this.transactionRuleSource, networkTokenTriggeredRiskRule.transactionRuleSource)
+ && Objects.equals(
+ this.isSetTransactionRuleSource,
+ networkTokenTriggeredRiskRule.isSetTransactionRuleSource);
}
@Override
public int hashCode() {
- return Objects.hash(reason, transactionRule, transactionRuleSource);
+ return Objects.hash(
+ reason,
+ isSetReason,
+ transactionRule,
+ isSetTransactionRule,
+ transactionRuleSource,
+ isSetTransactionRuleSource);
}
@Override
@@ -182,6 +237,36 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetReason) {
+ addIfNull(nulls, JSON_PROPERTY_REASON, this.reason);
+ }
+ if (isSetTransactionRule) {
+ addIfNull(nulls, JSON_PROPERTY_TRANSACTION_RULE, this.transactionRule);
+ }
+ if (isSetTransactionRuleSource) {
+ addIfNull(nulls, JSON_PROPERTY_TRANSACTION_RULE_SOURCE, this.transactionRuleSource);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of NetworkTokenTriggeredRiskRule given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrument.java b/src/main/java/com/adyen/model/java/PaymentInstrument.java
similarity index 82%
rename from src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrument.java
rename to src/main/java/com/adyen/model/java/PaymentInstrument.java
index fb4aad75d..57c4f2788 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrument.java
+++ b/src/main/java/com/adyen/model/java/PaymentInstrument.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -48,36 +50,69 @@ public class PaymentInstrument {
private List
additionalBankAccountIdentifications;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAdditionalBankAccountIdentifications = false;
+
public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID = "balanceAccountId";
private String balanceAccountId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalanceAccountId = false;
+
public static final String JSON_PROPERTY_BANK_ACCOUNT = "bankAccount";
private BankAccountDetails bankAccount;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBankAccount = false;
+
public static final String JSON_PROPERTY_CARD = "card";
private Card card;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCard = false;
+
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDescription = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_ISSUING_COUNTRY_CODE = "issuingCountryCode";
private String issuingCountryCode;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetIssuingCountryCode = false;
+
public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_GROUP_ID = "paymentInstrumentGroupId";
private String paymentInstrumentGroupId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPaymentInstrumentGroupId = false;
+
public static final String JSON_PROPERTY_REFERENCE = "reference";
private String reference;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReference = false;
+
public static final String JSON_PROPERTY_REPLACED_BY_ID = "replacedById";
private String replacedById;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReplacedById = false;
+
public static final String JSON_PROPERTY_REPLACEMENT_OF_ID = "replacementOfId";
private String replacementOfId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReplacementOfId = false;
+
/**
* The status of the payment instrument. If a status is not specified when creating a payment
* instrument, it is set to **active** by default. However, there can be exceptions for cards
@@ -135,9 +170,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;
+
public static final String JSON_PROPERTY_STATUS_COMMENT = "statusComment";
private String statusComment;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetStatusComment = false;
+
/**
* The reason for the status of the payment instrument. Possible values: **accountClosure**,
* **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**,
@@ -201,6 +242,9 @@ public static StatusReasonEnum fromValue(String value) {
public static final String JSON_PROPERTY_STATUS_REASON = "statusReason";
private StatusReasonEnum statusReason;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetStatusReason = false;
+
/** The type of payment instrument. Possible values: **card**, **bankAccount**. */
public enum TypeEnum {
BANKACCOUNT(String.valueOf("bankAccount")),
@@ -245,6 +289,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public PaymentInstrument() {}
/**
@@ -262,6 +315,7 @@ public PaymentInstrument additionalBankAccountIdentifications(
List
additionalBankAccountIdentifications) {
this.additionalBankAccountIdentifications = additionalBankAccountIdentifications;
+ isSetAdditionalBankAccountIdentifications = true; // mark as set
return this;
}
@@ -309,6 +363,7 @@ public void setAdditionalBankAccountIdentifications(
List
additionalBankAccountIdentifications) {
this.additionalBankAccountIdentifications = additionalBankAccountIdentifications;
+ isSetAdditionalBankAccountIdentifications = true; // mark as set
}
/**
@@ -323,6 +378,7 @@ public void setAdditionalBankAccountIdentifications(
*/
public PaymentInstrument balanceAccountId(String balanceAccountId) {
this.balanceAccountId = balanceAccountId;
+ isSetBalanceAccountId = true; // mark as set
return this;
}
@@ -354,6 +410,7 @@ public String getBalanceAccountId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalanceAccountId(String balanceAccountId) {
this.balanceAccountId = balanceAccountId;
+ isSetBalanceAccountId = true; // mark as set
}
/**
@@ -364,6 +421,7 @@ public void setBalanceAccountId(String balanceAccountId) {
*/
public PaymentInstrument bankAccount(BankAccountDetails bankAccount) {
this.bankAccount = bankAccount;
+ isSetBankAccount = true; // mark as set
return this;
}
@@ -387,6 +445,7 @@ public BankAccountDetails getBankAccount() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBankAccount(BankAccountDetails bankAccount) {
this.bankAccount = bankAccount;
+ isSetBankAccount = true; // mark as set
}
/**
@@ -397,6 +456,7 @@ public void setBankAccount(BankAccountDetails bankAccount) {
*/
public PaymentInstrument card(Card card) {
this.card = card;
+ isSetCard = true; // mark as set
return this;
}
@@ -420,6 +480,7 @@ public Card getCard() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCard(Card card) {
this.card = card;
+ isSetCard = true; // mark as set
}
/**
@@ -430,6 +491,7 @@ public void setCard(Card card) {
*/
public PaymentInstrument description(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
return this;
}
@@ -453,6 +515,7 @@ public String getDescription() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
}
/**
@@ -463,6 +526,7 @@ public void setDescription(String description) {
*/
public PaymentInstrument id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -486,6 +550,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -499,6 +564,7 @@ public void setId(String id) {
*/
public PaymentInstrument issuingCountryCode(String issuingCountryCode) {
this.issuingCountryCode = issuingCountryCode;
+ isSetIssuingCountryCode = true; // mark as set
return this;
}
@@ -528,6 +594,7 @@ public String getIssuingCountryCode() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setIssuingCountryCode(String issuingCountryCode) {
this.issuingCountryCode = issuingCountryCode;
+ isSetIssuingCountryCode = true; // mark as set
}
/**
@@ -542,6 +609,7 @@ public void setIssuingCountryCode(String issuingCountryCode) {
*/
public PaymentInstrument paymentInstrumentGroupId(String paymentInstrumentGroupId) {
this.paymentInstrumentGroupId = paymentInstrumentGroupId;
+ isSetPaymentInstrumentGroupId = true; // mark as set
return this;
}
@@ -573,6 +641,7 @@ public String getPaymentInstrumentGroupId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPaymentInstrumentGroupId(String paymentInstrumentGroupId) {
this.paymentInstrumentGroupId = paymentInstrumentGroupId;
+ isSetPaymentInstrumentGroupId = true; // mark as set
}
/**
@@ -583,6 +652,7 @@ public void setPaymentInstrumentGroupId(String paymentInstrumentGroupId) {
*/
public PaymentInstrument reference(String reference) {
this.reference = reference;
+ isSetReference = true; // mark as set
return this;
}
@@ -606,6 +676,7 @@ public String getReference() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReference(String reference) {
this.reference = reference;
+ isSetReference = true; // mark as set
}
/**
@@ -617,6 +688,7 @@ public void setReference(String reference) {
*/
public PaymentInstrument replacedById(String replacedById) {
this.replacedById = replacedById;
+ isSetReplacedById = true; // mark as set
return this;
}
@@ -642,6 +714,7 @@ public String getReplacedById() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReplacedById(String replacedById) {
this.replacedById = replacedById;
+ isSetReplacedById = true; // mark as set
}
/**
@@ -653,6 +726,7 @@ public void setReplacedById(String replacedById) {
*/
public PaymentInstrument replacementOfId(String replacementOfId) {
this.replacementOfId = replacementOfId;
+ isSetReplacementOfId = true; // mark as set
return this;
}
@@ -678,6 +752,7 @@ public String getReplacementOfId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReplacementOfId(String replacementOfId) {
this.replacementOfId = replacementOfId;
+ isSetReplacementOfId = true; // mark as set
}
/**
@@ -703,6 +778,7 @@ public void setReplacementOfId(String replacementOfId) {
*/
public PaymentInstrument status(StatusEnum status) {
this.status = status;
+ isSetStatus = true; // mark as set
return this;
}
@@ -756,6 +832,7 @@ public StatusEnum getStatus() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatus(StatusEnum status) {
this.status = status;
+ isSetStatus = true; // mark as set
}
/**
@@ -768,6 +845,7 @@ public void setStatus(StatusEnum status) {
*/
public PaymentInstrument statusComment(String statusComment) {
this.statusComment = statusComment;
+ isSetStatusComment = true; // mark as set
return this;
}
@@ -795,6 +873,7 @@ public String getStatusComment() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatusComment(String statusComment) {
this.statusComment = statusComment;
+ isSetStatusComment = true; // mark as set
}
/**
@@ -811,6 +890,7 @@ public void setStatusComment(String statusComment) {
*/
public PaymentInstrument statusReason(StatusReasonEnum statusReason) {
this.statusReason = statusReason;
+ isSetStatusReason = true; // mark as set
return this;
}
@@ -846,6 +926,7 @@ public StatusReasonEnum getStatusReason() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatusReason(StatusReasonEnum statusReason) {
this.statusReason = statusReason;
+ isSetStatusReason = true; // mark as set
}
/**
@@ -856,6 +937,7 @@ public void setStatusReason(StatusReasonEnum statusReason) {
*/
public PaymentInstrument type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -879,6 +961,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public PaymentInstrument 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 PaymentInstrument object is equal to o. */
@@ -894,40 +997,73 @@ public boolean equals(Object o) {
return Objects.equals(
this.additionalBankAccountIdentifications,
paymentInstrument.additionalBankAccountIdentifications)
+ && Objects.equals(
+ this.isSetAdditionalBankAccountIdentifications,
+ paymentInstrument.isSetAdditionalBankAccountIdentifications)
&& Objects.equals(this.balanceAccountId, paymentInstrument.balanceAccountId)
+ && Objects.equals(this.isSetBalanceAccountId, paymentInstrument.isSetBalanceAccountId)
&& Objects.equals(this.bankAccount, paymentInstrument.bankAccount)
+ && Objects.equals(this.isSetBankAccount, paymentInstrument.isSetBankAccount)
&& Objects.equals(this.card, paymentInstrument.card)
+ && Objects.equals(this.isSetCard, paymentInstrument.isSetCard)
&& Objects.equals(this.description, paymentInstrument.description)
+ && Objects.equals(this.isSetDescription, paymentInstrument.isSetDescription)
&& Objects.equals(this.id, paymentInstrument.id)
+ && Objects.equals(this.isSetId, paymentInstrument.isSetId)
&& Objects.equals(this.issuingCountryCode, paymentInstrument.issuingCountryCode)
+ && Objects.equals(this.isSetIssuingCountryCode, paymentInstrument.isSetIssuingCountryCode)
&& Objects.equals(this.paymentInstrumentGroupId, paymentInstrument.paymentInstrumentGroupId)
+ && Objects.equals(
+ this.isSetPaymentInstrumentGroupId, paymentInstrument.isSetPaymentInstrumentGroupId)
&& Objects.equals(this.reference, paymentInstrument.reference)
+ && Objects.equals(this.isSetReference, paymentInstrument.isSetReference)
&& Objects.equals(this.replacedById, paymentInstrument.replacedById)
+ && Objects.equals(this.isSetReplacedById, paymentInstrument.isSetReplacedById)
&& Objects.equals(this.replacementOfId, paymentInstrument.replacementOfId)
+ && Objects.equals(this.isSetReplacementOfId, paymentInstrument.isSetReplacementOfId)
&& Objects.equals(this.status, paymentInstrument.status)
+ && Objects.equals(this.isSetStatus, paymentInstrument.isSetStatus)
&& Objects.equals(this.statusComment, paymentInstrument.statusComment)
+ && Objects.equals(this.isSetStatusComment, paymentInstrument.isSetStatusComment)
&& Objects.equals(this.statusReason, paymentInstrument.statusReason)
- && Objects.equals(this.type, paymentInstrument.type);
+ && Objects.equals(this.isSetStatusReason, paymentInstrument.isSetStatusReason)
+ && Objects.equals(this.type, paymentInstrument.type)
+ && Objects.equals(this.isSetType, paymentInstrument.isSetType);
}
@Override
public int hashCode() {
return Objects.hash(
additionalBankAccountIdentifications,
+ isSetAdditionalBankAccountIdentifications,
balanceAccountId,
+ isSetBalanceAccountId,
bankAccount,
+ isSetBankAccount,
card,
+ isSetCard,
description,
+ isSetDescription,
id,
+ isSetId,
issuingCountryCode,
+ isSetIssuingCountryCode,
paymentInstrumentGroupId,
+ isSetPaymentInstrumentGroupId,
reference,
+ isSetReference,
replacedById,
+ isSetReplacedById,
replacementOfId,
+ isSetReplacementOfId,
status,
+ isSetStatus,
statusComment,
+ isSetStatusComment,
statusReason,
- type);
+ isSetStatusReason,
+ type,
+ isSetType);
}
@Override
@@ -967,6 +1103,75 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAdditionalBankAccountIdentifications) {
+ addIfNull(
+ nulls,
+ JSON_PROPERTY_ADDITIONAL_BANK_ACCOUNT_IDENTIFICATIONS,
+ this.additionalBankAccountIdentifications);
+ }
+ if (isSetBalanceAccountId) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE_ACCOUNT_ID, this.balanceAccountId);
+ }
+ if (isSetBankAccount) {
+ addIfNull(nulls, JSON_PROPERTY_BANK_ACCOUNT, this.bankAccount);
+ }
+ if (isSetCard) {
+ addIfNull(nulls, JSON_PROPERTY_CARD, this.card);
+ }
+ if (isSetDescription) {
+ addIfNull(nulls, JSON_PROPERTY_DESCRIPTION, this.description);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetIssuingCountryCode) {
+ addIfNull(nulls, JSON_PROPERTY_ISSUING_COUNTRY_CODE, this.issuingCountryCode);
+ }
+ if (isSetPaymentInstrumentGroupId) {
+ addIfNull(nulls, JSON_PROPERTY_PAYMENT_INSTRUMENT_GROUP_ID, this.paymentInstrumentGroupId);
+ }
+ if (isSetReference) {
+ addIfNull(nulls, JSON_PROPERTY_REFERENCE, this.reference);
+ }
+ if (isSetReplacedById) {
+ addIfNull(nulls, JSON_PROPERTY_REPLACED_BY_ID, this.replacedById);
+ }
+ if (isSetReplacementOfId) {
+ addIfNull(nulls, JSON_PROPERTY_REPLACEMENT_OF_ID, this.replacementOfId);
+ }
+ if (isSetStatus) {
+ addIfNull(nulls, JSON_PROPERTY_STATUS, this.status);
+ }
+ if (isSetStatusComment) {
+ addIfNull(nulls, JSON_PROPERTY_STATUS_COMMENT, this.statusComment);
+ }
+ if (isSetStatusReason) {
+ addIfNull(nulls, JSON_PROPERTY_STATUS_REASON, this.statusReason);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of PaymentInstrument given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java b/src/main/java/com/adyen/model/java/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java
similarity index 99%
rename from src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java
rename to src/main/java/com/adyen/model/java/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java
index c157a56b3..15d6887ff 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java
+++ b/src/main/java/com/adyen/model/java/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java
@@ -9,7 +9,7 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+package com.adyen.model.java;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrumentNotificationData.java b/src/main/java/com/adyen/model/java/PaymentInstrumentNotificationData.java
similarity index 66%
rename from src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrumentNotificationData.java
rename to src/main/java/com/adyen/model/java/PaymentInstrumentNotificationData.java
index 3d37771ab..f99524966 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrumentNotificationData.java
+++ b/src/main/java/com/adyen/model/java/PaymentInstrumentNotificationData.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -26,9 +28,21 @@ public class PaymentInstrumentNotificationData {
public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
private String balancePlatform;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalancePlatform = false;
+
public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT = "paymentInstrument";
private PaymentInstrument paymentInstrument;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPaymentInstrument = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public PaymentInstrumentNotificationData() {}
/**
@@ -40,6 +54,7 @@ public PaymentInstrumentNotificationData() {}
*/
public PaymentInstrumentNotificationData balancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
return this;
}
@@ -63,6 +78,7 @@ public String getBalancePlatform() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
}
/**
@@ -74,6 +90,7 @@ public void setBalancePlatform(String balancePlatform) {
*/
public PaymentInstrumentNotificationData paymentInstrument(PaymentInstrument paymentInstrument) {
this.paymentInstrument = paymentInstrument;
+ isSetPaymentInstrument = true; // mark as set
return this;
}
@@ -97,6 +114,27 @@ public PaymentInstrument getPaymentInstrument() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPaymentInstrument(PaymentInstrument paymentInstrument) {
this.paymentInstrument = paymentInstrument;
+ isSetPaymentInstrument = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public PaymentInstrumentNotificationData 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 PaymentInstrumentNotificationData object is equal to o. */
@@ -112,12 +150,17 @@ public boolean equals(Object o) {
(PaymentInstrumentNotificationData) o;
return Objects.equals(this.balancePlatform, paymentInstrumentNotificationData.balancePlatform)
&& Objects.equals(
- this.paymentInstrument, paymentInstrumentNotificationData.paymentInstrument);
+ this.isSetBalancePlatform, paymentInstrumentNotificationData.isSetBalancePlatform)
+ && Objects.equals(
+ this.paymentInstrument, paymentInstrumentNotificationData.paymentInstrument)
+ && Objects.equals(
+ this.isSetPaymentInstrument, paymentInstrumentNotificationData.isSetPaymentInstrument);
}
@Override
public int hashCode() {
- return Objects.hash(balancePlatform, paymentInstrument);
+ return Objects.hash(
+ balancePlatform, isSetBalancePlatform, paymentInstrument, isSetPaymentInstrument);
}
@Override
@@ -140,6 +183,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetBalancePlatform) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE_PLATFORM, this.balancePlatform);
+ }
+ if (isSetPaymentInstrument) {
+ addIfNull(nulls, JSON_PROPERTY_PAYMENT_INSTRUMENT, this.paymentInstrument);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of PaymentInstrumentNotificationData given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/PaymentNotificationRequest.java b/src/main/java/com/adyen/model/java/PaymentNotificationRequest.java
similarity index 72%
rename from src/main/java/com/adyen/model/configurationwebhooks/PaymentNotificationRequest.java
rename to src/main/java/com/adyen/model/java/PaymentNotificationRequest.java
index 09d8479b5..0c918be70 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/PaymentNotificationRequest.java
+++ b/src/main/java/com/adyen/model/java/PaymentNotificationRequest.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -33,12 +35,21 @@ public class PaymentNotificationRequest {
public static final String JSON_PROPERTY_DATA = "data";
private PaymentInstrumentNotificationData data;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetData = false;
+
public static final String JSON_PROPERTY_ENVIRONMENT = "environment";
private String environment;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEnvironment = false;
+
public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
private OffsetDateTime timestamp;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTimestamp = false;
+
/** Type of webhook. */
public enum TypeEnum {
BALANCEPLATFORM_PAYMENTINSTRUMENT_CREATED(
@@ -85,6 +96,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public PaymentNotificationRequest() {}
/**
@@ -95,6 +115,7 @@ public PaymentNotificationRequest() {}
*/
public PaymentNotificationRequest data(PaymentInstrumentNotificationData data) {
this.data = data;
+ isSetData = true; // mark as set
return this;
}
@@ -118,6 +139,7 @@ public PaymentInstrumentNotificationData getData() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setData(PaymentInstrumentNotificationData data) {
this.data = data;
+ isSetData = true; // mark as set
}
/**
@@ -129,6 +151,7 @@ public void setData(PaymentInstrumentNotificationData data) {
*/
public PaymentNotificationRequest environment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
return this;
}
@@ -154,6 +177,7 @@ public String getEnvironment() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnvironment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
}
/**
@@ -164,6 +188,7 @@ public void setEnvironment(String environment) {
*/
public PaymentNotificationRequest timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
return this;
}
@@ -187,6 +212,7 @@ public OffsetDateTime getTimestamp() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTimestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
}
/**
@@ -197,6 +223,7 @@ public void setTimestamp(OffsetDateTime timestamp) {
*/
public PaymentNotificationRequest type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -220,6 +247,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public PaymentNotificationRequest 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 PaymentNotificationRequest object is equal to o. */
@@ -233,14 +281,19 @@ public boolean equals(Object o) {
}
PaymentNotificationRequest paymentNotificationRequest = (PaymentNotificationRequest) o;
return Objects.equals(this.data, paymentNotificationRequest.data)
+ && Objects.equals(this.isSetData, paymentNotificationRequest.isSetData)
&& Objects.equals(this.environment, paymentNotificationRequest.environment)
+ && Objects.equals(this.isSetEnvironment, paymentNotificationRequest.isSetEnvironment)
&& Objects.equals(this.timestamp, paymentNotificationRequest.timestamp)
- && Objects.equals(this.type, paymentNotificationRequest.type);
+ && Objects.equals(this.isSetTimestamp, paymentNotificationRequest.isSetTimestamp)
+ && Objects.equals(this.type, paymentNotificationRequest.type)
+ && Objects.equals(this.isSetType, paymentNotificationRequest.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(data, environment, timestamp, type);
+ return Objects.hash(
+ data, isSetData, environment, isSetEnvironment, timestamp, isSetTimestamp, type, isSetType);
}
@Override
@@ -265,6 +318,39 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetData) {
+ addIfNull(nulls, JSON_PROPERTY_DATA, this.data);
+ }
+ if (isSetEnvironment) {
+ addIfNull(nulls, JSON_PROPERTY_ENVIRONMENT, this.environment);
+ }
+ if (isSetTimestamp) {
+ addIfNull(nulls, JSON_PROPERTY_TIMESTAMP, this.timestamp);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of PaymentNotificationRequest given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/Phone.java b/src/main/java/com/adyen/model/java/Phone.java
similarity index 72%
rename from src/main/java/com/adyen/model/configurationwebhooks/Phone.java
rename to src/main/java/com/adyen/model/java/Phone.java
index 08460eb12..8139bd343 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/Phone.java
+++ b/src/main/java/com/adyen/model/java/Phone.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -27,6 +29,9 @@ public class Phone {
public static final String JSON_PROPERTY_NUMBER = "number";
private String number;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetNumber = false;
+
/** Type of phone number. Possible values: **Landline**, **Mobile**. */
public enum TypeEnum {
LANDLINE(String.valueOf("landline")),
@@ -71,6 +76,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public Phone() {}
/**
@@ -84,6 +98,7 @@ public Phone() {}
*/
public Phone number(String number) {
this.number = number;
+ isSetNumber = true; // mark as set
return this;
}
@@ -113,6 +128,7 @@ public String getNumber() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNumber(String number) {
this.number = number;
+ isSetNumber = true; // mark as set
}
/**
@@ -123,6 +139,7 @@ public void setNumber(String number) {
*/
public Phone type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -146,6 +163,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public Phone 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 Phone object is equal to o. */
@@ -158,12 +196,15 @@ public boolean equals(Object o) {
return false;
}
Phone phone = (Phone) o;
- return Objects.equals(this.number, phone.number) && Objects.equals(this.type, phone.type);
+ return Objects.equals(this.number, phone.number)
+ && Objects.equals(this.isSetNumber, phone.isSetNumber)
+ && Objects.equals(this.type, phone.type)
+ && Objects.equals(this.isSetType, phone.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(number, type);
+ return Objects.hash(number, isSetNumber, type, isSetType);
}
@Override
@@ -186,6 +227,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetNumber) {
+ addIfNull(nulls, JSON_PROPERTY_NUMBER, this.number);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of Phone given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/PhoneNumber.java b/src/main/java/com/adyen/model/java/PhoneNumber.java
similarity index 74%
rename from src/main/java/com/adyen/model/configurationwebhooks/PhoneNumber.java
rename to src/main/java/com/adyen/model/java/PhoneNumber.java
index d746ec95a..3b6c916d8 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/PhoneNumber.java
+++ b/src/main/java/com/adyen/model/java/PhoneNumber.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -31,9 +33,15 @@ public class PhoneNumber {
public static final String JSON_PROPERTY_PHONE_COUNTRY_CODE = "phoneCountryCode";
private String phoneCountryCode;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPhoneCountryCode = false;
+
public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber";
private String phoneNumber;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPhoneNumber = false;
+
/** The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**. */
public enum PhoneTypeEnum {
FAX(String.valueOf("Fax")),
@@ -82,6 +90,15 @@ public static PhoneTypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_PHONE_TYPE = "phoneType";
private PhoneTypeEnum phoneType;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPhoneType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public PhoneNumber() {}
/**
@@ -94,6 +111,7 @@ public PhoneNumber() {}
*/
public PhoneNumber phoneCountryCode(String phoneCountryCode) {
this.phoneCountryCode = phoneCountryCode;
+ isSetPhoneCountryCode = true; // mark as set
return this;
}
@@ -121,6 +139,7 @@ public String getPhoneCountryCode() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPhoneCountryCode(String phoneCountryCode) {
this.phoneCountryCode = phoneCountryCode;
+ isSetPhoneCountryCode = true; // mark as set
}
/**
@@ -132,6 +151,7 @@ public void setPhoneCountryCode(String phoneCountryCode) {
*/
public PhoneNumber phoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
+ isSetPhoneNumber = true; // mark as set
return this;
}
@@ -157,6 +177,7 @@ public String getPhoneNumber() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
+ isSetPhoneNumber = true; // mark as set
}
/**
@@ -168,6 +189,7 @@ public void setPhoneNumber(String phoneNumber) {
*/
public PhoneNumber phoneType(PhoneTypeEnum phoneType) {
this.phoneType = phoneType;
+ isSetPhoneType = true; // mark as set
return this;
}
@@ -193,6 +215,27 @@ public PhoneTypeEnum getPhoneType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPhoneType(PhoneTypeEnum phoneType) {
this.phoneType = phoneType;
+ isSetPhoneType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public PhoneNumber 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 PhoneNumber object is equal to o. */
@@ -206,13 +249,22 @@ public boolean equals(Object o) {
}
PhoneNumber phoneNumber = (PhoneNumber) o;
return Objects.equals(this.phoneCountryCode, phoneNumber.phoneCountryCode)
+ && Objects.equals(this.isSetPhoneCountryCode, phoneNumber.isSetPhoneCountryCode)
&& Objects.equals(this.phoneNumber, phoneNumber.phoneNumber)
- && Objects.equals(this.phoneType, phoneNumber.phoneType);
+ && Objects.equals(this.isSetPhoneNumber, phoneNumber.isSetPhoneNumber)
+ && Objects.equals(this.phoneType, phoneNumber.phoneType)
+ && Objects.equals(this.isSetPhoneType, phoneNumber.isSetPhoneType);
}
@Override
public int hashCode() {
- return Objects.hash(phoneCountryCode, phoneNumber, phoneType);
+ return Objects.hash(
+ phoneCountryCode,
+ isSetPhoneCountryCode,
+ phoneNumber,
+ isSetPhoneNumber,
+ phoneType,
+ isSetPhoneType);
}
@Override
@@ -236,6 +288,36 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetPhoneCountryCode) {
+ addIfNull(nulls, JSON_PROPERTY_PHONE_COUNTRY_CODE, this.phoneCountryCode);
+ }
+ if (isSetPhoneNumber) {
+ addIfNull(nulls, JSON_PROPERTY_PHONE_NUMBER, this.phoneNumber);
+ }
+ if (isSetPhoneType) {
+ addIfNull(nulls, JSON_PROPERTY_PHONE_TYPE, this.phoneType);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of PhoneNumber given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/PlatformPaymentConfiguration.java b/src/main/java/com/adyen/model/java/PlatformPaymentConfiguration.java
similarity index 73%
rename from src/main/java/com/adyen/model/configurationwebhooks/PlatformPaymentConfiguration.java
rename to src/main/java/com/adyen/model/java/PlatformPaymentConfiguration.java
index 376a23994..dce19e869 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/PlatformPaymentConfiguration.java
+++ b/src/main/java/com/adyen/model/java/PlatformPaymentConfiguration.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -26,9 +28,21 @@ public class PlatformPaymentConfiguration {
public static final String JSON_PROPERTY_SALES_DAY_CLOSING_TIME = "salesDayClosingTime";
private String salesDayClosingTime;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetSalesDayClosingTime = false;
+
public static final String JSON_PROPERTY_SETTLEMENT_DELAY_DAYS = "settlementDelayDays";
private Integer settlementDelayDays;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetSettlementDelayDays = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public PlatformPaymentConfiguration() {}
/**
@@ -43,6 +57,7 @@ public PlatformPaymentConfiguration() {}
*/
public PlatformPaymentConfiguration salesDayClosingTime(String salesDayClosingTime) {
this.salesDayClosingTime = salesDayClosingTime;
+ isSetSalesDayClosingTime = true; // mark as set
return this;
}
@@ -74,6 +89,7 @@ public String getSalesDayClosingTime() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSalesDayClosingTime(String salesDayClosingTime) {
this.salesDayClosingTime = salesDayClosingTime;
+ isSetSalesDayClosingTime = true; // mark as set
}
/**
@@ -87,6 +103,7 @@ public void setSalesDayClosingTime(String salesDayClosingTime) {
*/
public PlatformPaymentConfiguration settlementDelayDays(Integer settlementDelayDays) {
this.settlementDelayDays = settlementDelayDays;
+ isSetSettlementDelayDays = true; // mark as set
return this;
}
@@ -116,6 +133,27 @@ public Integer getSettlementDelayDays() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSettlementDelayDays(Integer settlementDelayDays) {
this.settlementDelayDays = settlementDelayDays;
+ isSetSettlementDelayDays = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public PlatformPaymentConfiguration 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 PlatformPaymentConfiguration object is equal to o. */
@@ -131,12 +169,20 @@ public boolean equals(Object o) {
return Objects.equals(
this.salesDayClosingTime, platformPaymentConfiguration.salesDayClosingTime)
&& Objects.equals(
- this.settlementDelayDays, platformPaymentConfiguration.settlementDelayDays);
+ this.isSetSalesDayClosingTime, platformPaymentConfiguration.isSetSalesDayClosingTime)
+ && Objects.equals(
+ this.settlementDelayDays, platformPaymentConfiguration.settlementDelayDays)
+ && Objects.equals(
+ this.isSetSettlementDelayDays, platformPaymentConfiguration.isSetSettlementDelayDays);
}
@Override
public int hashCode() {
- return Objects.hash(salesDayClosingTime, settlementDelayDays);
+ return Objects.hash(
+ salesDayClosingTime,
+ isSetSalesDayClosingTime,
+ settlementDelayDays,
+ isSetSettlementDelayDays);
}
@Override
@@ -163,6 +209,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetSalesDayClosingTime) {
+ addIfNull(nulls, JSON_PROPERTY_SALES_DAY_CLOSING_TIME, this.salesDayClosingTime);
+ }
+ if (isSetSettlementDelayDays) {
+ addIfNull(nulls, JSON_PROPERTY_SETTLEMENT_DELAY_DAYS, this.settlementDelayDays);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of PlatformPaymentConfiguration given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/RemediatingAction.java b/src/main/java/com/adyen/model/java/RemediatingAction.java
similarity index 66%
rename from src/main/java/com/adyen/model/configurationwebhooks/RemediatingAction.java
rename to src/main/java/com/adyen/model/java/RemediatingAction.java
index 92f4cef85..8b6695c26 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/RemediatingAction.java
+++ b/src/main/java/com/adyen/model/java/RemediatingAction.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -23,9 +25,21 @@ public class RemediatingAction {
public static final String JSON_PROPERTY_CODE = "code";
private String code;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCode = false;
+
public static final String JSON_PROPERTY_MESSAGE = "message";
private String message;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetMessage = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public RemediatingAction() {}
/**
@@ -36,6 +50,7 @@ public RemediatingAction() {}
*/
public RemediatingAction code(String code) {
this.code = code;
+ isSetCode = true; // mark as set
return this;
}
@@ -59,6 +74,7 @@ public String getCode() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCode(String code) {
this.code = code;
+ isSetCode = true; // mark as set
}
/**
@@ -69,6 +85,7 @@ public void setCode(String code) {
*/
public RemediatingAction message(String message) {
this.message = message;
+ isSetMessage = true; // mark as set
return this;
}
@@ -92,6 +109,27 @@ public String getMessage() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMessage(String message) {
this.message = message;
+ isSetMessage = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public RemediatingAction 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 RemediatingAction object is equal to o. */
@@ -105,12 +143,14 @@ public boolean equals(Object o) {
}
RemediatingAction remediatingAction = (RemediatingAction) o;
return Objects.equals(this.code, remediatingAction.code)
- && Objects.equals(this.message, remediatingAction.message);
+ && Objects.equals(this.isSetCode, remediatingAction.isSetCode)
+ && Objects.equals(this.message, remediatingAction.message)
+ && Objects.equals(this.isSetMessage, remediatingAction.isSetMessage);
}
@Override
public int hashCode() {
- return Objects.hash(code, message);
+ return Objects.hash(code, isSetCode, message, isSetMessage);
}
@Override
@@ -133,6 +173,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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetCode) {
+ addIfNull(nulls, JSON_PROPERTY_CODE, this.code);
+ }
+ if (isSetMessage) {
+ addIfNull(nulls, JSON_PROPERTY_MESSAGE, this.message);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of RemediatingAction given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/Resource.java b/src/main/java/com/adyen/model/java/Resource.java
similarity index 68%
rename from src/main/java/com/adyen/model/configurationwebhooks/Resource.java
rename to src/main/java/com/adyen/model/java/Resource.java
index 90f36aea5..0de474cbb 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/Resource.java
+++ b/src/main/java/com/adyen/model/java/Resource.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -28,12 +30,27 @@ public class Resource {
public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
private String balancePlatform;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalancePlatform = false;
+
public static final String JSON_PROPERTY_CREATION_DATE = "creationDate";
private OffsetDateTime creationDate;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCreationDate = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public Resource() {}
/**
@@ -44,6 +61,7 @@ public Resource() {}
*/
public Resource balancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
return this;
}
@@ -67,6 +85,7 @@ public String getBalancePlatform() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
}
/**
@@ -79,6 +98,7 @@ public void setBalancePlatform(String balancePlatform) {
*/
public Resource creationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
+ isSetCreationDate = true; // mark as set
return this;
}
@@ -106,6 +126,7 @@ public OffsetDateTime getCreationDate() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCreationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
+ isSetCreationDate = true; // mark as set
}
/**
@@ -116,6 +137,7 @@ public void setCreationDate(OffsetDateTime creationDate) {
*/
public Resource id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -139,6 +161,27 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public Resource 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 Resource object is equal to o. */
@@ -152,13 +195,17 @@ public boolean equals(Object o) {
}
Resource resource = (Resource) o;
return Objects.equals(this.balancePlatform, resource.balancePlatform)
+ && Objects.equals(this.isSetBalancePlatform, resource.isSetBalancePlatform)
&& Objects.equals(this.creationDate, resource.creationDate)
- && Objects.equals(this.id, resource.id);
+ && Objects.equals(this.isSetCreationDate, resource.isSetCreationDate)
+ && Objects.equals(this.id, resource.id)
+ && Objects.equals(this.isSetId, resource.isSetId);
}
@Override
public int hashCode() {
- return Objects.hash(balancePlatform, creationDate, id);
+ return Objects.hash(
+ balancePlatform, isSetBalancePlatform, creationDate, isSetCreationDate, id, isSetId);
}
@Override
@@ -182,6 +229,36 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetBalancePlatform) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE_PLATFORM, this.balancePlatform);
+ }
+ if (isSetCreationDate) {
+ addIfNull(nulls, JSON_PROPERTY_CREATION_DATE, this.creationDate);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of Resource given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/ResourceReference.java b/src/main/java/com/adyen/model/java/ResourceReference.java
similarity index 67%
rename from src/main/java/com/adyen/model/configurationwebhooks/ResourceReference.java
rename to src/main/java/com/adyen/model/java/ResourceReference.java
index a015a573b..cc72661ea 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/ResourceReference.java
+++ b/src/main/java/com/adyen/model/java/ResourceReference.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -27,12 +29,27 @@ public class ResourceReference {
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDescription = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
public static final String JSON_PROPERTY_REFERENCE = "reference";
private String reference;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReference = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public ResourceReference() {}
/**
@@ -43,6 +60,7 @@ public ResourceReference() {}
*/
public ResourceReference description(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
return this;
}
@@ -66,6 +84,7 @@ public String getDescription() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
}
/**
@@ -76,6 +95,7 @@ public void setDescription(String description) {
*/
public ResourceReference id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -99,6 +119,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -109,6 +130,7 @@ public void setId(String id) {
*/
public ResourceReference reference(String reference) {
this.reference = reference;
+ isSetReference = true; // mark as set
return this;
}
@@ -132,6 +154,27 @@ public String getReference() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReference(String reference) {
this.reference = reference;
+ isSetReference = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public ResourceReference 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 ResourceReference object is equal to o. */
@@ -145,13 +188,16 @@ public boolean equals(Object o) {
}
ResourceReference resourceReference = (ResourceReference) o;
return Objects.equals(this.description, resourceReference.description)
+ && Objects.equals(this.isSetDescription, resourceReference.isSetDescription)
&& Objects.equals(this.id, resourceReference.id)
- && Objects.equals(this.reference, resourceReference.reference);
+ && Objects.equals(this.isSetId, resourceReference.isSetId)
+ && Objects.equals(this.reference, resourceReference.reference)
+ && Objects.equals(this.isSetReference, resourceReference.isSetReference);
}
@Override
public int hashCode() {
- return Objects.hash(description, id, reference);
+ return Objects.hash(description, isSetDescription, id, isSetId, reference, isSetReference);
}
@Override
@@ -175,6 +221,36 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetDescription) {
+ addIfNull(nulls, JSON_PROPERTY_DESCRIPTION, this.description);
+ }
+ if (isSetId) {
+ addIfNull(nulls, JSON_PROPERTY_ID, this.id);
+ }
+ if (isSetReference) {
+ addIfNull(nulls, JSON_PROPERTY_REFERENCE, this.reference);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of ResourceReference given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/ScoreNotificationRequest.java b/src/main/java/com/adyen/model/java/ScoreNotificationRequest.java
similarity index 72%
rename from src/main/java/com/adyen/model/configurationwebhooks/ScoreNotificationRequest.java
rename to src/main/java/com/adyen/model/java/ScoreNotificationRequest.java
index e25fb7b3e..a3b7e12de 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/ScoreNotificationRequest.java
+++ b/src/main/java/com/adyen/model/java/ScoreNotificationRequest.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -33,12 +35,21 @@ public class ScoreNotificationRequest {
public static final String JSON_PROPERTY_DATA = "data";
private BankScoreSignalTriggeredData data;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetData = false;
+
public static final String JSON_PROPERTY_ENVIRONMENT = "environment";
private String environment;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEnvironment = false;
+
public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
private OffsetDateTime timestamp;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTimestamp = false;
+
/** Type of webhook. */
public enum TypeEnum {
BALANCEPLATFORM_SCORE_TRIGGERED(String.valueOf("balancePlatform.score.triggered"));
@@ -81,6 +92,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public ScoreNotificationRequest() {}
/**
@@ -91,6 +111,7 @@ public ScoreNotificationRequest() {}
*/
public ScoreNotificationRequest data(BankScoreSignalTriggeredData data) {
this.data = data;
+ isSetData = true; // mark as set
return this;
}
@@ -114,6 +135,7 @@ public BankScoreSignalTriggeredData getData() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setData(BankScoreSignalTriggeredData data) {
this.data = data;
+ isSetData = true; // mark as set
}
/**
@@ -125,6 +147,7 @@ public void setData(BankScoreSignalTriggeredData data) {
*/
public ScoreNotificationRequest environment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
return this;
}
@@ -150,6 +173,7 @@ public String getEnvironment() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnvironment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
}
/**
@@ -160,6 +184,7 @@ public void setEnvironment(String environment) {
*/
public ScoreNotificationRequest timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
return this;
}
@@ -183,6 +208,7 @@ public OffsetDateTime getTimestamp() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTimestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
}
/**
@@ -193,6 +219,7 @@ public void setTimestamp(OffsetDateTime timestamp) {
*/
public ScoreNotificationRequest type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -216,6 +243,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public ScoreNotificationRequest 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 ScoreNotificationRequest object is equal to o. */
@@ -229,14 +277,19 @@ public boolean equals(Object o) {
}
ScoreNotificationRequest scoreNotificationRequest = (ScoreNotificationRequest) o;
return Objects.equals(this.data, scoreNotificationRequest.data)
+ && Objects.equals(this.isSetData, scoreNotificationRequest.isSetData)
&& Objects.equals(this.environment, scoreNotificationRequest.environment)
+ && Objects.equals(this.isSetEnvironment, scoreNotificationRequest.isSetEnvironment)
&& Objects.equals(this.timestamp, scoreNotificationRequest.timestamp)
- && Objects.equals(this.type, scoreNotificationRequest.type);
+ && Objects.equals(this.isSetTimestamp, scoreNotificationRequest.isSetTimestamp)
+ && Objects.equals(this.type, scoreNotificationRequest.type)
+ && Objects.equals(this.isSetType, scoreNotificationRequest.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(data, environment, timestamp, type);
+ return Objects.hash(
+ data, isSetData, environment, isSetEnvironment, timestamp, isSetTimestamp, type, isSetType);
}
@Override
@@ -261,6 +314,39 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetData) {
+ addIfNull(nulls, JSON_PROPERTY_DATA, this.data);
+ }
+ if (isSetEnvironment) {
+ addIfNull(nulls, JSON_PROPERTY_ENVIRONMENT, this.environment);
+ }
+ if (isSetTimestamp) {
+ addIfNull(nulls, JSON_PROPERTY_TIMESTAMP, this.timestamp);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of ScoreNotificationRequest given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/SweepConfigurationNotificationData.java b/src/main/java/com/adyen/model/java/SweepConfigurationNotificationData.java
similarity index 69%
rename from src/main/java/com/adyen/model/configurationwebhooks/SweepConfigurationNotificationData.java
rename to src/main/java/com/adyen/model/java/SweepConfigurationNotificationData.java
index 55bcb7120..49736be89 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/SweepConfigurationNotificationData.java
+++ b/src/main/java/com/adyen/model/java/SweepConfigurationNotificationData.java
@@ -9,8 +9,10 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -27,12 +29,27 @@ public class SweepConfigurationNotificationData {
public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId";
private String accountId;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetAccountId = false;
+
public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
private String balancePlatform;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetBalancePlatform = false;
+
public static final String JSON_PROPERTY_SWEEP = "sweep";
private SweepConfigurationV2 sweep;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetSweep = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public SweepConfigurationNotificationData() {}
/**
@@ -45,6 +62,7 @@ public SweepConfigurationNotificationData() {}
*/
public SweepConfigurationNotificationData accountId(String accountId) {
this.accountId = accountId;
+ isSetAccountId = true; // mark as set
return this;
}
@@ -70,6 +88,7 @@ public String getAccountId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountId(String accountId) {
this.accountId = accountId;
+ isSetAccountId = true; // mark as set
}
/**
@@ -81,6 +100,7 @@ public void setAccountId(String accountId) {
*/
public SweepConfigurationNotificationData balancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
return this;
}
@@ -104,6 +124,7 @@ public String getBalancePlatform() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalancePlatform(String balancePlatform) {
this.balancePlatform = balancePlatform;
+ isSetBalancePlatform = true; // mark as set
}
/**
@@ -115,6 +136,7 @@ public void setBalancePlatform(String balancePlatform) {
*/
public SweepConfigurationNotificationData sweep(SweepConfigurationV2 sweep) {
this.sweep = sweep;
+ isSetSweep = true; // mark as set
return this;
}
@@ -138,6 +160,27 @@ public SweepConfigurationV2 getSweep() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSweep(SweepConfigurationV2 sweep) {
this.sweep = sweep;
+ isSetSweep = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public SweepConfigurationNotificationData 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 SweepConfigurationNotificationData object is equal to o. */
@@ -152,13 +195,18 @@ public boolean equals(Object o) {
SweepConfigurationNotificationData sweepConfigurationNotificationData =
(SweepConfigurationNotificationData) o;
return Objects.equals(this.accountId, sweepConfigurationNotificationData.accountId)
+ && Objects.equals(this.isSetAccountId, sweepConfigurationNotificationData.isSetAccountId)
&& Objects.equals(this.balancePlatform, sweepConfigurationNotificationData.balancePlatform)
- && Objects.equals(this.sweep, sweepConfigurationNotificationData.sweep);
+ && Objects.equals(
+ this.isSetBalancePlatform, sweepConfigurationNotificationData.isSetBalancePlatform)
+ && Objects.equals(this.sweep, sweepConfigurationNotificationData.sweep)
+ && Objects.equals(this.isSetSweep, sweepConfigurationNotificationData.isSetSweep);
}
@Override
public int hashCode() {
- return Objects.hash(accountId, balancePlatform, sweep);
+ return Objects.hash(
+ accountId, isSetAccountId, balancePlatform, isSetBalancePlatform, sweep, isSetSweep);
}
@Override
@@ -182,6 +230,36 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetAccountId) {
+ addIfNull(nulls, JSON_PROPERTY_ACCOUNT_ID, this.accountId);
+ }
+ if (isSetBalancePlatform) {
+ addIfNull(nulls, JSON_PROPERTY_BALANCE_PLATFORM, this.balancePlatform);
+ }
+ if (isSetSweep) {
+ addIfNull(nulls, JSON_PROPERTY_SWEEP, this.sweep);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of SweepConfigurationNotificationData given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/SweepConfigurationNotificationRequest.java b/src/main/java/com/adyen/model/java/SweepConfigurationNotificationRequest.java
similarity index 73%
rename from src/main/java/com/adyen/model/configurationwebhooks/SweepConfigurationNotificationRequest.java
rename to src/main/java/com/adyen/model/java/SweepConfigurationNotificationRequest.java
index fe3140ab2..feee4f832 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/SweepConfigurationNotificationRequest.java
+++ b/src/main/java/com/adyen/model/java/SweepConfigurationNotificationRequest.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -33,12 +35,21 @@ public class SweepConfigurationNotificationRequest {
public static final String JSON_PROPERTY_DATA = "data";
private SweepConfigurationNotificationData data;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetData = false;
+
public static final String JSON_PROPERTY_ENVIRONMENT = "environment";
private String environment;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetEnvironment = false;
+
public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
private OffsetDateTime timestamp;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTimestamp = false;
+
/** Type of webhook. */
public enum TypeEnum {
BALANCEPLATFORM_BALANCEACCOUNTSWEEP_CREATED(
@@ -88,6 +99,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public SweepConfigurationNotificationRequest() {}
/**
@@ -99,6 +119,7 @@ public SweepConfigurationNotificationRequest() {}
*/
public SweepConfigurationNotificationRequest data(SweepConfigurationNotificationData data) {
this.data = data;
+ isSetData = true; // mark as set
return this;
}
@@ -122,6 +143,7 @@ public SweepConfigurationNotificationData getData() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setData(SweepConfigurationNotificationData data) {
this.data = data;
+ isSetData = true; // mark as set
}
/**
@@ -134,6 +156,7 @@ public void setData(SweepConfigurationNotificationData data) {
*/
public SweepConfigurationNotificationRequest environment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
return this;
}
@@ -159,6 +182,7 @@ public String getEnvironment() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnvironment(String environment) {
this.environment = environment;
+ isSetEnvironment = true; // mark as set
}
/**
@@ -170,6 +194,7 @@ public void setEnvironment(String environment) {
*/
public SweepConfigurationNotificationRequest timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
return this;
}
@@ -193,6 +218,7 @@ public OffsetDateTime getTimestamp() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTimestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
+ isSetTimestamp = true; // mark as set
}
/**
@@ -204,6 +230,7 @@ public void setTimestamp(OffsetDateTime timestamp) {
*/
public SweepConfigurationNotificationRequest type(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
return this;
}
@@ -227,6 +254,27 @@ public TypeEnum getType() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
+ isSetType = true; // mark as set
+ }
+
+ /**
+ * Configures whether null values are explicitly serialized in the JSON payload. Default is false.
+ */
+ public SweepConfigurationNotificationRequest 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 SweepConfigurationNotificationRequest object is equal to o. */
@@ -241,14 +289,20 @@ public boolean equals(Object o) {
SweepConfigurationNotificationRequest sweepConfigurationNotificationRequest =
(SweepConfigurationNotificationRequest) o;
return Objects.equals(this.data, sweepConfigurationNotificationRequest.data)
+ && Objects.equals(this.isSetData, sweepConfigurationNotificationRequest.isSetData)
&& Objects.equals(this.environment, sweepConfigurationNotificationRequest.environment)
+ && Objects.equals(
+ this.isSetEnvironment, sweepConfigurationNotificationRequest.isSetEnvironment)
&& Objects.equals(this.timestamp, sweepConfigurationNotificationRequest.timestamp)
- && Objects.equals(this.type, sweepConfigurationNotificationRequest.type);
+ && Objects.equals(this.isSetTimestamp, sweepConfigurationNotificationRequest.isSetTimestamp)
+ && Objects.equals(this.type, sweepConfigurationNotificationRequest.type)
+ && Objects.equals(this.isSetType, sweepConfigurationNotificationRequest.isSetType);
}
@Override
public int hashCode() {
- return Objects.hash(data, environment, timestamp, type);
+ return Objects.hash(
+ data, isSetData, environment, isSetEnvironment, timestamp, isSetTimestamp, type, isSetType);
}
@Override
@@ -273,6 +327,39 @@ 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 getExplicitNulls() {
+ if (!this.includeNullValues) {
+ return Collections.emptyMap();
+ }
+
+ Map nulls = new HashMap<>();
+
+ if (isSetData) {
+ addIfNull(nulls, JSON_PROPERTY_DATA, this.data);
+ }
+ if (isSetEnvironment) {
+ addIfNull(nulls, JSON_PROPERTY_ENVIRONMENT, this.environment);
+ }
+ if (isSetTimestamp) {
+ addIfNull(nulls, JSON_PROPERTY_TIMESTAMP, this.timestamp);
+ }
+ if (isSetType) {
+ addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
+ }
+
+ return nulls;
+ }
+
+ // add to map when value is null
+ private void addIfNull(Map map, String key, Object value) {
+ if (value == null) {
+ map.put(key, null);
+ }
+ }
+
/**
* Create an instance of SweepConfigurationNotificationRequest given an JSON string
*
diff --git a/src/main/java/com/adyen/model/configurationwebhooks/SweepConfigurationV2.java b/src/main/java/com/adyen/model/java/SweepConfigurationV2.java
similarity index 86%
rename from src/main/java/com/adyen/model/configurationwebhooks/SweepConfigurationV2.java
rename to src/main/java/com/adyen/model/java/SweepConfigurationV2.java
index 56b9b42ae..c18cea87f 100644
--- a/src/main/java/com/adyen/model/configurationwebhooks/SweepConfigurationV2.java
+++ b/src/main/java/com/adyen/model/java/SweepConfigurationV2.java
@@ -9,9 +9,11 @@
* Do not edit the class manually.
*/
-package com.adyen.model.configurationwebhooks;
+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;
@@ -96,18 +98,33 @@ public static CategoryEnum fromValue(String value) {
public static final String JSON_PROPERTY_CATEGORY = "category";
private CategoryEnum category;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCategory = false;
+
public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty";
private SweepCounterparty counterparty;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetCounterparty = false;
+
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_DESCRIPTION = "description";
private String description;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetDescription = false;
+
public static final String JSON_PROPERTY_ID = "id";
private String id;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetId = false;
+
/** Gets or Sets priorities */
public enum PrioritiesEnum {
CROSSBORDER(String.valueOf("crossBorder")),
@@ -160,6 +177,9 @@ public static PrioritiesEnum fromValue(String value) {
public static final String JSON_PROPERTY_PRIORITIES = "priorities";
private List priorities;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetPriorities = false;
+
/** The reason for disabling the sweep. */
public enum ReasonEnum {
ACCOUNTHIERARCHYNOTACTIVE(String.valueOf("accountHierarchyNotActive")),
@@ -232,18 +252,33 @@ public static ReasonEnum fromValue(String value) {
public static final String JSON_PROPERTY_REASON = "reason";
private ReasonEnum reason;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReason = false;
+
public static final String JSON_PROPERTY_REASON_DETAIL = "reasonDetail";
private String reasonDetail;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReasonDetail = false;
+
public static final String JSON_PROPERTY_REFERENCE = "reference";
private String reference;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReference = false;
+
public static final String JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY = "referenceForBeneficiary";
private String referenceForBeneficiary;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetReferenceForBeneficiary = false;
+
public static final String JSON_PROPERTY_SCHEDULE = "schedule";
private SweepSchedule schedule;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetSchedule = false;
+
/**
* The status of the sweep. If not provided, by default, this is set to **active**. Possible
* values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on
@@ -292,15 +327,27 @@ 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;
+
public static final String JSON_PROPERTY_SWEEP_AMOUNT = "sweepAmount";
private Amount sweepAmount;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetSweepAmount = false;
+
public static final String JSON_PROPERTY_TARGET_AMOUNT = "targetAmount";
private Amount targetAmount;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTargetAmount = false;
+
public static final String JSON_PROPERTY_TRIGGER_AMOUNT = "triggerAmount";
private Amount triggerAmount;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetTriggerAmount = false;
+
/**
* The direction of sweep, whether pushing out or pulling in funds to the balance account. If not
* provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to
@@ -350,6 +397,15 @@ public static TypeEnum fromValue(String value) {
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
+ /** Mark when the attribute has been explicitly set. */
+ private boolean isSetType = false;
+
+ /**
+ * Sets whether attributes with null values should be explicitly included in the JSON payload.
+ * Default is false.
+ */
+ @JsonIgnore private boolean includeNullValues = false;
+
public SweepConfigurationV2() {}
/**
@@ -370,6 +426,7 @@ public SweepConfigurationV2() {}
*/
public SweepConfigurationV2 category(CategoryEnum category) {
this.category = category;
+ isSetCategory = true; // mark as set
return this;
}
@@ -413,6 +470,7 @@ public CategoryEnum getCategory() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCategory(CategoryEnum category) {
this.category = category;
+ isSetCategory = true; // mark as set
}
/**
@@ -423,6 +481,7 @@ public void setCategory(CategoryEnum category) {
*/
public SweepConfigurationV2 counterparty(SweepCounterparty counterparty) {
this.counterparty = counterparty;
+ isSetCounterparty = true; // mark as set
return this;
}
@@ -446,6 +505,7 @@ public SweepCounterparty getCounterparty() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCounterparty(SweepCounterparty counterparty) {
this.counterparty = counterparty;
+ isSetCounterparty = true; // mark as set
}
/**
@@ -462,6 +522,7 @@ public void setCounterparty(SweepCounterparty counterparty) {
*/
public SweepConfigurationV2 currency(String currency) {
this.currency = currency;
+ isSetCurrency = true; // mark as set
return this;
}
@@ -497,6 +558,7 @@ public String getCurrency() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCurrency(String currency) {
this.currency = currency;
+ isSetCurrency = true; // mark as set
}
/**
@@ -511,6 +573,7 @@ public void setCurrency(String currency) {
*/
public SweepConfigurationV2 description(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
return this;
}
@@ -542,6 +605,7 @@ public String getDescription() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
+ isSetDescription = true; // mark as set
}
/**
@@ -552,6 +616,7 @@ public void setDescription(String description) {
*/
public SweepConfigurationV2 id(String id) {
this.id = id;
+ isSetId = true; // mark as set
return this;
}
@@ -575,6 +640,7 @@ public String getId() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
+ isSetId = true; // mark as set
}
/**
@@ -626,6 +692,7 @@ public void setId(String id) {
*/
public SweepConfigurationV2 priorities(List priorities) {
this.priorities = priorities;
+ isSetPriorities = true; // mark as set
return this;
}
@@ -739,6 +806,7 @@ public List getPriorities() {
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPriorities(List priorities) {
this.priorities = priorities;
+ isSetPriorities = true; // mark as set
}
/**
@@ -749,6 +817,7 @@ public void setPriorities(List