Class SmsMessage.Builder
- java.lang.Object
-
- pl.gsmservice.gateway.models.components.SmsMessage.Builder
-
- Enclosing class:
- SmsMessage
public static final class SmsMessage.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SmsMessagebuild()SmsMessage.Builderdate(java.time.OffsetDateTime date)Scheduled future date and time of sending the message (in ISO 8601 format).SmsMessage.Builderdate(org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date)Scheduled future date and time of sending the message (in ISO 8601 format).SmsMessage.Builderflash(boolean flash)Should the message to be sent with class 0 (FLASH)?SmsMessage.Builderflash(java.util.Optional<java.lang.Boolean> flash)Should the message to be sent with class 0 (FLASH)?SmsMessage.Buildermessage(java.lang.String message)SMS message contentSmsMessage.Builderrecipients(SmsMessageRecipients recipients)The recipient number or multiple recipients numbers of single message.SmsMessage.Buildersender(java.lang.String sender)SMS sender nameSmsMessage.Buildersender(java.util.Optional<java.lang.String> sender)SMS sender nameSmsMessage.Buildertype(java.util.Optional<? extends SmsType> type)SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)SmsMessage.Buildertype(SmsType type)SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)SmsMessage.Builderunicode(boolean unicode)Should the message be sent with special characters, e.g.SmsMessage.Builderunicode(java.util.Optional<java.lang.Boolean> unicode)Should the message be sent with special characters, e.g.
-
-
-
Method Detail
-
recipients
public SmsMessage.Builder recipients(SmsMessageRecipients recipients)
The recipient number or multiple recipients numbers of single message. To set one recipient, please useSmsMessageRecipients.of(String)method simply passing to it astringwith his phone number. To set multiple recipients, please useSmsMessageRecipients.ofArrayOfStrings(List.of(String,...))method passing to itList<string>. Optionally you can also set custom id (user identifier) for each message - useSmsMessageRecipients.of(PhoneNumberWithCid)method passingPhoneNumberWithCidobject (in case of single recipient) orSmsMessageRecipients.ofArrayOfPhoneNumberWithCids(Recipients.of(PhoneNumberWithCid,...))method passing List<PhoneNumberWithCid> (in case of multiple recipients).
-
message
public SmsMessage.Builder message(java.lang.String message)
SMS message content
-
sender
public SmsMessage.Builder sender(java.lang.String sender)
SMS sender name
-
sender
public SmsMessage.Builder sender(java.util.Optional<java.lang.String> sender)
SMS sender name
-
type
public SmsMessage.Builder type(SmsType type)
SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)
-
type
public SmsMessage.Builder type(java.util.Optional<? extends SmsType> type)
SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)
-
unicode
public SmsMessage.Builder unicode(boolean unicode)
Should the message be sent with special characters, e.g. Polish diacritics (if any)? If false, those characters will be automatically replaced with their equivalents. If true your message will be sent as unicode but the message will be able to consist of fewer characters.
-
unicode
public SmsMessage.Builder unicode(java.util.Optional<java.lang.Boolean> unicode)
Should the message be sent with special characters, e.g. Polish diacritics (if any)? If false, those characters will be automatically replaced with their equivalents. If true your message will be sent as unicode but the message will be able to consist of fewer characters.
-
flash
public SmsMessage.Builder flash(boolean flash)
Should the message to be sent with class 0 (FLASH)?
-
flash
public SmsMessage.Builder flash(java.util.Optional<java.lang.Boolean> flash)
Should the message to be sent with class 0 (FLASH)?
-
date
public SmsMessage.Builder date(java.time.OffsetDateTime date)
Scheduled future date and time of sending the message (in ISO 8601 format). If missing or null - message will be sent immediately
-
date
public SmsMessage.Builder date(org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date)
Scheduled future date and time of sending the message (in ISO 8601 format). If missing or null - message will be sent immediately
-
build
public SmsMessage build()
-
-