com.mailgun.api.v3.MailgunStoreMessagesApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mailgun-java Show documentation
Show all versions of mailgun-java Show documentation
The Mailgun SDK for Java enables Java developers to work with Mailgun API
efficiently.
The newest version!
package com.mailgun.api.v3;
import java.util.concurrent.CompletableFuture;
import com.mailgun.api.MailgunApi;
import com.mailgun.enums.ApiVersion;
import com.mailgun.model.message.MessageResponse;
import com.mailgun.model.message.StoreMessageResponse;
import feign.Headers;
import feign.Param;
import feign.RequestLine;
import feign.Response;
/**
*
* This API allows you to work with stored messages.
*
*
* @see Stored Messages
*/
@Headers("Accept: application/json")
public interface MailgunStoreMessagesApi extends MailgunApi {
static ApiVersion getApiVersion() {
throw new UnsupportedOperationException("Please use 'MailgunClient.config(storedMessageUrl, PRIVATE_API_KEY)"
+ ".createApiWithAbsoluteUrl(MailgunStoreMessagesApi.class)' configuration for this method");
}
/**
*
* Resend email.
*
*
* @param recipientEmail Email address of the recipient
* @return {@link MessageResponse}
*/
@Headers("Content-Type: multipart/form-data")
@RequestLine("POST")
MessageResponse resendMessage(@Param("to") String recipientEmail);
/**
*
* Resend message.
*
*
* @param recipientEmail Email address of the recipient
* @return {@link Response}
*/
@Headers("Content-Type: multipart/form-data")
@RequestLine("POST")
Response resendMessageFeignResponse(@Param("to") String recipientEmail);
/**
*
* Asynchronously resend email.
*
*
* Note: Use the asynchronous Mailgun client for this method.
*
* MailgunClient.config(PRIVATE_API_KEY)
* .createAsyncApi(MailgunStoreMessagesApi.class);
*
*
* @param recipientEmail Email address of the recipient
* @return {@link MessageResponse}
*/
@Headers("Content-Type: multipart/form-data")
@RequestLine("POST")
CompletableFuture resendMessageAsync(@Param("to") String recipientEmail);
/**
*
* Asynchronously resend message.
*
*
* Note: Use the asynchronous Mailgun client for this method.
*
* MailgunClient.config(PRIVATE_API_KEY)
* .createAsyncApi(MailgunStoreMessagesApi.class);
*
*
* @param recipientEmail Email address of the recipient
* @return {@link Response}
*/
@Headers("Content-Type: multipart/form-data")
@RequestLine("POST")
CompletableFuture resendMessageFeignResponseAsync(@Param("to") String recipientEmail);
/**
*
* Retrieve email(s).
*
*
* @return {@link StoreMessageResponse}
*/
@RequestLine("GET")
StoreMessageResponse retrieveMessage();
/**
*
* Retrieve email(s).
*
*
* @return {@link Response}
*/
@RequestLine("GET")
Response retrieveMessageFeignResponse();
}