All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mailgun.api.v3.MailgunDomainsApi Maven / Gradle / Ivy

Go to download

The Mailgun SDK for Java enables Java developers to work with Mailgun API efficiently.

The newest version!
package com.mailgun.api.v3;

import com.mailgun.api.MailgunApi;
import com.mailgun.enums.YesNo;
import com.mailgun.enums.YesNoHtml;
import com.mailgun.expanders.EnumExpander;
import com.mailgun.model.ResponseWithMessage;
import com.mailgun.model.domains.DomainConnectionRequest;
import com.mailgun.model.domains.DomainConnectionResponse;
import com.mailgun.model.domains.DomainCredentials;
import com.mailgun.model.domains.DomainListResponse;
import com.mailgun.model.domains.DomainRequest;
import com.mailgun.model.domains.DomainResponse;
import com.mailgun.model.domains.DomainTrackingResponse;
import com.mailgun.model.domains.DomainUnsubscribeConnectionSettingsRequest;
import com.mailgun.model.domains.DomainsParametersFilter;
import com.mailgun.model.domains.SingleDomainResponse;
import com.mailgun.model.domains.UpdateDomainClickTrackingSettingsResponse;
import com.mailgun.model.domains.UpdateDomainConnectionResponse;
import com.mailgun.model.domains.UpdateDomainOpenTrackingSettingsResponse;
import com.mailgun.model.domains.UpdateDomainUnsubscribeTrackingSettingsResponse;
import feign.Headers;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import feign.Response;

