Class SmsMessageRecipients


  • public class SmsMessageRecipients
    extends java.lang.Object
    SmsMessageRecipients

    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).

    • Method Detail

      • ofArrayOfStrings

        public static SmsMessageRecipients ofArrayOfStrings​(java.util.List<java.lang.String> value)
      • value

        public java.lang.Object value()
        Returns an instance of one of these types:
        • java.lang.String
        • java.util.List<java.lang.String>
        • pl.gsmservice.gateway.models.components.PhoneNumberWithCid
        • java.util.List<pl.gsmservice.gateway.models.components.PhoneNumberWithCid>

        Use instanceof to determine what type is returned. For example:

         if (obj.value() instanceof String) {
             String answer = (String) obj.value();
             System.out.println("answer=" + answer);
         }
         
        Returns:
        value of oneOf type
      • 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