File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,40 @@ where:
1414 - ` TOKEN ` is your MessageBird token
1515 - ` FROM ` is your sender
1616
17+ Adding Options to a Message
18+ ---------------------------
19+
20+ With a MessageBird Message, you can use the ` MessageBirdOptions ` class to add
21+ [ message options] ( https://developers.messagebird.com/api/sms-messaging/#send-outbound-sms ) .
22+
23+ ``` php
24+ use Symfony\Component\Notifier\Message\SmsMessage;
25+ use Symfony\Component\Notifier\Bridge\MessageBird\MessageBirdOptions;
26+
27+ $sms = new SmsMessage('+1411111111', 'My message');
28+
29+ $options = (new MessageBirdOptions())
30+ ->type('test_type')
31+ ->scheduledDatetime('test_scheduled_datetime')
32+ ->createdDatetime('test_created_datetime')
33+ ->dataCoding('test_data_coding')
34+ ->gateway(999)
35+ ->groupIds(['test_group_ids'])
36+ ->mClass(888)
37+ ->reference('test_reference')
38+ ->reportUrl('test_report_url')
39+ ->shortenUrls(true)
40+ ->typeDetails('test_type_details')
41+ ->validity(777)
42+ // ...
43+ ;
44+
45+ // Add the custom options to the sms message and send the message
46+ $sms->options($options);
47+
48+ $texter->send($sms);
49+ ```
50+
1751Resources
1852---------
1953
You can’t perform that action at this time.
0 commit comments