Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 523612f

Browse files
chore: preview changes by twiml gather
1 parent ffc0aa1 commit 523612f

File tree

8 files changed

+22
-161
lines changed

8 files changed

+22
-161
lines changed

CHANGES.md

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

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

6+
[2025-01-31] Version 9.5.0
7+
--------------------------
8+
**Twiml**
9+
- Convert Twiml Attribute `speechModel` of type enum to string **(breaking change)**
10+
11+
612
[2025-01-28] Version 9.4.4
713
--------------------------
814
**Library - Fix**

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

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -525,26 +525,6 @@ 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-
548528
class TwilioText(object):
549529
"""
550530
:ivar body:
@@ -571,7 +551,6 @@ class Types(object):
571551
:ivar twilio_catalog:
572552
:ivar twilio_carousel:
573553
:ivar twilio_flows:
574-
:ivar twilio_schedule:
575554
:ivar whatsapp_card:
576555
:ivar whatsapp_authentication:
577556
"""
@@ -608,9 +587,6 @@ def __init__(self, payload: Dict[str, Any]):
608587
self.twilio_flows: Optional[ContentList.TwilioFlows] = payload.get(
609588
"twilio_flows"
610589
)
611-
self.twilio_schedule: Optional[ContentList.TwilioSchedule] = payload.get(
612-
"twilio_schedule"
613-
)
614590
self.whatsapp_card: Optional[ContentList.WhatsappCard] = payload.get(
615591
"whatsapp_card"
616592
)
@@ -666,11 +642,6 @@ def to_dict(self):
666642
if self.twilio_flows is not None
667643
else None
668644
),
669-
"twilio_schedule": (
670-
self.twilio_schedule.to_dict()
671-
if self.twilio_schedule is not None
672-
else None
673-
),
674645
"whatsapp_card": (
675646
self.whatsapp_card.to_dict()
676647
if self.whatsapp_card is not None
@@ -1384,26 +1355,6 @@ def to_dict(self):
13841355
),
13851356
}
13861357

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-
14071358
class TwilioText(object):
14081359
"""
14091360
:ivar body:
@@ -1430,7 +1381,6 @@ class Types(object):
14301381
:ivar twilio_catalog:
14311382
:ivar twilio_carousel:
14321383
:ivar twilio_flows:
1433-
:ivar twilio_schedule:
14341384
:ivar whatsapp_card:
14351385
:ivar whatsapp_authentication:
14361386
"""
@@ -1467,9 +1417,6 @@ def __init__(self, payload: Dict[str, Any]):
14671417
self.twilio_flows: Optional[ContentList.TwilioFlows] = payload.get(
14681418
"twilio_flows"
14691419
)
1470-
self.twilio_schedule: Optional[ContentList.TwilioSchedule] = payload.get(
1471-
"twilio_schedule"
1472-
)
14731420
self.whatsapp_card: Optional[ContentList.WhatsappCard] = payload.get(
14741421
"whatsapp_card"
14751422
)
@@ -1525,11 +1472,6 @@ def to_dict(self):
15251472
if self.twilio_flows is not None
15261473
else None
15271474
),
1528-
"twilio_schedule": (
1529-
self.twilio_schedule.to_dict()
1530-
if self.twilio_schedule is not None
1531-
else None
1532-
),
15331475
"whatsapp_card": (
15341476
self.whatsapp_card.to_dict()
15351477
if self.whatsapp_card is not None
@@ -2244,26 +2186,6 @@ def to_dict(self):
22442186
),
22452187
}
22462188

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-
22672189
class TwilioText(object):
22682190
"""
22692191
:ivar body:
@@ -2290,7 +2212,6 @@ class Types(object):
22902212
:ivar twilio_catalog:
22912213
:ivar twilio_carousel:
22922214
:ivar twilio_flows:
2293-
:ivar twilio_schedule:
22942215
:ivar whatsapp_card:
22952216
:ivar whatsapp_authentication:
22962217
"""
@@ -2327,9 +2248,6 @@ def __init__(self, payload: Dict[str, Any]):
23272248
self.twilio_flows: Optional[ContentList.TwilioFlows] = payload.get(
23282249
"twilio_flows"
23292250
)
2330-
self.twilio_schedule: Optional[ContentList.TwilioSchedule] = payload.get(
2331-
"twilio_schedule"
2332-
)
23332251
self.whatsapp_card: Optional[ContentList.WhatsappCard] = payload.get(
23342252
"whatsapp_card"
23352253
)
@@ -2385,11 +2303,6 @@ def to_dict(self):
23852303
if self.twilio_flows is not None
23862304
else None
23872305
),
2388-
"twilio_schedule": (
2389-
self.twilio_schedule.to_dict()
2390-
if self.twilio_schedule is not None
2391-
else None
2392-
),
23932306
"whatsapp_card": (
23942307
self.whatsapp_card.to_dict()
23952308
if self.whatsapp_card is not None

twilio/rest/conversations/v1/address_configuration.py

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

4544
"""
4645
:ivar sid: A 34 character string that uniquely identifies this resource.

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

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ 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.
3736
"""
3837

3938
def __init__(
@@ -53,9 +52,6 @@ def __init__(
5352
self.sink_sid: Optional[str] = payload.get("sink_sid")
5453
self.url: Optional[str] = payload.get("url")
5554
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-
)
5955

6056
self._solution = {
6157
"sid": sid or self.sid,
@@ -117,42 +113,36 @@ def update(
117113
self,
118114
description: Union[str, object] = values.unset,
119115
sink_sid: Union[str, object] = values.unset,
120-
receive_events_from_subaccounts: Union[bool, object] = values.unset,
121116
) -> "SubscriptionInstance":
122117
"""
123118
Update the SubscriptionInstance
124119
125120
:param description: A human readable description for the Subscription.
126121
: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.
128122
129123
:returns: The updated SubscriptionInstance
130124
"""
131125
return self._proxy.update(
132126
description=description,
133127
sink_sid=sink_sid,
134-
receive_events_from_subaccounts=receive_events_from_subaccounts,
135128
)
136129

137130
async def update_async(
138131
self,
139132
description: Union[str, object] = values.unset,
140133
sink_sid: Union[str, object] = values.unset,
141-
receive_events_from_subaccounts: Union[bool, object] = values.unset,
142134
) -> "SubscriptionInstance":
143135
"""
144136
Asynchronous coroutine to update the SubscriptionInstance
145137
146138
:param description: A human readable description for the Subscription.
147139
: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.
149140
150141
:returns: The updated SubscriptionInstance
151142
"""
152143
return await self._proxy.update_async(
153144
description=description,
154145
sink_sid=sink_sid,
155-
receive_events_from_subaccounts=receive_events_from_subaccounts,
156146
)
157147

158148
@property
@@ -263,14 +253,12 @@ def update(
263253
self,
264254
description: Union[str, object] = values.unset,
265255
sink_sid: Union[str, object] = values.unset,
266-
receive_events_from_subaccounts: Union[bool, object] = values.unset,
267256
) -> SubscriptionInstance:
268257
"""
269258
Update the SubscriptionInstance
270259
271260
:param description: A human readable description for the Subscription.
272261
: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.
274262
275263
:returns: The updated SubscriptionInstance
276264
"""
@@ -279,9 +267,6 @@ def update(
279267
{
280268
"Description": description,
281269
"SinkSid": sink_sid,
282-
"ReceiveEventsFromSubaccounts": serialize.boolean_to_string(
283-
receive_events_from_subaccounts
284-
),
285270
}
286271
)
287272
headers = values.of({})
@@ -300,14 +285,12 @@ async def update_async(
300285
self,
301286
description: Union[str, object] = values.unset,
302287
sink_sid: Union[str, object] = values.unset,
303-
receive_events_from_subaccounts: Union[bool, object] = values.unset,
304288
) -> SubscriptionInstance:
305289
"""
306290
Asynchronous coroutine to update the SubscriptionInstance
307291
308292
:param description: A human readable description for the Subscription.
309293
: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.
311294
312295
:returns: The updated SubscriptionInstance
313296
"""
@@ -316,9 +299,6 @@ async def update_async(
316299
{
317300
"Description": description,
318301
"SinkSid": sink_sid,
319-
"ReceiveEventsFromSubaccounts": serialize.boolean_to_string(
320-
receive_events_from_subaccounts
321-
),
322302
}
323303
)
324304
headers = values.of({})
@@ -388,19 +368,14 @@ def __init__(self, version: Version):
388368
self._uri = "/Subscriptions"
389369

390370
def create(
391-
self,
392-
description: str,
393-
sink_sid: str,
394-
types: List[object],
395-
receive_events_from_subaccounts: Union[bool, object] = values.unset,
371+
self, description: str, sink_sid: str, types: List[object]
396372
) -> SubscriptionInstance:
397373
"""
398374
Create the SubscriptionInstance
399375
400376
:param description: A human readable description for the Subscription **This value should not contain PII.**
401377
: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.
402378
: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.
404379
405380
:returns: The created SubscriptionInstance
406381
"""
@@ -410,9 +385,6 @@ def create(
410385
"Description": description,
411386
"SinkSid": sink_sid,
412387
"Types": serialize.map(types, lambda e: serialize.object(e)),
413-
"ReceiveEventsFromSubaccounts": serialize.boolean_to_string(
414-
receive_events_from_subaccounts
415-
),
416388
}
417389
)
418390
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
@@ -428,19 +400,14 @@ def create(
428400
return SubscriptionInstance(self._version, payload)
429401

430402
async def create_async(
431-
self,
432-
description: str,
433-
sink_sid: str,
434-
types: List[object],
435-
receive_events_from_subaccounts: Union[bool, object] = values.unset,
403+
self, description: str, sink_sid: str, types: List[object]
436404
) -> SubscriptionInstance:
437405
"""
438406
Asynchronously create the SubscriptionInstance
439407
440408
:param description: A human readable description for the Subscription **This value should not contain PII.**
441409
: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.
442410
: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.
444411
445412
:returns: The created SubscriptionInstance
446413
"""
@@ -450,9 +417,6 @@ async def create_async(
450417
"Description": description,
451418
"SinkSid": sink_sid,
452419
"Types": serialize.map(types, lambda e: serialize.object(e)),
453-
"ReceiveEventsFromSubaccounts": serialize.boolean_to_string(
454-
receive_events_from_subaccounts
455-
),
456420
}
457421
)
458422
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})

