Skip to content

Commit 5121cfd

Browse files
committed
[Notifier] Add BandwidthOptions in README
1 parent eac7ccd commit 5121cfd

File tree

1 file changed

+28
-0
lines changed
  • src/Symfony/Component/Notifier/Bridge/Bandwidth

1 file changed

+28
-0
lines changed

src/Symfony/Component/Notifier/Bridge/Bandwidth/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,34 @@ where:
1919
- `APPLICATION_ID` is your application ID
2020
- `PRIORITY` is your priority (optional)
2121

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+
2250
Resources
2351
---------
2452

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy