8000 [Librarian] Regenerated @ a7caf52aaea6fe6c7b30170a468564bcea4f0362 13… · CodeBoarding/twilio-python@338cbb0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 338cbb0

Browse files
committed
[Librarian] Regenerated @ a7caf52aaea6fe6c7b30170a468564bcea4f0362 13ec50967b82ae43900a263102daafb96aa61935
1 parent ab846b4 commit 338cbb0

File tree

11 files changed

+212
-45
lines changed

11 files changed

+212
-45
lines changed

CHANGES.md

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

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

6+
[2025-01-28] Version 9.4.4
7+
--------------------------
8+
**Library - Fix**
9+
- [PR #822](https://github.com/twilio/twilio-python/pull/822): Fix for 10 vulnerabilities. Thanks to [@twilio-product-security](https://github.com/twilio-product-security)!
10+
11+
**Library - Chore**
12+
- [PR #834](https://github.com/twilio/twilio-python/pull/834): update httpclient. Thanks to [@manisha1997](https://github.com/manisha1997)!
13+
- [PR #837](https://github.com/twilio/twilio-python/pull/837): enable newer versions of aiohttp-retry. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
14+
- [PR #833](https://github.com/twilio/twilio-python/pull/833): created bug report issue template. Thanks to [@sbansla](https://github.com/sbansla)!
15+
16+
**Api**
17+
- Add open-api file tag to `conference/call recordings` and `recording_transcriptions`.
18+
19+
**Events**
20+
- Add support for subaccount subscriptions (beta)
21+
22+
**Insights**
23+
- add new region to conference APIs
24+
25+
**Lookups**
26+
- Add new `parnter_sub_id` query parameter to the lookup request
27+
28+
629
[2025-01-13] Version 9.4.3
730
--------------------------
831
**Messaging**

tests/unit/http/test_http_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ def test_session_not_preserved(self):
293293
self.assertEqual(response_2.content, "response_2")
294294

295295

296-
297296
class MyVersion(Version):
298297
def __init__(self, domain):
299298
super().__init__(domain, "v1")

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

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,26 @@ def to_dict(self):
525525
),
526526
}
527527

528+
class TwilioSchedule(object):
529+
"""
530+
:ivar id:
531+
:ivar title:
532+
:ivar time_slots:
533+
"""
534+
535+
def __init__(self, payload: Dict[str, Any]):
536+
537+
self.id: Optional[str] = payload.get("id")
538+
self.title: Optional[str] = payload.get("title")
539+
self.time_slots: Optional[str] = payload.get("time_slots")
540+
541+
def to_dict(self):
542+
return {
543+
"id": self.id,
544+
"title": self.title,
545+
"time_slots": self.time_slots,
546+
}
547+
528548
class TwilioText(object):
529549
"""
530550
:ivar body:
@@ -551,6 +571,7 @@ class Types(object):
551571
:ivar twilio_catalog:
552572
:ivar twilio_carousel:
553573
:ivar twilio_flows:
574+
:ivar twilio_schedule:
554575
:ivar whatsapp_card:
555576
:ivar whatsapp_authentication:
556577
"""
@@ -587,6 +608,9 @@ def __init__(self, payload: Dict[str, Any]):
587608
self.twilio_flows: Optional[ContentList.TwilioFlows] = payload.get(
588609
"twilio_flows"
589610
)
611+
self.twilio_schedule: Optional[ContentList.TwilioSchedule] = payload.get(
612+
"twilio_schedule"
613+
)
590614
self.whatsapp_card: Optional[ContentList.WhatsappCard] = payload.get(
591615
"whatsapp_card"
592616
)
@@ -642,6 +666,11 @@ def to_dict(self):
642666
if self.twilio_flows is not None
643667
else None
644668
),
669+
"twilio_schedule": (
670+
self.twilio_schedule.to_dict()
671+
if self.twilio_schedule is not None
672+
else None
673+
),
645674
"whatsapp_card": (
646675
self.whatsapp_card.to_dict()
647676
if self.whatsapp_card is not None
@@ -1355,6 +1384,26 @@ def to_dict(self):
13551384
),
13561385
}
13571386

