@@ -219,6 +219,29 @@ def to_dict(self):
219219 "types" : self .types .to_dict () if self .types is not None else None ,
220220 }
221221
222+ class ContentUpdateRequest (object ):
223+ """
224+ :ivar friendly_name: User defined name of the content
225+ :ivar variables: Key value pairs of variable name to value
226+ :ivar language: Language code for the content
227+ :ivar types:
228+ """
229+
230+ def __init__ (self , payload : Dict [str , Any ]):
231+
232+ self .friendly_name : Optional [str ] = payload .get ("friendly_name" )
233+ self .variables : Optional [dict [str , str ]] = payload .get ("variables" )
234+ self .language : Optional [str ] = payload .get ("language" )
235+ self .types : Optional [ContentList .Types ] = payload .get ("types" )
236+
237+ def to_dict (self ):
238+ return {
239+ "friendly_name" : self .friendly_name ,
240+ "variables" : self .variables ,
241+ "language" : self .language ,
242+ "types" : self .types .to_dict () if self .types is not None else None ,
243+ }
244+
222245 class FlowsPage (object ):
223246 """
224247 :ivar id:
@@ -925,6 +948,32 @@ async def fetch_async(self) -> "ContentInstance":
925948 """
926949 return await self ._proxy .fetch_async ()
927950
951+ def update (self , content_update_request : ContentUpdateRequest ) -> "ContentInstance" :
952+ """
953+ Update the ContentInstance
954+
955+ :param content_update_request:
956+
957+ :returns: The updated ContentInstance
958+ """
959+ return self ._proxy .update (
960+ content_update_request = content_update_request ,
961+ )
962+
963+ async def update_async (
964+ self , content_update_request : ContentUpdateRequest
965+ ) -> "ContentInstance" :
966+ """
967+ Asynchronous coroutine to update the ContentInstance
968+
969+ :param content_update_request:
970+
971+ :returns: The updated ContentInstance
972+ """
973+ return await self ._proxy .update_async (
974+ content_update_request = content_update_request ,
975+ )
976+
928977 @property
929978 def approval_create (self ) -> ApprovalCreateList :
930979 """
@@ -1144,6 +1193,29 @@ def to_dict(self):
11441193 "types" : self .types .to_dict () if self .types is not None else None ,
11451194 }
11461195
1196+ class ContentUpdateRequest (object ):
1197+ """
1198+ :ivar friendly_name: User defined name of the content
1199+ :ivar variables: Key value pairs of variable name to value
1200+ :ivar language: Language code for the content
1201+ :ivar types:
1202+ """
1203+
1204+ def __init__ (self , payload : Dict [str , Any ]):
1205+
1206+ self .friendly_name : Optional [str ] = payload .get ("friendly_name" )
1207+ self .variables : Optional [dict [str , str ]] = payload .get ("variables" )
1208+ self .language : Optional [str ] = payload .get ("language" )
1209+ self .types : Optional [ContentList .Types ] = payload .get ("types" )
1210+
1211+ def to_dict (self ):
1212+ return {
1213+ "friendly_name" : self .friendly_name ,
1214+ "variables" : self .variables ,
1215+ "language" : self .language ,
1216+ "types" : self .types .to_dict () if self .types is not None else None ,
1217+ }
1218+
11471219 class FlowsPage (object ):
11481220 """
11491221 :ivar id:
@@ -1735,7 +1807,7 @@ def __init__(self, version: Version, sid: str):
17351807 Initialize the ContentContext
17361808
17371809 :param version: Version that contains the resource
1738- :param sid: The Twilio-provided string that uniquely identifies the Content resource to fetch .
1810+ :param sid: The Twilio-provided string that uniquely identifies the Content resource to update .
17391811 """
17401812 super ().__init__ (version )
17411813
@@ -1816,6 +1888,52 @@ async def fetch_async(self) -> ContentInstance:
18161888 sid = self ._solution ["sid" ],
18171889 )
18181890
1891+ def update (self , content_update_request : ContentUpdateRequest ) -> ContentInstance :
1892+ """
1893+ Update the ContentInstance
1894+
1895+ :param content_update_request:
1896+
1897+ :returns: The updated ContentInstance
1898+ """
1899+ data = content_update_request .to_dict ()
1900+
1901+ headers = values .of ({})
1902+
1903+ headers ["Content-Type" ] = "application/json"
1904+
1905+ headers ["Accept" ] = "application/json"
1906+
1907+ payload = self ._version .update (
1908+ method = "PUT" , uri = self ._uri , data = data , headers = headers
1909+ )
1910+
1911+ return ContentInstance (self ._version , payload , sid = self ._solution ["sid" ])
1912+
1913+ async def update_async (
1914+ self , content_update_request : ContentUpdateRequest
1915+ ) -> ContentInstance :
1916+ """
1917+ Asynchronous coroutine to update the ContentInstance
1918+
1919+ :param content_update_request:
1920+
1921+ :returns: The updated ContentInstance
1922+ """
1923+ data = content_update_request .to_dict ()
1924+
1925+ headers = values .of ({})
1926+
1927+ headers ["Content-Type" ] = "application/json"
1928+
1929+ headers ["Accept" ] = "application/json"
1930+
1931+ payload = await self ._version .update_async (
1932+ method = "PUT" , uri = self ._uri , data = data , headers = headers
1933+ )
1934+
1935+ return ContentInstance (self ._version , payload , sid = self ._solution ["sid" ])
1936+
18191937 @property
18201938 def approval_create (self ) -> ApprovalCreateList :
18211939 """
@@ -2064,6 +2182,29 @@ def to_dict(self):
20642182 "types" : self .types .to_dict () if self .types is not None else None ,
20652183 }
20662184
2185+ class ContentUpdateRequest (object ):
2186+ """
2187+ :ivar friendly_name: User defined name of the content
2188+ :ivar variables: Key value pairs of variable name to value
2189+ :ivar language: Language code for the content
2190+ :ivar types:
2191+ """
2192+
2193+ def __init__ (self , payload : Dict [str , Any ]):
2194+
2195+ self .friendly_name : Optional [str ] = payload .get ("friendly_name" )
2196+ self .variables : Optional [dict [str , str ]] = payload .get ("variables" )
2197+ self .language : Optional [str ] = payload .get ("language" )
2198+ self .types : Optional [ContentList .Types ] = payload .get ("types" )
2199+
2200+ def to_dict (self ):
2201+ return {
2202+ "friendly_name" : self .friendly_name ,
2203+ "variables" : self .variables ,
2204+ "language" : self .language ,
2205+ "types" : self .types .to_dict () if self .types is not None else None ,
2206+ }
2207+
20672208 class FlowsPage (object ):
20682209 """
20692210 :ivar id:
@@ -2904,15 +3045,15 @@ def get(self, sid: str) -> ContentContext:
29043045 """
29053046 Constructs a ContentContext
29063047
2907- :param sid: The Twilio-provided string that uniquely identifies the Content resource to fetch .
3048+ :param sid: The Twilio-provided string that uniquely identifies the Content resource to update .
29083049 """
29093050 return ContentContext (self ._version , sid = sid )
29103051
29113052 def __call__ (self , sid : str ) -> ContentContext :
29123053 """
29133054 Constructs a ContentContext
29143055
2915- :param sid: The Twilio-provided string that uniquely identifies the Content resource to fetch .
3056+ :param sid: The Twilio-provided string that uniquely identifies the Content resource to update .
29163057 """
29173058 return ContentContext (self ._version , sid = sid )
29183059
0 commit comments