Skip to content

Commit 590a0f0

Browse files
committed
[Librarian] Regenerated @ ed54b4c8e0cb1a9c046256a32f0d793bc1999424 70b7e9f9f68469f076b7c43b68a828f609a29d7c
1 parent 3e08637 commit 590a0f0

7 files changed

Lines changed: 352 additions & 30 deletions

File tree

CHANGES.md

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

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

6+
[2025-12-17] Version 9.9.0
7+
--------------------------
8+
**Library - Fix**
9+
- [PR #898](https://github.com/twilio/twilio-python/pull/898): allow 2XX response for delete operation. Thanks to [@kridai](https://github.com/kridai)!
10+
11+
**Trunking**
12+
- Corrected the type used for phone number capabilities when accessed through a Trunk. **(breaking change)**
13+
- Corrected the type used for phone number capabilities when accessed through a Trunk. **(breaking change)**
14+
15+
**Trusthub**
16+
- Added new parameters in in toll-free initialize api payload.
17+
- Remove the invalid status transition to Draft from the examples
18+
- Change the value of email to a valid one in the examples.
19+
20+
621
[2025-12-03] Version 9.8.8
722
--------------------------
823
**Library - Fix**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def create(
521521
:param region: The state or region of the new address.
522522
:param postal_code: The postal code of the new address.
523523
:param iso_country: The ISO country code of the new address.
524-
:param friendly_name: A descriptive string that you create to describe the new address. It can be up to 64 characters long.
524+
:param friendly_name: A descriptive string that you create to describe the new address. It can be up to 64 characters long for Regulatory Compliance addresses and 32 characters long for Emergency addresses.
525525
:param emergency_enabled: Whether to enable emergency calling on the new address. Can be: `true` or `false`.
526526
:param auto_correct_address: Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide.
527527
:param street_secondary: The additional number and street address of the address.
@@ -579,7 +579,7 @@ async def create_async(
579579
:param region: The state or region of the new address.
580580
:param postal_code: The postal code of the new address.
581581
:param iso_country: The ISO country code of the new address.
582-
:param friendly_name: A descriptive string that you create to describe the new address. It can be up to 64 characters long.
582+
:param friendly_name: A descriptive string that you create to describe the new address. It can be up to 64 characters long for Regulatory Compliance addresses and 32 characters long for Emergency addresses.
583583
:param emergency_enabled: Whether to enable emergency calling on the new address. Can be: `true` or `false`.
584584
:param auto_correct_address: Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide.
585585
:param street_secondary: The additional number and street address of the address.

twilio/rest/messaging/v2/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from twilio.base.version import Version
1717
from twilio.base.domain import Domain
1818
from twilio.rest.messaging.v2.channels_sender import ChannelsSenderList
19+
from twilio.rest.messaging.v2.domain_certs import DomainCertsList
1920
from twilio.rest.messaging.v2.typing_indicator import TypingIndicatorList
2021

2122

@@ -29,6 +30,7 @@ def __init__(self, domain: Domain):
2930
"""
3031
super().__init__(domain, "v2")
3132
self._channels_senders: Optional[ChannelsSenderList] = None
33+
self._domain_certs: Optional[DomainCertsList] = None
3234
self._typing_indicator: Optional[TypingIndicatorList] = None
3335

3436
@property
@@ -37,6 +39,12 @@ def channels_senders(self) -> ChannelsSenderList:
3739
self._channels_senders = ChannelsSenderList(self)
3840
return self._channels_senders
3941

42+
@property
43+
def domain_certs(self) -> DomainCertsList:
44+
if self._domain_certs is None:
45+
self._domain_certs = DomainCertsList(self)
46+
return self._domain_certs
47+
4048
@property
4149
def typing_indicator(self) -> TypingIndicatorList:
4250
if self._typing_indicator is None:
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
r"""
2+
This code was generated by
3+
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
7+
Twilio - Messaging
8+
This is the public Twilio REST API.
9+
10+
NOTE: This class is auto generated by OpenAPI Generator.
11+
https://openapi-generator.tech
12+
Do not edit the class manually.
13+
"""
14+
15+
from datetime import datetime
16+
from typing import Any, Dict, Optional
17+
from twilio.base import deserialize, values
18+
from twilio.base.instance_context import InstanceContext
19+
from twilio.base.instance_resource import InstanceResource
20+
from twilio.base.list_resource import ListResource
21+
from twilio.base.version import Version
22+
23+
24+
class DomainCertsInstance(InstanceResource):
25+
"""
26+
:ivar domain_sid: The unique string that we created to identify the Domain resource.
27+
:ivar date_updated: Date that this Domain was last updated.
28+
:ivar date_expires: Date that the private certificate associated with this domain expires. You will need to update the certificate before that date to ensure your shortened links will continue to work.
29+
:ivar date_created: Date that this Domain was registered to the Twilio platform to create a new Domain object.
30+
:ivar domain_name: Full url path for this domain.
31+
:ivar certificate_sid: The unique string that we created to identify this Certificate resource.
32+
:ivar managed: Boolean field that indicates whether the certificate is managed by Twilio or uploaded by the customer.
33+
:ivar requesting: Boolean field that indicates whether a Twilio managed cert request is in progress or completed. True indicates a request is in progress and false indicates the request has completed or not requested yet.
34+
:ivar url:
35+
:ivar cert_in_validation: Optional JSON field describing the status and upload date of a new certificate in the process of validation
36+
"""
37+
38+
def __init__(
39+
self,
40+
version: Version,
41+
payload: Dict[str, Any],
42+
domain_sid: Optional[str] = None,
43+
):
44+
super().__init__(version)
45+
46+
self.domain_sid: Optional[str] = payload.get("domain_sid")
47+
self.date_updated: Optional[datetime] = deserialize.iso8601_datetime(
48+
payload.get("date_updated")
49+
)
50+
self.date_expires: Optional[datetime] = deserialize.iso8601_datetime(
51+
payload.get("date_expires")
52+
)
53+
self.date_created: Optional[datetime] = deserialize.iso8601_datetime(
54+
payload.get("date_created")
55+
)
56+
self.domain_name: Optional[str] = payload.get("domain_name")
57+
self.certificate_sid: Optional[str] = payload.get("certificate_sid")
58+
self.managed: Optional[bool] = payload.get("managed")
59+
self.requesting: Optional[bool] = payload.get("requesting")
60+
self.url: Optional[str] = payload.get("url")
61+
self.cert_in_validation: Optional[Dict[str, object]] = payload.get(
62+
"cert_in_validation"
63+
)
64+
65+
self._solution = {
66+
"domain_sid": domain_sid or self.domain_sid,
67+
}
68+
self._context: Optional[DomainCertsContext] = None
69+
70+
@property
71+
def _proxy(self) -> "DomainCertsContext":
72+
"""
73+
Generate an instance context for the instance, the context is capable of
74+
performing various actions. All instance actions are proxied to the context
75+
76+
:returns: DomainCertsContext for this DomainCertsInstance
77+
"""
78+
if self._context is None:
79+
self._context = DomainCertsContext(
80+
self._version,
81+
domain_sid=self._solution["domain_sid"],
82+
)
83+
return self._context
84+
85+
def fetch(self) -> "DomainCertsInstance":
86+
"""
87+
Fetch the DomainCertsInstance
88+
89+
90+
:returns: The fetched DomainCertsInstance
91+
"""
92+
return self._proxy.fetch()
93+
94+
async def fetch_async(self) -> "DomainCertsInstance":
95+
"""
96+
Asynchronous coroutine to fetch the DomainCertsInstance
97+
98+
99+
:returns: The fetched DomainCertsInstance
100+
"""
101+
return await self._proxy.fetch_async()
102+
103+
def __repr__(self) -> str:
104+
"""
105+
Provide a friendly representation
106+
107+
:returns: Machine friendly representation
108+
"""
109+
context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
110+
return "<Twilio.Messaging.V2.DomainCertsInstance {}>".format(context)
111+
112+
113+
class DomainCertsContext(InstanceContext):
114+
115+
def __init__(self, version: Version, domain_sid: str):
116+
"""
117+
Initialize the DomainCertsContext
118+
119+
:param version: Version that contains the resource
120+
:param domain_sid: Unique string used to identify the domain that this certificate should be associated with.
121+
"""
122+
super().__init__(version)
123+
124+
# Path Solution
125+
self._solution = {
126+
"domain_sid": domain_sid,
127+
}
128+
self._uri = "/LinkShortening/Domains/{domain_sid}/Certificate".format(
129+
**self._solution
130+
)
131+
132+
def fetch(self) -> DomainCertsInstance:
133+
"""
134+
Fetch the DomainCertsInstance
135+
136+
137+
:returns: The fetched DomainCertsInstance
138+
"""
139+
140+
headers = values.of({})
141+
142+
headers["Accept"] = "application/json"
143+
144+
payload = self._version.fetch(method="GET", uri=self._uri, headers=headers)
145+
146+
return DomainCertsInstance(
147+
self._version,
148+
payload,
149+
domain_sid=self._solution["domain_sid"],
150+
)
151+
152+
async def fetch_async(self) -> DomainCertsInstance:
153+
"""
154+
Asynchronous coroutine to fetch the DomainCertsInstance
155+
156+
157+
:returns: The fetched DomainCertsInstance
158+
"""
159+
160+
headers = values.of({})
161+
162+
headers["Accept"] = "application/json"
163+
164+
payload = await self._version.fetch_async(
165+
method="GET", uri=self._uri, headers=headers
166+
)
167+
168+
return DomainCertsInstance(
169+
self._version,
170+
payload,
171+
domain_sid=self._solution["domain_sid"],
172+
)
173+
174+
def __repr__(self) -> str:
175+
"""
176+
Provide a friendly representation
177+
178+
:returns: Machine friendly representation
179+
"""
180+
context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
181+
return "<Twilio.Messaging.V2.DomainCertsContext {}>".format(context)
182+
183+
184+
class DomainCertsList(ListResource):
185+
186+
def __init__(self, version: Version):
187+
"""
188+
Initialize the DomainCertsList
189+
190+
:param version: Version that contains the resource
191+
192+
"""
193+
super().__init__(version)
194+
195+
def get(self, domain_sid: str) -> DomainCertsContext:
196+
"""
197+
Constructs a DomainCertsContext
198+
199+
:param domain_sid: Unique string used to identify the domain that this certificate should be associated with.
200+
"""
201+
return DomainCertsContext(self._version, domain_sid=domain_sid)
202+
203+
def __call__(self, domain_sid: str) -> DomainCertsContext:
204+
"""
205+
Constructs a DomainCertsContext
206+
207+
:param domain_sid: Unique string used to identify the domain that this certificate should be associated with.
208+
"""
209+
return DomainCertsContext(self._version, domain_sid=domain_sid)
210+
211+
def __repr__(self) -> str:
212+
"""
213+
Provide a friendly representation
214+
215+
:returns: Machine friendly representation
216+
"""
217+
return "<Twilio.Messaging.V2.DomainCertsList>"

0 commit comments

Comments
 (0)