1387+
class TwilioSchedule(object):
1388+
"""
1389+
:ivar id:
1390+
:ivar title:
1391+
:ivar time_slots:
1392+
"""
1393+
1394+
def __init__(self, payload: Dict[str, Any]):
1395+
1396+
self.id: Optional[str] = payload.get("id")
1397+
self.title: Optional[str] = payload.get("title")
1398+
self.time_slots: Optional[str] = payload.get("time_slots")
1399+
1400+
def to_dict(self):
1401+
return {
1402+
"id": self.id,
1403+
"title": self.title,
1404+
"time_slots": self.time_slots,
1405+
}
1406+
13581407
class TwilioText(object):
13591408
"""
13601409
:ivar body:
@@ -1381,6 +1430,7 @@ class Types(object):
13811430
:ivar twilio_catalog:
13821431
:ivar twilio_carousel:
13831432
:ivar twilio_flows:
1433+
:ivar twilio_schedule:
13841434
:ivar whatsapp_card:
13851435
:ivar whatsapp_authentication:
13861436
"""
@@ -1417,6 +1467,9 @@ def __init__(self, payload: Dict[str, Any]):
14171467
self.twilio_flows: Optional[ContentList.TwilioFlows] = payload.get(
14181468
"twilio_flows"
14191469
)
1470+
self.twilio_schedule: Optional[ContentList.TwilioSchedule] = payload.get(
1471+
"twilio_schedule"
1472+
)
14201473
self.whatsapp_card: Optional[ContentList.WhatsappCard] = payload.get(
14211474
"whatsapp_card"
14221475
)
@@ -1472,6 +1525,11 @@ def to_dict(self):
14721525
if self.twilio_flows is not None
14731526
else None
14741527
),
1528+
"twilio_schedule": (
1529+
self.twilio_schedule.to_dict()
1530+
if self.twilio_schedule is not None
1531+
else None
1532+
),
14751533
"whatsapp_card": (
14761534
self.whatsapp_card.to_dict()
14771535
if self.whatsapp_card is not None
@@ -2186,6 +2244,26 @@ def to_dict(self):
21862244
),
21872245
}
21882246

