File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
src/Symfony/Component/Notifier/Bridge/Bandwidth Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,34 @@ where:
19
19
- ` APPLICATION_ID ` is your application ID
20
20
- ` PRIORITY ` is your priority (optional)
21
21
22
+ Adding Options to a Message
23
+ ---------------------------
24
+
25
+ With a Bandwidth Message, you can use the ` BandwidthOptions ` class to add
26
+ [ message options] ( https://dev.bandwidth.com/apis/messaging/#tag/Messages/operation/createMessage ) .
27
+
28
+ ``` php
29
+ use Symfony\Component\Notifier\Message\SmsMessage;
30
+ use Symfony\Component\Notifier\Bridge\Bandwidth\BandwidthOptions;
31
+
32
+ $sms = new SmsMessage('+1411111111', 'My message');
33
+
34
+ $options = (new BandwidthOptions())
35
+ ->media(['foo'])
36
+ ->tag('tag')
37
+ ->accountId('account_id')
38
+ ->applicationId('application_id')
39
+ ->expiration('test_expiration')
40
+ ->priority('default')
41
+ // ...
42
+ ;
43
+
44
+ // Add the custom options to the sms message and send the message
45
+ $sms->options($options);
46
+
47
+ $texter->send($sms);
48
+ ```
49
+
22
50
Resources
23
51
---------
24
52
You can’t perform that action at this time.
0 commit comments