Skip to content

Commit ba11724

Browse files
committed
[Librarian] Regenerated @ 0430a9c977225d55252b84f4d16e16ad2091cde1
1 parent 27df2a7 commit ba11724

File tree

3 files changed

+72
-60
lines changed

3 files changed

+72
-60
lines changed

CHANGES.md

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ twilio-python Changelog
33

44
Here you can see the full list of changes between each twilio-python release.
55

6+
[2023-06-15] Version 8.3.0
7+
--------------------------
8+
**Api**
9+
- Added `content_sid` as conditional parameter
10+
- Removed `content_sid` as optional field **(breaking change)**
11+
12+
**Insights**
13+
- Added `annotation` to list summary output
14+
15+
616
[2023-06-01] Version 8.2.2
717
--------------------------
818
**Api**

twilio/rest/api/v2010/account/message/__init__.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -486,12 +486,12 @@ def create(
486486
schedule_type: Union["MessageInstance.ScheduleType", object] = values.unset,
487487
send_at: Union[datetime, object] = values.unset,
488488
send_as_mms: Union[bool, object] = values.unset,
489-
content_sid: Union[str, object] = values.unset,
490489
content_variables: Union[str, object] = values.unset,
491490
from_: Union[str, object] = values.unset,
492491
messaging_service_sid: Union[str, object] = values.unset,
493492
body: Union[str, object] = values.unset,
494493
media_url: Union[List[str], object] = values.unset,
494+
content_sid: Union[str, object] = values.unset,
495495
) -> MessageInstance:
496496
"""
497497
Create the MessageInstance
@@ -512,12 +512,12 @@ def create(
512512
:param schedule_type:
513513
:param send_at: The time that Twilio will send the message. Must be in ISO 8601 format.
514514
:param send_as_mms: If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
515-
:param content_sid: 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.
516515
:param content_variables: 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.
517516
:param 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.
518517
:param messaging_service_sid: 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.
519518
:param body: The text of the message you want to send. Can be up to 1,600 characters in length.
520519
:param media_url: 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.
520+
:param content_sid: 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.
521521
522522
:returns: The created MessageInstance
523523
"""
@@ -539,12 +539,12 @@ def create(
539539
"ScheduleType": schedule_type,
540540
"SendAt": serialize.iso8601_datetime(send_at),
541541
"SendAsMms": send_as_mms,
542-
"ContentSid": content_sid,
543542
"ContentVariables": content_variables,
544543
"From": from_,
545544
"MessagingServiceSid": messaging_service_sid,
546545
"Body": body,
547546
"MediaUrl": serialize.map(media_url, lambda e: e),
547+
"ContentSid": content_sid,
548548
}
549549
)
550550

@@ -580,12 +580,12 @@ async def create_async(
580580
schedule_type: Union["MessageInstance.ScheduleType", object] = values.unset,
581581
send_at: Union[datetime, object] = values.unset,
582582
send_as_mms: Union[bool, object] = values.unset,
583-
content_sid: Union[str, object] = values.unset,
584583
content_variables: Union[str, object] = values.unset,
585584
from_: Union[str, object] = values.unset,
586585
messaging_service_sid: Union[str, object] = values.unset,
587586
body: Union[str, object] = values.unset,
588587
media_url: Union[List[str], object] = values.unset,
588+
content_sid: Union[str, object] = values.unset,
589589
) -> MessageInstance:
590590
"""
591591
Asynchronously create the MessageInstance
@@ -606,12 +606,12 @@ async def create_async(
606606
:param schedule_type:
607607
:param send_at: The time that Twilio will send the message. Must be in ISO 8601 format.
608608
:param send_as_mms: If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
609-
:param content_sid: 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.
610609
:param content_variables: 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.
611610
:param 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.
612611
:param messaging_service_sid: 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.
613612
:param body: The text of the message you want to send. Can be up to 1,600 characters in length.
614613
:param media_url: 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.
614+
:param content_sid: 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.
615615
616616
:returns: The created MessageInstance
617617
"""
@@ -633,12 +633,12 @@ async def create_async(
633633
"ScheduleType": schedule_type,
634634
"SendAt": serialize.iso8601_datetime(send_at),
635635
"SendAsMms": send_as_mms,
636-
"ContentSid": content_sid,
637636
"ContentVariables": content_variables,
638637
"From": from_,
639638
"MessagingServiceSid": messaging_service_sid,
640639
"Body": body,
641640
"MediaUrl": serialize.map(media_url, lambda e: e),
641+
"ContentSid": content_sid,
642642
}
643643
)
644644

0 commit comments

Comments
 (0)