2247+
class TwilioSchedule(object):
2248+
"""
2249+
:ivar id:
2250+
:ivar title:
2251+
:ivar time_slots:
2252+
"""
2253+
2254+
def __init__(self, payload: Dict[str, Any]):
2255+
2256+
self.id: Optional[str] = payload.get("id")
2257+
self.title: Optional[str] = payload.get("title")
2258+
self.time_slots: Optional[str] = payload.get("time_slots")
2259+
2260+
def to_dict(self):
2261+
return {
2262+
"id": self.id,
2263+
"title": self.title,
2264+
"time_slots": self.time_slots,
2265+
}
2266+
21892267
class TwilioText(object):
21902268
"""
21912269
:ivar body:
@@ -2212,6 +2290,7 @@ class Types(object):
22122290
:ivar twilio_catalog:
22132291
:ivar twilio_carousel:
22142292
:ivar twilio_flows:
2293+
:ivar twilio_schedule:
22152294
:ivar whatsapp_card:
22162295
:ivar whatsapp_authentication:
22172296
"""
@@ -2248,6 +2327,9 @@ def __init__(self, payload: Dict[str, Any]):
22482327
self.twilio_flows: Optional[ContentList.TwilioFlows] = payload.get(
22492328
"twilio_flows"
22502329
)
2330+
self.twilio_schedule: Optional[ContentList.TwilioSchedule] = payload.get(
2331+
"twilio_schedule"
2332+
)
22512333
self.whatsapp_card: Optional[ContentList.WhatsappCard] = payload.get(
22522334
"whatsapp_card"
22532335
)
@@ -2303,6 +2385,11 @@ def to_dict(self):
23032385
if self.twilio_flows is not None
23042386
else None
23052387
),
2388+
"twilio_schedule": (
2389+
self.twilio_schedule.to_dict()
2390+
if self.twilio_schedule is not None
2391+
else None
2392+
),
23062393
"whatsapp_card": (
23072394
self.whatsapp_card.to_dict()
23082395
if self.whatsapp_card is not None

twilio/rest/conversations/v1/address_configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class Type(object):
4040
GBM = "gbm"
4141
EMAIL = "email"
4242
RCS = "rcs"
43+
APPLE = "apple"
4344

4445
"""
4546
:ivar sid: A 34 character string that uniquely identifies this resource.

twilio/rest/events/v1/subscription/__init__.py

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class SubscriptionInstance(InstanceResource):
3333
:ivar sink_sid: The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
3434
:ivar url: The URL of this resource.
3535
:ivar links: Contains a dictionary of URL links to nested resources of this Subscription.
36+
:ivar receive_events_from_subaccounts: Receive events from all children accounts in the parent account subscription.
3637
"""
3738

3839
def __init__(
@@ -52,6 +53,9 @@ def __init__(
5253
self.sink_sid: Optional[str] = payload.get("sink_sid")
5354
self.url: Optional[str] = payload.get("url")
5455
self.links: Optional[Dict[str, object]] = payload.get("links")
56+
self.receive_events_from_subaccounts: Optional[bool] = payload.get(
57+
"receive_events_from_subaccounts"
58+
)
5559

5660
self._solution = {
5761
"sid": sid or self.sid,
@@ -113,36 +117,42 @@ def update(
113117
self,
114118
description: Union[str, object] = values.unset,
115119
sink_sid: Union[str, object] = values.unset,
120+
receive_events_from_subaccounts: Union[bool, object] = values.unset,
116121
) -> "SubscriptionInstance":
117122
"""
118123
Update the SubscriptionInstance
119124
120125
:param description: A human readable description for the Subscription.
121126
:param sink_sid: The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
127+
:param receive_events_from_subaccounts: Receive events from all children accounts in the parent account subscription.
122128
123129
:returns: The updated SubscriptionInstance
124130
"""
125131
return self._proxy.update(
126132
description=description,
127133
sink_sid=sink_sid,
134+
receive_events_from_subaccounts=receive_events_from_subaccounts,
128135
)
129136

130137
async def update_async(
131138
self,
132139
description: Union[str, object] = values.unset,
133140
sink_sid: Union[str, object] = values.unset,
141+
receive_events_from_subaccounts: Union[bool, object] = values.unset,
134142
) -> "SubscriptionInstance":
135143
"""
136144
Asynchronous coroutine to update the SubscriptionInstance
137145
138146
:param description: A human readable description for the Subscription.
139147
:param sink_sid: The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
148+
:param receive_events_from_subaccounts: Receive events from all children accounts in the parent account subscription.
140149
141150
:returns: The updated SubscriptionInstance
142151
"""
143152
return await self._proxy.update_async(
144153
description=description,
145154
sink_sid=sink_sid,
155+
receive_events_from_subaccounts=receive_events_from_subaccounts,
146156
)
147157

148158
@property
@@ -253,12 +263,14 @@ def update(
253263
self,
254264
description: Union[str, object] = values.unset,
255265
sink_sid: Union[str, object] = values.unset,
266+
receive_events_from_subaccounts: Union[bool, object] = values.unset,
256267
) -> SubscriptionInstance:
257268
"""
258269
Update the SubscriptionInstance
259270
260271
:param description: A human readable description for the Subscription.
261272
:param sink_sid: The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
273+
:param receive_events_from_subaccounts: Receive events from all children accounts in the parent account subscription.
262274
263275
:returns: The updated SubscriptionInstance
264276
"""
@@ -267,6 +279,9 @@ def update(
267279
{
268280
"Description": description,
269281
"SinkSid": sink_sid,
282+
"ReceiveEventsFromSubaccounts": serialize.boolean_to_string(
283+
receive_events_from_subaccounts
284+
),
270285
}
271286
)
272287
headers = values.of({})
@@ -285,12 +300,14 @@ async def update_async(
285300
self,
286301
description: Union[str, object] = values.unset,
287302
sink_sid: Union[str, object] = values.unset,
303+
receive_events_from_subaccounts: Union[bool, object] = values.unset,
288304
) -> SubscriptionInstance:
289305
"""
290306
Asynchronous coroutine to update the SubscriptionInstance
291307
292308
:param description: A human readable description for the Subscription.
293309
:param sink_sid: The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
310+
:param receive_events_from_subaccounts: Receive events from all children accounts in the parent account subscription.
294311
295312
:returns: The updated SubscriptionInstance
296313
"""
@@ -299,6 +316,9 @@ async def update_async(
299316
{
300317
"Description": description,
301318
"SinkSid": sink_sid,
319+
"ReceiveEventsFromSubaccounts": serialize.boolean_to_string(
320+
receive_events_from_subaccounts
321+
),
302322
}
303323
)
304324
headers = values.of({})
@@ -368,14 +388,19 @@ def __init__(self, version: Version):
368388
self._uri = "/Subscriptions"
369389

370390
def create(
371-
self, description: str, sink_sid: str, types: List[object]
391+
self,
392+
description: str,
393+
sink_sid: str,
394+
types: List[object],
395+
receive_events_from_subaccounts: Union[bool, object] = values.unset,
372396
) -> SubscriptionInstance:
373397
"""
374398
Create the SubscriptionInstance
375399
376400
:param description: A human readable description for the Subscription **This value should not contain PII.**
377401
:param sink_sid: The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
378402
:param types: An array of objects containing the subscribed Event Types
403+
:param receive_events_from_subaccounts: Receive events from all children accounts in the parent account subscription.
379404
380405
:returns: The created SubscriptionInstance
381406
"""
@@ -385,6 +410,9 @@ def create(
385410
"Description": description,
386411
"SinkSid": sink_sid,
387412
"Types": serialize.map(types, lambda e: serialize.object(e)),
413+
"ReceiveEventsFromSubaccounts": serialize.boolean_to_string(
414+
receive_events_from_subaccounts
415+
),
388416
}
389417
)
390418
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
@@ -400,14 +428,19 @@ def create(
400428
return SubscriptionInstance(self._version, payload)
401429

402430
async def create_async(
403-
self, description: str, sink_sid: str, types: List[object]
431+
self,
432+
description: str,
433+
sink_sid: str,
434+
types: List[object],
435+
receive_events_from_subaccounts: Union[bool, object] = values.unset,
404436
) -> SubscriptionInstance:
405437
"""
406438
Asynchronously create the SubscriptionInstance
407439
408440
:param description: A human readable description for the Subscription **This value should not contain PII.**
409441
:param sink_sid: The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
410442
:param types: An array of objects containing the subscribed Event Types
443+
:param receive_events_from_subaccounts: Receive events from all children accounts in the parent account subscription.
411444
412445
:returns: The created SubscriptionInstance
413446
"""
@@ -417,6 +450,9 @@ async def create_async(
417450
"Description": description,
418451
"SinkSid": sink_sid,
419452
"Types": serialize.map(types, lambda e: serialize.object(e)),
453+
"ReceiveEventsFromSubaccounts": serialize.boolean_to_string(
454+
receive_events_from_subaccounts
455+
),
420456
}
421457
)
422458
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})

0 commit comments

Comments
 (0)
0