File tree Expand file tree Collapse file tree 3 files changed +49
-2
lines changed
src/Symfony/Component/Notifier/Bridge Expand file tree Collapse file tree 3 files changed +49
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public function recipient(string $topic): self
5252 }
5353
5454 /**
55- * @see PublishInput::$Subject
55+ * @see PublishInput::$subject
5656 *
5757 * @return $this
5858 */
@@ -64,7 +64,7 @@ public function subject(string $subject): self
6464 }
6565
6666 /**
67- * @see PublishInput::$MessageStructure
67+ * @see PublishInput::$messageStructure
6868 *
6969 * @return $this
7070 */
Original file line number Diff line number Diff line change @@ -10,6 +10,30 @@ DSN example
1010AMAZON_SNS_DSN=sns://ACCESS_ID:ACCESS_KEY@default?region=REGION
1111```
1212
13+ Adding Options to a Chat Message
14+ --------------------------------
15+
16+ With an Amazon SNS Chat Message, you can use the ` AmazonSnsOptions ` class to add
17+ message options.
18+
19+ ``` php
20+ use Symfony\Component\Notifier\Message\ChatMessage;
21+ use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsOptions;
22+
23+ $chatMessage = new ChatMessage('Contribute To Symfony');
24+
25+ $options = (new AmazonSnsOptions('topic_arn'))
26+ ->subject('subject')
27+ ->messageStructure('json')
28+ // ...
29+ ;
30+
31+ // Add the custom options to the chat message and send the message
32+ $chatMessage->options($options);
33+
34+ $chatter->send($chatMessage);
35+ ```
36+
1337Resources
1438---------
1539
Original file line number Diff line number Diff line change @@ -16,6 +16,29 @@ where:
1616 - ` FROM ` is the sender
1717 - ` TYPE_QUALITY ` is the quality of your message: ` N ` for high, ` L ` for medium, ` LL ` for low (default: ` L ` )
1818
19+ Adding Options to a Message
20+ ---------------------------
21+
22+ With a Mobyt Message, you can use the ` MobytOptions ` class to add
23+ [ message options] ( https://gatewayapi.com/docs/apis/rest/ ) .
24+
25+ ``` php
26+ use Symfony\Component\Notifier\Message\SmsMessage;
27+ use Symfony\Component\Notifier\Bridge\Mobyt\MobytOptions;
28+
29+ $sms = new SmsMessage('+1411111111', 'My message');
30+
31+ $options = (new MobytOptions())
32+ ->messageType(MobytOptions::MESSAGE_TYPE_QUALITY_HIGH)
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+
1942Resources
2043---------
2144
You can’t perform that action at this time.
0 commit comments