From 631e5580328775cf07384304353e21bf758e4a1b Mon Sep 17 00:00:00 2001 From: jcechavarri Date: Thu, 21 Jul 2022 19:01:20 -0400 Subject: [PATCH] Add content support over rest --- twilio/rest/api/v2010/account/message/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/twilio/rest/api/v2010/account/message/__init__.py b/twilio/rest/api/v2010/account/message/__init__.py index 0675381f65..288b039831 100644 --- a/twilio/rest/api/v2010/account/message/__init__.py +++ b/twilio/rest/api/v2010/account/message/__init__.py @@ -43,7 +43,8 @@ def create(self, to, status_callback=values.unset, application_sid=values.unset, persistent_action=values.unset, schedule_type=values.unset, send_at=values.unset, send_as_mms=values.unset, from_=values.unset, messaging_service_sid=values.unset, body=values.unset, - media_url=values.unset): + media_url=values.unset, content_sid=values.unset, + content_variables=values.unset): """ Create the MessageInstance @@ -66,6 +67,8 @@ def create(self, to, status_callback=values.unset, application_sid=values.unset, :param unicode messaging_service_sid: The SID of the Messaging Service you want to associate with the message. :param unicode body: The text of the message you want to send. Can be up to 1,600 characters in length. :param list[unicode] media_url: The URL of the media to send with the message + :param unicode content_sid: The SID of the content to send. + :param dict[unicode] content_variables: Object containing the variables required to fill the content from `content_sid`. :returns: The created MessageInstance :rtype: twilio.rest.api.v2010.account.message.MessageInstance @@ -90,6 +93,8 @@ def create(self, to, status_callback=values.unset, application_sid=values.unset, 'ScheduleType': schedule_type, 'SendAt': serialize.iso8601_datetime(send_at), 'SendAsMms': send_as_mms, + 'ContentSid': content_sid, + 'ContentVariables': serialize.object(content_variables), }) payload = self._version.create(method='POST', uri=self._uri, data=data, ) @@ -470,6 +475,8 @@ def __init__(self, version, payload, account_sid, sid=None): 'price_unit': payload.get('price_unit'), 'api_version': payload.get('api_version'), 'subresource_uris': payload.get('subresource_uris'), + 'content_sid': payload.get('content_sid'), + 'content_variables': payload.get('content_variables'), } # Context