Class SmsMessage.Builder

  • Enclosing class:
    SmsMessage

    public static final class SmsMessage.Builder
    extends java.lang.Object
    • Method Detail

      • recipients

        public SmsMessage.Builder recipients​(SmsMessageRecipients recipients)
        The recipient number or multiple recipients numbers of single message. To set one recipient, please use SmsMessageRecipients.of(String) method simply passing to it a string with his phone number. To set multiple recipients, please use SmsMessageRecipients.ofArrayOfStrings(List.of(String,...)) method passing to it List<string>. Optionally you can also set custom id (user identifier) for each message - use SmsMessageRecipients.of(PhoneNumberWithCid) method passing PhoneNumberWithCid object (in case of single recipient) or SmsMessageRecipients.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.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