File tree 5 files changed +138
-0
lines changed
src/Symfony/Component/Notifier/Bridge
5 files changed +138
-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
Original file line number Diff line number Diff line change @@ -19,6 +19,34 @@ where:
19
19
- ` LIST_ID ` is your recipient list ID (optional)
20
20
- ` FROM_EMAIL ` is your from email where replies must be emailed (optional)
21
21
22
+ Adding Options to a Message
23
+ ---------------------------
24
+
25
+ With a ClickSend Message, you can use the ` ClickSendOptions ` class to add
26
+ [ message options] ( https://developers.clicksend.com/docs/rest/v3/#send-sms/ ) .
27
+
28
+ ``` php
29
+ use Symfony\Component\Notifier\Message\SmsMessage;
30
+ use Symfony\Component\Notifier\Bridge\ClickSend\ClickSendOptions;
31
+
32
+ $sms = new SmsMessage('+1411111111', 'My message');
33
+
34
+ $options = (new ClickSendOptions())
35
+ ->country('country')
36
+ ->customString('custom_string')
37
+ ->fromEmail('from_email')
38
+ ->listId('list_id')
39
+ ->schedule(999)
40
+ ->source('source')
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
Original file line number Diff line number Diff line change @@ -16,6 +16,35 @@ where:
16
16
- ` AUTH_TOKEN ` is your Plivo Auth Token
17
17
- ` FROM ` is your sender
18
18
19
+ Adding Options to a Message
20
+ ---------------------------
21
+
22
+ With a Plivo Message, you can use the ` PlivoOptions ` class to add
23
+ [ message options] ( https://www.plivo.com/docs/sms/api/message#send-a-message ) .
24
+
25
+ ``` php
26
+ use Symfony\Component\Notifier\Message\SmsMessage;
27
+ use Symfony\Component\Notifier\Bridge\Plivo\PlivoOptions;
28
+
29
+ $sms = new SmsMessage('+1411111111', 'My message');
30
+
31
+ $options = (new PlivoOptions())
32
+ ->log(true)
33
+ ->method('POST')
34
+ ->url('url')
35
+ ->mediaUrls('media_urls')
36
+ ->powerpackUuid('uuid')
37
+ ->trackable(true)
38
+ ->type('sms')
39
+ // ...
40
+ ;
41
+
42
+ // Add the custom options to the sms message and send the message
43
+ $sms->options($options);
44
+
45
+ $texter->send($sms);
46
+ ```
47
+
19
48
Resources
20
49
---------
21
50
Original file line number Diff line number Diff line change @@ -15,6 +15,35 @@ where:
15
15
- ` API_TOKEN ` is your Ring Central OAuth 2 token
16
16
- ` FROM ` is your sender
17
17
18
+ Adding Options to a Message
19
+ ---------------------------
20
+
21
+ With a Ring Central Message, you can use the ` RingCentralOptions ` class to add
22
+ [ message options] ( https://developers.ringcentral.com/api-reference/SMS/createSMSMessage ) .
23
+
24
+ ``` php
25
+ use Symfony\Component\Notifier\Message\SmsMessage;
26
+ use Symfony\Component\Notifier\Bridge\RingCentral\RingCentralOptions;
27
+
28
+ $sms = new SmsMessage('+1411111111', 'My message');
29
+
30
+ $options = (new RingCentralOptions())
31
+ ->country(
32
+ 'test_country_id',
33
+ 'country_iso_code',
34
+ 'country_name',
35
+ 'country_uri',
36
+ 'country_calling_code'
37
+ )
38
+ // ...
39
+ ;
40
+
41
+ // Add the custom options to the sms message and send the message
42
+ $sms->options($options);
43
+
44
+ $texter->send($sms);
45
+ ```
46
+
18
47
Resources
19
48
---------
20
49
Original file line number Diff line number Diff line change @@ -15,6 +15,30 @@ where:
15
15
- ` API_KEY ` is your Smsmode API key
16
16
- ` FROM ` is your sender ID
17
17
18
+ Adding Options to a Message
19
+ ---------------------------
20
+
21
+ With a Smsmode Message, you can use the ` SmsmodeOptions ` class to add
22
+ [ message options] ( https://dev.smsmode.com/sms/v1/message ) .
23
+
24
+ ``` php
25
+ use Symfony\Component\Notifier\Message\SmsMessage;
26
+ use Symfony\Component\Notifier\Bridge\Smsmode\SmsmodeOptions;
27
+
28
+ $sms = new SmsMessage('+1411111111', 'My message');
29
+
30
+ $options = (new SmsmodeOptions())
31
+ ->refClient('ref_client')
32
+ ->sentDate('sent_date')
33
+ // ...
34
+ ;
35
+
36
+ // Add the custom options to the sms message and send the message
37
+ $sms->options($options);
38
+
39
+ $texter->send($sms);
40
+ ```
41
+
18
42
Resources
19
43
---------
20
44
You can’t perform that action at this time.
0 commit comments