From cf7471f6487db625bd0843bc30c634a8ed5e16c7 Mon Sep 17 00:00:00 2001 From: Igor Balos Date: Mon, 12 Dec 2022 16:51:41 +0100 Subject: [PATCH 1/2] added additional endpoint properties --- .../data/model/messages/OutboundMessage.java | 10 ++++++ .../client/data/model/stats/BounceStat.java | 10 ++++++ .../data/model/stats/OutboundBounceStats.java | 9 +++++ .../model/webhooks/SubscriptionChange.java | 19 +++++++++++ .../data/model/webhooks/WebhookTriggers.java | 33 +++++++++++++++++++ 5 files changed, 81 insertions(+) create mode 100644 src/main/java/com/postmarkapp/postmark/client/data/model/webhooks/SubscriptionChange.java diff --git a/src/main/java/com/postmarkapp/postmark/client/data/model/messages/OutboundMessage.java b/src/main/java/com/postmarkapp/postmark/client/data/model/messages/OutboundMessage.java index e2ab1db..33d6ddf 100644 --- a/src/main/java/com/postmarkapp/postmark/client/data/model/messages/OutboundMessage.java +++ b/src/main/java/com/postmarkapp/postmark/client/data/model/messages/OutboundMessage.java @@ -25,6 +25,8 @@ public class OutboundMessage { private Map metadata; private String messageStream; + private Boolean sandboxed; + // GETTERS AND SETTERS public String getMessageStream() { @@ -143,4 +145,12 @@ public void setTrackLinks(String trackLinks) { public void setMetadata(Map metadata) { this.metadata = metadata; } + public Boolean getSandboxed() { + return sandboxed; + } + + public void setSandboxed(Boolean sandboxed) { + this.sandboxed = sandboxed; + } + } diff --git a/src/main/java/com/postmarkapp/postmark/client/data/model/stats/BounceStat.java b/src/main/java/com/postmarkapp/postmark/client/data/model/stats/BounceStat.java index 1e77f06..ee99bbf 100644 --- a/src/main/java/com/postmarkapp/postmark/client/data/model/stats/BounceStat.java +++ b/src/main/java/com/postmarkapp/postmark/client/data/model/stats/BounceStat.java @@ -12,6 +12,8 @@ public class BounceStat extends BaseStat { private Integer ispBlock; private Integer Transient; + private Integer DMARCPolicy; + // SETTERS AND GETTERS public Integer getTransient() { @@ -61,4 +63,12 @@ public Integer getIspBlock() { public void setIspBlock(Integer ispBlock) { this.ispBlock = ispBlock; } + + public Integer getDMARCPolicy() { + return DMARCPolicy; + } + + public void setDMARCPolicy(Integer DMARCPolicy) { + this.DMARCPolicy = DMARCPolicy; + } } diff --git a/src/main/java/com/postmarkapp/postmark/client/data/model/stats/OutboundBounceStats.java b/src/main/java/com/postmarkapp/postmark/client/data/model/stats/OutboundBounceStats.java index 37846cd..cb1083d 100644 --- a/src/main/java/com/postmarkapp/postmark/client/data/model/stats/OutboundBounceStats.java +++ b/src/main/java/com/postmarkapp/postmark/client/data/model/stats/OutboundBounceStats.java @@ -13,6 +13,7 @@ public class OutboundBounceStats { private Integer spamComplaint; private Integer ispBlock; private Integer Transient; + private Integer DMARCPolicy; // SETTERS AND GETTERS @@ -73,4 +74,12 @@ public List getDays() { public void setDays(List days) { this.days = days; } + + public Integer getDMARCPolicy() { + return DMARCPolicy; + } + + public void setDMARCPolicy(Integer DMARCPolicy) { + this.DMARCPolicy = DMARCPolicy; + } } diff --git a/src/main/java/com/postmarkapp/postmark/client/data/model/webhooks/SubscriptionChange.java b/src/main/java/com/postmarkapp/postmark/client/data/model/webhooks/SubscriptionChange.java new file mode 100644 index 0000000..a13c804 --- /dev/null +++ b/src/main/java/com/postmarkapp/postmark/client/data/model/webhooks/SubscriptionChange.java @@ -0,0 +1,19 @@ +package com.postmarkapp.postmark.client.data.model.webhooks; + +public class SubscriptionChange { + private Boolean enabled; + + public SubscriptionChange() {} + + public SubscriptionChange(Boolean enabled) { + this.enabled = enabled; + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } +} diff --git a/src/main/java/com/postmarkapp/postmark/client/data/model/webhooks/WebhookTriggers.java b/src/main/java/com/postmarkapp/postmark/client/data/model/webhooks/WebhookTriggers.java index c8f9cb7..79c8358 100644 --- a/src/main/java/com/postmarkapp/postmark/client/data/model/webhooks/WebhookTriggers.java +++ b/src/main/java/com/postmarkapp/postmark/client/data/model/webhooks/WebhookTriggers.java @@ -9,12 +9,15 @@ public class WebhookTriggers { private BounceWebhookTrigger bounce; private SpamWebhookTrigger spamComplaint; + private SubscriptionChange subscriptionChange; + public WebhookTriggers() { this.open = new OpenWebhookTrigger(false); this.click = new WebhookTrigger(false); this.delivery = new WebhookTrigger(false); this.bounce = new BounceWebhookTrigger(false); this.spamComplaint = new SpamWebhookTrigger(false); + this.subscriptionChange = new SubscriptionChange(false); } public WebhookTriggers(boolean openEnabled, boolean clickEnabled) { @@ -38,6 +41,17 @@ public WebhookTriggers(boolean openEnabled, boolean clickEnabled, this.spamComplaint = new SpamWebhookTrigger(spamComplaintEnabled); } + public WebhookTriggers(boolean openEnabled, boolean clickEnabled, + boolean bounceEnabled, boolean spamComplaintEnabled, boolean deliveryEnabled, + boolean subscriptionChangeEnabled) { + this.open = new OpenWebhookTrigger(openEnabled); + this.click = new WebhookTrigger(clickEnabled); + this.delivery = new WebhookTrigger(deliveryEnabled); + this.bounce = new BounceWebhookTrigger(bounceEnabled); + this.spamComplaint = new SpamWebhookTrigger(spamComplaintEnabled); + this.subscriptionChange = new SubscriptionChange(subscriptionChangeEnabled); + } + public WebhookTriggers(OpenWebhookTrigger open, WebhookTrigger click, WebhookTrigger delivery, BounceWebhookTrigger bounce, SpamWebhookTrigger spamComplaint) { this.open = open; @@ -47,6 +61,17 @@ public WebhookTriggers(OpenWebhookTrigger open, WebhookTrigger click, WebhookTri this.spamComplaint = spamComplaint; } + public WebhookTriggers(OpenWebhookTrigger open, WebhookTrigger click, WebhookTrigger delivery, + BounceWebhookTrigger bounce, SpamWebhookTrigger spamComplaint, + SubscriptionChange subscriptionChange) { + this.open = open; + this.click = click; + this.delivery = delivery; + this.bounce = bounce; + this.spamComplaint = spamComplaint; + this.subscriptionChange = subscriptionChange; + } + public OpenWebhookTrigger getOpen() { return open; } @@ -86,4 +111,12 @@ public SpamWebhookTrigger getSpamComplaint() { public void setSpamComplaint(SpamWebhookTrigger spamComplaint) { this.spamComplaint = spamComplaint; } + + public SubscriptionChange getSubscriptionChange() { + return subscriptionChange; + } + + public void setSubscriptionChange(SubscriptionChange subscriptionChange) { + this.subscriptionChange = subscriptionChange; + } } From 3487886189e0cfb1dbf5db5f96351de166ad1603 Mon Sep 17 00:00:00 2001 From: Igor Balos Date: Mon, 12 Dec 2022 17:00:24 +0100 Subject: [PATCH 2/2] updated jackson version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7bb090c..bd821c1 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ UTF-8 1.8 2.9.7 - 2.14.0 + 2.14.1 2.37 5.8.2 1.3.2