/**
 * 

* The domains API allows you to create, access, and validate domains programmatically. *

* * @see Domains */ @Headers("Accept: application/json") public interface MailgunDomainsApi extends MailgunApi { /** *

* Returns a list of domains under your account (limit to 100 entries). *

* * @return {@link DomainListResponse} */ @RequestLine("GET /domains") DomainListResponse getDomainsList(); /** *

* Returns a list of domains under your account (limit to 100 entries). *

* * @return {@link Response} */ @RequestLine("GET /domains") Response getDomainsListFeignResponse(); /** *

* Returns a list of domains under your account. *

* * @param filter {@link DomainsParametersFilter} * @return {@link DomainListResponse} */ @RequestLine("GET /domains") DomainListResponse getDomainsList(@QueryMap DomainsParametersFilter filter); /** *

* Returns a list of domains under your account. *

* * @param filter {@link DomainsParametersFilter} * @return {@link Response} */ @RequestLine("GET /domains") Response getDomainsListFeignResponse(@QueryMap DomainsParametersFilter filter); /** *

* Returns a single domain, including credentials and DNS records. *

* * @param domain Name of the domain * @return {@link SingleDomainResponse} */ @RequestLine("GET /domains/{domain}") SingleDomainResponse getSingleDomain(@Param("domain") String domain); /** *

* Returns a single domain, including credentials and DNS records. *

* * @param domain Name of the domain * @return {@link Response} */ @RequestLine("GET /domains/{domain}") Response getSingleDomainFeignResponse(@Param("domain") String domain); /** *

* Verifies and returns a single domain, including credentials and DNS records. * If the domain is successfully verified the domain’s state will be ‘active’. * For more information on verifying domains, visit: @see Verifying Your Domain *

* * @param domain Name of the domain * @return {@link DomainResponse} */ @RequestLine("PUT /domains/{domain}/verify") DomainResponse verifyDomain(@Param("domain") String domain); /** *

* Verifies and returns a single domain, including credentials and DNS records. * If the domain is successfully verified the domain’s state will be ‘active’. * For more information on verifying domains, visit: @see Verifying Your Domain *

* * @param domain Name of the domain * @return {@link Response} */ @RequestLine("PUT /domains/{domain}/verify") Response verifyDomainFeignResponse(@Param("domain") String domain); /** *

* Create a new domain. *

* * @param request {@link DomainRequest} * @return {@link DomainResponse} */ @Headers("Content-Type: multipart/form-data") @RequestLine("POST /domains") DomainResponse createNewDomain(DomainRequest request); /** *

* Create a new domain. *

* * @param request {@link DomainRequest} * @return {@link Response} */ @Headers("Content-Type: multipart/form-data") @RequestLine("POST /domains") Response createNewDomainFeignResponse(DomainRequest request); /** *

* Delete a domain from your account. *

* * @param domain Name of the domain * @return {@link ResponseWithMessage} */ @RequestLine("DELETE /domains/{domain}") ResponseWithMessage deleteDomain(@Param("domain") String domain); /** *

* Delete a domain from your account. *

* * @param domain Name of the domain * @return {@link Response} */ @RequestLine("DELETE /domains/{domain}") Response deleteDomainFeignResponse(@Param("domain") String domain); /** *

* Creates a new set of SMTP credentials for the defined domain. *

* * @param domain Name of the domain * @param request {@link DomainCredentials} * @return {@link ResponseWithMessage} */ @Headers("Content-Type: multipart/form-data") @RequestLine("POST /domains/{domain}/credentials") ResponseWithMessage createNewCredentials(@Param("domain") String domain, DomainCredentials request); /** *

* Creates a new set of SMTP credentials for the defined domain. *

* * @param domain Name of the domain * @param request {@link DomainCredentials} * @return {@link Response} */ @Headers("Content-Type: multipart/form-data") @RequestLine("POST /domains/{domain}/credentials") Response createNewCredentialsFeignResponse(@Param("domain") String domain, DomainCredentials request); /** *

* Updates the specified SMTP credentials. * Currently only the password can be changed. *

* * @param domain Name of the domain * @param login Login * @param password A password for the SMTP credentials. (Length Min 5, Max 32) * @return {@link ResponseWithMessage} */ @Headers("Content-Type: multipart/form-data") @RequestLine("PUT /domains/{domain}/credentials/{login}") ResponseWithMessage updateCredentials(@Param("domain") String domain, @Param("login") String login, @Param("password") String password); /** *

* Updates the specified SMTP credentials. * Currently only the password can be changed. *

* * @param domain Name of the domain * @param login Login * @param password A password for the SMTP credentials. (Length Min 5, Max 32) * @return {@link Response} */ @Headers("Content-Type: multipart/form-data") @RequestLine("PUT /domains/{domain}/credentials/{login}") Response updateCredentialsFeignResponse(@Param("domain") String domain, @Param("login") String login, @Param("password") String password); /** *

* Deletes the defined SMTP credentials. *

* * @param domain Name of the domain * @param login Login * @return {@link ResponseWithMessage} */ @RequestLine("DELETE /domains/{domain}/credentials/{login}") ResponseWithMessage deleteCredentials(@Param("domain") String domain, @Param("login") String login); /** *

* Deletes the defined SMTP credentials. *

* * @param domain Name of the domain * @param login Login * @return {@link Response} */ @RequestLine("DELETE /domains/{domain}/credentials/{login}") Response deleteCredentialsFeignResponse(@Param("domain") String domain, @Param("login") String login); /** *

* Returns delivery connection settings for the defined domain. *

* * @param domain Name of the domain * @return {@link DomainConnectionResponse} */ @RequestLine("GET /domains/{domain}/connection") DomainConnectionResponse getDomainConnectionSettings(@Param("domain") String domain); /** *

* Returns delivery connection settings for the defined domain. *

* * @param domain Name of the domain * @return {@link Response} */ @RequestLine("GET /domains/{domain}/connection") Response getDomainConnectionSettingsFeignResponse(@Param("domain") String domain); /** *

* Updates the specified delivery connection settings for the defined domain. *

* * @param domain Name of the domain * @param request {@link DomainConnectionRequest} * @return {@link UpdateDomainConnectionResponse} */ @Headers("Content-Type: multipart/form-data") @RequestLine("PUT /domains/{domain}/connection") UpdateDomainConnectionResponse updateDomainConnectionSettings(@Param("domain") String domain, DomainConnectionRequest request); /** *

* Updates the specified delivery connection settings for the defined domain. *

* * @param domain Name of the domain * @param request {@link DomainConnectionRequest} * @return {@link Response} */ @Headers("Content-Type: multipart/form-data") @RequestLine("PUT /domains/{domain}/connection") Response updateDomainConnectionSettingsFeignResponse(@Param("domain") String domain, DomainConnectionRequest request); /** *

* Returns tracking settings for a domain. *

* * @param domain Name of the domain * @return {@link DomainTrackingResponse} */ @RequestLine("GET /domains/{domain}/tracking") DomainTrackingResponse getDomainTrackingSettings(@Param("domain") String domain); /** *

* Returns tracking settings for a domain. *

* * @param domain Name of the domain * @return {@link Response} */ @RequestLine("GET /domains/{domain}/tracking") Response getDomainTrackingSettingsFeignResponse(@Param("domain") String domain); /** *

* Updates the open tracking settings for a domain. *

* * @param domain Name of the domain * @param active {@link YesNo} * @return {@link UpdateDomainOpenTrackingSettingsResponse} */ @Headers("Content-Type: multipart/form-data") @RequestLine("PUT /domains/{domain}/tracking/open") UpdateDomainOpenTrackingSettingsResponse updateDomainOpenTrackingSettings(@Param("domain") String domain, @Param(value = "active", expander = EnumExpander.class) YesNo active); /** *

* Updates the open tracking settings for a domain. *

* * @param domain Name of the domain * @param active {@link YesNo} * @return {@link Response} */ @Headers("Content-Type: multipart/form-data") @RequestLine("PUT /domains/{domain}/tracking/open") Response updateDomainOpenTrackingSettingsFeignResponse(@Param("domain") String domain, @Param(value = "active", expander = EnumExpander.class) YesNo active); /** *

* Updates the click tracking settings for a domain. *

* * @param domain Name of the domain * @param active {@link YesNoHtml} *

* If set to YES, links will be overwritten and pointed to our servers so we can track clicks. *

*

* If set to HTML_ONLY, links will only be rewritten in the HTML part of a message. *

* @return {@link UpdateDomainClickTrackingSettingsResponse} */ @Headers("Content-Type: multipart/form-data") @RequestLine("PUT /domains/{domain}/tracking/click") UpdateDomainClickTrackingSettingsResponse updateDomainClickTrackingSettings(@Param("domain") String domain, @Param(value = "active", expander = EnumExpander.class) YesNoHtml active); /** *

* Updates the click tracking settings for a domain. *

* * @param domain Name of the domain * @param active {@link YesNoHtml} *

* If set to YES, links will be overwritten and pointed to our servers so we can track clicks. *

*

* If set to HTML_ONLY, links will only be rewritten in the HTML part of a message. *

* @return {@link Response} */ @Headers("Content-Type: multipart/form-data") @RequestLine("PUT /domains/{domain}/tracking/click") Response updateDomainClickTrackingSettingsFeignResponse(@Param("domain") String domain, @Param(value = "active", expander = EnumExpander.class) YesNoHtml active); /** *

* Updates unsubscribe tracking settings for a domain. *

* * @param domain Name of the domain * @param request {@link DomainUnsubscribeConnectionSettingsRequest} * @return {@link UpdateDomainUnsubscribeTrackingSettingsResponse} */ @Headers("Content-Type: multipart/form-data") @RequestLine("PUT /domains/{domain}/tracking/unsubscribe") UpdateDomainUnsubscribeTrackingSettingsResponse updateDomainUnsubscribeConnectionSettings(@Param("domain") String domain, DomainUnsubscribeConnectionSettingsRequest request); /** *

* Updates unsubscribe tracking settings for a domain. *

* * @param domain Name of the domain * @param request {@link DomainUnsubscribeConnectionSettingsRequest} * @return {@link Response} */ @Headers("Content-Type: multipart/form-data") @RequestLine("PUT /domains/{domain}/tracking/unsubscribe") Response updateDomainUnsubscribeConnectionSettingsFeignResponse(@Param("domain") String domain, DomainUnsubscribeConnectionSettingsRequest request); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy