Package software.xdev.brevo.api
Class SendersApi
java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.SendersApi
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSender(CreateSender sender) Create a new sendercreateSender(CreateSender sender, Map<String, String> additionalHeaders) Create a new sendervoiddeleteSender(Long senderId) Delete a sendervoiddeleteSender(Long senderId, Map<String, String> additionalHeaders) Delete a sendergetIps()Get all the dedicated IPs for your accountGet all the dedicated IPs for your accountgetIpsFromSender(Long senderId) Get all the dedicated IPs for a sendergetIpsFromSender(Long senderId, Map<String, String> additionalHeaders) Get all the dedicated IPs for a sendergetSenders(String ip, String domain) Get the list of all your sendersGet the list of all your senders<T> TinvokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) Directly invoke the API for the given URL.voidupdateSender(Long senderId, UpdateSender sender) Update a sendervoidupdateSender(Long senderId, UpdateSender sender, Map<String, String> additionalHeaders) Update a sendervoidvalidateSenderByOTP(Long senderId, Otp sender) Validate Sender using OTPvoidValidate Sender using OTPMethods inherited from class software.xdev.brevo.client.BaseApi
getApiClient, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, setApiClient
-
Constructor Details
-
SendersApi
public SendersApi() -
SendersApi
-
-
Method Details
-
createSender
Create a new sender- Parameters:
sender- sender's name (optional)- Returns:
- CreateSenderModel
- Throws:
ApiException- if fails to make API call
-
createSender
public CreateSenderModel createSender(@Nullable CreateSender sender, Map<String, String> additionalHeaders) throws ApiExceptionCreate a new sender- Parameters:
sender- sender's name (optional)additionalHeaders- additionalHeaders for this call- Returns:
- CreateSenderModel
- Throws:
ApiException- if fails to make API call
-
deleteSender
Delete a sender- Parameters:
senderId- Id of the sender (required)- Throws:
ApiException- if fails to make API call
-
deleteSender
public void deleteSender(@Nonnull Long senderId, Map<String, String> additionalHeaders) throws ApiExceptionDelete a sender- Parameters:
senderId- Id of the sender (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
getIps
Get all the dedicated IPs for your account- Returns:
- GetIps
- Throws:
ApiException- if fails to make API call
-
getIps
Get all the dedicated IPs for your account- Parameters:
additionalHeaders- additionalHeaders for this call- Returns:
- GetIps
- Throws:
ApiException- if fails to make API call
-
getIpsFromSender
Get all the dedicated IPs for a sender- Parameters:
senderId- Id of the sender (required)- Returns:
- GetIpsFromSender
- Throws:
ApiException- if fails to make API call
-
getIpsFromSender
public GetIpsFromSender getIpsFromSender(@Nonnull Long senderId, Map<String, String> additionalHeaders) throws ApiExceptionGet all the dedicated IPs for a sender- Parameters:
senderId- Id of the sender (required)additionalHeaders- additionalHeaders for this call- Returns:
- GetIpsFromSender
- Throws:
ApiException- if fails to make API call
-
getSenders
Get the list of all your senders- Parameters:
ip- Filter your senders for a specific ip. **Available for dedicated IP usage only** (optional)domain- Filter your senders for a specific domain (optional)- Returns:
- GetSendersList
- Throws:
ApiException- if fails to make API call
-
getSenders
public GetSendersList getSenders(@Nullable String ip, @Nullable String domain, Map<String, String> additionalHeaders) throws ApiExceptionGet the list of all your senders- Parameters:
ip- Filter your senders for a specific ip. **Available for dedicated IP usage only** (optional)domain- Filter your senders for a specific domain (optional)additionalHeaders- additionalHeaders for this call- Returns:
- GetSendersList
- Throws:
ApiException- if fails to make API call
-
updateSender
Update a sender- Parameters:
senderId- Id of the sender (required)sender- sender's name (optional)- Throws:
ApiException- if fails to make API call
-
updateSender
public void updateSender(@Nonnull Long senderId, @Nullable UpdateSender sender, Map<String, String> additionalHeaders) throws ApiExceptionUpdate a sender- Parameters:
senderId- Id of the sender (required)sender- sender's name (optional)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
validateSenderByOTP
Validate Sender using OTP- Parameters:
senderId- Id of the sender (required)sender- otp (optional)- Throws:
ApiException- if fails to make API call
-
validateSenderByOTP
public void validateSenderByOTP(@Nonnull Long senderId, @Nullable Otp sender, Map<String, String> additionalHeaders) throws ApiExceptionValidate Sender using OTP- Parameters:
senderId- Id of the sender (required)sender- otp (optional)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
invokeAPI
public <T> T invokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) throws ApiExceptionDescription copied from class:BaseApiDirectly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.- Specified by:
invokeAPIin classBaseApi- Parameters:
url- The URL for the request, either full URL or only the path.method- The HTTP method for the request.request- The request object.returnType- The return type.additionalHeaders- Additional headers for the request.- Returns:
- The API response in the specified type.
- Throws:
ApiException- if fails to make API call.
-