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 27df2a7 commit ba11724
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 60 deletions.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ twilio-python Changelog

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

[2023-06-15] Version 8.3.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 8.2.2
--------------------------
**Api**
Expand Down
12 changes: 6 additions & 6 deletions twilio/rest/api/v2010/account/message/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,12 @@ def create(
schedule_type: Union["MessageInstance.ScheduleType", object] = values.unset,
send_at: Union[datetime, object] = values.unset,
send_as_mms: Union[bool, object] = values.unset,
content_sid: Union[str, object] = values.unset,
content_variables: Union[str, object] = values.unset,
from_: Union[str, object] = values.unset,
messaging_service_sid: Union[str, object] = values.unset,
body: Union[str, object] = values.unset,
media_url: Union[List[str], object] = values.unset,
content_sid: Union[str, object] = values.unset,
) -> MessageInstance:
"""
Create the MessageInstance
Expand All @@ -512,12 +512,12 @@ def create(
:param schedule_type:
:param send_at: The time that Twilio will send the message. Must be in ISO 8601 format.
:param send_as_mms: If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
: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.
: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.
: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.
: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.
:param body: The text of the message you want to send. Can be up to 1,600 characters in length.
: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.
: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.
:returns: The created MessageInstance
"""
Expand All @@ -539,12 +539,12 @@ def create(
"ScheduleType": schedule_type,
"SendAt": serialize.iso8601_datetime(send_at),
"SendAsMms": send_as_mms,
"ContentSid": content_sid,
"ContentVariables": content_variables,
"From": from_,
"MessagingServiceSid": messaging_service_sid,
"Body": body,
"MediaUrl": serialize.map(media_url, lambda e: e),
"ContentSid": content_sid,
}
)

Expand Down Expand Up @@ -580,12 +580,12 @@ async def create_async(
schedule_type: Union["MessageInstance.ScheduleType", object] = values.unset,
send_at: Union[datetime, object] = values.unset,
send_as_mms: Union[bool, object] = values.unset,
content_sid: Union[str, object] = values.unset,
content_variables: Union[str, object] = values.unset,
from_: Union[str, object] = values.unset,
messaging_service_sid: Union[str, object] = values.unset,
body: Union[str, object] = values.unset,
media_url: Union[List[str], object] = values.unset,
content_sid: Union[str, object] = values.unset,
) -> MessageInstance:
"""
Asynchronously create the MessageInstance
Expand All @@ -606,12 +606,12 @@ async def create_async(
:param schedule_type:
:param send_at: The time that Twilio will send the message. Must be in ISO 8601 format.
:param send_as_mms: If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
: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.
: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.
: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.
: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.
:param body: The text of the message you want to send. Can be up to 1,600 characters in length.
: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.
: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.
:returns: The created MessageInstance
"""
Expand All @@ -633,12 +633,12 @@ async def create_async(
"ScheduleType": schedule_type,
"SendAt": serialize.iso8601_datetime(send_at),
"SendAsMms": send_as_mms,
"ContentSid": content_sid,
"ContentVariables": content_variables,
"From": from_,
"MessagingServiceSid": messaging_service_sid,
"Body": body,
"MediaUrl": serialize.map(media_url, lambda e: e),
"ContentSid": content_sid,
}
)

Expand Down
Loading

0 comments on commit ba11724

Please sign in to comment.