Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 1.27 KB

sms-newsletter.md

File metadata and controls

63 lines (47 loc) · 1.27 KB

SMS newsletter resources

Get SMS newsletters

for (SmsNewsletterEntity smsNewsletter : mailQ.getSmsNewsletters(Pagination.DEFAULT)) {
    System.out.println(smsNewsletter.getName());
}

Get SMS newsletter

SmsNewsletterEntity smsNewsletter = mailQ.getSmsNewsletter(1L);
System.out.println(smsNewsletter.getName());

Create SMS newsletter

SmsNewsletterEntity smsNewsletter = new SmsNewsletterEntity();
smsNewsletter
        .setCampaign("Winter sales")
        .setName("SMS news")
        .setText("Winter sales are coming. Your discount code is {{code}}")
        .setRecipientsListId(320L)
        .setFrom(LocalDateTime.now().plusHours(2))
        .setTo(LocalDateTime.now().plusDays(1));
smsNewsletter = mailQ.createSmsNewsletter(smsNewsletter);
System.out.println(smsNewsletter.getId());

Update SMS newsletter

SmsNewsletterEntity smsNewsletter = mailQ.getSmsNewsletter(1L);
System.out.println(smsNewsletter.getName());

Delete SMS newsletter

mailQ.deleteSmsNewsletter(1L);

Start SMS newsletter

mailQ.startSmsNewsletter(1L);

Stop SMS newsletter

mailQ.stopSmsNewsletter(1L);

Send test SMS

This SMS will be charged!

mailQ.sendTestSms(1L,"+420600700700");