diff --git a/src/main/java/com/adyen/model/balanceplatform/BankAccountAccountIdentification.java b/src/main/java/com/adyen/model/balanceplatform/BankAccountAccountIdentification.java index eba31a111..725aa0b2f 100644 --- a/src/main/java/com/adyen/model/balanceplatform/BankAccountAccountIdentification.java +++ b/src/main/java/com/adyen/model/balanceplatform/BankAccountAccountIdentification.java @@ -82,9 +82,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AULocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AULocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -106,9 +109,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(BRLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(BRLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -130,9 +136,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CALocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CALocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -154,9 +163,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -178,9 +190,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -202,9 +217,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -226,9 +244,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(HULocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(HULocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -250,9 +271,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IbanAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IbanAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -274,9 +298,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -298,9 +325,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -322,9 +352,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -347,9 +380,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -371,9 +407,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SELocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SELocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -395,9 +434,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -419,9 +461,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -443,9 +488,12 @@ public BankAccountAccountIdentification deserialize(JsonParser jp, Deserializati boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(USLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(USLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/balanceplatform/BankAccountIdentificationValidationRequestAccountIdentification.java b/src/main/java/com/adyen/model/balanceplatform/BankAccountIdentificationValidationRequestAccountIdentification.java index d3d4b4348..8b130a0b5 100644 --- a/src/main/java/com/adyen/model/balanceplatform/BankAccountIdentificationValidationRequestAccountIdentification.java +++ b/src/main/java/com/adyen/model/balanceplatform/BankAccountIdentificationValidationRequestAccountIdentification.java @@ -92,9 +92,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AULocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AULocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -116,9 +119,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(BRLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(BRLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -140,9 +146,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CALocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CALocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -164,9 +173,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -188,9 +200,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -212,9 +227,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -236,9 +254,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(HULocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(HULocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -260,9 +281,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IbanAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IbanAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -284,9 +308,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -308,9 +335,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -332,9 +362,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -357,9 +390,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -381,9 +417,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SELocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SELocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -405,9 +444,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -429,9 +471,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -453,9 +498,12 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(USLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(USLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/balanceplatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java b/src/main/java/com/adyen/model/balanceplatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java index baf40abb1..e851b6972 100644 --- a/src/main/java/com/adyen/model/balanceplatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java +++ b/src/main/java/com/adyen/model/balanceplatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java @@ -90,9 +90,12 @@ public PaymentInstrumentAdditionalBankAccountIdentificationsInner deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IbanAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IbanAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/balanceplatform/TransferRouteRequirementsInner.java b/src/main/java/com/adyen/model/balanceplatform/TransferRouteRequirementsInner.java index bcfa4176d..0a86079f4 100644 --- a/src/main/java/com/adyen/model/balanceplatform/TransferRouteRequirementsInner.java +++ b/src/main/java/com/adyen/model/balanceplatform/TransferRouteRequirementsInner.java @@ -82,9 +82,12 @@ public TransferRouteRequirementsInner deserialize(JsonParser jp, Deserialization boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AdditionalBankIdentificationRequirement.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AdditionalBankIdentificationRequirement.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -111,9 +114,12 @@ public TransferRouteRequirementsInner deserialize(JsonParser jp, Deserialization boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AddressRequirement.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AddressRequirement.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(AddressRequirement.class); @@ -134,9 +140,12 @@ public TransferRouteRequirementsInner deserialize(JsonParser jp, Deserialization boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AmountMinMaxRequirement.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AmountMinMaxRequirement.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(AmountMinMaxRequirement.class); @@ -157,9 +166,12 @@ public TransferRouteRequirementsInner deserialize(JsonParser jp, Deserialization boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AmountNonZeroDecimalsRequirement.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AmountNonZeroDecimalsRequirement.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -182,9 +194,12 @@ public TransferRouteRequirementsInner deserialize(JsonParser jp, Deserialization boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(BankAccountIdentificationTypeRequirement.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(BankAccountIdentificationTypeRequirement.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -212,9 +227,12 @@ public TransferRouteRequirementsInner deserialize(JsonParser jp, Deserialization boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IbanAccountIdentificationRequirement.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IbanAccountIdentificationRequirement.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -241,9 +259,12 @@ public TransferRouteRequirementsInner deserialize(JsonParser jp, Deserialization boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PaymentInstrumentRequirement.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PaymentInstrumentRequirement.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -265,9 +286,12 @@ public TransferRouteRequirementsInner deserialize(JsonParser jp, Deserialization boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(USInstantPayoutAddressRequirement.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(USInstantPayoutAddressRequirement.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -290,9 +314,12 @@ public TransferRouteRequirementsInner deserialize(JsonParser jp, Deserialization boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(USInternationalAchAddressRequirement.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(USInternationalAchAddressRequirement.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -319,9 +346,12 @@ public TransferRouteRequirementsInner deserialize(JsonParser jp, Deserialization boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(USInternationalAchPriorityRequirement.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(USInternationalAchPriorityRequirement.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java index 9d130568d..a0d2fe2ae 100644 --- a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java +++ b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java @@ -78,9 +78,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AchDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AchDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(AchDetails.class); @@ -101,9 +104,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AffirmDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AffirmDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(AffirmDetails.class); @@ -124,9 +130,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AfterpayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AfterpayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(AfterpayDetails.class); @@ -147,9 +156,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AmazonPayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AmazonPayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(AmazonPayDetails.class); @@ -170,9 +182,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AncvDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AncvDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(AncvDetails.class); @@ -193,9 +208,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AndroidPayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AndroidPayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(AndroidPayDetails.class); @@ -216,9 +234,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(ApplePayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(ApplePayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(ApplePayDetails.class); @@ -239,9 +260,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(BacsDirectDebitDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(BacsDirectDebitDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(BacsDirectDebitDetails.class); @@ -262,9 +286,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(BillDeskDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(BillDeskDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(BillDeskDetails.class); @@ -285,9 +312,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(BlikDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(BlikDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(BlikDetails.class); @@ -308,9 +338,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CardDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CardDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(CardDetails.class); @@ -331,9 +364,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CashAppDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CashAppDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(CashAppDetails.class); @@ -354,9 +390,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CellulantDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CellulantDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(CellulantDetails.class); @@ -377,9 +416,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(DokuDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(DokuDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(DokuDetails.class); @@ -400,9 +442,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(DragonpayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(DragonpayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(DragonpayDetails.class); @@ -423,9 +468,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(EBankingFinlandDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(EBankingFinlandDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(EBankingFinlandDetails.class); @@ -446,9 +494,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(EcontextVoucherDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(EcontextVoucherDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(EcontextVoucherDetails.class); @@ -469,9 +520,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(EftDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(EftDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(EftDetails.class); @@ -492,9 +546,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(FastlaneDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(FastlaneDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(FastlaneDetails.class); @@ -515,9 +572,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(GenericIssuerPaymentMethodDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(GenericIssuerPaymentMethodDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -540,9 +600,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(GooglePayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(GooglePayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(GooglePayDetails.class); @@ -563,9 +626,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IdealDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IdealDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(IdealDetails.class); @@ -586,9 +652,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(KlarnaDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(KlarnaDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(KlarnaDetails.class); @@ -609,9 +678,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(MasterpassDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(MasterpassDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(MasterpassDetails.class); @@ -632,9 +704,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(MbwayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(MbwayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(MbwayDetails.class); @@ -655,9 +730,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(MobilePayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(MobilePayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(MobilePayDetails.class); @@ -678,9 +756,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(MolPayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(MolPayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(MolPayDetails.class); @@ -701,9 +782,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(OpenInvoiceDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(OpenInvoiceDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(OpenInvoiceDetails.class); @@ -724,9 +808,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PayByBankAISDirectDebitDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PayByBankAISDirectDebitDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -749,9 +836,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PayByBankDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PayByBankDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PayByBankDetails.class); @@ -772,9 +862,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PayPalDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PayPalDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PayPalDetails.class); @@ -795,9 +888,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PayPayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PayPayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PayPayDetails.class); @@ -818,9 +914,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PayToDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PayToDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PayToDetails.class); @@ -841,9 +940,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PayUUpiDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PayUUpiDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PayUUpiDetails.class); @@ -864,9 +966,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PayWithGoogleDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PayWithGoogleDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PayWithGoogleDetails.class); @@ -887,9 +992,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PaymentDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PaymentDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PaymentDetails.class); @@ -910,9 +1018,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PixDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PixDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PixDetails.class); @@ -933,9 +1044,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PseDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PseDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PseDetails.class); @@ -956,9 +1070,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(RakutenPayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(RakutenPayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(RakutenPayDetails.class); @@ -979,9 +1096,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(RatepayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(RatepayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(RatepayDetails.class); @@ -1002,9 +1122,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(RivertyDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(RivertyDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(RivertyDetails.class); @@ -1025,9 +1148,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SamsungPayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SamsungPayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(SamsungPayDetails.class); @@ -1048,9 +1174,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SepaDirectDebitDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SepaDirectDebitDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(SepaDirectDebitDetails.class); @@ -1071,9 +1200,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(StoredPaymentMethodDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(StoredPaymentMethodDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -1095,9 +1227,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(TwintDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(TwintDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(TwintDetails.class); @@ -1118,9 +1253,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(UpiCollectDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(UpiCollectDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(UpiCollectDetails.class); @@ -1141,9 +1279,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(UpiIntentDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(UpiIntentDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(UpiIntentDetails.class); @@ -1164,9 +1305,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(VippsDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(VippsDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(VippsDetails.class); @@ -1187,9 +1331,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(VisaCheckoutDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(VisaCheckoutDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(VisaCheckoutDetails.class); @@ -1210,9 +1357,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(WeChatPayDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(WeChatPayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(WeChatPayDetails.class); @@ -1233,9 +1383,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(WeChatPayMiniProgramDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(WeChatPayMiniProgramDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -1257,9 +1410,12 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(ZipDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(ZipDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(ZipDetails.class); diff --git a/src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java b/src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java index 1aa8d1b75..6eafdf5a2 100644 --- a/src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java +++ b/src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java @@ -78,9 +78,12 @@ public DonationPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(ApplePayDonations.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(ApplePayDonations.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(ApplePayDonations.class); @@ -101,9 +104,12 @@ public DonationPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CardDonations.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CardDonations.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(CardDonations.class); @@ -124,9 +130,12 @@ public DonationPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(GooglePayDonations.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(GooglePayDonations.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(GooglePayDonations.class); @@ -147,9 +156,12 @@ public DonationPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IdealDonations.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IdealDonations.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(IdealDonations.class); @@ -170,9 +182,12 @@ public DonationPaymentMethod deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PayWithGoogleDonations.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PayWithGoogleDonations.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PayWithGoogleDonations.class); diff --git a/src/main/java/com/adyen/model/checkout/PaymentDetailsResponseAction.java b/src/main/java/com/adyen/model/checkout/PaymentDetailsResponseAction.java index cc3a59165..2ee936ea4 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentDetailsResponseAction.java +++ b/src/main/java/com/adyen/model/checkout/PaymentDetailsResponseAction.java @@ -80,9 +80,12 @@ public PaymentDetailsResponseAction deserialize(JsonParser jp, DeserializationCo boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CheckoutThreeDS2Action.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CheckoutThreeDS2Action.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(CheckoutThreeDS2Action.class); diff --git a/src/main/java/com/adyen/model/checkout/PaymentResponseAction.java b/src/main/java/com/adyen/model/checkout/PaymentResponseAction.java index 58871d0bf..39cbc9f63 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentResponseAction.java +++ b/src/main/java/com/adyen/model/checkout/PaymentResponseAction.java @@ -80,9 +80,12 @@ public PaymentResponseAction deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CheckoutAwaitAction.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CheckoutAwaitAction.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(CheckoutAwaitAction.class); @@ -103,9 +106,12 @@ public PaymentResponseAction deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CheckoutBankTransferAction.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CheckoutBankTransferAction.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -127,9 +133,12 @@ public PaymentResponseAction deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CheckoutDelegatedAuthenticationAction.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CheckoutDelegatedAuthenticationAction.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -156,9 +165,12 @@ public PaymentResponseAction deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CheckoutNativeRedirectAction.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CheckoutNativeRedirectAction.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -180,9 +192,12 @@ public PaymentResponseAction deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CheckoutQrCodeAction.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CheckoutQrCodeAction.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(CheckoutQrCodeAction.class); @@ -203,9 +218,12 @@ public PaymentResponseAction deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CheckoutRedirectAction.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CheckoutRedirectAction.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(CheckoutRedirectAction.class); @@ -226,9 +244,12 @@ public PaymentResponseAction deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CheckoutSDKAction.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CheckoutSDKAction.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(CheckoutSDKAction.class); @@ -249,9 +270,12 @@ public PaymentResponseAction deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CheckoutThreeDS2Action.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CheckoutThreeDS2Action.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(CheckoutThreeDS2Action.class); @@ -272,9 +296,12 @@ public PaymentResponseAction deserialize(JsonParser jp, DeserializationContext c boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CheckoutVoucherAction.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CheckoutVoucherAction.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(CheckoutVoucherAction.class); diff --git a/src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java b/src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java index b9b78a034..c157a56b3 100644 --- a/src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java +++ b/src/main/java/com/adyen/model/configurationwebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.java @@ -90,9 +90,12 @@ public PaymentInstrumentAdditionalBankAccountIdentificationsInner deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IbanAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IbanAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/legalentitymanagement/BankAccountInfoAccountIdentification.java b/src/main/java/com/adyen/model/legalentitymanagement/BankAccountInfoAccountIdentification.java index 3e8e36e30..bc122bd32 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/BankAccountInfoAccountIdentification.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/BankAccountInfoAccountIdentification.java @@ -85,9 +85,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AULocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AULocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -109,9 +112,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CALocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CALocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -133,9 +139,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -157,9 +166,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -181,9 +193,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -205,9 +220,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(HULocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(HULocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -229,9 +247,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IbanAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IbanAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -253,9 +274,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -277,9 +301,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -301,9 +328,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -326,9 +356,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -350,9 +383,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SELocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SELocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -374,9 +410,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -398,9 +437,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -422,9 +464,12 @@ public BankAccountInfoAccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(USLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(USLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java index 44e20d2d2..94436e76c 100644 --- a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java +++ b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java @@ -89,9 +89,12 @@ public ScheduleTerminalActionsRequestActionDetails deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(InstallAndroidAppDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(InstallAndroidAppDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(InstallAndroidAppDetails.class); @@ -112,9 +115,12 @@ public ScheduleTerminalActionsRequestActionDetails deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(InstallAndroidCertificateDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(InstallAndroidCertificateDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -137,9 +143,12 @@ public ScheduleTerminalActionsRequestActionDetails deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(ReleaseUpdateDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(ReleaseUpdateDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(ReleaseUpdateDetails.class); @@ -160,9 +169,12 @@ public ScheduleTerminalActionsRequestActionDetails deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(UninstallAndroidAppDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(UninstallAndroidAppDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -184,9 +196,12 @@ public ScheduleTerminalActionsRequestActionDetails deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(UninstallAndroidCertificateDetails.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(UninstallAndroidCertificateDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/transactionwebhooks/TransferViewCategoryData.java b/src/main/java/com/adyen/model/transactionwebhooks/TransferViewCategoryData.java index 5320d8767..5773a5ecb 100644 --- a/src/main/java/com/adyen/model/transactionwebhooks/TransferViewCategoryData.java +++ b/src/main/java/com/adyen/model/transactionwebhooks/TransferViewCategoryData.java @@ -79,9 +79,12 @@ public TransferViewCategoryData deserialize(JsonParser jp, DeserializationContex boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(BankCategoryData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(BankCategoryData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(BankCategoryData.class); @@ -102,9 +105,12 @@ public TransferViewCategoryData deserialize(JsonParser jp, DeserializationContex boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(InternalCategoryData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(InternalCategoryData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(InternalCategoryData.class); @@ -125,9 +131,12 @@ public TransferViewCategoryData deserialize(JsonParser jp, DeserializationContex boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IssuedCard.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IssuedCard.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(IssuedCard.class); @@ -148,9 +157,12 @@ public TransferViewCategoryData deserialize(JsonParser jp, DeserializationContex boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PlatformPayment.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PlatformPayment.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PlatformPayment.class); diff --git a/src/main/java/com/adyen/model/transfers/BankAccountV3AccountIdentification.java b/src/main/java/com/adyen/model/transfers/BankAccountV3AccountIdentification.java index 1d2274e76..fedff8f80 100644 --- a/src/main/java/com/adyen/model/transfers/BankAccountV3AccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/BankAccountV3AccountIdentification.java @@ -83,9 +83,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AULocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AULocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -107,9 +110,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(BRLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(BRLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -131,9 +137,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CALocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CALocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -155,9 +164,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -179,9 +191,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -203,9 +218,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -227,9 +245,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(HULocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(HULocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -251,9 +272,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IbanAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IbanAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -275,9 +299,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -299,9 +326,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -323,9 +353,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -348,9 +381,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -372,9 +408,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SELocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SELocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -396,9 +435,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -420,9 +462,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -444,9 +489,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(USLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(USLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/transfers/TransferCategoryData.java b/src/main/java/com/adyen/model/transfers/TransferCategoryData.java index 83071208c..7b9ba6d8c 100644 --- a/src/main/java/com/adyen/model/transfers/TransferCategoryData.java +++ b/src/main/java/com/adyen/model/transfers/TransferCategoryData.java @@ -78,9 +78,12 @@ public TransferCategoryData deserialize(JsonParser jp, DeserializationContext ct boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(BankCategoryData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(BankCategoryData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(BankCategoryData.class); @@ -101,9 +104,12 @@ public TransferCategoryData deserialize(JsonParser jp, DeserializationContext ct boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(InternalCategoryData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(InternalCategoryData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(InternalCategoryData.class); @@ -124,9 +130,12 @@ public TransferCategoryData deserialize(JsonParser jp, DeserializationContext ct boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IssuedCard.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IssuedCard.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(IssuedCard.class); @@ -147,9 +156,12 @@ public TransferCategoryData deserialize(JsonParser jp, DeserializationContext ct boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PlatformPayment.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PlatformPayment.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PlatformPayment.class); diff --git a/src/main/java/com/adyen/model/transfers/TransferDataTracking.java b/src/main/java/com/adyen/model/transfers/TransferDataTracking.java index 7c4856a60..1feb2c1d1 100644 --- a/src/main/java/com/adyen/model/transfers/TransferDataTracking.java +++ b/src/main/java/com/adyen/model/transfers/TransferDataTracking.java @@ -78,9 +78,12 @@ public TransferDataTracking deserialize(JsonParser jp, DeserializationContext ct boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(ConfirmationTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(ConfirmationTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(ConfirmationTrackingData.class); @@ -101,9 +104,12 @@ public TransferDataTracking deserialize(JsonParser jp, DeserializationContext ct boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(EstimationTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(EstimationTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(EstimationTrackingData.class); @@ -124,9 +130,12 @@ public TransferDataTracking deserialize(JsonParser jp, DeserializationContext ct boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(InternalReviewTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(InternalReviewTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/transfers/TransferEventEventsDataInner.java b/src/main/java/com/adyen/model/transfers/TransferEventEventsDataInner.java index 8166b91e4..732f81f28 100644 --- a/src/main/java/com/adyen/model/transfers/TransferEventEventsDataInner.java +++ b/src/main/java/com/adyen/model/transfers/TransferEventEventsDataInner.java @@ -80,9 +80,12 @@ public TransferEventEventsDataInner deserialize(JsonParser jp, DeserializationCo boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IssuingTransactionData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IssuingTransactionData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(IssuingTransactionData.class); @@ -103,9 +106,12 @@ public TransferEventEventsDataInner deserialize(JsonParser jp, DeserializationCo boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(MerchantPurchaseData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(MerchantPurchaseData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(MerchantPurchaseData.class); diff --git a/src/main/java/com/adyen/model/transfers/TransferEventTrackingData.java b/src/main/java/com/adyen/model/transfers/TransferEventTrackingData.java index f38f83249..90f80c6e2 100644 --- a/src/main/java/com/adyen/model/transfers/TransferEventTrackingData.java +++ b/src/main/java/com/adyen/model/transfers/TransferEventTrackingData.java @@ -79,9 +79,12 @@ public TransferEventTrackingData deserialize(JsonParser jp, DeserializationConte boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(ConfirmationTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(ConfirmationTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(ConfirmationTrackingData.class); @@ -102,9 +105,12 @@ public TransferEventTrackingData deserialize(JsonParser jp, DeserializationConte boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(EstimationTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(EstimationTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(EstimationTrackingData.class); @@ -125,9 +131,12 @@ public TransferEventTrackingData deserialize(JsonParser jp, DeserializationConte boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(InternalReviewTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(InternalReviewTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3AccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3AccountIdentification.java index 31e5ec67a..8b8a56abf 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3AccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3AccountIdentification.java @@ -83,9 +83,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(AULocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AULocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -107,9 +110,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(BRLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(BRLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -131,9 +137,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CALocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CALocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -155,9 +164,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -179,9 +191,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -203,9 +218,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -227,9 +245,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(HULocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(HULocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -251,9 +272,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IbanAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IbanAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -275,9 +299,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -299,9 +326,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -323,9 +353,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -348,9 +381,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -372,9 +408,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SELocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SELocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -396,9 +435,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -420,9 +462,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = @@ -444,9 +489,12 @@ public BankAccountV3AccountIdentification deserialize( boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(USLocalAccountIdentification.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(USLocalAccountIdentification.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferDataCategoryData.java b/src/main/java/com/adyen/model/transferwebhooks/TransferDataCategoryData.java index ecfe51eee..e8dc4fa80 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferDataCategoryData.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferDataCategoryData.java @@ -79,9 +79,12 @@ public TransferDataCategoryData deserialize(JsonParser jp, DeserializationContex boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(BankCategoryData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(BankCategoryData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(BankCategoryData.class); @@ -102,9 +105,12 @@ public TransferDataCategoryData deserialize(JsonParser jp, DeserializationContex boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(InternalCategoryData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(InternalCategoryData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(InternalCategoryData.class); @@ -125,9 +131,12 @@ public TransferDataCategoryData deserialize(JsonParser jp, DeserializationContex boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IssuedCard.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IssuedCard.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(IssuedCard.class); @@ -148,9 +157,12 @@ public TransferDataCategoryData deserialize(JsonParser jp, DeserializationContex boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(PlatformPayment.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(PlatformPayment.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(PlatformPayment.class); diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferDataTracking.java b/src/main/java/com/adyen/model/transferwebhooks/TransferDataTracking.java index 88772e290..452eb8c73 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferDataTracking.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferDataTracking.java @@ -78,9 +78,12 @@ public TransferDataTracking deserialize(JsonParser jp, DeserializationContext ct boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(ConfirmationTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(ConfirmationTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(ConfirmationTrackingData.class); @@ -101,9 +104,12 @@ public TransferDataTracking deserialize(JsonParser jp, DeserializationContext ct boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(EstimationTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(EstimationTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(EstimationTrackingData.class); @@ -124,9 +130,12 @@ public TransferDataTracking deserialize(JsonParser jp, DeserializationContext ct boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(InternalReviewTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(InternalReviewTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferEventEventsDataInner.java b/src/main/java/com/adyen/model/transferwebhooks/TransferEventEventsDataInner.java index 1f2077c3c..9f8c0aa2b 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferEventEventsDataInner.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferEventEventsDataInner.java @@ -80,9 +80,12 @@ public TransferEventEventsDataInner deserialize(JsonParser jp, DeserializationCo boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(IssuingTransactionData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(IssuingTransactionData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(IssuingTransactionData.class); @@ -103,9 +106,12 @@ public TransferEventEventsDataInner deserialize(JsonParser jp, DeserializationCo boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(MerchantPurchaseData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(MerchantPurchaseData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(MerchantPurchaseData.class); diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferEventTrackingData.java b/src/main/java/com/adyen/model/transferwebhooks/TransferEventTrackingData.java index 3b17a39b4..c775beac7 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferEventTrackingData.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferEventTrackingData.java @@ -79,9 +79,12 @@ public TransferEventTrackingData deserialize(JsonParser jp, DeserializationConte boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(ConfirmationTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(ConfirmationTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(ConfirmationTrackingData.class); @@ -102,9 +105,12 @@ public TransferEventTrackingData deserialize(JsonParser jp, DeserializationConte boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(EstimationTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(EstimationTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = tree.traverse(jp.getCodec()).readValueAs(EstimationTrackingData.class); @@ -125,9 +131,12 @@ public TransferEventTrackingData deserialize(JsonParser jp, DeserializationConte boolean attemptParsing = true; if (attemptParsing) { // Checks if the unique type of the oneOf json matches any of the object TypeEnum values - boolean typeMatch = - Arrays.stream(InternalReviewTrackingData.TypeEnum.values()) - .anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(InternalReviewTrackingData.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } if (typeMatch) { deserialized = diff --git a/src/test/java/com/adyen/CheckoutTest.java b/src/test/java/com/adyen/CheckoutTest.java index a02dc9b1c..a6b715d76 100644 --- a/src/test/java/com/adyen/CheckoutTest.java +++ b/src/test/java/com/adyen/CheckoutTest.java @@ -705,7 +705,7 @@ public void TestBccmMobile() throws Exception { assertEquals(PaymentResponse.ResultCodeEnum.PENDING, paymentResponse.getResultCode()); assertNotNull(paymentResponse.getAction()); } - + @Test public void testPixActionQrCode() throws Exception { Client client = createMockClientFromFile("mocks/checkout/pixQrCodeResponse.json");