Skip to content

Commit c25470a

Browse files
committed
[Librarian] Regenerated @ a25fe2e20ee404d8f8642d6e5acceff276916c9e
1 parent c18ba65 commit c25470a

File tree

4 files changed

+281
-8
lines changed

4 files changed

+281
-8
lines changed

CHANGES.md

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

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

6+
[2023-10-05] Version 8.9.1
7+
--------------------------
8+
**Library - Chore**
9+
- [PR #721](https://github.com/twilio/twilio-python/pull/721): Drop dependency on `pytz` by using stdlib `datetime.timezone.utc`. Thanks to [@Zac-HD](https://github.com/Zac-HD)!
10+
- [PR #723](https://github.com/twilio/twilio-python/pull/723): twilio help changes. Thanks to [@kridai](https://github.com/kridai)!
11+
12+
**Library - Fix**
13+
- [PR #724](https://github.com/twilio/twilio-python/pull/724): Update ValidateSslCertificate method. Thanks to [@AsabuHere](https://github.com/AsabuHere)!
14+
15+
**Lookups**
16+
- Add test api support for Lookup v2
17+
18+
619
[2023-09-21] Version 8.9.0
720
--------------------------
821
**Conversations**

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ class UpdateStatus(object):
8686
:ivar price_unit: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. `usd`, `eur`, `jpy`).
8787
:ivar api_version: The API version used to process the Message
8888
:ivar subresource_uris: A list of related resources identified by their URIs relative to `https://api.twilio.com`
89-
:ivar tags: A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message.
9089
"""
9190

9291
def __init__(
@@ -126,7 +125,6 @@ def __init__(
126125
self.subresource_uris: Optional[Dict[str, object]] = payload.get(
127126
"subresource_uris"
128127
)
129-
self.tags: Optional[Dict[str, object]] = payload.get("tags")
130128

131129
self._solution = {
132130
"account_sid": account_sid,
@@ -495,7 +493,6 @@ def create(
495493
send_at: Union[datetime, object] = values.unset,
496494
send_as_mms: Union[bool, object] = values.unset,
497495
content_variables: Union[str, object] = values.unset,
498-
tags: Union[str, object] = values.unset,
499496
risk_check: Union["MessageInstance.RiskCheck", object] = values.unset,
500497
from_: Union[str, object] = values.unset,
501498
messaging_service_sid: Union[str, object] = values.unset,
@@ -523,7 +520,6 @@ def create(
523520
:param send_at: The time that Twilio will send the message. Must be in ISO 8601 format.
524521
:param send_as_mms: If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media.
525522
:param content_variables: For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used.
526-
:param tags: A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length.
527523
:param risk_check:
528524
:param from_: The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
529525
:param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
@@ -552,7 +548,6 @@ def create(
552548
"SendAt": serialize.iso8601_datetime(send_at),
553549
"SendAsMms": send_as_mms,
554550
"ContentVariables": content_variables,
555-
"Tags": tags,
556551
"RiskCheck": risk_check,
557552
"From": from_,
558553
"MessagingServiceSid": messaging_service_sid,
@@ -595,7 +590,6 @@ async def create_async(
595590
send_at: Union[datetime, object] = values.unset,
596591
send_as_mms: Union[bool, object] = values.unset,
597592
content_variables: Union[str, object] = values.unset,
598-
tags: Union[str, object] = values.unset,
599593
risk_check: Union["MessageInstance.RiskCheck", object] = values.unset,
600594
from_: Union[str, object] = values.unset,
601595
messaging_service_sid: Union[str, object] = values.unset,
@@ -623,7 +617,6 @@ async def create_async(
623617
:param send_at: The time that Twilio will send the message. Must be in ISO 8601 format.
624618
:param send_as_mms: If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media.
625619
:param content_variables: For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used.
626-
:param tags: A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length.
627620
:param risk_check:
628621
:param from_: The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
629622
:param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
@@ -652,7 +645,6 @@ async def create_async(
652645
"SendAt": serialize.iso8601_datetime(send_at),
653646
"SendAsMms": send_as_mms,
654647
"ContentVariables": content_variables,
655-
"Tags": tags,
656648
"RiskCheck": risk_check,
657649
"From": from_,
658650
"MessagingServiceSid": messaging_service_sid,

twilio/rest/trusthub/v1/__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.trusthub.v1.compliance_inquiries import ComplianceInquiriesList
1819
from twilio.rest.trusthub.v1.customer_profiles import CustomerProfilesList
1920
from twilio.rest.trusthub.v1.end_user import EndUserList
2021
from twilio.rest.trusthub.v1.end_user_type import EndUserTypeList
@@ -32,6 +33,7 @@ def __init__(self, domain: Domain):
3233
:param domain: The Twilio.trusthub domain
3334
"""
3435
super().__init__(domain, "v1")
36+
self._compliance_inquiries: Optional[ComplianceInquiriesList] = None
3537
self._customer_profiles: Optional[CustomerProfilesList] = None
3638
self._end_users: Optional[EndUserList] = None
3739
self._end_user_types: Optional[EndUserTypeList] = None
@@ -40,6 +42,12 @@ def __init__(self, domain: Domain):
4042
self._supporting_document_types: Optional[SupportingDocumentTypeList] = None
4143
self._trust_products: Optional[TrustProductsList] = None
4244

45+
@property
46+
def compliance_inquiries(self) -> ComplianceInquiriesList:
47+
if self._compliance_inquiries is None:
48+
self._compliance_inquiries = ComplianceInquiriesList(self)
49+
return self._compliance_inquiries
50+
4351
@property
4452
def customer_profiles(self) -> CustomerProfilesList:
4553
if self._customer_profiles is None:
Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
r"""
2+
This code was generated by
3+
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
7+
Twilio - Trusthub
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+
16+
from typing import Any, Dict, Optional
17+
from twilio.base import 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 ComplianceInquiriesInstance(InstanceResource):
25+
26+
"""
27+
:ivar inquiry_id: The unique ID used to start an embedded compliance registration session.
28+
:ivar inquiry_session_token: The session token used to start an embedded compliance registration session.
29+
:ivar customer_id: The CustomerID matching the Customer Profile that should be resumed or resubmitted for editing.
30+
:ivar url: The URL of this resource.
31+
"""
32+
33+
def __init__(
34+
self,
35+
version: Version,
36+
payload: Dict[str, Any],
37+
customer_id: Optional[str] = None,
38+
):
39+
super().__init__(version)
40+
41+
self.inquiry_id: Optional[str] = payload.get("inquiry_id")
42+
self.inquiry_session_token: Optional[str] = payload.get("inquiry_session_token")
43+
self.customer_id: Optional[str] = payload.get("customer_id")
44+
self.url: Optional[str] = payload.get("url")
45+
46+
self._solution = {
47+
"customer_id": customer_id or self.customer_id,
48+
}
49+
self._context: Optional[ComplianceInquiriesContext] = None
50+
51+
@property
52+
def _proxy(self) -> "ComplianceInquiriesContext":
53+
"""
54+
Generate an instance context for the instance, the context is capable of
55+
performing various actions. All instance actions are proxied to the context
56+
57+
:returns: ComplianceInquiriesContext for this ComplianceInquiriesInstance
58+
"""
59+
if self._context is None:
60+
self._context = ComplianceInquiriesContext(
61+
self._version,
62+
customer_id=self._solution["customer_id"],
63+
)
64+
return self._context
65+
66+
def update(self, primary_profile_sid: str) -> "ComplianceInquiriesInstance":
67+
"""
68+
Update the ComplianceInquiriesInstance
69+
70+
:param primary_profile_sid: The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile.
71+
72+
:returns: The updated ComplianceInquiriesInstance
73+
"""
74+
return self._proxy.update(
75+
primary_profile_sid=primary_profile_sid,
76+
)
77+
78+
async def update_async(
79+
self, primary_profile_sid: str
80+
) -> "ComplianceInquiriesInstance":
81+
"""
82+
Asynchronous coroutine to update the ComplianceInquiriesInstance
83+
84+
:param primary_profile_sid: The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile.
85+
86+
:returns: The updated ComplianceInquiriesInstance
87+
"""
88+
return await self._proxy.update_async(
89+
primary_profile_sid=primary_profile_sid,
90+
)
91+
92+
def __repr__(self) -> str:
93+
"""
94+
Provide a friendly representation
95+
96+
:returns: Machine friendly representation
97+
"""
98+
context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
99+
return "<Twilio.Trusthub.V1.ComplianceInquiriesInstance {}>".format(context)
100+
101+
102+
class ComplianceInquiriesContext(InstanceContext):
103+
def __init__(self, version: Version, customer_id: str):
104+
"""
105+
Initialize the ComplianceInquiriesContext
106+
107+
:param version: Version that contains the resource
108+
:param customer_id: The unique CustomerId matching the Customer Profile/Compliance Inquiry that should be resumed or resubmitted. This value will have been returned by the initial Compliance Inquiry creation call.
109+
"""
110+
super().__init__(version)
111+
112+
# Path Solution
113+
self._solution = {
114+
"customer_id": customer_id,
115+
}
116+
self._uri = "/ComplianceInquiries/Customers/{customer_id}/Initialize".format(
117+
**self._solution
118+
)
119+
120+
def update(self, primary_profile_sid: str) -> ComplianceInquiriesInstance:
121+
"""
122+
Update the ComplianceInquiriesInstance
123+
124+
:param primary_profile_sid: The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile.
125+
126+
:returns: The updated ComplianceInquiriesInstance
127+
"""
128+
data = values.of(
129+
{
130+
"PrimaryProfileSid": primary_profile_sid,
131+
}
132+
)
133+
134+
payload = self._version.update(
135+
method="POST",
136+
uri=self._uri,
137+
data=data,
138+
)
139+
140+
return ComplianceInquiriesInstance(
141+
self._version, payload, customer_id=self._solution["customer_id"]
142+
)
143+
144+
async def update_async(
145+
self, primary_profile_sid: str
146+
) -> ComplianceInquiriesInstance:
147+
"""
148+
Asynchronous coroutine to update the ComplianceInquiriesInstance
149+
150+
:param primary_profile_sid: The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile.
151+
152+
:returns: The updated ComplianceInquiriesInstance
153+
"""
154+
data = values.of(
155+
{
156+
"PrimaryProfileSid": primary_profile_sid,
157+
}
158+
)
159+
160+
payload = await self._version.update_async(
161+
method="POST",
162+
uri=self._uri,
163+
data=data,
164+
)
165+
166+
return ComplianceInquiriesInstance(
167+
self._version, payload, customer_id=self._solution["customer_id"]
168+
)
169+
170+
def __repr__(self) -> str:
171+
"""
172+
Provide a friendly representation
173+
174+
:returns: Machine friendly representation
175+
"""
176+
context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
177+
return "<Twilio.Trusthub.V1.ComplianceInquiriesContext {}>".format(context)
178+
179+
180+
class ComplianceInquiriesList(ListResource):
181+
def __init__(self, version: Version):
182+
"""
183+
Initialize the ComplianceInquiriesList
184+
185+
:param version: Version that contains the resource
186+
187+
"""
188+
super().__init__(version)
189+
190+
self._uri = "/ComplianceInquiries/Customers/Initialize"
191+
192+
def create(self, primary_profile_sid: str) -> ComplianceInquiriesInstance:
193+
"""
194+
Create the ComplianceInquiriesInstance
195+
196+
:param primary_profile_sid: The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile.
197+
198+
:returns: The created ComplianceInquiriesInstance
199+
"""
200+
data = values.of(
201+
{
202+
"PrimaryProfileSid": primary_profile_sid,
203+
}
204+
)
205+
206+
payload = self._version.create(
207+
method="POST",
208+
uri=self._uri,
209+
data=data,
210+
)
211+
212+
return ComplianceInquiriesInstance(self._version, payload)
213+
214+
async def create_async(
215+
self, primary_profile_sid: str
216+
) -> ComplianceInquiriesInstance:
217+
"""
218+
Asynchronously create the ComplianceInquiriesInstance
219+
220+
:param primary_profile_sid: The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile.
221+
222+
:returns: The created ComplianceInquiriesInstance
223+
"""
224+
data = values.of(
225+
{
226+
"PrimaryProfileSid": primary_profile_sid,
227+
}
228+
)
229+
230+
payload = await self._version.create_async(
231+
method="POST",
232+
uri=self._uri,
233+
data=data,
234+
)
235+
236+
return ComplianceInquiriesInstance(self._version, payload)
237+
238+
def get(self, customer_id: str) -> ComplianceInquiriesContext:
239+
"""
240+
Constructs a ComplianceInquiriesContext
241+
242+
:param customer_id: The unique CustomerId matching the Customer Profile/Compliance Inquiry that should be resumed or resubmitted. This value will have been returned by the initial Compliance Inquiry creation call.
243+
"""
244+
return ComplianceInquiriesContext(self._version, customer_id=customer_id)
245+
246+
def __call__(self, customer_id: str) -> ComplianceInquiriesContext:
247+
"""
248+
Constructs a ComplianceInquiriesContext
249+
250+
:param customer_id: The unique CustomerId matching the Customer Profile/Compliance Inquiry that should be resumed or resubmitted. This value will have been returned by the initial Compliance Inquiry creation call.
251+
"""
252+
return ComplianceInquiriesContext(self._version, customer_id=customer_id)
253+
254+
def __repr__(self) -> str:
255+
"""
256+
Provide a friendly representation
257+
258+
:returns: Machine friendly representation
259+
"""
260+
return "<Twilio.Trusthub.V1.ComplianceInquiriesList>"

0 commit comments

Comments
 (0)