Skip to content

Commit 8b16c3c

Browse files
committed
[Librarian] Regenerated @ e23430afd3fa493c96b42fc37f0314ad84bbe6ef 23e59a55e752d2706cce811cfe03600e929d0fb4
1 parent c886f5a commit 8b16c3c

File tree

4 files changed

+803
-3
lines changed

4 files changed

+803
-3
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ twilio-python Changelog
33

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

6+
[2025-11-20] Version 9.8.7
7+
--------------------------
8+
**Memory**
9+
- # Memory API Changes
10+
- Added initial Memory API endpoints with darkseagreen badge status
11+
12+
613
[2025-11-11] Version 9.8.6
714
--------------------------
815
**Twiml**

twilio/rest/content/v1/content/__init__.py

Lines changed: 144 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

twilio/rest/numbers/v2/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from typing import Optional
1616
from twilio.base.version import Version
1717
from twilio.base.domain import Domain
18+
from twilio.rest.numbers.v2.application import ApplicationList
1819
from twilio.rest.numbers.v2.authorization_document import AuthorizationDocumentList
1920
from twilio.rest.numbers.v2.bulk_hosted_number_order import BulkHostedNumberOrderList
2021
from twilio.rest.numbers.v2.bundle_clone import BundleCloneList
@@ -31,12 +32,19 @@ def __init__(self, domain: Domain):
3132
:param domain: The Twilio.numbers domain
3233
"""
3334
super().__init__(domain, "v2")
35+
self._applications: Optional[ApplicationList] = None
3436
self._authorization_documents: Optional[AuthorizationDocumentList] = None
3537
self._bulk_hosted_number_orders: Optional[BulkHostedNumberOrderList] = None
3638
self._bundle_clone: Optional[BundleCloneList] = None
3739
self._hosted_number_orders: Optional[HostedNumberOrderList] = None
3840
self._regulatory_compliance: Optional[RegulatoryComplianceList] = None
3941

42+
@property
43+
def applications(self) -> ApplicationList:
44+
if self._applications is None:
45+
self._applications = ApplicationList(self)
46+
return self._applications
47+
4048
@property
4149
def authorization_documents(self) -> AuthorizationDocumentList:
4250
if self._authorization_documents is None:

0 commit comments

Comments
 (0)