Skip to content

Commit

Permalink
[Librarian] Regenerated @ 0430a9c977225d55252b84f4d16e16ad2091cde1
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Jun 15, 2023
1 parent f951e38 commit f68b9ea
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 53 deletions.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
twilio-php Changelog
====================

[2023-06-15] Version 7.5.0
--------------------------
**Api**
- Added `content_sid` as conditional parameter
- Removed `content_sid` as optional field **(breaking change)**

**Insights**
- Added `annotation` to list summary output


[2023-06-01] Version 7.4.2
--------------------------
**Api**
Expand Down
4 changes: 2 additions & 2 deletions src/Twilio/Rest/Api/V2010/Account/MessageList.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ public function create(string $to, array $options = []): MessageInstance
Serialize::iso8601DateTime($options['sendAt']),
'SendAsMms' =>
Serialize::booleanToString($options['sendAsMms']),
'ContentSid' =>
$options['contentSid'],
'ContentVariables' =>
$options['contentVariables'],
'From' =>
Expand All @@ -108,6 +106,8 @@ public function create(string $to, array $options = []): MessageInstance
$options['body'],
'MediaUrl' =>
Serialize::map($options['mediaUrl'], function ($e) { return $e; }),
'ContentSid' =>
$options['contentSid'],
]);

$payload = $this->version->create('POST', $this->uri, [], $data);
Expand Down
36 changes: 18 additions & 18 deletions src/Twilio/Rest/Api/V2010/Account/MessageOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ abstract class MessageOptions
* @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.
Expand All @@ -40,7 +41,6 @@ abstract class MessageOptions
* @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 $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 $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.
* @return CreateMessageOptions Options builder
*/
Expand All @@ -50,6 +50,7 @@ public static function create(
string $messagingServiceSid = Values::NONE,
string $body = Values::NONE,
array $mediaUrl = Values::ARRAY_NONE,
string $contentSid = Values::NONE,
string $statusCallback = Values::NONE,
string $applicationSid = Values::NONE,
string $maxPrice = Values::NONE,
Expand All @@ -65,7 +66,6 @@ public static function create(
string $scheduleType = Values::NONE,
\DateTime $sendAt = null,
bool $sendAsMms = Values::BOOL_NONE,
string $contentSid = Values::NONE,
string $contentVariables = Values::NONE

): CreateMessageOptions
Expand All @@ -75,6 +75,7 @@ public static function create(
$messagingServiceSid,
$body,
$mediaUrl,
$contentSid,
$statusCallback,
$applicationSid,
$maxPrice,
Expand All @@ -90,7 +91,6 @@ public static function create(
$scheduleType,
$sendAt,
$sendAsMms,
$contentSid,
$contentVariables
);
}
Expand Down Expand Up @@ -151,6 +151,7 @@ class CreateMessageOptions extends Options
* @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.
Expand All @@ -166,7 +167,6 @@ class CreateMessageOptions extends Options
* @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 $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 $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.
*/
public function __construct(
Expand All @@ -175,6 +175,7 @@ public function __construct(
string $messagingServiceSid = Values::NONE,
string $body = Values::NONE,
array $mediaUrl = Values::ARRAY_NONE,
string $contentSid = Values::NONE,
string $statusCallback = Values::NONE,
string $applicationSid = Values::NONE,
string $maxPrice = Values::NONE,
Expand All @@ -190,14 +191,14 @@ public function __construct(
string $scheduleType = Values::NONE,
\DateTime $sendAt = null,
bool $sendAsMms = Values::BOOL_NONE,
string $contentSid = Values::NONE,
string $contentVariables = Values::NONE

) {
$this->options['from'] = $from;
$this->options['messagingServiceSid'] = $messagingServiceSid;
$this->options['body'] = $body;
$this->options['mediaUrl'] = $mediaUrl;
$this->options['contentSid'] = $contentSid;
$this->options['statusCallback'] = $statusCallback;
$this->options['applicationSid'] = $applicationSid;
$this->options['maxPrice'] = $maxPrice;
Expand All @@ -213,7 +214,6 @@ public function __construct(
$this->options['scheduleType'] = $scheduleType;
$this->options['sendAt'] = $sendAt;
$this->options['sendAsMms'] = $sendAsMms;
$this->options['contentSid'] = $contentSid;
$this->options['contentVariables'] = $contentVariables;
}

Expand Down Expand Up @@ -265,6 +265,18 @@ public function setMediaUrl(array $mediaUrl): self
return $this;
}

/**
* 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 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.
* @return $this Fluent Builder
*/
public function setContentSid(string $contentSid): self
{
$this->options['contentSid'] = $contentSid;
return $this;
}

/**
* 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.
*
Expand Down Expand Up @@ -439,18 +451,6 @@ public function setSendAsMms(bool $sendAsMms): self
return $this;
}

/**
* 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 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.
* @return $this Fluent Builder
*/
public function setContentSid(string $contentSid): self
{
$this->options['contentSid'] = $contentSid;
return $this;
}

/**
* 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.
*
Expand Down
2 changes: 2 additions & 0 deletions src/Twilio/Rest/Insights/V1/CallSummariesInstance.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
* @property array|null $attributes
* @property array|null $properties
* @property array|null $trust
* @property array|null $annotation
*/
class CallSummariesInstance extends InstanceResource
{
Expand Down Expand Up @@ -84,6 +85,7 @@ public function __construct(Version $version, array $payload)
'attributes' => Values::array_get($payload, 'attributes'),
'properties' => Values::array_get($payload, 'properties'),
'trust' => Values::array_get($payload, 'trust'),
'annotation' => Values::array_get($payload, 'annotation'),
];

$this->solution = [];
Expand Down
12 changes: 6 additions & 6 deletions src/Twilio/Rest/Insights/V1/CallSummariesList.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ public function page(
Serialize::booleanToString($options['abnormalSession']),
'AnsweredBy' =>
$options['answeredBy'],
'ConnectivityIssues' =>
$options['connectivityIssues'],
'QualityIssues' =>
$options['qualityIssues'],
'ConnectivityIssue' =>
$options['connectivityIssue'],
'QualityIssue' =>
$options['qualityIssue'],
'Spam' =>
Serialize::booleanToString($options['spam']),
'CallScores' =>
$options['callScores'],
'CallScore' =>
$options['callScore'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
Expand Down
Loading

0 comments on commit f68b9ea

Please sign in to comment.