Package cz.quanti.mailq
Class MailQ
- java.lang.Object
-
- cz.quanti.mailq.MailQ
-
public class MailQ extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRecipientsToList(Long recipientsListId, List<RecipientsListEntryEntity> entries)Add multiple recipients to the list with validation of e-mail addresses.voidaddRecipientsToList(Long recipientsListId, List<RecipientsListEntryEntity> entries, Boolean validate)Add multiple recipients to the list.NewsletterEntitycreateNewsletter(NewsletterEntity newsletterEntity)Create newsletter This action will not automatically start newsletter.NotificationEntitycreateNotification(NotificationEntity notification)Create notification.RecipientsListEntitycreateRecipientsList(RecipientsListEntity recipientsList)Create recipients list.SmsNewsletterEntitycreateSmsNewsletter(SmsNewsletterEntity newsletterEntity)Create SMS newsletter.SmsNotificationEntitycreateSmsNotification(SmsNotificationEntity notification)Create SMS notificationvoiddeleteNewsletter(Long newsletterId)Delete newslettervoiddeleteNotification(Long notificationId)Delete notificationvoiddeleteRecipientFromList(Long recipientsListId, String email)Delete entry from recipients list.voiddeleteRecipientsList(Long recipientsListId)Delete recipients list.voiddeleteRecipientsList(Long recipientsListId, boolean complete)Delete recipients list.voiddeleteSmsNewsletter(Long newsletterId)Delete SMS newslettervoiddeleteSmsNotification(Long notificationId)Delete SMS notificationvoiddeleteUnsubscriber(Long recipientsListId, String email)Delete unsubscriber from recipients listvoiddeleteUnsubscriber(String email)Remove delete unsubscriberCampaignEntitygetCampaign(Long id)Get single campaignCampaignsEntitygetCampaigns()Get all campaignsCampaignsEntitygetCampaigns(Pagination pagination)Get all campaignsCompanyEntitygetCompany()Get single companyLogMessageEntitygetLogMessage(Long id)Get single log message from systemLogMessagesEntitygetLogMessages()Get all log messages from systemLogMessagesEntitygetLogMessages(Pagination pagination)Get all log messages from systemNewsletterEntitygetNewsletter(Long newsletterId)Get newsletterNewsletterEntitygetNewsletterByCode(String code)Get newsletter by user specific code.NewslettersEntitygetNewsletters()Get newsletters of companyNewslettersEntitygetNewsletters(Pagination pagination)Get newsletters of companyTagsEntitygetNewslettersTags()Get tags of all newslettersNotificationEntitygetNotification(Long notificationId)Get notificationNotificationDataEntitygetNotificationData(Long notificationId, String notificationDataId)Get notification dataNotificationsEntitygetNotifications()Get notificationsNotificationsEntitygetNotifications(Pagination pagination)Get notificationsNotificationsDataEntitygetNotificationsData(Long notificationId, String email)Get notifications data.NotificationsDataEntitygetNotificationsData(Long notificationId, String email, Pagination pagination)Get notifications data.RecipientsListEntriesEntitygetRecipientsFromList(Long recipientsListId)Get entries from recipients listRecipientsListEntriesEntitygetRecipientsFromList(Long recipientsListId, Pagination pagination)Get entries from recipients listRecipientsListEntitygetRecipientsList(Long recipientsListId)Get recipient listRecipientsListsEntitygetRecipientsLists(Pagination pagination)Get recipients listsRecipientsListsEntitygetRecipientsListsByEmail(String email, Pagination pagination)Get recipients lists by email address.SenderEmailEntitygetSenderEmail(Long id)Get sender e-mailSenderEmailsEntitygetSenderEmails()Get sender e-mails.SmsNewsletterEntitygetSmsNewsletter(Long newsletterId)Get SMS newsletterSmsNewslettersEntitygetSmsNewsletters()Get SMS newslettersSmsNewslettersEntitygetSmsNewsletters(Pagination pagination)Get SMS newslettersSmsNotificationEntitygetSmsNotification(Long notificationId)Get SMS notificationSmsNotificationDataEntitygetSmsNotificationData(Long notificationId, String notificationDataId)Get SMS notification data.SmsNotificationsEntitygetSmsNotifications(Pagination pagination)Get SMS notificationsUnsubscriberEntitygetUnsubscriber(Long recipientsListId, String email)Get unsubscriber from recipients listUnsubscribersEntitygetUnsubscriber(String email)Get single unsubscriber by email addressUnsubscribersEntitygetUnsubscribers(Long recipientsListId)Get unsubscribers from recipients listUnsubscribersEntitygetUnsubscribers(Long recipientsListId, Pagination pagination)Get unsubscribers from recipients listUnsubscribersEntitygetUnsubscribers(java.time.LocalDateTime from)Get all global unsubscribersUnsubscribersEntitygetUnsubscribers(java.time.LocalDateTime from, Pagination pagination)Get all global unsubscribersUserEntitygetUser(Long userId)Get userUsersEntitygetUsers()Get users in companyStringregenerateApiKey()Regenerate API keyNotificationDataEntitysendNotificationEmail(Long notificationId, NotificationDataEntity notificationData)Send notification e-mail.SmsBatchResultEntitysendSmsBatchNotification(Long notificationId, SmsNotificationBatchEntity notificationBatch)Send batch of SMS.SmsNotificationDataEntitysendSmsNotification(Long notificationId, SmsNotificationDataEntity notification)Send SMS notification.voidsendTestEmail(Long newsletterId, String email)Send test e-mail.voidsendTestSms(Long newsletterId, String number)Send test SMS.voidstartNewsletter(Long newsletterId)Start preparing of newsletter.voidstartSmsNewsletter(Long newsletterId)Start preparing of newsletter.voidstopNewsletter(Long newsletterId)Stop preparing of newsletter. it is allowed only if newsletter start is after now+1hour.voidstopSmsNewsletter(Long newsletterId)Stop preparing of newsletter. it is allowed only if newsletter start is after now+1hour.voidunsubscribe(Long recipientsListId, String... emails)Unsubscribe e-mail addresses from recipient listvoidunsubscribe(Long recipientsListId, Set<String> emails)Unsubscribe e-mail addresses from recipient listvoidunsubscribe(String... emails)Unsubscribe email addresses from all recipients lists.voidunsubscribe(Set<String> emails)Unsubscribe email addresses from all recipients lists.voidupdateNewsletter(NewsletterEntity newsletter)Update newsletter You can update newsletter only before you call startNewsletter.voidupdateNotification(NotificationEntity notification)Update notificationvoidupdatePreparedNewsletter(PreparedNewsletterEntity preparedNewsletter)Update prepared newsletter If newsletter started you can update only some newsletter data.voidupdateRecipientFromList(Long recipientsListId, RecipientsListEntryEntity recipientsListEntry)Update entry from recipients listvoidupdateRecipientFromList(Long recipientsListId, RecipientsListEntryEntity recipientsListEntry, Boolean validate)Update entry from recipients listvoidupdateSmsNewsletter(SmsNewsletterEntity newsletter)Update SMS newsletter.voidupdateSmsNotification(SmsNotificationEntity notification)Update SMS notificationvoidvalidate(String email)Validate e-mail address.voidvalidate(String email, int timeout)Validate e-mail address.
-
-
-
Method Detail
-
getCampaigns
public CampaignsEntity getCampaigns() throws ApiException, InvalidRequestException
Get all campaigns- Returns:
- CampaignEntity
- Throws:
ApiExceptionInvalidRequestException
-
getCampaigns
public CampaignsEntity getCampaigns(Pagination pagination) throws ApiException, InvalidRequestException
Get all campaigns- Parameters:
pagination-- Returns:
- CampaignEntity
- Throws:
ApiExceptionInvalidRequestException
-
getCampaign
public CampaignEntity getCampaign(Long id) throws ApiException, InvalidRequestException
Get single campaign- Parameters:
id-- Returns:
- CampaignEntity
- Throws:
ApiExceptionInvalidRequestException
-
getCompany
public CompanyEntity getCompany() throws ApiException, InvalidRequestException
Get single company- Returns:
- CompanyEntity
- Throws:
ApiExceptionInvalidRequestException
-
regenerateApiKey
public String regenerateApiKey() throws ApiException, InvalidRequestException
Regenerate API key- Returns:
- apiKey - new API key, you have to use new API key in next request
- Throws:
ApiExceptionInvalidRequestException
-
unsubscribe
public void unsubscribe(String... emails) throws InvalidRequestException, ApiException
Unsubscribe email addresses from all recipients lists. This is global unsubscribe. If you want to unsubscribe only from specific recipients list check unsubscribe method with recipients list ID parameter.- Parameters:
emails- - email addresses- Throws:
InvalidRequestExceptionApiException
-
unsubscribe
public void unsubscribe(Set<String> emails) throws InvalidRequestException, ApiException
Unsubscribe email addresses from all recipients lists. This is global unsubscribe. If you want to unsubscribe only from specific recipients list check unsubscribe method with recipients list ID parameter.- Parameters:
emails-- Throws:
InvalidRequestExceptionApiException
-
getUnsubscribers
public UnsubscribersEntity getUnsubscribers(java.time.LocalDateTime from) throws InvalidRequestException, ApiException
Get all global unsubscribers- Parameters:
from- - filter to unsubscriptions created after this datetime- Returns:
- UnsubscribersEntity
- Throws:
InvalidRequestExceptionApiException
-
getUnsubscribers
public UnsubscribersEntity getUnsubscribers(java.time.LocalDateTime from, Pagination pagination) throws InvalidRequestException, ApiException
Get all global unsubscribers- Parameters:
from- - filter to unsubscriptions created after this datetimepagination-- Returns:
- UnsubscribersEntity
- Throws:
InvalidRequestExceptionApiException
-
getUnsubscriber
public UnsubscribersEntity getUnsubscriber(String email) throws InvalidRequestException, ApiException
Get single unsubscriber by email address- Parameters:
email- - email address of unsubscriber- Returns:
- UnsubscribersEntity
- Throws:
InvalidRequestExceptionApiException
-
deleteUnsubscriber
public void deleteUnsubscriber(String email) throws InvalidRequestException, ApiException
Remove delete unsubscriber- Parameters:
email-- Throws:
InvalidRequestExceptionApiException
-
getLogMessages
public LogMessagesEntity getLogMessages() throws InvalidRequestException, ApiException
Get all log messages from system- Returns:
- LogMessagesEntity
- Throws:
InvalidRequestExceptionApiException
-
getLogMessages
public LogMessagesEntity getLogMessages(Pagination pagination) throws InvalidRequestException, ApiException
Get all log messages from system- Parameters:
pagination-- Returns:
- LogMessagesEntity
- Throws:
InvalidRequestExceptionApiException
-
getLogMessage
public LogMessageEntity getLogMessage(Long id) throws InvalidRequestException, ApiException
Get single log message from system- Parameters:
id- - id of log message- Returns:
- LogMessageEntity
- Throws:
InvalidRequestExceptionApiException
-
getNewsletters
public NewslettersEntity getNewsletters() throws InvalidRequestException, ApiException
Get newsletters of company- Returns:
- NewslettersEntity
- Throws:
InvalidRequestExceptionApiException
-
getNewsletters
public NewslettersEntity getNewsletters(Pagination pagination) throws InvalidRequestException, ApiException
Get newsletters of company- Parameters:
pagination-- Returns:
- NewslettersEntity
- Throws:
InvalidRequestExceptionApiException
-
createNewsletter
public NewsletterEntity createNewsletter(NewsletterEntity newsletterEntity) throws InvalidRequestException, ApiException
Create newsletter This action will not automatically start newsletter. You have to call startNewsletter to confirm you want to send all emails.- Parameters:
newsletterEntity-- Returns:
- NewsletterEntity
- Throws:
InvalidRequestExceptionApiException
-
getNewslettersTags
public TagsEntity getNewslettersTags() throws InvalidRequestException, ApiException
Get tags of all newsletters- Returns:
- TagsEntity
- Throws:
InvalidRequestExceptionApiException
-
getNewsletterByCode
public NewsletterEntity getNewsletterByCode(String code) throws InvalidRequestException, ApiException
Get newsletter by user specific code. Code is unique in company.- Parameters:
code-- Returns:
- NewsletterEntity
- Throws:
InvalidRequestExceptionApiException
-
getNewsletter
public NewsletterEntity getNewsletter(Long newsletterId) throws InvalidRequestException, ApiException
Get newsletter- Parameters:
newsletterId- - ID of newsletter- Returns:
- NewsletterEntity
- Throws:
InvalidRequestExceptionApiException
-
updateNewsletter
public void updateNewsletter(NewsletterEntity newsletter) throws InvalidRequestException, ApiException
Update newsletter You can update newsletter only before you call startNewsletter. If you already started newsletter you can stop it by stopNewsletter method.- Parameters:
newsletter-- Throws:
InvalidRequestExceptionApiException
-
updatePreparedNewsletter
public void updatePreparedNewsletter(PreparedNewsletterEntity preparedNewsletter) throws InvalidRequestException, ApiException
Update prepared newsletter If newsletter started you can update only some newsletter data.- Parameters:
preparedNewsletter-- Throws:
InvalidRequestExceptionApiException
-
deleteNewsletter
public void deleteNewsletter(Long newsletterId) throws InvalidRequestException, ApiException
Delete newsletter- Parameters:
newsletterId-- Throws:
InvalidRequestExceptionApiException
-
startNewsletter
public void startNewsletter(Long newsletterId) throws InvalidRequestException, ApiException
Start preparing of newsletter. If start of newsletter is not in range (past to now+1hour) newsletter can be stopped by stopNewsletter. Otherwise it cannot be stopped.- Parameters:
newsletterId-- Throws:
InvalidRequestExceptionApiException
-
stopNewsletter
public void stopNewsletter(Long newsletterId) throws InvalidRequestException, ApiException
Stop preparing of newsletter. it is allowed only if newsletter start is after now+1hour.- Parameters:
newsletterId-- Throws:
InvalidRequestExceptionApiException
-
sendTestEmail
public void sendTestEmail(Long newsletterId, String email) throws ApiException, InvalidRequestException
Send test e-mail. This will send e-mail with data from first row of recipients list.- Parameters:
newsletterId-email-- Throws:
ApiExceptionInvalidRequestException
-
getSmsNewsletters
public SmsNewslettersEntity getSmsNewsletters() throws InvalidRequestException, ApiException
Get SMS newsletters- Returns:
- SmsNewslettersEntity
- Throws:
InvalidRequestExceptionApiException
-
getSmsNewsletters
public SmsNewslettersEntity getSmsNewsletters(Pagination pagination) throws InvalidRequestException, ApiException
Get SMS newsletters- Parameters:
pagination-- Returns:
- SmsNewslettersEntity
- Throws:
InvalidRequestExceptionApiException
-
createSmsNewsletter
public SmsNewsletterEntity createSmsNewsletter(SmsNewsletterEntity newsletterEntity) throws InvalidRequestException, ApiException
Create SMS newsletter. This action will not automatically start newsletter. You have to call startSmsNewsletter to confirm you want to send all SMS.- Parameters:
newsletterEntity-- Returns:
- SmsNewsletterEntity
- Throws:
InvalidRequestExceptionApiException
-
getSmsNewsletter
public SmsNewsletterEntity getSmsNewsletter(Long newsletterId) throws InvalidRequestException, ApiException
Get SMS newsletter- Parameters:
newsletterId-- Returns:
- SmsNewsletterEntity
- Throws:
InvalidRequestExceptionApiException
-
updateSmsNewsletter
public void updateSmsNewsletter(SmsNewsletterEntity newsletter) throws ApiException, InvalidRequestException
Update SMS newsletter. You can update newsletter only before you call startSmsNewsletter. If you already started newsletter you can stop it by stopNewsletter method.- Parameters:
newsletter-- Throws:
ApiExceptionInvalidRequestException
-
deleteSmsNewsletter
public void deleteSmsNewsletter(Long newsletterId) throws ApiException, InvalidRequestException
Delete SMS newsletter- Parameters:
newsletterId-- Throws:
ApiExceptionInvalidRequestException
-
startSmsNewsletter
public void startSmsNewsletter(Long newsletterId) throws ApiException, InvalidRequestException
Start preparing of newsletter. If start of newsletter is not in range (past to now+1hour) newsletter can be stopped by stopSmsNewsletter. Otherwise it cannot be stopped.- Parameters:
newsletterId-- Throws:
ApiExceptionInvalidRequestException
-
stopSmsNewsletter
public void stopSmsNewsletter(Long newsletterId) throws ApiException, InvalidRequestException
Stop preparing of newsletter. it is allowed only if newsletter start is after now+1hour.- Parameters:
newsletterId-- Throws:
InvalidRequestExceptionApiException
-
sendTestSms
public void sendTestSms(Long newsletterId, String number) throws ApiException, InvalidRequestException
Send test SMS. This will sent normal SMS. It will be charged!- Parameters:
newsletterId-number-- Throws:
ApiExceptionInvalidRequestException
-
getNotifications
public NotificationsEntity getNotifications() throws ApiException, InvalidRequestException
Get notifications- Returns:
- NotificationsEntity
- Throws:
ApiExceptionInvalidRequestException
-
getNotifications
public NotificationsEntity getNotifications(Pagination pagination) throws ApiException, InvalidRequestException
Get notifications- Parameters:
pagination-- Returns:
- NotificationsEntity
- Throws:
ApiExceptionInvalidRequestException
-
createNotification
public NotificationEntity createNotification(NotificationEntity notification) throws ApiException, InvalidRequestException
Create notification. If you want to send notification check sendNotificationEmail method.- Parameters:
notification-- Returns:
- NotificationEntity
- Throws:
ApiExceptionInvalidRequestException
-
getNotification
public NotificationEntity getNotification(Long notificationId) throws ApiException, InvalidRequestException
Get notification- Parameters:
notificationId-- Returns:
- NotificationEntity
- Throws:
ApiExceptionInvalidRequestException
-
updateNotification
public void updateNotification(NotificationEntity notification) throws ApiException, InvalidRequestException
Update notification- Parameters:
notification-- Throws:
ApiExceptionInvalidRequestException
-
deleteNotification
public void deleteNotification(Long notificationId) throws ApiException, InvalidRequestException
Delete notification- Parameters:
notificationId-- Throws:
ApiExceptionInvalidRequestException
-
sendNotificationEmail
public NotificationDataEntity sendNotificationEmail(Long notificationId, NotificationDataEntity notificationData) throws ApiException, InvalidRequestException
Send notification e-mail. This will send e-mail using notification and data you provide. Template using mustache templating system.- Parameters:
notificationId-notificationData-- Returns:
- NotificationDataEntity
- Throws:
ApiExceptionInvalidRequestException
-
getNotificationsData
public NotificationsDataEntity getNotificationsData(Long notificationId, String email) throws ApiException, InvalidRequestException
Get notifications data. You can find all notifications send to specific e-mail address.- Parameters:
notificationId-email-- Returns:
- NotificationsDataEntity
- Throws:
ApiExceptionInvalidRequestException
-
getNotificationsData
public NotificationsDataEntity getNotificationsData(Long notificationId, String email, Pagination pagination) throws ApiException, InvalidRequestException
Get notifications data. You can find all notifications send to specific e-mail address.- Parameters:
notificationId-email-pagination-- Returns:
- NotificationsDataEntity
- Throws:
ApiExceptionInvalidRequestException
-
getNotificationData
public NotificationDataEntity getNotificationData(Long notificationId, String notificationDataId) throws ApiException, InvalidRequestException
Get notification data- Parameters:
notificationId-notificationDataId-- Returns:
- NotificationDataEntity
- Throws:
ApiExceptionInvalidRequestException
-
createSmsNotification
public SmsNotificationEntity createSmsNotification(SmsNotificationEntity notification) throws ApiException, InvalidRequestException
Create SMS notification- Parameters:
notification-- Returns:
- SmsNotificationEntity
- Throws:
ApiExceptionInvalidRequestException
-
getSmsNotifications
public SmsNotificationsEntity getSmsNotifications(Pagination pagination) throws ApiException, InvalidRequestException
Get SMS notifications- Parameters:
pagination-- Returns:
- SmsNotificationsEntity
- Throws:
ApiExceptionInvalidRequestException
-
getSmsNotification
public SmsNotificationEntity getSmsNotification(Long notificationId) throws ApiException, InvalidRequestException
Get SMS notification- Parameters:
notificationId-- Returns:
- SmsNotificationEntity
- Throws:
ApiExceptionInvalidRequestException
-
updateSmsNotification
public void updateSmsNotification(SmsNotificationEntity notification) throws ApiException, InvalidRequestException
Update SMS notification- Parameters:
notification-- Throws:
ApiExceptionInvalidRequestException
-
deleteSmsNotification
public void deleteSmsNotification(Long notificationId) throws ApiException, InvalidRequestException
Delete SMS notification- Parameters:
notificationId-- Throws:
ApiExceptionInvalidRequestException
-
sendSmsNotification
public SmsNotificationDataEntity sendSmsNotification(Long notificationId, SmsNotificationDataEntity notification) throws ApiException, InvalidRequestException
Send SMS notification. This will be charged!- Parameters:
notificationId-notification-- Returns:
- Throws:
ApiExceptionInvalidRequestException
-
sendSmsBatchNotification
public SmsBatchResultEntity sendSmsBatchNotification(Long notificationId, SmsNotificationBatchEntity notificationBatch) throws ApiException, InvalidRequestException
Send batch of SMS. Maximum batch size is 100. Always check response to find out status of every SMS in batch. This will be charged!- Parameters:
notificationId-notificationBatch-- Returns:
- SmsBatchResultEntity
- Throws:
ApiExceptionInvalidRequestException
-
getSmsNotificationData
public SmsNotificationDataEntity getSmsNotificationData(Long notificationId, String notificationDataId) throws ApiException, InvalidRequestException
Get SMS notification data.- Parameters:
notificationId-notificationDataId-- Returns:
- Throws:
ApiExceptionInvalidRequestException
-
getRecipientsLists
public RecipientsListsEntity getRecipientsLists(Pagination pagination) throws ApiException, InvalidRequestException
Get recipients lists- Parameters:
pagination-- Returns:
- RecipientsListsEntity
- Throws:
ApiExceptionInvalidRequestException
-
getRecipientsListsByEmail
public RecipientsListsEntity getRecipientsListsByEmail(String email, Pagination pagination) throws ApiException, InvalidRequestException
Get recipients lists by email address. This will filter all company recipients list to lists which contains specific e-mail address.- Parameters:
email-- Returns:
- RecipientsListsEntity
- Throws:
ApiExceptionInvalidRequestException
-
getRecipientsList
public RecipientsListEntity getRecipientsList(Long recipientsListId) throws ApiException, InvalidRequestException
Get recipient list- Parameters:
recipientsListId-- Returns:
- RecipientsListEntity
- Throws:
ApiExceptionInvalidRequestException
-
createRecipientsList
public RecipientsListEntity createRecipientsList(RecipientsListEntity recipientsList) throws ApiException, InvalidRequestException
Create recipients list. You can specify which variable will be used. It is possible only on creation.- Parameters:
recipientsList-- Returns:
- RecipientsListEntity
- Throws:
ApiExceptionInvalidRequestException
-
deleteRecipientsList
public void deleteRecipientsList(Long recipientsListId) throws ApiException, InvalidRequestException
Delete recipients list. List will be deleted only if it is empty. If you want to delete list with entries use same method with second parameter set to true - it wil; disable check.- Parameters:
recipientsListId-- Throws:
ApiExceptionInvalidRequestException
-
deleteRecipientsList
public void deleteRecipientsList(Long recipientsListId, boolean complete) throws ApiException, InvalidRequestException
Delete recipients list. List will be deleted only if it is empty. If you want to delete list with entries set second parameter to true - it wil; disable check.- Parameters:
recipientsListId-complete- - If it is set to true it will delete list even if they are entries in it.- Throws:
ApiExceptionInvalidRequestException
-
addRecipientsToList
public void addRecipientsToList(Long recipientsListId, List<RecipientsListEntryEntity> entries) throws ApiException, InvalidRequestException
Add multiple recipients to the list with validation of e-mail addresses.- Parameters:
recipientsListId-entries-- Throws:
ApiExceptionInvalidRequestException
-
addRecipientsToList
public void addRecipientsToList(Long recipientsListId, List<RecipientsListEntryEntity> entries, Boolean validate) throws ApiException, InvalidRequestException
Add multiple recipients to the list. If you do not want to validate e-mail addresses set third parameter to false.- Parameters:
recipientsListId-entries-validate- - If it is set to true email addresses will be validated.- Throws:
ApiExceptionInvalidRequestException
-
getRecipientsFromList
public RecipientsListEntriesEntity getRecipientsFromList(Long recipientsListId) throws ApiException, InvalidRequestException
Get entries from recipients list- Parameters:
recipientsListId-- Returns:
- RecipientsListEntriesEntity
- Throws:
ApiExceptionInvalidRequestException
-
getRecipientsFromList
public RecipientsListEntriesEntity getRecipientsFromList(Long recipientsListId, Pagination pagination) throws ApiException, InvalidRequestException
Get entries from recipients list- Parameters:
recipientsListId-pagination-- Returns:
- RecipientsListEntriesEntity
- Throws:
ApiExceptionInvalidRequestException
-
updateRecipientFromList
public void updateRecipientFromList(Long recipientsListId, RecipientsListEntryEntity recipientsListEntry) throws ApiException, InvalidRequestException
Update entry from recipients list- Parameters:
recipientsListId-recipientsListEntry-- Throws:
ApiExceptionInvalidRequestException
-
updateRecipientFromList
public void updateRecipientFromList(Long recipientsListId, RecipientsListEntryEntity recipientsListEntry, Boolean validate) throws ApiException, InvalidRequestException
Update entry from recipients list- Parameters:
recipientsListId-recipientsListEntry-- Throws:
ApiExceptionInvalidRequestException
-
deleteRecipientFromList
public void deleteRecipientFromList(Long recipientsListId, String email) throws ApiException, InvalidRequestException
Delete entry from recipients list. If you do not want to send newsletters to user from this recipient list, it is better to unsubscribe user rather then delete it.- Parameters:
recipientsListId-email-- Throws:
ApiExceptionInvalidRequestException
-
unsubscribe
public void unsubscribe(Long recipientsListId, Set<String> emails) throws ApiException, InvalidRequestException
Unsubscribe e-mail addresses from recipient list- Parameters:
recipientsListId-emails-- Throws:
ApiExceptionInvalidRequestException
-
unsubscribe
public void unsubscribe(Long recipientsListId, String... emails) throws InvalidRequestException, ApiException
Unsubscribe e-mail addresses from recipient list- Parameters:
recipientsListId-emails-- Throws:
InvalidRequestExceptionApiException
-
getUnsubscribers
public UnsubscribersEntity getUnsubscribers(Long recipientsListId) throws InvalidRequestException, ApiException
Get unsubscribers from recipients list- Parameters:
recipientsListId-- Returns:
- UnsubscribersEntity
- Throws:
InvalidRequestExceptionApiException
-
getUnsubscribers
public UnsubscribersEntity getUnsubscribers(Long recipientsListId, Pagination pagination) throws InvalidRequestException, ApiException
Get unsubscribers from recipients list- Parameters:
recipientsListId-pagination-- Returns:
- UnsubscribersEntity
- Throws:
InvalidRequestExceptionApiException
-
getUnsubscriber
public UnsubscriberEntity getUnsubscriber(Long recipientsListId, String email) throws InvalidRequestException, ApiException
Get unsubscriber from recipients list- Parameters:
recipientsListId-email-- Returns:
- Throws:
InvalidRequestExceptionApiException
-
deleteUnsubscriber
public void deleteUnsubscriber(Long recipientsListId, String email) throws InvalidRequestException, ApiException
Delete unsubscriber from recipients list- Parameters:
recipientsListId-email-- Throws:
InvalidRequestExceptionApiException
-
getSenderEmails
public SenderEmailsEntity getSenderEmails() throws InvalidRequestException, ApiException
Get sender e-mails. This is list of e-mail addresses you can use for sending e-mails. If you want to add another with same domain you can do it in administration GUI. If it is e-mail address with different domain then existing. You have to send request to support.- Returns:
- SenderEmailsEntity
- Throws:
InvalidRequestExceptionApiException
-
getSenderEmail
public SenderEmailEntity getSenderEmail(Long id) throws InvalidRequestException, ApiException
Get sender e-mail- Parameters:
id-- Returns:
- SenderEmailEntity
- Throws:
InvalidRequestExceptionApiException
-
getUsers
public UsersEntity getUsers() throws InvalidRequestException, ApiException
Get users in company- Returns:
- UsersEntity
- Throws:
InvalidRequestExceptionApiException
-
getUser
public UserEntity getUser(Long userId) throws InvalidRequestException, ApiException
Get user- Parameters:
userId-- Returns:
- UserEntity
- Throws:
InvalidRequestExceptionApiException
-
validate
public void validate(String email) throws InvalidRequestException, ApiException
Validate e-mail address. This validation also validate MX domain.- Parameters:
email-- Throws:
InvalidRequestExceptionApiException
-
validate
public void validate(String email, int timeout) throws InvalidRequestException, ApiException
Validate e-mail address. This validation also validate MX domain. Validation can take max specified timeout in milliseconds- Parameters:
email-- Throws:
InvalidRequestExceptionApiException
-
-