public class MailQ extends Object
| Constructor and Description |
|---|
MailQ(String baseUrl,
Integer companyId,
String apiKey)
Create new MailQ object
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRecipientsToList(Long recipientsListId,
List<RecipientsListEntryEntity> entries)
Add multiple recipients to the list with validation of e-mail addresses.
|
void |
addRecipientsToList(Long recipientsListId,
List<RecipientsListEntryEntity> entries,
Boolean validate)
Add multiple recipients to the list.
|
NewsletterEntity |
createNewsletter(NewsletterEntity newsletterEntity)
Create newsletter
This action will not automatically start newsletter.
|
NotificationEntity |
createNotification(NotificationEntity notification)
Create notification.
|
RecipientsListEntity |
createRecipientsList(RecipientsListEntity recipientsList)
Create recipients list.
|
SmsNewsletterEntity |
createSmsNewsletter(SmsNewsletterEntity newsletterEntity)
Create SMS newsletter.
|
SmsNotificationEntity |
createSmsNotification(SmsNotificationEntity notification)
Create SMS notification
|
void |
deleteNewsletter(Long newsletterId)
Delete newsletter
|
void |
deleteNotification(Long notificationId)
Delete notification
|
void |
deleteRecipientFromList(Long recipientsListId,
String email)
Delete entry from recipients list.
|
void |
deleteRecipientsList(Long recipientsListId)
Delete recipients list.
|
void |
deleteRecipientsList(Long recipientsListId,
boolean complete)
Delete recipients list.
|
void |
deleteSmsNewsletter(Long newsletterId)
Delete SMS newsletter
|
void |
deleteSmsNotification(Long notificationId)
Delete SMS notification
|
void |
deleteUnsubscriber(Long recipientsListId,
String email)
Delete unsubscriber from recipients list
|
void |
deleteUnsubscriber(String email)
Remove delete unsubscriber
|
CampaignEntity |
getCampaign(Long id)
Get single campaign
|
CampaignsEntity |
getCampaigns()
Get all campaigns
|
CampaignsEntity |
getCampaigns(Pagination pagination)
Get all campaigns
|
CompanyEntity |
getCompany()
Get single company
|
LogMessageEntity |
getLogMessage(Long id)
Get single log message from system
|
LogMessagesEntity |
getLogMessages()
Get all log messages from system
|
LogMessagesEntity |
getLogMessages(Pagination pagination)
Get all log messages from system
|
NewsletterEntity |
getNewsletter(Long newsletterId)
Get newsletter
|
NewsletterEntity |
getNewsletterByCode(String code)
Get newsletter by user specific code.
|
NewslettersEntity |
getNewsletters()
Get newsletters of company
|
NewslettersEntity |
getNewsletters(Pagination pagination)
Get newsletters of company
|
TagsEntity |
getNewslettersTags()
Get tags of all newsletters
|
NotificationEntity |
getNotification(Long notificationId)
Get notification
|
NotificationDataEntity |
getNotificationData(Long notificationId,
String notificationDataId)
Get notification data
|
NotificationsEntity |
getNotifications()
Get notifications
|
NotificationsEntity |
getNotifications(Pagination pagination)
Get notifications
|
NotificationsDataEntity |
getNotificationsData(Long notificationId,
String email)
Get notifications data.
|
NotificationsDataEntity |
getNotificationsData(Long notificationId,
String email,
Pagination pagination)
Get notifications data.
|
RecipientsListEntriesEntity |
getRecipientsFromList(Long recipientsListId)
Get entries from recipients list
|
RecipientsListEntriesEntity |
getRecipientsFromList(Long recipientsListId,
Pagination pagination)
Get entries from recipients list
|
RecipientsListEntity |
getRecipientsList(Long recipientsListId)
Get recipient list
|
RecipientsListsEntity |
getRecipientsLists(Pagination pagination)
Get recipients lists
|
RecipientsListsEntity |
getRecipientsListsByEmail(String email,
Pagination pagination)
Get recipients lists by email address.
|
SenderEmailEntity |
getSenderEmail(Long id)
Get sender e-mail
|
SenderEmailsEntity |
getSenderEmails()
Get sender e-mails.
|
SmsNewsletterEntity |
getSmsNewsletter(Long newsletterId)
Get SMS newsletter
|
SmsNewslettersEntity |
getSmsNewsletters()
Get SMS newsletters
|
SmsNewslettersEntity |
getSmsNewsletters(Pagination pagination)
Get SMS newsletters
|
SmsNotificationEntity |
getSmsNotification(Long notificationId)
Get SMS notification
|
SmsNotificationDataEntity |
getSmsNotificationData(Long notificationId,
String notificationDataId)
Get SMS notification data.
|
SmsNotificationsEntity |
getSmsNotifications(Pagination pagination)
Get SMS notifications
|
UnsubscriberEntity |
getUnsubscriber(Long recipientsListId,
String email)
Get unsubscriber from recipients list
|
UnsubscribersEntity |
getUnsubscriber(String email)
Get single unsubscriber by email address
|
UnsubscribersEntity |
getUnsubscribers(java.time.LocalDateTime from)
Get all global unsubscribers
|
UnsubscribersEntity |
getUnsubscribers(java.time.LocalDateTime from,
Pagination pagination)
Get all global unsubscribers
|
UnsubscribersEntity |
getUnsubscribers(Long recipientsListId)
Get unsubscribers from recipients list
|
UnsubscribersEntity |
getUnsubscribers(Long recipientsListId,
Pagination pagination)
Get unsubscribers from recipients list
|
UserEntity |
getUser(Long userId)
Get user
|
UsersEntity |
getUsers()
Get users in company
|
String |
regenerateApiKey()
Regenerate API key
|
NotificationDataEntity |
sendNotificationEmail(Long notificationId,
NotificationDataEntity notificationData)
Send notification e-mail.
|
SmsBatchResultEntity |
sendSmsBatchNotification(Long notificationId,
SmsNotificationBatchEntity notificationBatch)
Send batch of SMS.
|
SmsNotificationDataEntity |
sendSmsNotification(Long notificationId,
SmsNotificationDataEntity notification)
Send SMS notification.
|
void |
sendTestEmail(Long newsletterId,
String email)
Send test e-mail.
|
void |
sendTestSms(Long newsletterId,
String number)
Send test SMS.
|
void |
startNewsletter(Long newsletterId)
Start preparing of newsletter.
|
void |
startSmsNewsletter(Long newsletterId)
Start preparing of newsletter.
|
void |
stopNewsletter(Long newsletterId)
Stop preparing of newsletter.
|
void |
stopSmsNewsletter(Long newsletterId)
Stop preparing of newsletter.
|
void |
unsubscribe(Long recipientsListId,
Set<String> emails)
Unsubscribe e-mail addresses from recipient list
|
void |
unsubscribe(Long recipientsListId,
String... emails)
Unsubscribe e-mail addresses from recipient list
|
void |
unsubscribe(Set<String> emails)
Unsubscribe email addresses from all recipients lists.
|
void |
unsubscribe(String... emails)
Unsubscribe email addresses from all recipients lists.
|
void |
updateNewsletter(NewsletterEntity newsletter)
Update newsletter
You can update newsletter only before you call startNewsletter.
|
void |
updateNotification(NotificationEntity notification)
Update notification
|
void |
updatePreparedNewsletter(PreparedNewsletterEntity preparedNewsletter)
Update prepared newsletter
If newsletter started you can update only some newsletter data.
|
void |
updateRecipientFromList(Long recipientsListId,
RecipientsListEntryEntity recipientsListEntry)
Update entry from recipients list
|
void |
updateRecipientFromList(Long recipientsListId,
RecipientsListEntryEntity recipientsListEntry,
Boolean validate)
Update entry from recipients list
|
void |
updateSmsNewsletter(SmsNewsletterEntity newsletter)
Update SMS newsletter.
|
void |
updateSmsNotification(SmsNotificationEntity notification)
Update SMS notification
|
void |
validate(String email)
Validate e-mail address.
|
public CampaignsEntity getCampaigns() throws ApiException, InvalidRequestException
ApiExceptionInvalidRequestExceptionpublic CampaignsEntity getCampaigns(Pagination pagination) throws ApiException, InvalidRequestException
pagination - ApiExceptionInvalidRequestExceptionpublic CampaignEntity getCampaign(Long id) throws ApiException, InvalidRequestException
id - ApiExceptionInvalidRequestExceptionpublic CompanyEntity getCompany() throws ApiException, InvalidRequestException
ApiExceptionInvalidRequestExceptionpublic String regenerateApiKey() throws ApiException, InvalidRequestException
ApiExceptionInvalidRequestExceptionpublic void unsubscribe(String... emails) throws InvalidRequestException, ApiException
emails - - email addressesInvalidRequestExceptionApiExceptionpublic void unsubscribe(Set<String> emails) throws InvalidRequestException, ApiException
emails - InvalidRequestExceptionApiExceptionpublic UnsubscribersEntity getUnsubscribers(java.time.LocalDateTime from) throws InvalidRequestException, ApiException
from - - filter to unsubscriptions created after this datetimeInvalidRequestExceptionApiExceptionpublic UnsubscribersEntity getUnsubscribers(java.time.LocalDateTime from, Pagination pagination) throws InvalidRequestException, ApiException
from - - filter to unsubscriptions created after this datetimepagination - InvalidRequestExceptionApiExceptionpublic UnsubscribersEntity getUnsubscriber(String email) throws InvalidRequestException, ApiException
email - - email address of unsubscriberInvalidRequestExceptionApiExceptionpublic void deleteUnsubscriber(String email) throws InvalidRequestException, ApiException
email - InvalidRequestExceptionApiExceptionpublic LogMessagesEntity getLogMessages() throws InvalidRequestException, ApiException
InvalidRequestExceptionApiExceptionpublic LogMessagesEntity getLogMessages(Pagination pagination) throws InvalidRequestException, ApiException
pagination - InvalidRequestExceptionApiExceptionpublic LogMessageEntity getLogMessage(Long id) throws InvalidRequestException, ApiException
id - - id of log messageInvalidRequestExceptionApiExceptionpublic NewslettersEntity getNewsletters() throws InvalidRequestException, ApiException
InvalidRequestExceptionApiExceptionpublic NewslettersEntity getNewsletters(Pagination pagination) throws InvalidRequestException, ApiException
pagination - InvalidRequestExceptionApiExceptionpublic NewsletterEntity createNewsletter(NewsletterEntity newsletterEntity) throws InvalidRequestException, ApiException
newsletterEntity - InvalidRequestExceptionApiExceptionpublic TagsEntity getNewslettersTags() throws InvalidRequestException, ApiException
InvalidRequestExceptionApiExceptionpublic NewsletterEntity getNewsletterByCode(String code) throws InvalidRequestException, ApiException
code - InvalidRequestExceptionApiExceptionpublic NewsletterEntity getNewsletter(Long newsletterId) throws InvalidRequestException, ApiException
newsletterId - - ID of newsletterInvalidRequestExceptionApiExceptionpublic void updateNewsletter(NewsletterEntity newsletter) throws InvalidRequestException, ApiException
newsletter - InvalidRequestExceptionApiExceptionpublic void updatePreparedNewsletter(PreparedNewsletterEntity preparedNewsletter) throws InvalidRequestException, ApiException
preparedNewsletter - InvalidRequestExceptionApiExceptionpublic void deleteNewsletter(Long newsletterId) throws InvalidRequestException, ApiException
newsletterId - InvalidRequestExceptionApiExceptionpublic void startNewsletter(Long newsletterId) throws InvalidRequestException, ApiException
newsletterId - InvalidRequestExceptionApiExceptionpublic void stopNewsletter(Long newsletterId) throws InvalidRequestException, ApiException
newsletterId - InvalidRequestExceptionApiExceptionpublic void sendTestEmail(Long newsletterId, String email) throws ApiException, InvalidRequestException
newsletterId - email - ApiExceptionInvalidRequestExceptionpublic SmsNewslettersEntity getSmsNewsletters() throws InvalidRequestException, ApiException
InvalidRequestExceptionApiExceptionpublic SmsNewslettersEntity getSmsNewsletters(Pagination pagination) throws InvalidRequestException, ApiException
pagination - InvalidRequestExceptionApiExceptionpublic SmsNewsletterEntity createSmsNewsletter(SmsNewsletterEntity newsletterEntity) throws InvalidRequestException, ApiException
newsletterEntity - InvalidRequestExceptionApiExceptionpublic SmsNewsletterEntity getSmsNewsletter(Long newsletterId) throws InvalidRequestException, ApiException
newsletterId - InvalidRequestExceptionApiExceptionpublic void updateSmsNewsletter(SmsNewsletterEntity newsletter) throws ApiException, InvalidRequestException
newsletter - ApiExceptionInvalidRequestExceptionpublic void deleteSmsNewsletter(Long newsletterId) throws ApiException, InvalidRequestException
newsletterId - ApiExceptionInvalidRequestExceptionpublic void startSmsNewsletter(Long newsletterId) throws ApiException, InvalidRequestException
newsletterId - ApiExceptionInvalidRequestExceptionpublic void stopSmsNewsletter(Long newsletterId) throws ApiException, InvalidRequestException
newsletterId - InvalidRequestExceptionApiExceptionpublic void sendTestSms(Long newsletterId, String number) throws ApiException, InvalidRequestException
newsletterId - number - ApiExceptionInvalidRequestExceptionpublic NotificationsEntity getNotifications() throws ApiException, InvalidRequestException
ApiExceptionInvalidRequestExceptionpublic NotificationsEntity getNotifications(Pagination pagination) throws ApiException, InvalidRequestException
pagination - ApiExceptionInvalidRequestExceptionpublic NotificationEntity createNotification(NotificationEntity notification) throws ApiException, InvalidRequestException
notification - ApiExceptionInvalidRequestExceptionpublic NotificationEntity getNotification(Long notificationId) throws ApiException, InvalidRequestException
notificationId - ApiExceptionInvalidRequestExceptionpublic void updateNotification(NotificationEntity notification) throws ApiException, InvalidRequestException
notification - ApiExceptionInvalidRequestExceptionpublic void deleteNotification(Long notificationId) throws ApiException, InvalidRequestException
notificationId - ApiExceptionInvalidRequestExceptionpublic NotificationDataEntity sendNotificationEmail(Long notificationId, NotificationDataEntity notificationData) throws ApiException, InvalidRequestException
notificationId - notificationData - ApiExceptionInvalidRequestExceptionpublic NotificationsDataEntity getNotificationsData(Long notificationId, String email) throws ApiException, InvalidRequestException
notificationId - email - ApiExceptionInvalidRequestExceptionpublic NotificationsDataEntity getNotificationsData(Long notificationId, String email, Pagination pagination) throws ApiException, InvalidRequestException
notificationId - email - pagination - ApiExceptionInvalidRequestExceptionpublic NotificationDataEntity getNotificationData(Long notificationId, String notificationDataId) throws ApiException, InvalidRequestException
notificationId - notificationDataId - ApiExceptionInvalidRequestExceptionpublic SmsNotificationEntity createSmsNotification(SmsNotificationEntity notification) throws ApiException, InvalidRequestException
notification - ApiExceptionInvalidRequestExceptionpublic SmsNotificationsEntity getSmsNotifications(Pagination pagination) throws ApiException, InvalidRequestException
pagination - ApiExceptionInvalidRequestExceptionpublic SmsNotificationEntity getSmsNotification(Long notificationId) throws ApiException, InvalidRequestException
notificationId - ApiExceptionInvalidRequestExceptionpublic void updateSmsNotification(SmsNotificationEntity notification) throws ApiException, InvalidRequestException
notification - ApiExceptionInvalidRequestExceptionpublic void deleteSmsNotification(Long notificationId) throws ApiException, InvalidRequestException
notificationId - ApiExceptionInvalidRequestExceptionpublic SmsNotificationDataEntity sendSmsNotification(Long notificationId, SmsNotificationDataEntity notification) throws ApiException, InvalidRequestException
notificationId - notification - ApiExceptionInvalidRequestExceptionpublic SmsBatchResultEntity sendSmsBatchNotification(Long notificationId, SmsNotificationBatchEntity notificationBatch) throws ApiException, InvalidRequestException
notificationId - notificationBatch - ApiExceptionInvalidRequestExceptionpublic SmsNotificationDataEntity getSmsNotificationData(Long notificationId, String notificationDataId) throws ApiException, InvalidRequestException
notificationId - notificationDataId - ApiExceptionInvalidRequestExceptionpublic RecipientsListsEntity getRecipientsLists(Pagination pagination) throws ApiException, InvalidRequestException
pagination - ApiExceptionInvalidRequestExceptionpublic RecipientsListsEntity getRecipientsListsByEmail(String email, Pagination pagination) throws ApiException, InvalidRequestException
email - ApiExceptionInvalidRequestExceptionpublic RecipientsListEntity getRecipientsList(Long recipientsListId) throws ApiException, InvalidRequestException
recipientsListId - ApiExceptionInvalidRequestExceptionpublic RecipientsListEntity createRecipientsList(RecipientsListEntity recipientsList) throws ApiException, InvalidRequestException
recipientsList - ApiExceptionInvalidRequestExceptionpublic void deleteRecipientsList(Long recipientsListId) throws ApiException, InvalidRequestException
recipientsListId - ApiExceptionInvalidRequestExceptionpublic void deleteRecipientsList(Long recipientsListId, boolean complete) throws ApiException, InvalidRequestException
recipientsListId - complete - - If it is set to true it will delete list even if they are entries in it.ApiExceptionInvalidRequestExceptionpublic void addRecipientsToList(Long recipientsListId, List<RecipientsListEntryEntity> entries) throws ApiException, InvalidRequestException
recipientsListId - entries - ApiExceptionInvalidRequestExceptionpublic void addRecipientsToList(Long recipientsListId, List<RecipientsListEntryEntity> entries, Boolean validate) throws ApiException, InvalidRequestException
recipientsListId - entries - validate - - If it is set to true email addresses will be validated.ApiExceptionInvalidRequestExceptionpublic RecipientsListEntriesEntity getRecipientsFromList(Long recipientsListId) throws ApiException, InvalidRequestException
recipientsListId - ApiExceptionInvalidRequestExceptionpublic RecipientsListEntriesEntity getRecipientsFromList(Long recipientsListId, Pagination pagination) throws ApiException, InvalidRequestException
recipientsListId - pagination - ApiExceptionInvalidRequestExceptionpublic void updateRecipientFromList(Long recipientsListId, RecipientsListEntryEntity recipientsListEntry) throws ApiException, InvalidRequestException
recipientsListId - recipientsListEntry - ApiExceptionInvalidRequestExceptionpublic void updateRecipientFromList(Long recipientsListId, RecipientsListEntryEntity recipientsListEntry, Boolean validate) throws ApiException, InvalidRequestException
recipientsListId - recipientsListEntry - ApiExceptionInvalidRequestExceptionpublic void deleteRecipientFromList(Long recipientsListId, String email) throws ApiException, InvalidRequestException
recipientsListId - email - ApiExceptionInvalidRequestExceptionpublic void unsubscribe(Long recipientsListId, Set<String> emails) throws ApiException, InvalidRequestException
recipientsListId - emails - ApiExceptionInvalidRequestExceptionpublic void unsubscribe(Long recipientsListId, String... emails) throws InvalidRequestException, ApiException
recipientsListId - emails - InvalidRequestExceptionApiExceptionpublic UnsubscribersEntity getUnsubscribers(Long recipientsListId) throws InvalidRequestException, ApiException
recipientsListId - InvalidRequestExceptionApiExceptionpublic UnsubscribersEntity getUnsubscribers(Long recipientsListId, Pagination pagination) throws InvalidRequestException, ApiException
recipientsListId - pagination - InvalidRequestExceptionApiExceptionpublic UnsubscriberEntity getUnsubscriber(Long recipientsListId, String email) throws InvalidRequestException, ApiException
recipientsListId - email - InvalidRequestExceptionApiExceptionpublic void deleteUnsubscriber(Long recipientsListId, String email) throws InvalidRequestException, ApiException
recipientsListId - email - InvalidRequestExceptionApiExceptionpublic SenderEmailsEntity getSenderEmails() throws InvalidRequestException, ApiException
InvalidRequestExceptionApiExceptionpublic SenderEmailEntity getSenderEmail(Long id) throws InvalidRequestException, ApiException
id - InvalidRequestExceptionApiExceptionpublic UsersEntity getUsers() throws InvalidRequestException, ApiException
InvalidRequestExceptionApiExceptionpublic UserEntity getUser(Long userId) throws InvalidRequestException, ApiException
userId - InvalidRequestExceptionApiExceptionpublic void validate(String email) throws InvalidRequestException, ApiException
email - InvalidRequestExceptionApiExceptionCopyright © 2018. All rights reserved.