Class Sms
- java.lang.Object
-
- pl.gsmservice.gateway.models.components.Sms
-
public class Sms extends java.lang.ObjectSms - An object with a new SMS message properties
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSms.Builder
-
Constructor Summary
Constructors Constructor Description Sms(Recipients recipients, java.lang.String message)Sms(Recipients 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 Sms.Builderbuilder()org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime>date()Scheduled future date and time of sending the message (in ISO 8601 format).booleanequals(java.lang.Object o)java.util.Optional<java.lang.Boolean>flash()Should the message to be sent with class 0 (FLASH)?inthashCode()java.lang.Stringmessage()SMS message contentRecipientsrecipients()The recipient number or multiple recipients numbers of single message.java.util.Optional<java.lang.String>sender()SMS sender namejava.lang.StringtoString()java.util.Optional<SmsType>type()SMS type according to the table |type|Description| |----|-----------| | 1 | SMS PRO | | 3 | SMS ECO | | 4 | SMS 2WAY |java.util.Optional<java.lang.Boolean>unicode()Should the message be sent with special characters, e.g.SmswithDate(java.time.OffsetDateTime date)Scheduled future date and time of sending the message (in ISO 8601 format).SmswithDate(org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date)Scheduled future date and time of sending the message (in ISO 8601 format).SmswithFlash(boolean flash)Should the message to be sent with class 0 (FLASH)?SmswithFlash(java.util.Optional<java.lang.Boolean> flash)Should the message to be sent with class 0 (FLASH)?SmswithMessage(java.lang.String message)SMS message contentSmswithRecipients(Recipients recipients)The recipient number or multiple recipients numbers of single message.SmswithSender(java.lang.String sender)SMS sender nameSmswithSender(java.util.Optional<java.lang.String> sender)SMS sender nameSmswithType(java.util.Optional<? extends SmsType> type)SMS type according to the table |type|Description| |----|-----------| | 1 | SMS PRO | | 3 | SMS ECO | | 4 | SMS 2WAY |SmswithType(SmsType type)SMS type according to the table |type|Description| |----|-----------| | 1 | SMS PRO | | 3 | SMS ECO | | 4 | SMS 2WAY |SmswithUnicode(boolean unicode)Should the message be sent with special characters, e.g.SmswithUnicode(java.util.Optional<java.lang.Boolean> unicode)Should the message be sent with special characters, e.g.
-
-
-
Constructor Detail
-
Sms
public Sms(Recipients 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)
-
Sms
public Sms(Recipients recipients, java.lang.String message)
-
-
Method Detail
-
recipients
public Recipients recipients()
The recipient number or multiple recipients numbers of single message. To set one recipient, simply pass here a `string` with his phone number. To set multiple recipients, pass here a simple `array` of `string`. Optionally you can also set custom id (user identifier) for each message - pass `PhoneNumberWithCid` object (in case of single recipient) or `Array` of `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 according to the table |type|Description| |----|-----------| | 1 | SMS PRO | | 3 | SMS ECO | | 4 | 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
-
builder
public static final Sms.Builder builder()
-
withRecipients
public Sms withRecipients(Recipients recipients)
The recipient number or multiple recipients numbers of single message. To set one recipient, simply pass here a `string` with his phone number. To set multiple recipients, pass here a simple `array` of `string`. Optionally you can also set custom id (user identifier) for each message - pass `PhoneNumberWithCid` object (in case of single recipient) or `Array` of `PhoneNumberWithCid` (in case of multiple recipients).
-
withMessage
public Sms withMessage(java.lang.String message)
SMS message content
-
withSender
public Sms withSender(java.lang.String sender)
SMS sender name
-
withSender
public Sms withSender(java.util.Optional<java.lang.String> sender)
SMS sender name
-
withType
public Sms withType(SmsType type)
SMS type according to the table |type|Description| |----|-----------| | 1 | SMS PRO | | 3 | SMS ECO | | 4 | SMS 2WAY |
-
withType
public Sms withType(java.util.Optional<? extends SmsType> type)
SMS type according to the table |type|Description| |----|-----------| | 1 | SMS PRO | | 3 | SMS ECO | | 4 | SMS 2WAY |
-
withUnicode
public Sms 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 Sms 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 Sms withFlash(boolean flash)
Should the message to be sent with class 0 (FLASH)?
-
withFlash
public Sms withFlash(java.util.Optional<java.lang.Boolean> flash)
Should the message to be sent with class 0 (FLASH)?
-
withDate
public Sms 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 Sms 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-