From 664ca3e7f16c7e59776fdd78b9dd1172d9e98f2d Mon Sep 17 00:00:00 2001 From: Twilio Date: Thu, 27 Jul 2023 02:29:29 -0700 Subject: [PATCH] [Librarian] Regenerated @ 07a9a183b1077d5a881e6cd53ef76b0d75ccc6b0 --- CHANGES.md | 20 +++ .../V2010/Account/Message/MediaContext.php | 6 +- .../V2010/Account/Message/MediaInstance.php | 6 +- .../Api/V2010/Account/Message/MediaList.php | 6 +- .../V2010/Account/Message/MediaOptions.php | 24 +-- .../Rest/Api/V2010/Account/MessageContext.php | 4 +- .../Api/V2010/Account/MessageInstance.php | 4 +- .../Rest/Api/V2010/Account/MessageList.php | 6 +- .../Rest/Api/V2010/Account/MessageOptions.php | 168 +++++++++--------- src/Twilio/Rest/Client.php | 2 +- .../Rest/Lookups/V2/PhoneNumberInstance.php | 2 + .../DependentHostedNumberOrderOptions.php | 8 +- .../Numbers/V2/HostedNumberOrderOptions.php | 16 +- .../Verify/V2/VerificationAttemptOptions.php | 16 +- .../V2/VerificationAttemptsSummaryOptions.php | 24 +-- src/Twilio/TwiML/Voice/Siprec.php | 18 ++ 16 files changed, 185 insertions(+), 145 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c98c3b14f..cf8c4390b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,26 @@ twilio-php Changelog ==================== +[2023-07-27] Version 7.7.1 +-------------------------- +**Api** +- Added `voice-intelligence`, `voice-intelligence-transcription` and `voice-intelligence-operators` to `usage_record` API. +- Added `tts-google` to `usage_record` API. + +**Lookups** +- Add new `disposable_phone_number_risk` package to the lookup response + +**Verify** +- Documentation of list attempts API was improved by correcting `date_created_after` and `date_created_before` expected date format. +- Documentation was improved by correcting `date_created_after` and `date_created_before` expected date format parameter on attempts summary API. +- Documentation was improved by adding `WHATSAPP` as optional valid parameter on attempts summary API. + +**Twiml** +- Added support for he-il inside of ssm_lang.json that was missing +- Added support for he-il language in say.json that was missing +- Add `statusCallback` and `statusCallbackMethod` attributes to ``. + + [2023-07-13] Version 7.7.0 -------------------------- **Flex** diff --git a/src/Twilio/Rest/Api/V2010/Account/Message/MediaContext.php b/src/Twilio/Rest/Api/V2010/Account/Message/MediaContext.php index 3c6893c1e..29bf813ea 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Message/MediaContext.php +++ b/src/Twilio/Rest/Api/V2010/Account/Message/MediaContext.php @@ -28,9 +28,9 @@ class MediaContext extends InstanceContext * Initialize the MediaContext * * @param Version $version Version that contains the resource - * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Media resource(s) to delete. - * @param string $messageSid The SID of the Message resource that this Media resource belongs to. - * @param string $sid The Twilio-provided string that uniquely identifies the Media resource to delete + * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is associated with the Media resource. + * @param string $messageSid The SID of the Message resource that is associated with the Media resource. + * @param string $sid The unique identifier of the to-be-deleted Media resource. */ public function __construct( Version $version, diff --git a/src/Twilio/Rest/Api/V2010/Account/Message/MediaInstance.php b/src/Twilio/Rest/Api/V2010/Account/Message/MediaInstance.php index 3a90e5676..8a0d88661 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Message/MediaInstance.php +++ b/src/Twilio/Rest/Api/V2010/Account/Message/MediaInstance.php @@ -40,9 +40,9 @@ class MediaInstance extends InstanceResource * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload - * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Media resource(s) to delete. - * @param string $messageSid The SID of the Message resource that this Media resource belongs to. - * @param string $sid The Twilio-provided string that uniquely identifies the Media resource to delete + * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is associated with the Media resource. + * @param string $messageSid The SID of the Message resource that is associated with the Media resource. + * @param string $sid The unique identifier of the to-be-deleted Media resource. */ public function __construct(Version $version, array $payload, string $accountSid, string $messageSid, string $sid = null) { diff --git a/src/Twilio/Rest/Api/V2010/Account/Message/MediaList.php b/src/Twilio/Rest/Api/V2010/Account/Message/MediaList.php index 722baaeb6..cba493b9f 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Message/MediaList.php +++ b/src/Twilio/Rest/Api/V2010/Account/Message/MediaList.php @@ -30,8 +30,8 @@ class MediaList extends ListResource * Construct the MediaList * * @param Version $version Version that contains the resource - * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Media resource(s) to delete. - * @param string $messageSid The SID of the Message resource that this Media resource belongs to. + * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is associated with the Media resource. + * @param string $messageSid The SID of the Message resource that is associated with the Media resource. */ public function __construct( Version $version, @@ -160,7 +160,7 @@ public function getPage(string $targetUrl): MediaPage /** * Constructs a MediaContext * - * @param string $sid The Twilio-provided string that uniquely identifies the Media resource to delete + * @param string $sid The unique identifier of the to-be-deleted Media resource. */ public function getContext( string $sid diff --git a/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.php b/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.php index d2ed34b0b..d1fc7da51 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.php +++ b/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.php @@ -23,9 +23,9 @@ abstract class MediaOptions /** - * @param string $dateCreatedBefore Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. - * @param string $dateCreated Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. - * @param string $dateCreatedAfter Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. + * @param string $dateCreatedBefore Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. + * @param string $dateCreated Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. + * @param string $dateCreatedAfter Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. * @return ReadMediaOptions Options builder */ public static function read( @@ -50,9 +50,9 @@ public static function read( class ReadMediaOptions extends Options { /** - * @param string $dateCreatedBefore Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. - * @param string $dateCreated Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. - * @param string $dateCreatedAfter Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. + * @param string $dateCreatedBefore Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. + * @param string $dateCreated Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. + * @param string $dateCreatedAfter Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. */ public function __construct( @@ -67,9 +67,9 @@ public function __construct( } /** - * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. + * Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. * - * @param string $dateCreatedBefore Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. + * @param string $dateCreatedBefore Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. * @return $this Fluent Builder */ public function setDateCreatedBefore(string $dateCreatedBefore): self @@ -79,9 +79,9 @@ public function setDateCreatedBefore(string $dateCreatedBefore): self } /** - * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. + * Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. * - * @param string $dateCreated Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. + * @param string $dateCreated Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. * @return $this Fluent Builder */ public function setDateCreated(string $dateCreated): self @@ -91,9 +91,9 @@ public function setDateCreated(string $dateCreated): self } /** - * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. + * Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. * - * @param string $dateCreatedAfter Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. + * @param string $dateCreatedAfter Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date. * @return $this Fluent Builder */ public function setDateCreatedAfter(string $dateCreatedAfter): self diff --git a/src/Twilio/Rest/Api/V2010/Account/MessageContext.php b/src/Twilio/Rest/Api/V2010/Account/MessageContext.php index 5aa5fff0b..3f7d04cce 100644 --- a/src/Twilio/Rest/Api/V2010/Account/MessageContext.php +++ b/src/Twilio/Rest/Api/V2010/Account/MessageContext.php @@ -41,8 +41,8 @@ class MessageContext extends InstanceContext * Initialize the MessageContext * * @param Version $version Version that contains the resource - * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. - * @param string $sid The Twilio-provided string that uniquely identifies the Message resource to delete. + * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource. + * @param string $sid The SID of the Message resource you wish to delete */ public function __construct( Version $version, diff --git a/src/Twilio/Rest/Api/V2010/Account/MessageInstance.php b/src/Twilio/Rest/Api/V2010/Account/MessageInstance.php index 7316962c9..6e4c601a7 100644 --- a/src/Twilio/Rest/Api/V2010/Account/MessageInstance.php +++ b/src/Twilio/Rest/Api/V2010/Account/MessageInstance.php @@ -59,8 +59,8 @@ class MessageInstance extends InstanceResource * * @param Version $version Version that contains the resource * @param mixed[] $payload The response payload - * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. - * @param string $sid The Twilio-provided string that uniquely identifies the Message resource to delete. + * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource. + * @param string $sid The SID of the Message resource you wish to delete */ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null) { diff --git a/src/Twilio/Rest/Api/V2010/Account/MessageList.php b/src/Twilio/Rest/Api/V2010/Account/MessageList.php index b6a8dda41..aef77996f 100644 --- a/src/Twilio/Rest/Api/V2010/Account/MessageList.php +++ b/src/Twilio/Rest/Api/V2010/Account/MessageList.php @@ -31,7 +31,7 @@ class MessageList extends ListResource * Construct the MessageList * * @param Version $version Version that contains the resource - * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource. */ public function __construct( Version $version, @@ -53,7 +53,7 @@ public function __construct( /** * Create the MessageInstance * - * @param string $to The destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format for SMS/MMS or [Channel user address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other 3rd-party channels. + * @param string $to The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/sms/channels#channel-addresses), e.g. `whatsapp:+15552229999`. * @param array|Options $options Optional Arguments * @return MessageInstance Created MessageInstance * @throws TwilioException When an HTTP error occurs. @@ -229,7 +229,7 @@ public function getPage(string $targetUrl): MessagePage /** * Constructs a MessageContext * - * @param string $sid The Twilio-provided string that uniquely identifies the Message resource to delete. + * @param string $sid The SID of the Message resource you wish to delete */ public function getContext( string $sid diff --git a/src/Twilio/Rest/Api/V2010/Account/MessageOptions.php b/src/Twilio/Rest/Api/V2010/Account/MessageOptions.php index 08039ccf3..155bc8156 100644 --- a/src/Twilio/Rest/Api/V2010/Account/MessageOptions.php +++ b/src/Twilio/Rest/Api/V2010/Account/MessageOptions.php @@ -21,27 +21,27 @@ abstract class MessageOptions { /** - * @param string $from A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty. - * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery. - * @param string $body The text of the message you want to send. Can be up to 1,600 characters in length. - * @param string[] $mediaUrl The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada. - * @param string $contentSid The SID of the Content object returned at Content API content create time (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template). If this parameter is not specified, then the Content API will not be utilized. - * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application. If specified, we POST these message status changes to the URL: `queued`, `failed`, `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as some additional parameters including `MessageSid`, `MessageStatus`, and `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a valid hostname and underscores are not allowed. - * @param string $applicationSid The SID of the application that should receive message status. We POST a `message_sid` parameter and a `message_status` parameter with a value of `sent` or `failed` to the [application](https://www.twilio.com/docs/usage/api/applications)'s `message_status_callback`. If a `status_callback` parameter is also passed, it will be ignored and the application's `message_status_callback` parameter will be used. - * @param string $maxPrice The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds `max_price`, the message will fail and a status of `Failed` is sent to the status callback. If `MaxPrice` is not set, the message cost is not checked. - * @param bool $provideFeedback Whether to confirm delivery of the message. Set this value to `true` if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the [Message Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource). This parameter is `false` by default. - * @param int $attempt Total number of attempts made ( including this ) to send out the message regardless of the provider used - * @param int $validityPeriod How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. + * @param string $from The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/wireless/tutorials/communications-guides/how-to-send-and-receive-text-messages), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/sms/channels#channel-addresses) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belong to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool. + * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool. + * @param string $body The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages). + * @param string[] $mediaUrl The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. + * @param string $contentSid For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources). + * @param string $statusCallback The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). + * @param string $applicationSid The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). If this parameter is provided, the `status_callback` parameter of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. + * @param string $maxPrice The maximum price in US dollars that you are willing to pay for this Message's delivery. The value can have up to four decimal places. When the `max_price` parameter is provided, the cost of a message is checked before it is sent. If the cost exceeds `max_price`, the message is not sent and the Message `status` is `failed`. + * @param bool $provideFeedback Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`. + * @param int $attempt Total number of attempts made (including this request) to send the message regardless of the provider used + * @param int $validityPeriod The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html) * @param bool $forceDelivery Reserved * @param string $contentRetention * @param string $addressRetention * @param bool $smartEncoded Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. - * @param string[] $persistentAction Rich actions for Channels Messages. - * @param bool $shortenUrls Determines the usage of Click Tracking. Setting it to `true` will instruct Twilio to replace all links in the Message with a shortened version based on the associated Domain Sid and track clicks on them. If this parameter is not set on an API call, we will use the value set on the Messaging Service. If this parameter is not set and the value is not configured on the Messaging Service used this will default to `false`. + * @param string[] $persistentAction Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp). + * @param bool $shortenUrls For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. * @param string $scheduleType * @param \DateTime $sendAt The time that Twilio will send the message. Must be in ISO 8601 format. - * @param bool $sendAsMms If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media. - * @param string $contentVariables Key-value pairs of variable names to substitution values, used alongside a content_sid. If not specified, Content API will default to the default variables defined at create time. + * @param bool $sendAsMms If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media. + * @param string $contentVariables For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used. * @return CreateMessageOptions Options builder */ public static function create( @@ -98,11 +98,11 @@ public static function create( /** - * @param string $to Read messages sent to only this phone number. - * @param string $from Read messages sent from only this phone number or alphanumeric sender ID. - * @param string $dateSentBefore The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. - * @param string $dateSent The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. - * @param string $dateSentAfter The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. + * @param string $to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` + * @param string $from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` + * @param string $dateSentBefore Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). + * @param string $dateSent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). + * @param string $dateSentAfter Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). * @return ReadMessageOptions Options builder */ public static function read( @@ -125,7 +125,7 @@ public static function read( } /** - * @param string $body The text of the message you want to send. Can be up to 1,600 characters long. + * @param string $body The new `body` of the Message resource. To redact the text content of a Message, this parameter's value must be an empty string * @param string $status * @return UpdateMessageOptions Options builder */ @@ -147,27 +147,27 @@ public static function update( class CreateMessageOptions extends Options { /** - * @param string $from A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty. - * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery. - * @param string $body The text of the message you want to send. Can be up to 1,600 characters in length. - * @param string[] $mediaUrl The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada. - * @param string $contentSid The SID of the Content object returned at Content API content create time (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template). If this parameter is not specified, then the Content API will not be utilized. - * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application. If specified, we POST these message status changes to the URL: `queued`, `failed`, `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as some additional parameters including `MessageSid`, `MessageStatus`, and `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a valid hostname and underscores are not allowed. - * @param string $applicationSid The SID of the application that should receive message status. We POST a `message_sid` parameter and a `message_status` parameter with a value of `sent` or `failed` to the [application](https://www.twilio.com/docs/usage/api/applications)'s `message_status_callback`. If a `status_callback` parameter is also passed, it will be ignored and the application's `message_status_callback` parameter will be used. - * @param string $maxPrice The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds `max_price`, the message will fail and a status of `Failed` is sent to the status callback. If `MaxPrice` is not set, the message cost is not checked. - * @param bool $provideFeedback Whether to confirm delivery of the message. Set this value to `true` if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the [Message Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource). This parameter is `false` by default. - * @param int $attempt Total number of attempts made ( including this ) to send out the message regardless of the provider used - * @param int $validityPeriod How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. + * @param string $from The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/wireless/tutorials/communications-guides/how-to-send-and-receive-text-messages), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/sms/channels#channel-addresses) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belong to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool. + * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool. + * @param string $body The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages). + * @param string[] $mediaUrl The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. + * @param string $contentSid For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources). + * @param string $statusCallback The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). + * @param string $applicationSid The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). If this parameter is provided, the `status_callback` parameter of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. + * @param string $maxPrice The maximum price in US dollars that you are willing to pay for this Message's delivery. The value can have up to four decimal places. When the `max_price` parameter is provided, the cost of a message is checked before it is sent. If the cost exceeds `max_price`, the message is not sent and the Message `status` is `failed`. + * @param bool $provideFeedback Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`. + * @param int $attempt Total number of attempts made (including this request) to send the message regardless of the provider used + * @param int $validityPeriod The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html) * @param bool $forceDelivery Reserved * @param string $contentRetention * @param string $addressRetention * @param bool $smartEncoded Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. - * @param string[] $persistentAction Rich actions for Channels Messages. - * @param bool $shortenUrls Determines the usage of Click Tracking. Setting it to `true` will instruct Twilio to replace all links in the Message with a shortened version based on the associated Domain Sid and track clicks on them. If this parameter is not set on an API call, we will use the value set on the Messaging Service. If this parameter is not set and the value is not configured on the Messaging Service used this will default to `false`. + * @param string[] $persistentAction Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp). + * @param bool $shortenUrls For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. * @param string $scheduleType * @param \DateTime $sendAt The time that Twilio will send the message. Must be in ISO 8601 format. - * @param bool $sendAsMms If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media. - * @param string $contentVariables Key-value pairs of variable names to substitution values, used alongside a content_sid. If not specified, Content API will default to the default variables defined at create time. + * @param bool $sendAsMms If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media. + * @param string $contentVariables For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used. */ public function __construct( @@ -218,9 +218,9 @@ public function __construct( } /** - * A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty. + * The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/wireless/tutorials/communications-guides/how-to-send-and-receive-text-messages), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/sms/channels#channel-addresses) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belong to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool. * - * @param string $from A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty. + * @param string $from The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/wireless/tutorials/communications-guides/how-to-send-and-receive-text-messages), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/sms/channels#channel-addresses) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belong to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool. * @return $this Fluent Builder */ public function setFrom(string $from): self @@ -230,9 +230,9 @@ public function setFrom(string $from): self } /** - * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery. + * The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool. * - * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery. + * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool. * @return $this Fluent Builder */ public function setMessagingServiceSid(string $messagingServiceSid): self @@ -242,9 +242,9 @@ public function setMessagingServiceSid(string $messagingServiceSid): self } /** - * The text of the message you want to send. Can be up to 1,600 characters in length. + * The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages). * - * @param string $body The text of the message you want to send. Can be up to 1,600 characters in length. + * @param string $body The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages). * @return $this Fluent Builder */ public function setBody(string $body): self @@ -254,9 +254,9 @@ public function setBody(string $body): self } /** - * The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada. + * The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. * - * @param string[] $mediaUrl The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada. + * @param string[] $mediaUrl The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. * @return $this Fluent Builder */ public function setMediaUrl(array $mediaUrl): self @@ -266,9 +266,9 @@ public function setMediaUrl(array $mediaUrl): self } /** - * The SID of the Content object returned at Content API content create time (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template). If this parameter is not specified, then the Content API will not be utilized. + * For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources). * - * @param string $contentSid The SID of the Content object returned at Content API content create time (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template). If this parameter is not specified, then the Content API will not be utilized. + * @param string $contentSid For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources). * @return $this Fluent Builder */ public function setContentSid(string $contentSid): self @@ -278,9 +278,9 @@ public function setContentSid(string $contentSid): self } /** - * The URL we should call using the `status_callback_method` to send status information to your application. If specified, we POST these message status changes to the URL: `queued`, `failed`, `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as some additional parameters including `MessageSid`, `MessageStatus`, and `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a valid hostname and underscores are not allowed. + * The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). * - * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application. If specified, we POST these message status changes to the URL: `queued`, `failed`, `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as some additional parameters including `MessageSid`, `MessageStatus`, and `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a valid hostname and underscores are not allowed. + * @param string $statusCallback The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self @@ -290,9 +290,9 @@ public function setStatusCallback(string $statusCallback): self } /** - * The SID of the application that should receive message status. We POST a `message_sid` parameter and a `message_status` parameter with a value of `sent` or `failed` to the [application](https://www.twilio.com/docs/usage/api/applications)'s `message_status_callback`. If a `status_callback` parameter is also passed, it will be ignored and the application's `message_status_callback` parameter will be used. + * The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). If this parameter is provided, the `status_callback` parameter of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. * - * @param string $applicationSid The SID of the application that should receive message status. We POST a `message_sid` parameter and a `message_status` parameter with a value of `sent` or `failed` to the [application](https://www.twilio.com/docs/usage/api/applications)'s `message_status_callback`. If a `status_callback` parameter is also passed, it will be ignored and the application's `message_status_callback` parameter will be used. + * @param string $applicationSid The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). If this parameter is provided, the `status_callback` parameter of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. * @return $this Fluent Builder */ public function setApplicationSid(string $applicationSid): self @@ -302,9 +302,9 @@ public function setApplicationSid(string $applicationSid): self } /** - * The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds `max_price`, the message will fail and a status of `Failed` is sent to the status callback. If `MaxPrice` is not set, the message cost is not checked. + * The maximum price in US dollars that you are willing to pay for this Message's delivery. The value can have up to four decimal places. When the `max_price` parameter is provided, the cost of a message is checked before it is sent. If the cost exceeds `max_price`, the message is not sent and the Message `status` is `failed`. * - * @param string $maxPrice The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds `max_price`, the message will fail and a status of `Failed` is sent to the status callback. If `MaxPrice` is not set, the message cost is not checked. + * @param string $maxPrice The maximum price in US dollars that you are willing to pay for this Message's delivery. The value can have up to four decimal places. When the `max_price` parameter is provided, the cost of a message is checked before it is sent. If the cost exceeds `max_price`, the message is not sent and the Message `status` is `failed`. * @return $this Fluent Builder */ public function setMaxPrice(string $maxPrice): self @@ -314,9 +314,9 @@ public function setMaxPrice(string $maxPrice): self } /** - * Whether to confirm delivery of the message. Set this value to `true` if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the [Message Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource). This parameter is `false` by default. + * Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`. * - * @param bool $provideFeedback Whether to confirm delivery of the message. Set this value to `true` if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the [Message Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource). This parameter is `false` by default. + * @param bool $provideFeedback Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`. * @return $this Fluent Builder */ public function setProvideFeedback(bool $provideFeedback): self @@ -326,9 +326,9 @@ public function setProvideFeedback(bool $provideFeedback): self } /** - * Total number of attempts made ( including this ) to send out the message regardless of the provider used + * Total number of attempts made (including this request) to send the message regardless of the provider used * - * @param int $attempt Total number of attempts made ( including this ) to send out the message regardless of the provider used + * @param int $attempt Total number of attempts made (including this request) to send the message regardless of the provider used * @return $this Fluent Builder */ public function setAttempt(int $attempt): self @@ -338,9 +338,9 @@ public function setAttempt(int $attempt): self } /** - * How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. + * The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html) * - * @param int $validityPeriod How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. + * @param int $validityPeriod The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html) * @return $this Fluent Builder */ public function setValidityPeriod(int $validityPeriod): self @@ -394,9 +394,9 @@ public function setSmartEncoded(bool $smartEncoded): self } /** - * Rich actions for Channels Messages. + * Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp). * - * @param string[] $persistentAction Rich actions for Channels Messages. + * @param string[] $persistentAction Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp). * @return $this Fluent Builder */ public function setPersistentAction(array $persistentAction): self @@ -406,9 +406,9 @@ public function setPersistentAction(array $persistentAction): self } /** - * Determines the usage of Click Tracking. Setting it to `true` will instruct Twilio to replace all links in the Message with a shortened version based on the associated Domain Sid and track clicks on them. If this parameter is not set on an API call, we will use the value set on the Messaging Service. If this parameter is not set and the value is not configured on the Messaging Service used this will default to `false`. + * For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. * - * @param bool $shortenUrls Determines the usage of Click Tracking. Setting it to `true` will instruct Twilio to replace all links in the Message with a shortened version based on the associated Domain Sid and track clicks on them. If this parameter is not set on an API call, we will use the value set on the Messaging Service. If this parameter is not set and the value is not configured on the Messaging Service used this will default to `false`. + * @param bool $shortenUrls For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. * @return $this Fluent Builder */ public function setShortenUrls(bool $shortenUrls): self @@ -440,9 +440,9 @@ public function setSendAt(\DateTime $sendAt): self } /** - * If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media. + * If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media. * - * @param bool $sendAsMms If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media. + * @param bool $sendAsMms If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media. * @return $this Fluent Builder */ public function setSendAsMms(bool $sendAsMms): self @@ -452,9 +452,9 @@ public function setSendAsMms(bool $sendAsMms): self } /** - * Key-value pairs of variable names to substitution values, used alongside a content_sid. If not specified, Content API will default to the default variables defined at create time. + * For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used. * - * @param string $contentVariables Key-value pairs of variable names to substitution values, used alongside a content_sid. If not specified, Content API will default to the default variables defined at create time. + * @param string $contentVariables For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used. * @return $this Fluent Builder */ public function setContentVariables(string $contentVariables): self @@ -480,11 +480,11 @@ public function __toString(): string class ReadMessageOptions extends Options { /** - * @param string $to Read messages sent to only this phone number. - * @param string $from Read messages sent from only this phone number or alphanumeric sender ID. - * @param string $dateSentBefore The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. - * @param string $dateSent The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. - * @param string $dateSentAfter The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. + * @param string $to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` + * @param string $from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` + * @param string $dateSentBefore Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). + * @param string $dateSent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). + * @param string $dateSentAfter Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */ public function __construct( @@ -503,9 +503,9 @@ public function __construct( } /** - * Read messages sent to only this phone number. + * Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` * - * @param string $to Read messages sent to only this phone number. + * @param string $to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` * @return $this Fluent Builder */ public function setTo(string $to): self @@ -515,9 +515,9 @@ public function setTo(string $to): self } /** - * Read messages sent from only this phone number or alphanumeric sender ID. + * Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` * - * @param string $from Read messages sent from only this phone number or alphanumeric sender ID. + * @param string $from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` * @return $this Fluent Builder */ public function setFrom(string $from): self @@ -527,9 +527,9 @@ public function setFrom(string $from): self } /** - * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. + * Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). * - * @param string $dateSentBefore The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. + * @param string $dateSentBefore Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). * @return $this Fluent Builder */ public function setDateSentBefore(string $dateSentBefore): self @@ -539,9 +539,9 @@ public function setDateSentBefore(string $dateSentBefore): self } /** - * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. + * Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). * - * @param string $dateSent The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. + * @param string $dateSent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). * @return $this Fluent Builder */ public function setDateSent(string $dateSent): self @@ -551,9 +551,9 @@ public function setDateSent(string $dateSent): self } /** - * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. + * Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). * - * @param string $dateSentAfter The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. + * @param string $dateSentAfter Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). * @return $this Fluent Builder */ public function setDateSentAfter(string $dateSentAfter): self @@ -577,7 +577,7 @@ public function __toString(): string class UpdateMessageOptions extends Options { /** - * @param string $body The text of the message you want to send. Can be up to 1,600 characters long. + * @param string $body The new `body` of the Message resource. To redact the text content of a Message, this parameter's value must be an empty string * @param string $status */ public function __construct( @@ -591,9 +591,9 @@ public function __construct( } /** - * The text of the message you want to send. Can be up to 1,600 characters long. + * The new `body` of the Message resource. To redact the text content of a Message, this parameter's value must be an empty string * - * @param string $body The text of the message you want to send. Can be up to 1,600 characters long. + * @param string $body The new `body` of the Message resource. To redact the text content of a Message, this parameter's value must be an empty string * @return $this Fluent Builder */ public function setBody(string $body): self diff --git a/src/Twilio/Rest/Client.php b/src/Twilio/Rest/Client.php index 5c2516222..8e1f704d0 100644 --- a/src/Twilio/Rest/Client.php +++ b/src/Twilio/Rest/Client.php @@ -619,7 +619,7 @@ protected function getMessages(): \Twilio\Rest\Api\V2010\Account\MessageList { return $this->api->v2010->account->messages; } /** - * @param string $sid The Twilio-provided string that uniquely identifies the Message resource to fetch. + * @param string $sid The SID of the Message resource to be fetched */ protected function contextMessages(string $sid): \Twilio\Rest\Api\V2010\Account\MessageContext { return $this->api->v2010->account->messages($sid); diff --git a/src/Twilio/Rest/Lookups/V2/PhoneNumberInstance.php b/src/Twilio/Rest/Lookups/V2/PhoneNumberInstance.php index ea7161247..5c40fb158 100644 --- a/src/Twilio/Rest/Lookups/V2/PhoneNumberInstance.php +++ b/src/Twilio/Rest/Lookups/V2/PhoneNumberInstance.php @@ -39,6 +39,7 @@ * @property array|null $identityMatch * @property array|null $reassignedNumber * @property array|null $smsPumpingRisk + * @property array|null $disposablePhoneNumberRisk * @property string|null $url */ class PhoneNumberInstance extends InstanceResource @@ -70,6 +71,7 @@ public function __construct(Version $version, array $payload, string $phoneNumbe 'identityMatch' => Values::array_get($payload, 'identity_match'), 'reassignedNumber' => Values::array_get($payload, 'reassigned_number'), 'smsPumpingRisk' => Values::array_get($payload, 'sms_pumping_risk'), + 'disposablePhoneNumberRisk' => Values::array_get($payload, 'disposable_phone_number_risk'), 'url' => Values::array_get($payload, 'url'), ]; diff --git a/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderOptions.php b/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderOptions.php index 8bbb605c8..17a9367dd 100644 --- a/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderOptions.php +++ b/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderOptions.php @@ -24,7 +24,7 @@ abstract class DependentHostedNumberOrderOptions * @param string $status Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. * @param string $phoneNumber An E164 formatted phone number hosted by this HostedNumberOrder. * @param string $incomingPhoneNumberSid A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. - * @param string $friendlyName A human readable description of this resource, up to 64 characters. + * @param string $friendlyName A human readable description of this resource, up to 128 characters. * @return ReadDependentHostedNumberOrderOptions Options builder */ public static function read( @@ -52,7 +52,7 @@ class ReadDependentHostedNumberOrderOptions extends Options * @param string $status Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. * @param string $phoneNumber An E164 formatted phone number hosted by this HostedNumberOrder. * @param string $incomingPhoneNumberSid A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. - * @param string $friendlyName A human readable description of this resource, up to 64 characters. + * @param string $friendlyName A human readable description of this resource, up to 128 characters. */ public function __construct( @@ -105,9 +105,9 @@ public function setIncomingPhoneNumberSid(string $incomingPhoneNumberSid): self } /** - * A human readable description of this resource, up to 64 characters. + * A human readable description of this resource, up to 128 characters. * - * @param string $friendlyName A human readable description of this resource, up to 64 characters. + * @param string $friendlyName A human readable description of this resource, up to 128 characters. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self diff --git a/src/Twilio/Rest/Numbers/V2/HostedNumberOrderOptions.php b/src/Twilio/Rest/Numbers/V2/HostedNumberOrderOptions.php index ada2f0011..d04243121 100644 --- a/src/Twilio/Rest/Numbers/V2/HostedNumberOrderOptions.php +++ b/src/Twilio/Rest/Numbers/V2/HostedNumberOrderOptions.php @@ -22,7 +22,7 @@ abstract class HostedNumberOrderOptions { /** * @param string $accountSid This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to. - * @param string $friendlyName A 64 character string that is a human readable text that describes this resource. + * @param string $friendlyName A 128 character string that is a human readable text that describes this resource. * @param string[] $ccEmails Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to. * @param string $smsUrl The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource. * @param string $smsMethod The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. @@ -75,7 +75,7 @@ public static function create( * @param bool $smsCapability Whether the SMS capability will be hosted on our platform. Can be `true` of `false`. * @param string $phoneNumber An E164 formatted phone number hosted by this HostedNumberOrder. * @param string $incomingPhoneNumberSid A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. - * @param string $friendlyName A human readable description of this resource, up to 64 characters. + * @param string $friendlyName A human readable description of this resource, up to 128 characters. * @return ReadHostedNumberOrderOptions Options builder */ public static function read( @@ -103,7 +103,7 @@ class CreateHostedNumberOrderOptions extends Options { /** * @param string $accountSid This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to. - * @param string $friendlyName A 64 character string that is a human readable text that describes this resource. + * @param string $friendlyName A 128 character string that is a human readable text that describes this resource. * @param string[] $ccEmails Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to. * @param string $smsUrl The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource. * @param string $smsMethod The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. @@ -158,9 +158,9 @@ public function setAccountSid(string $accountSid): self } /** - * A 64 character string that is a human readable text that describes this resource. + * A 128 character string that is a human readable text that describes this resource. * - * @param string $friendlyName A 64 character string that is a human readable text that describes this resource. + * @param string $friendlyName A 128 character string that is a human readable text that describes this resource. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self @@ -310,7 +310,7 @@ class ReadHostedNumberOrderOptions extends Options * @param bool $smsCapability Whether the SMS capability will be hosted on our platform. Can be `true` of `false`. * @param string $phoneNumber An E164 formatted phone number hosted by this HostedNumberOrder. * @param string $incomingPhoneNumberSid A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. - * @param string $friendlyName A human readable description of this resource, up to 64 characters. + * @param string $friendlyName A human readable description of this resource, up to 128 characters. */ public function __construct( @@ -377,9 +377,9 @@ public function setIncomingPhoneNumberSid(string $incomingPhoneNumberSid): self } /** - * A human readable description of this resource, up to 64 characters. + * A human readable description of this resource, up to 128 characters. * - * @param string $friendlyName A human readable description of this resource, up to 64 characters. + * @param string $friendlyName A human readable description of this resource, up to 128 characters. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self diff --git a/src/Twilio/Rest/Verify/V2/VerificationAttemptOptions.php b/src/Twilio/Rest/Verify/V2/VerificationAttemptOptions.php index d357f4111..7f99b939b 100644 --- a/src/Twilio/Rest/Verify/V2/VerificationAttemptOptions.php +++ b/src/Twilio/Rest/Verify/V2/VerificationAttemptOptions.php @@ -22,8 +22,8 @@ abstract class VerificationAttemptOptions { /** - * @param \DateTime $dateCreatedAfter Datetime filter used to query Verification Attempts created after this datetime. Given as GMT in RFC 2822 format. - * @param \DateTime $dateCreatedBefore Datetime filter used to query Verification Attempts created before this datetime. Given as GMT in RFC 2822 format. + * @param \DateTime $dateCreatedAfter Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. + * @param \DateTime $dateCreatedBefore Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * @param string $channelDataTo Destination of a verification. It is phone number in E.164 format. * @param string $country Filter used to query Verification Attempts sent to the specified destination country. * @param string $channel Filter used to query Verification Attempts by communication channel. Valid values are `SMS` and `CALL` @@ -63,8 +63,8 @@ public static function read( class ReadVerificationAttemptOptions extends Options { /** - * @param \DateTime $dateCreatedAfter Datetime filter used to query Verification Attempts created after this datetime. Given as GMT in RFC 2822 format. - * @param \DateTime $dateCreatedBefore Datetime filter used to query Verification Attempts created before this datetime. Given as GMT in RFC 2822 format. + * @param \DateTime $dateCreatedAfter Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. + * @param \DateTime $dateCreatedBefore Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * @param string $channelDataTo Destination of a verification. It is phone number in E.164 format. * @param string $country Filter used to query Verification Attempts sent to the specified destination country. * @param string $channel Filter used to query Verification Attempts by communication channel. Valid values are `SMS` and `CALL` @@ -95,9 +95,9 @@ public function __construct( } /** - * Datetime filter used to query Verification Attempts created after this datetime. Given as GMT in RFC 2822 format. + * Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * - * @param \DateTime $dateCreatedAfter Datetime filter used to query Verification Attempts created after this datetime. Given as GMT in RFC 2822 format. + * @param \DateTime $dateCreatedAfter Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * @return $this Fluent Builder */ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self @@ -107,9 +107,9 @@ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self } /** - * Datetime filter used to query Verification Attempts created before this datetime. Given as GMT in RFC 2822 format. + * Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * - * @param \DateTime $dateCreatedBefore Datetime filter used to query Verification Attempts created before this datetime. Given as GMT in RFC 2822 format. + * @param \DateTime $dateCreatedBefore Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * @return $this Fluent Builder */ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self diff --git a/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryOptions.php b/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryOptions.php index 11796d5c0..846b1aae0 100644 --- a/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryOptions.php +++ b/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryOptions.php @@ -22,10 +22,10 @@ abstract class VerificationAttemptsSummaryOptions { /** * @param string $verifyServiceSid Filter used to consider only Verification Attempts of the given verify service on the summary aggregation. - * @param \DateTime $dateCreatedAfter Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in RFC 2822 format. - * @param \DateTime $dateCreatedBefore Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in RFC 2822 format. + * @param \DateTime $dateCreatedAfter Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. + * @param \DateTime $dateCreatedBefore Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * @param string $country Filter used to consider only Verification Attempts sent to the specified destination country on the summary aggregation. - * @param string $channel Filter Verification Attempts considered on the summary aggregation by communication channel. Valid values are `SMS` and `CALL` + * @param string $channel Filter Verification Attempts considered on the summary aggregation by communication channel. Valid values are `SMS`, `CALL` and `WHATSAPP` * @param string $destinationPrefix Filter the Verification Attempts considered on the summary aggregation by Destination prefix. It is the prefix of a phone number in E.164 format. * @return FetchVerificationAttemptsSummaryOptions Options builder */ @@ -56,10 +56,10 @@ class FetchVerificationAttemptsSummaryOptions extends Options { /** * @param string $verifyServiceSid Filter used to consider only Verification Attempts of the given verify service on the summary aggregation. - * @param \DateTime $dateCreatedAfter Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in RFC 2822 format. - * @param \DateTime $dateCreatedBefore Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in RFC 2822 format. + * @param \DateTime $dateCreatedAfter Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. + * @param \DateTime $dateCreatedBefore Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * @param string $country Filter used to consider only Verification Attempts sent to the specified destination country on the summary aggregation. - * @param string $channel Filter Verification Attempts considered on the summary aggregation by communication channel. Valid values are `SMS` and `CALL` + * @param string $channel Filter Verification Attempts considered on the summary aggregation by communication channel. Valid values are `SMS`, `CALL` and `WHATSAPP` * @param string $destinationPrefix Filter the Verification Attempts considered on the summary aggregation by Destination prefix. It is the prefix of a phone number in E.164 format. */ public function __construct( @@ -93,9 +93,9 @@ public function setVerifyServiceSid(string $verifyServiceSid): self } /** - * Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in RFC 2822 format. + * Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * - * @param \DateTime $dateCreatedAfter Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in RFC 2822 format. + * @param \DateTime $dateCreatedAfter Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * @return $this Fluent Builder */ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self @@ -105,9 +105,9 @@ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self } /** - * Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in RFC 2822 format. + * Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * - * @param \DateTime $dateCreatedBefore Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in RFC 2822 format. + * @param \DateTime $dateCreatedBefore Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. * @return $this Fluent Builder */ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self @@ -129,9 +129,9 @@ public function setCountry(string $country): self } /** - * Filter Verification Attempts considered on the summary aggregation by communication channel. Valid values are `SMS` and `CALL` + * Filter Verification Attempts considered on the summary aggregation by communication channel. Valid values are `SMS`, `CALL` and `WHATSAPP` * - * @param string $channel Filter Verification Attempts considered on the summary aggregation by communication channel. Valid values are `SMS` and `CALL` + * @param string $channel Filter Verification Attempts considered on the summary aggregation by communication channel. Valid values are `SMS`, `CALL` and `WHATSAPP` * @return $this Fluent Builder */ public function setChannel(string $channel): self diff --git a/src/Twilio/TwiML/Voice/Siprec.php b/src/Twilio/TwiML/Voice/Siprec.php index 1f6b57b0e..ac8dcc748 100644 --- a/src/Twilio/TwiML/Voice/Siprec.php +++ b/src/Twilio/TwiML/Voice/Siprec.php @@ -57,4 +57,22 @@ public function setConnectorName($connectorName): self { public function setTrack($track): self { return $this->setAttribute('track', $track); } + + /** + * Add StatusCallback attribute. + * + * @param string $statusCallback Status Callback URL + */ + public function setStatusCallback($statusCallback): self { + return $this->setAttribute('statusCallback', $statusCallback); + } + + /** + * Add StatusCallbackMethod attribute. + * + * @param string $statusCallbackMethod Status Callback URL method + */ + public function setStatusCallbackMethod($statusCallbackMethod): self { + return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); + } } \ No newline at end of file