@@ -18,6 +18,26 @@ class TwilioSmsMessage extends TwilioMessage
1818
1919 public ?int $ validityPeriod = null ;
2020
21+ public ?int $ attempt = null ;
22+
23+ public ?string $ contentRetention = null ;
24+
25+ public ?string $ addressRetention = null ;
26+
27+ public ?bool $ smartEncoded = null ;
28+
29+ public ?array $ persistentAction = null ;
30+
31+ public ?string $ scheduleType = null ;
32+
33+ public ?string $ sendAt = null ;
34+
35+ public ?bool $ sendAsMms = null ;
36+
37+ public ?string $ contentVariables = null ;
38+
39+ public ?string $ riskCheck = null ;
40+
2141 /**
2242 * Get the from address of this message.
2343 */
@@ -111,4 +131,120 @@ public function validityPeriod(int $validityPeriodSeconds): self
111131
112132 return $ this ;
113133 }
134+
135+ /**
136+ * Total number of attempts made to send the message (including the current one).
137+ */
138+ public function attempt (int $ attempt ): self
139+ {
140+ $ this ->attempt = $ attempt ;
141+
142+ return $ this ;
143+ }
144+
145+ /**
146+ * Determines if the message content can be stored or redacted based on privacy settings
147+ * Possible values:
148+ * - retain
149+ * - discard
150+ */
151+ public function contentRetention (string $ contentRetention ): self
152+ {
153+ $ this ->contentRetention = $ contentRetention ;
154+
155+ return $ this ;
156+ }
157+
158+ /**
159+ * Determines if the address can be stored or obfuscated based on privacy settings
160+ * Possible values:
161+ * - retain
162+ * - obfuscate
163+ */
164+ public function addressRetention (string $ addressRetention ): self
165+ {
166+ $ this ->addressRetention = $ addressRetention ;
167+
168+ return $ this ;
169+ }
170+
171+ /**
172+ * Whether to detect Unicode characters that have a similar GSM-7 character and replace them
173+ */
174+ public function smartEncoded (bool $ smartEncoded ): self
175+ {
176+ $ this ->smartEncoded = $ smartEncoded ;
177+
178+ return $ this ;
179+ }
180+
181+ /**
182+ * Rich actions for non-SMS/MMS channels. Used for sending location in WhatsApp messages.
183+ * @param array<string> $persistentAction
184+ * @return $this
185+ */
186+ public function persistentAction (array $ persistentAction ): self
187+ {
188+ $ this ->persistentAction = $ persistentAction ;
189+
190+ return $ this ;
191+ }
192+
193+ /**
194+ * For Messaging Services only: Include this parameter with a value of fixed in conjunction with the send_time parameter in order to schedule a Message.
195+ * Possible values:
196+ * - fixed
197+ */
198+ public function scheduleType (string $ scheduleType ): self
199+ {
200+ $ this ->scheduleType = $ scheduleType ;
201+
202+ return $ this ;
203+ }
204+
205+ /**
206+ * The time that Twilio will send the message.
207+ * Must be in ISO 8601 format.
208+ */
209+ public function sendAt (string $ sendAt ): self
210+ {
211+ $ this ->sendAt = $ sendAt ;
212+
213+ return $ this ;
214+ }
215+
216+ /**
217+ * If set to true, Twilio delivers the message as a single MMS message, regardless of the presence of media.
218+ */
219+ public function sendAsMms (bool $ sendAsMms ): self
220+ {
221+ $ this ->sendAsMms = $ sendAsMms ;
222+
223+ return $ this ;
224+ }
225+
226+ /**
227+ * For Content Editor/API only: Key-value pairs of Template variables and their substitution values.
228+ * content_sid parameter must also be provided.
229+ * If values are not defined in the content_variables parameter, the Template's default placeholder values are used.
230+ */
231+ public function contentVariables (string $ contentVariables ): self
232+ {
233+ $ this ->contentVariables = $ contentVariables ;
234+
235+ return $ this ;
236+ }
237+
238+ /**
239+ * Include this parameter with a value of "disable" to skip any kind of risk check on the respective message request.
240+ * Possible values:
241+ * - enable (default)
242+ * - disable
243+ */
244+ public function riskCheck (string $ riskCheck ): self
245+ {
246+ $ this ->riskCheck = $ riskCheck ;
247+
248+ return $ this ;
249+ }
114250}
0 commit comments