10000 [Librarian] Regenerated @ 78bf2bbef74e4846ca8353fbdee038a6b8080c59 22… · CoolNightTimeCoder/twilio-python@ba7da14 · GitHub
[go: up one dir, main page]

Skip to content

Commit ba7da14

Browse files
committed
[Librarian] Regenerated @ 78bf2bbef74e4846ca8353fbdee038a6b8080c59 2250ef3ba08540233f688bf6aaa55e9c94febf3b
1 parent e848451 commit ba7da14

File tree

11 files changed

+1018
-6
lines changed

11 files changed

+1018
-6
lines changed

CHANGES.md

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

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

6+
[2024-09-05] Version 9.3.0
7+
--------------------------
8+
**Iam**
9+
- updated library_visibility public for new public apikeys
10+
11+
**Numbers**
12+
- Add new field in Error Codes for Regulatory Compliance.
13+
- Change typing of Port In Request date_created field to date_time instead of date **(breaking change)**
14+
15+
616
[2024-08-26] Version 9.2.4
717
--------------------------
818
**Library - Chore**

twilio/rest/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from twilio.rest.events import Events
2424
from twilio.rest.flex_api import FlexApi
2525
from twilio.rest.frontline_api import FrontlineApi
26+
from twilio.rest.iam import Iam
2627
from twilio.rest.insights import Insights
2728
from twilio.rest.intelligence import Intelligence
2829
from twilio.rest.ip_messaging import IpMessaging
@@ -131,6 +132,7 @@ def __init__(
131 67E6 132
self._events: Optional["Events"] = None
132133
self._flex_api: Optional["FlexApi"] = None
133134
self._frontline_api: Optional["FrontlineApi"] = None
135+
self._iam: Optional["Iam"] = None
134136
self._insights: Optional["Insights"] = None
135137
self._intelligence: Optional["Intelligence"] = None
136138
self._ip_messaging: Optional["IpMessaging"] = None
@@ -275,6 +277,19 @@ def frontline_api(self) -> "FrontlineApi":
275277
self._frontline_api = FrontlineApi(self)
276278
return self._frontline_api
277279

280+
@property
281+
def iam(self) -> "Iam":
282+
"""
283+
Access the Iam Twilio Domain
284+
285+
:returns: Iam Twilio Domain
286+
"""
287+
if self._iam is None:
288+
from twilio.rest.iam import Iam
289+
290+
self._iam = Iam(self)
291+
return self._iam
292+
278293
@property
279294
def insights(self) -> "Insights":
280295
"""

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

Lines changed: 114 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ class AuthenticationActionType(object):
3232
class CallToActionActionType(object):
3333
URL = "URL"
3434
PHONE_NUMBER = "PHONE_NUMBER"
35+
COPY_CODE = "COPY_CODE"
36+
VOICE_CALL = "VOICE_CALL"
3537

3638
class CardActionType(object):
3739
URL = "URL"
3840
PHONE_NUMBER = "PHONE_NUMBER"
3941
QUICK_REPLY = "QUICK_REPLY"
42+
COPY_CODE = "COPY_CODE"
43+
VOICE_CALL = "VOICE_CALL"
4044

4145
class CarouselActionType(object):
4246
URL = "URL"
@@ -321,7 +325,7 @@ class CallToActionAction(object):
321325
:ivar title:
322326
:ivar url:
323327
:ivar phone:
324-
:ivar id:
328+
:ivar code:
325329
"""
326330

327331
def __init__(self, payload: Dict[str, Any]):
@@ -332,15 +336,15 @@ def __init__(self, payload: Dict[str, Any]):
332336
self.title: Optional[str] = payload.get("title")
333337
self.url: Optional[str] = payload.get("url")
334338
self.phone: Optional[str] = payload.get("phone")
335-
self.id: Optional[str] = payload.get("id")
339+
self.code: Optional[str] = payload.get("code")
336340

337341
def to_dict(self):
338342
return {
339343
"type": self.type,
340344
"title": self.title,
341345
"url": self.url,
342346
"phone": self.phone,
343-
"id": self.id,
347+
"code": self.code,
344348
}
345349

346350
class CardAction(object):
@@ -350,6 +354,7 @@ class CardAction(object):
350354
:ivar url:
351355
:ivar phone:
352356
:ivar id:
357+
:ivar code:
353358
"""
354359

355360
def __init__(self, payload: Dict[str, Any]):
@@ -359,6 +364,7 @@ def __init__(self, payload: Dict[str, Any]):
359364
self.url: Optional[str] = payload.get("url")
360365
self.phone: Optional[str] = payload.get("phone")
361366
self.id: Optional[str] = payload.get("id")
367+
self.code: Optional[str] = payload.get("code")
362368

363369
def to_dict(self):
364370
return {
@@ -367,6 +373,7 @@ def to_dict(self):
367373
"url": self.url,
368374
"phone": self.phone,
369375
"id": self.id,
376+
"code": self.code,
370377
}
371378

372379
class CarouselAction(object):
@@ -474,6 +481,76 @@ def to_dict(self):
474481
"types": self.types.to_dict(),
475482
}
476483

484+
class FlowsPage(object):
485+
"""
486+
:ivar id:
487+
:ivar next_page_id:
488+
:ivar title:
489+
:ivar subtitle:
490+
:ivar layout:
491+
"""
492+
493+
def __init__(self, payload: Dict[str, Any]):
494+
495+
self.id: Optional[str] = payload.get("id")
496+
self.next_page_id: Optional[str] = payload.get("next_page_id")
497+
self.title: Optional[str] = payload.get("title")
498+
self.subtitle: Optional[str] = payload.get("subtitle")
499+
self.layout: Optional[List[ContentList.FlowsPageComponent]] = payload.get(
500+
"layout"
501+
)
502+
503+
def to_dict(self):
504+
return {
505+
"id": self.id,
506+
"next_page_id": self.next_page_id,
507+
"title": self.title,
508+
"subtitle": self.subtitle,
509+
"layout": [layout.to_dict() for layout in self.layout],
510+
}
511+
512+
class FlowsPageComponent(object):
513+
"""
514+
:ivar label:
515+
:ivar type:
516+
:ivar text:
517+
:ivar options:
518+
"""
519+
520+
def __init__(self, payload: Dict[str, Any]):
521+
522+
self.label: Optional[str] = payload.get("label")
523+
self.type: Optional[str] = payload.get("type")
524+
self.text: Optional[str] = payload.get("text")
525+
self.options: Optional[List[ContentList.FlowsPageComponentSelectItem]] = (
526+
payload.get("options")
527+
)
528+
529+
def to_dict(self):
530+
return {
531+
"label": self.label,
532+
"type": self.type,
533+
"text": self.text,
534+
"options": [options.to_dict() for options in self.options],
535+
}
536+
537+
class FlowsPageComponentSelectItem(object):
538+
"""
539+
:ivar id:
540+
:ivar title:
541+
"""
542+
543+
def __init__(self, payload: Dict[str, Any]):
544+
545+
self.id: Optional[str] = payload.get("id")
546+
self.title: Optional[str] = payload.get("title")
547+
548+
def to_dict(self):
549+
return {
550+
"id": self.id,
551+
"title": self.title,
552+
}
553+
477554
class ListItem(object):
478555
"""
479556
:ivar id:
@@ -606,6 +683,35 @@ def to_dict(self):
606683
"dynamic_items": self.dynamic_items,
607684
}
608685

