|
1 | 1 | package com.wildbit.java.postmark.client; |
2 | 2 |
|
3 | 3 | import com.fasterxml.jackson.core.type.TypeReference; |
| 4 | +import com.wildbit.java.postmark.client.data.model.RequestResponse; |
4 | 5 | import com.wildbit.java.postmark.client.data.model.bounces.Bounce; |
5 | 6 | import com.wildbit.java.postmark.client.data.model.bounces.BounceDump; |
6 | 7 | import com.wildbit.java.postmark.client.data.model.bounces.Bounces; |
7 | 8 | import com.wildbit.java.postmark.client.data.model.bounces.DeliveryStats; |
8 | | -import com.wildbit.java.postmark.client.data.model.message.BaseMessageResponse; |
9 | 9 | import com.wildbit.java.postmark.client.data.model.message.Message; |
10 | 10 | import com.wildbit.java.postmark.client.data.model.message.MessageResponse; |
11 | 11 | import com.wildbit.java.postmark.client.data.model.messages.*; |
@@ -41,7 +41,6 @@ public class ApiClient extends BaseApiClient { |
41 | 41 | private final String outboundMessagesEndpoint = "/messages/outbound/"; |
42 | 42 | private final String inboundMessagesEndpoint = "/messages/inbound/"; |
43 | 43 | private final String outboundStatsEndpoint = "/stats/outbound/"; |
44 | | - private final String triggerTagsEndpoint = "/triggers/tags/"; |
45 | 44 | private final String triggerInboundRulesEndpoint = "/triggers/inboundRules/"; |
46 | 45 | private final String sendingEndpoint = "/email/"; |
47 | 46 | private final String webhooksEndpoint = "/webhooks/"; |
@@ -267,14 +266,14 @@ public InboundMessageDetails getInboundMessageDetails(String id) throws Postmark |
267 | 266 | return dataHandler.fromJson(response, InboundMessageDetails.class); |
268 | 267 | } |
269 | 268 |
|
270 | | - public String bypassInboundMessage(String id) throws PostmarkException, IOException { |
| 269 | + public RequestResponse bypassInboundMessage(String id) throws PostmarkException, IOException { |
271 | 270 | String response = execute(HttpClient.REQUEST_TYPES.PUT, getEndpointUrl(inboundMessagesEndpoint + id + "/bypass")); |
272 | | - return dataHandler.fromJson(response, BaseMessageResponse.class).getMessage(); |
| 271 | + return dataHandler.fromJson(response, RequestResponse.class); |
273 | 272 | } |
274 | 273 |
|
275 | | - public String retryFailedInboundMessage( String id) throws PostmarkException, IOException { |
| 274 | + public RequestResponse retryFailedInboundMessage(String id) throws PostmarkException, IOException { |
276 | 275 | String response = execute(HttpClient.REQUEST_TYPES.PUT, getEndpointUrl(inboundMessagesEndpoint + id + "/retry")); |
277 | | - return dataHandler.fromJson(response, BaseMessageResponse.class).getMessage(); |
| 276 | + return dataHandler.fromJson(response, RequestResponse.class); |
278 | 277 | } |
279 | 278 |
|
280 | 279 | /* |
@@ -430,5 +429,9 @@ public SuppressionStatuses deleteSuppressions(String messageStream, SuppressionE |
430 | 429 | return dataHandler.fromJson(response, SuppressionStatuses.class); |
431 | 430 | } |
432 | 431 |
|
| 432 | + /* |
| 433 | + Message stream endpoints |
| 434 | + */ |
| 435 | + |
433 | 436 |
|
434 | 437 | } |
0 commit comments