Skip to content

Commit

Permalink
[Librarian] Regenerated @ 78bf2bbef74e4846ca8353fbdee038a6b8080c59 22…
Browse files Browse the repository at this point in the history
…50ef3ba08540233f688bf6aaa55e9c94febf3b
  • Loading branch information
twilio-dx committed Sep 5, 2024
1 parent e848451 commit ba7da14
Show file tree
Hide file tree
Showing 11 changed files with 1,018 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ twilio-python Changelog

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

[2024-09-05] Version 9.3.0
--------------------------
**Iam**
- updated library_visibility public for new public apikeys

**Numbers**
- Add new field in Error Codes for Regulatory Compliance.
- Change typing of Port In Request date_created field to date_time instead of date **(breaking change)**


[2024-08-26] Version 9.2.4
--------------------------
**Library - Chore**
Expand Down
15 changes: 15 additions & 0 deletions twilio/rest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from twilio.rest.events import Events
from twilio.rest.flex_api import FlexApi
from twilio.rest.frontline_api import FrontlineApi
from twilio.rest.iam import Iam
from twilio.rest.insights import Insights
from twilio.rest.intelligence import Intelligence
from twilio.rest.ip_messaging import IpMessaging
Expand Down Expand Up @@ -131,6 +132,7 @@ def __init__(
self._events: Optional["Events"] = None
self._flex_api: Optional["FlexApi"] = None
self._frontline_api: Optional["FrontlineApi"] = None
self._iam: Optional["Iam"] = None
self._insights: Optional["Insights"] = None
self._intelligence: Optional["Intelligence"] = None
self._ip_messaging: Optional["IpMessaging"] = None
Expand Down Expand Up @@ -275,6 +277,19 @@ def frontline_api(self) -> "FrontlineApi":
self._frontline_api = FrontlineApi(self)
return self._frontline_api

@property
def iam(self) -> "Iam":
"""
Access the Iam Twilio Domain
:returns: Iam Twilio Domain
"""
if self._iam is None:
from twilio.rest.iam import Iam

self._iam = Iam(self)
return self._iam

@property
def insights(self) -> "Insights":
"""
Expand Down
117 changes: 114 additions & 3 deletions twilio/rest/content/v1/content/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ class AuthenticationActionType(object):
class CallToActionActionType(object):
URL = "URL"
PHONE_NUMBER = "PHONE_NUMBER"
COPY_CODE = "COPY_CODE"
VOICE_CALL = "VOICE_CALL"

class CardActionType(object):
URL = "URL"
PHONE_NUMBER = "PHONE_NUMBER"
QUICK_REPLY = "QUICK_REPLY"
COPY_CODE = "COPY_CODE"
VOICE_CALL = "VOICE_CALL"

class CarouselActionType(object):
URL = "URL"
Expand Down Expand Up @@ -321,7 +325,7 @@ class CallToActionAction(object):
:ivar title:
:ivar url:
:ivar phone:
:ivar id:
:ivar code:
"""

def __init__(self, payload: Dict[str, Any]):
Expand All @@ -332,15 +336,15 @@ def __init__(self, payload: Dict[str, Any]):
self.title: Optional[str] = payload.get("title")
self.url: Optional[str] = payload.get("url")
self.phone: Optional[str] = payload.get("phone")
self.id: Optional[str] = payload.get("id")
self.code: Optional[str] = payload.get("code")

def to_dict(self):
return {
"type": self.type,
"title": self.title,
"url": self.url,
"phone": self.phone,
"id": self.id,
"code": self.code,
}

class CardAction(object):
Expand All @@ -350,6 +354,7 @@ class CardAction(object):
:ivar url:
:ivar phone:
:ivar id:
:ivar code:
"""

def __init__(self, payload: Dict[str, Any]):
Expand All @@ -359,6 +364,7 @@ def __init__(self, payload: Dict[str, Any]):
self.url: Optional[str] = payload.get("url")
self.phone: Optional[str] = payload.get("phone")
self.id: Optional[str] = payload.get("id")
self.code: Optional[str] = payload.get("code")

def to_dict(self):
return {
Expand All @@ -367,6 +373,7 @@ def to_dict(self):
"url": self.url,
"phone": self.phone,
"id": self.id,
"code": self.code,
}

class CarouselAction(object):
Expand Down Expand Up @@ -474,6 +481,76 @@ def to_dict(self):
"types": self.types.to_dict(),
}

class FlowsPage(object):
"""
:ivar id:
:ivar next_page_id:
:ivar title:
:ivar subtitle:
:ivar layout:
"""

def __init__(self, payload: Dict[str, Any]):

self.id: Optional[str] = payload.get("id")
self.next_page_id: Optional[str] = payload.get("next_page_id")
self.title: Optional[str] = payload.get("title")
self.subtitle: Optional[str] = payload.get("subtitle")
self.layout: Optional[List[ContentList.FlowsPageComponent]] = payload.get(
"layout"
)

def to_dict(self):
return {
"id": self.id,
"next_page_id": self.next_page_id,
"title": self.title,
"subtitle": self.subtitle,
"layout": [layout.to_dict() for layout in self.layout],
}

class FlowsPageComponent(object):
"""
:ivar label:
:ivar type:
:ivar text:
:ivar options:
"""

def __init__(self, payload: Dict[str, Any]):

self.label: Optional[str] = payload.get("label")
self.type: Optional[str] = payload.get("type")
self.text: Optional[str] = payload.get("text")
self.options: Optional[List[ContentList.FlowsPageComponentSelectItem]] = (
payload.get("options")
)

def to_dict(self):
return {
"label": self.label,
"type": self.type,
"text": self.text,
"options": [options.to_dict() for options in self.options],
}

class FlowsPageComponentSelectItem(object):
"""
:ivar id:
:ivar title:
"""

def __init__(self, payload: Dict[str, Any]):

self.id: Optional[str] = payload.get("id")
self.title: Optional[str] = payload.get("title")

def to_dict(self):
return {
"id": self.id,
"title": self.title,
}

class ListItem(object):
"""
:ivar id:
Expand Down Expand Up @@ -606,6 +683,35 @@ def to_dict(self):
"dynamic_items": self.dynamic_items,
}

