8000 [Librarian] Regenerated @ d97b0740a0c7cf86beebd56c6973927b07719cde 1f… · twilio/twilio-python@ccce713 · GitHub
[go: up one dir, main page]

Skip to content

Commit ccce713

Browse files
committed
[Librarian] Regenerated @ d97b0740a0c7cf86beebd56c6973927b07719cde 1fc3bb6195ebcbd02451fb8fc9080c695b075d4f
1 parent 69b9ae8 commit ccce713

File tree

4 files changed

+247
-21
lines changed

4 files changed

+247
-21
lines changed

CHANGES.md

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

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

6+
[2024-10-17] Version 9.3.4
7+
--------------------------
8+
**Api**
9+
- Add response key `country` to fetch AvailablePhoneNumber resource by specific country.
10+
11+
**Messaging**
12+
- Make library and doc public for requestManagedCert Endpoint
13+
14+
615
[2024-10-03] Version 9.3.3
716
--------------------------
817
**Library - Chore**

twilio/rest/messaging/v1/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from twilio.rest.messaging.v1.linkshortening_messaging_service_domain_association import (
3030
LinkshorteningMessagingServiceDomainAssociationList,
3131
)
32+
from twilio.rest.messaging.v1.request_managed_cert import RequestManagedCertList
3233
from twilio.rest.messaging.v1.service import ServiceList
3334
from twilio.rest.messaging.v1.tollfree_verification import TollfreeVerificationList
3435
from twilio.rest.messaging.v1.usecase import UsecaseList
@@ -57,6 +58,7 @@ def __init__(self, domain: Domain):
5758
self._linkshortening_messaging_service_domain_association: Optional[
5859
LinkshorteningMessagingServiceDomainAssociationList
5960
] = None
61+
self._request_managed_cert: Optional[RequestManagedCertList] = None
6062
self._services: Optional[ServiceList] = None
6163
self._tollfree_verifications: Optional[TollfreeVerificationList] = None
6264
self._usecases: Optional[UsecaseList] = None
@@ -117,6 +119,12 @@ def linkshortening_messaging_service_domain_association(
117119
)
118120
return self._linkshortening_messaging_service_domain_association
119121

