Skip to content

Commit 59f950d

Browse files
[configurationwebhooks] Automated update from Adyen/adyen-openapi@6f2bb26
1 parent 553cc21 commit 59f950d

9 files changed

Lines changed: 1746 additions & 9 deletions

src/main/java/com/adyen/model/configurationwebhooks/ConfigurationWebhooksHandler.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,28 @@ public Optional<CardOrderNotificationRequest> getCardOrderNotificationRequest()
102102
return Optional.empty();
103103
}
104104

105+
/**
106+
* Attempts to deserialize the webhook payload into a MandateNotificationRequest
107+
*
108+
* @return an Optional containing the deserialized object, or empty if deserialization fails
109+
*/
110+
public Optional<MandateNotificationRequest> getMandateNotificationRequest() {
111+
112+
var optionalMandateNotificationRequest = getOptionalField(MandateNotificationRequest.class);
113+
114+
if (optionalMandateNotificationRequest.isPresent()) {
115+
// verify event type
116+
for (var value : MandateNotificationRequest.TypeEnum.values()) {
117+
if (value.equals(optionalMandateNotificationRequest.get().getType())) {
118+
// found matching event type
119+
return optionalMandateNotificationRequest;
120+
}
121+
}
122+
}
123+
124+
return Optional.empty();
125+
}
126+
105127
/**
106128
* Attempts to deserialize the webhook payload into a NetworkTokenNotificationRequest
107129
*

0 commit comments

Comments
 (0)