class TwilioFlows(object):
"""
:ivar body:
:ivar button_text:
:ivar subtitle:
:ivar media_url:
:ivar pages:
:ivar type:
"""

def __init__(self, payload: Dict[str, Any]):

self.body: Optional[str] = payload.get("body")
self.button_text: Optional[str] = payload.get("button_text")
self.subtitle: Optional[str] = payload.get("subtitle")
self.media_url: Optional[str] = payload.get("media_url")
self.pages: Optional[List[ContentList.FlowsPage]] = payload.get("pages")
self.type: Optional[str] = payload.get("type")

def to_dict(self):
return {
"body": self.body,
"button_text": self.button_text,
"subtitle": self.subtitle,
"media_url": self.media_url,
"pages": [pages.to_dict() for pages in self.pages],
"type": self.type,
}

class TwilioListPicker(object):
"""
:ivar body:
Expand Down Expand Up @@ -707,6 +813,7 @@ class Types(object):
:ivar twilio_card:
:ivar twilio_catalog:
:ivar twilio_carousel:
:ivar twilio_flows:
:ivar whatsapp_card:
:ivar whatsapp_authentication:
"""
Expand Down Expand Up @@ -740,6 +847,9 @@ def __init__(self, payload: Dict[str, Any]):
self.twilio_carousel: Optional[ContentList.TwilioCarousel] = payload.get(
"twilio_carousel"
)
self.twilio_flows: Optional[ContentList.TwilioFlows] = payload.get(
"twilio_flows"
)
self.whatsapp_card: Optional[ContentList.WhatsappCard] = payload.get(
"whatsapp_card"
)
Expand All @@ -758,6 +868,7 @@ def to_dict(self):
"twilio_card": self.twilio_card.to_dict(),
"twilio_catalog": self.twilio_catalog.to_dict(),
"twilio_carousel": self.twilio_carousel.to_dict(),
"twilio_flows": self.twilio_flows.to_dict(),
"whatsapp_card": self.whatsapp_card.to_dict(),
"whatsapp_authentication": self.whatsapp_authentication.to_dict(),
}
Expand Down
44 changes: 44 additions & 0 deletions twilio/rest/iam/IamBase.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
r"""
This code was generated by
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
NOTE: This class is auto generated by OpenAPI Generator.
https://openapi-generator.tech
Do not edit the class manually.
"""

from typing import Optional

from twilio.base.domain import Domain
from twilio.rest import Client
from twilio.rest.iam.v1 import V1


class IamBase(Domain):

def __init__(self, twilio: Client):
"""
Initialize the Iam Domain
:returns: Domain for Iam
"""
super().__init__(twilio, "https://iam.twilio.com")
self._v1: Optional[V1] = None

@property
def v1(self) -> V1:
"""
:returns: Versions v1 of Iam
"""
if self._v1 is None:
self._v1 = V1(self)
return self._v1

def __repr__(self) -> str:
"""
Provide a friendly representation
:returns: Machine friendly representation
"""
return "<Twilio.Iam>"
59 changes: 59 additions & 0 deletions twilio/rest/iam/v1/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
r"""
This code was generated by
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
Twilio - Iam
This is the public Twilio REST API.
NOTE: This class is auto generated by OpenAPI Generator.
https://openapi-generator.tech
Do not edit the class manually.
"""

from typing import Optional
from twilio.base.version import Version
from twilio.base.domain import Domain
from twilio.rest.iam.v1.api_key import ApiKeyList
from twilio.rest.iam.v1.get_api_keys import GetApiKeysList
from twilio.rest.iam.v1.new_api_key import NewApiKeyList


class V1(Version):

def __init__(self, domain: Domain):
"""
Initialize the V1 version of Iam
:param domain: The Twilio.iam domain
"""
super().__init__(domain, "v1")
self._api_key: Optional[ApiKeyList] = None
self._get_api_keys: Optional[GetApiKeysList] = None
self._new_api_key: Optional[NewApiKeyList] = None

@property
def api_key(self) -> ApiKeyList:
if self._api_key is None:
self._api_key = ApiKeyList(self)
return self._api_key

@property
def get_api_keys(self) -> GetApiKeysList:
if self._get_api_keys is None:
self._get_api_keys = GetApiKeysList(self)
return self._get_api_keys

@property
def new_api_key(self) -> NewApiKeyList:
if self._new_api_key is None:
self._new_api_key = NewApiKeyList(self)
return self._new_api_key

def __repr__(self) -> str:
"""
Provide a friendly representation
:returns: Machine friendly representation
"""
return "<Twilio.Iam.V1>"
Loading

0 comments on commit ba7da14

Please sign in to comment.