122+
@property
123+
def request_managed_cert(self) -> RequestManagedCertList:
124+
if self._request_managed_cert is None:
125+
self._request_managed_cert = RequestManagedCertList(self)
126+
return self._request_managed_cert
127+
120128
@property
121129
def services(self) -> ServiceList:
122130
if self._services is None:
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
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 RequestManagedCertInstance(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_created: Date that this Domain was registered to the Twilio platform to create a new Domain object.
29+
:ivar date_expires: Date that the private certificate associated with this domain expires. This is the expiration date of your existing cert.
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 url:
33+
:ivar managed: A boolean flag indicating if the certificate is managed by Twilio.
34+
:ivar requesting: A boolean flag indicating if a managed certificate needs to be fulfilled by Twilio.
35+
"""
36+
37+
def __init__(
38+
self,
39+
version: Version,
40+
payload: Dict[str, Any],
41+
domain_sid: Optional[str] = None,
42+
):
43+
super().__init__(version)
44+
45+
self.domain_sid: Optional[str] = payload.get("domain_ 3270 sid")
46+
self.date_updated: Optional[datetime] = deserialize.iso8601_datetime(
47+
payload.get("date_updated")
48+
)
49+
self.date_created: Optional[datetime] = deserialize.iso8601_datetime(
50+
payload.get("date_created")
51+
)
52+
self.date_expires: Optional[datetime] = deserialize.iso8601_datetime(
53+
payload.get("date_expires")
54+
)
55+
self.domain_name: Optional[str] = payload.get("domain_name")
56+
self.certificate_sid: Optional[str] = payload.get("certificate_sid")
57+
self.url: Optional[str] = payload.get("url")
58+
self.managed: Optional[bool] = payload.get("managed")
59+
self.requesting: Optional[bool] = payload.get("requesting")
60+
61+
self._solution = {
62+
"domain_sid": domain_sid or self.domain_sid,
63+
}
64+
self._context: Optional[RequestManagedCertContext] = None
65+
66+
@property
67+
def _proxy(self) -> "RequestManagedCertContext":
68+
"""
69+
Generate an instance context for the instance, the context is capable of
70+
performing various actions. All instance actions are proxied to the context
71+
72+
:returns: RequestManagedCertContext for this RequestManagedCertInstance
73+
"""
74+
if self._context is None:
75+
self._context = RequestManagedCertContext(
76+
self._version,
77+
domain_sid=self._solution["domain_sid"],
78+
)
79+
return self._context
80+
81+
def update(self) -> "RequestManagedCertInstance":
82+
"""
83+
Update the RequestManagedCertInstance
84+
85+
86+
:returns: The updated RequestManagedCertInstance
87+
"""
88+
return self._proxy.update()
89+
90+
async def update_async(self) -> "RequestManagedCertInstance":
91+
"""
92+
Asynchronous coroutine to update the RequestManagedCertInstance
93+
94+
95+
:returns: The updated RequestManagedCertInstance
96+
"""
97+
return await self._proxy.update_async()
98+
99+
def __repr__(self) -> str:
100+
"""
101+
Provide a friendly representation
102+
103+
:returns: Machine friendly representation
104+
"""
105+
context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
106+
return "<Twilio.Messaging.V1.RequestManagedCertInstance {}>".format(context)
107+
108+
109+
class RequestManagedCertContext(InstanceContext):
110+
111+
def __init__(self, version: Version, domain_sid: str):
112+
"""
113+
Initialize the RequestManagedCertContext
114+
115+
:param version: Version that contains the resource
116+
:param domain_sid: Unique string used to identify the domain that this certificate should be associated with.
117+
"""
118+
super().__init__(version)
119+
120+
# Path Solution
121+
self._solution = {
122+
"domain_sid": domain_sid,
123+
}
124+
self._uri = "/LinkShortening/Domains/{domain_sid}/RequestManagedCert".format(
125+
**self._solution
126+
)
127+
128+
def update(self) -> RequestManagedCertInstance:
129+
"""
130+
Update the RequestManagedCertInstance
131+
132+
133+
:returns: The updated RequestManagedCertInstance
134+
"""
135+
data = values.of({})
136+
137+
payload = self._version.update(
138+
method="POST",
139+
uri=self._uri,
140+
data=data,
141+
)
142+
143+
return RequestManagedCertInstance(
144+
self._version, payload, domain_sid=self._solution["domain_sid"]
145+
)
146+
147+
async def update_async(self) -> RequestManagedCertInstance:
148+
"""
149+
Asynchronous coroutine to update the RequestManagedCertInstance
150+
151+
152+
:returns: The updated RequestManagedCertInstance
153+
"""
154+
data = values.of({})
155+
156+
payload = await self._version.update_async(
157+
method="POST",
158+
uri=self._uri,
159+
data=data,
160+
)
161+
162+
return RequestManagedCertInstance(
163+
self._version, payload, domain_sid=self._solution["domain_sid"]
164+
)
165+
166+
def __repr__(self) -> str:
167+
"""
168+
Provide a friendly representation
169+
170+
:returns: Machine friendly representation
171+
"""
172+
context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
173+
return "<Twilio.Messaging.V1.RequestManagedCertContext {}>".format(context)
174+
175+
176+
class RequestManagedCertList(ListResource):
177+
178+
def __init__(self, version: Version):
179+
"""
180+
Initialize the RequestManagedCertList
181+
182+
:param version: Version that contains the resource
183+
184+
"""
185+
super().__init__(version)
186+
187+
def get(self, domain_sid: str) -> RequestManagedCertContext:
188+
"""
189+
Constructs a RequestManagedCertContext
190+
191+
:param domain_sid: Unique string used to identify the domain that this certificate should be associated with.
192+
"""
193+
return RequestManagedCertContext(self._version, domain_sid=domain_sid)
194+
195+
def __call__(self, domain_sid: str) -> RequestManagedCertContext:
196+
"""
197+
Constructs a RequestManagedCertContext
198+
199+
:param domain_sid: Unique string used to identify the domain that this certificate should be associated with.
200+
"""
201+
return RequestManagedCertContext(self._version, domain_sid=domain_sid)
202+
203+
def __repr__(self) -> str:
204+
"""
205+
Provide a friendly representation
206+
207+
:returns: Machine friendly representation
208+
"""
209+
return "<Twilio.Messaging.V1.RequestManagedCertList>"

0 commit comments

Comments
 (0)
0