686+
class TwilioFlows(object):
687+
"""
688+
:ivar body:
689+
:ivar button_text:
690+
:ivar subtitle:
691+
:ivar media_url:
692+
:ivar pages:
693+
:ivar type:
694+
"""
695+
696+
def __init__(self, payload: Dict[str, Any]):
697+
698+
self.body: Optional[str] = payload.get("body")
699+
self.button_text: Optional[str] = payload.get("button_text")
700+
self.subtitle: Optional[str] = payload.get("subtitle")
701+
self.media_url: Optional[str] = payload.get("media_url")
702+
self.pages: Optional[List[ContentList.FlowsPage]] = payload.get("pages")
703+
self.type: Optional[str] = payload.get("type")
704+
705+
def to_dict(self):
706+
return {
707+
"body": self.body,
708+
"button_text": self.button_text,
709+
"subtitle": self.subtitle,
710+
"media_url": self.media_url,
711+
"pages": [pages.to_dict() for pages in self.pages],
712+
"type": self.type,
713+
}
714+
609715
class TwilioListPicker(object):
610716
"""
611717
:ivar body:
@@ -707,6 +813,7 @@ class Types(object):
707813
:ivar twilio_card:
708814
:ivar twilio_catalog:
709815
:ivar twilio_carousel:
816+
:ivar twilio_flows:
710817
:ivar whatsapp_card:
711818
:ivar whatsapp_authentication:
712819
"""
@@ -740,6 +847,9 @@ def __init__(self, payload: Dict[str, Any]):
740847
self.twilio_carousel: Optional[ContentList.TwilioCarousel] = payload.get(
741848
"twilio_carousel"
742849
)
850+
self.twilio_flows: Optional[ContentList.TwilioFlows] = payload.get(
851+
"twilio_flows"
852+
)
743853
self.whatsapp_card: Optional[ContentList.WhatsappCard] = payload.get(
744854
"whatsapp_card"
745855
)
@@ -758,6 +868,7 @@ def to_dict(self):
758868
"twilio_card": self.twilio_card.to_dict(),
759869
"twilio_catalog": self.twilio_catalog.to_dict(),
760870
"twilio_carousel": self.twilio_carousel.to_dict(),
871+
"twilio_flows": self.twilio_flows.to_dict(),
761872
"whatsapp_card": self.whatsapp_card.to_dict(),
762873
"whatsapp_authentication": self.whatsapp_authentication.to_dict(),
763874
}

