Skip to content

[Notifier] Document Notifier options in README files #50378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/Symfony/Component/Notifier/Bridge/Bandwidth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,34 @@ where:
- `APPLICATION_ID` is your application ID
- `PRIORITY` is your priority (optional)

Adding Options to a Message
---------------------------

With a Bandwidth Message, you can use the `BandwidthOptions` class to add
[message options](https://dev.bandwidth.com/apis/messaging/#tag/Messages/operation/createMessage).

```php
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Bridge\Bandwidth\BandwidthOptions;

$sms = new SmsMessage('+1411111111', 'My message');

$options = (new BandwidthOptions())
->media(['foo'])
->tag('tag')
->accountId('account_id')
->applicationId('application_id')
->expiration('test_expiration')
->priority('default')
// ...
;

// Add the custom options to the sms message and send the message
$sms->options($options);

$texter->send($sms);
```

Resources
---------

Expand Down
28 changes: 28 additions & 0 deletions src/Symfony/Component/Notifier/Bridge/ClickSend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,34 @@ where:
- `LIST_ID` is your recipient list ID (optional)
- `FROM_EMAIL` is your from email where replies must be emailed (optional)

Adding Options to a Message
---------------------------

With a ClickSend Message, you can use the `ClickSendOptions` class to add
[message options](https://developers.clicksend.com/docs/rest/v3/#send-sms/).

```php
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Bridge\ClickSend\ClickSendOptions;

$sms = new SmsMessage('+1411111111', 'My message');

$options = (new ClickSendOptions())
->country('country')
->customString('custom_string')
->fromEmail('from_email')
->listId('list_id')
->schedule(999)
->source('source')
// ...
;

// Add the custom options to the sms message and send the message
$sms->options($options);

$texter->send($sms);
```

Resources
---------

Expand Down
29 changes: 29 additions & 0 deletions src/Symfony/Component/Notifier/Bridge/Plivo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,35 @@ where:
- `AUTH_TOKEN` is your Plivo Auth Token
- `FROM` is your sender

Adding Options to a Message
---------------------------

With a Plivo Message, you can use the `PlivoOptions` class to add
[message options](https://www.plivo.com/docs/sms/api/message#send-a-message).

```php
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Bridge\Plivo\PlivoOptions;

$sms = new SmsMessage('+1411111111', 'My message');

$options = (new PlivoOptions())
->log(true)
->method('POST')
->url('url')
->mediaUrls('media_urls')
->powerpackUuid('uuid')
->trackable(true)
->type('sms')
// ...
;

// Add the custom options to the sms message and send the message
$sms->options($options);

$texter->send($sms);
```

Resources
---------

Expand Down
29 changes: 29 additions & 0 deletions src/Symfony/Component/Notifier/Bridge/RingCentral/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@ where:
- `API_TOKEN` is your Ring Central OAuth 2 token
- `FROM` is your sender

Adding Options to a Message
---------------------------

With a Ring Central Message, you can use the `RingCentralOptions` class to add
[message options](https://developers.ringcentral.com/api-reference/SMS/createSMSMessage).

```php
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Bridge\RingCentral\RingCentralOptions;

$sms = new SmsMessage('+1411111111', 'My message');

$options = (new RingCentralOptions())
->country(
'test_country_id',
'country_iso_code',
'country_name',
'country_uri',
'country_calling_code'
)
// ...
;

// Add the custom options to the sms message and send the message
$sms->options($options);

$texter->send($sms);
```

Resources
---------

Expand Down
24 changes: 24 additions & 0 deletions src/Symfony/Component/Notifier/Bridge/Smsmode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,30 @@ where:
- `API_KEY` is your Smsmode API key
- `FROM` is your sender ID

Adding Options to a Message
---------------------------

With a Smsmode Message, you can use the `SmsmodeOptions` class to add
[message options](https://dev.smsmode.com/sms/v1/message).

```php
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Bridge\Smsmode\SmsmodeOptions;

$sms = new SmsMessage('+1411111111', 'My message');

$options = (new SmsmodeOptions())
->refClient('ref_client')
->sentDate('sent_date')
// ...
;

// Add the custom options to the sms message and send the message
$sms->options($options);

$texter->send($sms);
```

Resources
---------

Expand Down