twilio/rest/iam/v1/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from twilio.base.domain import Domain
1818
from twilio.rest.iam.v1.api_key import ApiKeyList
1919
from twilio.rest.iam.v1.get_api_keys import GetApiKeysList
20-
from twilio.rest.iam.v1.new_api_key import NewApiKeyList
20+
from twilio.rest.iam.v1.key import KeyList
2121

2222

2323
class V1(Version):
@@ -31,7 +31,7 @@ def __init__(self, domain: Domain):
3131
super().__init__(domain, "v1")
3232
self._api_key: Optional[ApiKeyList] = None
3333
self._get_api_keys: Optional[GetApiKeysList] = None
34-
self._new_api_key: Optional[NewApiKeyList] = None
34+
self._keys: Optional[KeyList] = None
3535

3636
@property
3737
def api_key(self) -> ApiKeyList:
@@ -46,10 +46,10 @@ def get_api_keys(self) -> GetApiKeysList:
4646
return self._get_api_keys
4747

4848
@property
49-
def new_api_key(self) -> NewApiKeyList:
50-
if self._new_api_key is None:
51-
self._new_api_key = NewApiKeyList(self)
52-
return self._new_api_key
49+
def keys(self) -> KeyList:
50+
if self._keys is None:
51+
self._keys = KeyList(self)
52+
return self._keys
5353

5454
def __repr__(self) -> str:
5555
"""

0 commit comments

Comments
 (0)