twilio/rest/iam/IamBase.py

Lines changed: 44 additions & 0 deletions
< 10000 tr class="diff-line-row">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
r"""
2+
This code was generated by
3+
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
7+
NOTE: This class is auto generated by OpenAPI Generator.
8+
https://openapi-generator.tech
9+
Do not edit the class manually.
10+
"""
11+
12+
from typing import Optional
13+
14+
from twilio.base.domain import Domain
15+
from twilio.rest import Client
16+
from twilio.rest.iam.v1 import V1
17+
18+
19+
class IamBase(Domain):
20+
21+
def __init__(self, twilio: Client):
22+
"""
23+
Initialize the Iam Domain
24+
25+
:returns: Domain for Iam
26+
"""
27+
super().__init__(twilio, "https://iam.twilio.com")
28+
self._v1: Optional[V1] = None
29+
30+
@property
31+
def v1(self) -> V1:
32+
"""
33+
:returns: Versions v1 of Iam
34+
"""
35+
if self._v1 is None:
36+
self._v1 = V1(self)
37+
return self._v1
38+
39+
def __repr__(self) -> str:
40+
"""
41+
Provide a friendly representation
42+
:returns: Machine friendly representation
43+
"""
44+
return "<Twilio.Iam>"

twilio/rest/iam/v1/__init__.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
r"""
2+
This code was generated by
3+
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
7+
Twilio - Iam
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 typing import Optional
16+
from twilio.base.version import Version
17+
from twilio.base.domain import Domain
18+
from twilio.rest.iam.v1.api_key import ApiKeyList
19+
from twilio.rest.iam.v1.get_api_keys import GetApiKeysList
20+
from twilio.rest.iam.v1.new_api_key import NewApiKeyList
21+
22+
23+
class V1(Version):
24+
25+
def __init__(self, domain: Domain):
26+
"""
27+
Initialize the V1 version of Iam
28+
29+
:param domain: The Twilio.iam domain
30+
"""
31+
super().__init__(domain, "v1")
32+
self._api_key: Optional[ApiKeyList] = None
33+
self._get_api_keys: Optional[GetApiKeysList] = None
34+
self._new_api_key: Optional[NewApiKeyList] = None
35+
36+
@property
37+
def api_key(self) -> ApiKeyList:
38+
if self._api_key is None:
39+
self._api_key = ApiKeyList(self)
40+
return self._api_key
41+
42+
@property
43+
def get_api_keys(self) -> GetApiKeysList:
44+
if self._get_api_keys is None:
45+
self._get_api_keys = GetApiKeysList(self)
46+
return self._get_api_keys
47+
48+
@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
53+
54+
def __repr__(self) -> str:
55+
"""
56+
Provide a friendly representation
57+
:returns: Machine friendly representation
58+
"""
59+
return "<Twilio.Iam.V1>"

0 commit comments

Comments
 (0)
0