Class SmsMessage


  • public class SmsMessage
    extends java.lang.Object
    SmsMessage

    An object with a new SMS message properties

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SmsMessage.Builder  
    • Constructor Summary

      Constructors 
      Constructor Description
      SmsMessage​(SmsMessageRecipients recipients, java.lang.String message)  
      SmsMessage​(SmsMessageRecipients recipients, java.lang.String message, java.util.Optional<java.lang.String> sender, java.util.Optional<? extends SmsType> type, java.util.Optional<java.lang.Boolean> unicode, java.util.Optional<java.lang.Boolean> flash, org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static SmsMessage.Builder builder()  
      org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date()
      Scheduled future date and time of sending the message (in ISO 8601 format).
      boolean equals​(java.lang.Object o)  
      java.util.Optional<java.lang.Boolean> flash()
      Should the message to be sent with class 0 (FLASH)?
      int hashCode()  
      java.lang.String message()
      SMS message content
      SmsMessageRecipients recipients()
      The recipient number or multiple recipients numbers of single message.
      java.util.Optional<java.lang.String> sender()
      SMS sender name
      java.lang.String toString()  
      java.util.Optional<SmsType> type()
      SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)
      java.util.Optional<java.lang.Boolean> unicode()
      Should the message be sent with special characters, e.g.
      SmsMessage withDate​(java.time.OffsetDateTime date)
      Scheduled future date and time of sending the message (in ISO 8601 format).
      SmsMessage withDate​(org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date)
      Scheduled future date and time of sending the message (in ISO 8601 format).
      SmsMessage withFlash​(boolean flash)
      Should the message to be sent with class 0 (FLASH)?
      SmsMessage withFlash​(java.util.Optional<java.lang.Boolean> flash)
      Should the message to be sent with class 0 (FLASH)?
      SmsMessage withMessage​(java.lang.String message)
      SMS message content
      SmsMessage withRecipients​(SmsMessageRecipients recipients)
      The recipient number or multiple recipients numbers of single message.
      SmsMessage withSender​(java.lang.String sender)
      SMS sender name
      SmsMessage withSender​(java.util.Optional<java.lang.String> sender)
      SMS sender name
      SmsMessage withType​(java.util.Optional<? extends SmsType> type)
      SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)
      SmsMessage withType​(SmsType type)
      SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)
      SmsMessage withUnicode​(boolean unicode)
      Should the message be sent with special characters, e.g.
      SmsMessage withUnicode​(java.util.Optional<java.lang.Boolean> unicode)
      Should the message be sent with special characters, e.g.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SmsMessage

        public SmsMessage​(SmsMessageRecipients recipients,
                          java.lang.String message,
                          java.util.Optional<java.lang.String> sender,
                          java.util.Optional<? extends SmsType> type,
                          java.util.Optional<java.lang.Boolean> unicode,
                          java.util.Optional<java.lang.Boolean> flash,
                          org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date)
    • Method Detail

      • recipients

        public 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 java.lang.String message()
        SMS message content
      • sender

        public java.util.Optional<java.lang.String> sender()
        SMS sender name
      • type

        public java.util.Optional<SmsType> type()
        SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)
      • unicode

        public 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 java.util.Optional<java.lang.Boolean> flash()
        Should the message to be sent with class 0 (FLASH)?
      • date

        public 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
      • withRecipients

        public SmsMessage withRecipients​(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).
      • withMessage

        public SmsMessage withMessage​(java.lang.String message)
        SMS message content
      • withSender

        public SmsMessage withSender​(java.lang.String sender)
        SMS sender name
      • withSender

        public SmsMessage withSender​(java.util.Optional<java.lang.String> sender)
        SMS sender name
      • withType

        public SmsMessage withType​(SmsType type)
        SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)
      • withType

        public SmsMessage withType​(java.util.Optional<? extends SmsType> type)
        SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)
      • withUnicode

        public SmsMessage withUnicode​(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.
      • withUnicode

        public SmsMessage withUnicode​(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.
      • withFlash

        public SmsMessage withFlash​(boolean flash)
        Should the message to be sent with class 0 (FLASH)?
      • withFlash

        public SmsMessage withFlash​(java.util.Optional<java.lang.Boolean> flash)
        Should the message to be sent with class 0 (FLASH)?
      • withDate

        public SmsMessage withDate​(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
      • withDate

        public SmsMessage withDate​(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
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object