Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook Models #22

Merged
merged 3 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions force-app/main/default/classes/AdyenNotification.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Represents an incoming Adyen Webhook Notification
* https://docs.adyen.com/development-resources/webhooks/understand-notifications
*/
@namespaceAccessible
public with sharing class AdyenNotification {

@namespaceAccessible
public String live {get;set;}

@namespaceAccessible
public List<NotificationItems> notificationItems {get;set;}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>52.0</apiVersion>
<status>Active</status>
</ApexClass>
7 changes: 7 additions & 0 deletions force-app/main/default/classes/NotificationItems.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@namespaceAccessible
public with sharing class NotificationItems {

@namespaceAccessible
public NotificationRequestItem NotificationRequestItem {get;set;}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>52.0</apiVersion>
<status>Active</status>
</ApexClass>
37 changes: 37 additions & 0 deletions force-app/main/default/classes/NotificationRequestItem.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Represents an Adyen Webhook Notification Request Item
*/
@namespaceAccessible
public with sharing class NotificationRequestItem {

@namespaceAccessible
public Amount amount {get;set;}

@namespaceAccessible
public String eventCode {get;set;}

@namespaceAccessible
public String eventDate {get;set;}

@namespaceAccessible
public String merchantAccountCode {get;set;}

@namespaceAccessible
public String paymentMethod {get;set;}

@namespaceAccessible
public String originalReference {get;set;}

@namespaceAccessible
public String paymentPspReference {get;set;}

@namespaceAccessible
public String pspReference {get;set;}

@namespaceAccessible
public String reason {get;set;}

@namespaceAccessible
public String success {get;set;}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>52.0</apiVersion>
<status>Active</status>
</ApexClass>