Skip to content

Commit 622d7d9

Browse files
committed
[Librarian] Regenerated @ 704aff1023a3b44d7f87c78c70595552749ad55c
1 parent 08c1022 commit 622d7d9

File tree

311 files changed

+15736
-1425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

311 files changed

+15736
-1425
lines changed

CHANGES.md

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

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

6+
[2024-01-25] Version 8.12.0
7+
---------------------------
8+
**Oauth**
9+
- updated openid discovery endpoint uri **(breaking change)**
10+
- Added device code authorization endpoint
11+
- added oauth JWKS endpoint
12+
- Get userinfo resource
13+
- OpenID discovery resource
14+
- Add new API for token endpoint
15+
16+
617
[2024-01-14] Version 8.11.1
718
---------------------------
819
**Library - Chore**

twilio/rest/__init__.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
if TYPE_CHECKING:
1616
from twilio.rest.accounts import Accounts
1717
from twilio.rest.api import Api
18+
from twilio.rest.autopilot import Autopilot
1819
from twilio.rest.bulkexports import Bulkexports
1920
from twilio.rest.chat import Chat
2021
from twilio.rest.content import Content
@@ -32,6 +33,7 @@
3233
from twilio.rest.monitor import Monitor
3334
from twilio.rest.notify import Notify
3435
from twilio.rest.numbers import Numbers
36+
from twilio.rest.oauth import Oauth
3537
from twilio.rest.preview import Preview
3638
from twilio.rest.pricing import Pricing
3739
from twilio.rest.proxy import Proxy
@@ -122,6 +124,7 @@ def __init__(
122124
# Domains
123125
self._accounts: Optional["Accounts"] = None
124126
self._api: Optional["Api"] = None
127+
self._autopilot: Optional["Autopilot"] = None
125128
self._bulkexports: Optional["Bulkexports"] = None
126129
self._chat: Optional["Chat"] = None
127130
self._content: Optional["Content"] = None
@@ -139,6 +142,7 @@ def __init__(
139142
self._monitor: Optional["Monitor"] = None
140143
self._notify: Optional["Notify"] = None
141144
self._numbers: Optional["Numbers"] = None
145+
self._oauth: Optional["Oauth"] = None
142146
self._preview: Optional["Preview"] = None
143147
self._pricing: Optional["Pricing"] = None
144148
self._proxy: Optional["Proxy"] = None
@@ -181,6 +185,19 @@ def api(self) -> "Api":
181185
self._api = Api(self)
182186
return self._api
183187

188+
@property
189+
def autopilot(self) -> "Autopilot":
190+
"""
191+
Access the Autopilot Twilio Domain
192+
193+
:returns: Autopilot Twilio Domain
194+
"""
195+
if self._autopilot is None:
196+
from twilio.rest.autopilot import Autopilot
197+
198+
self._autopilot = Autopilot(self)
199+
return self._autopilot
200+
184201
@property
185202
def bulkexports(self) -> "Bulkexports":
186203
"""
@@ -402,6 +419,19 @@ def numbers(self) -> "Numbers":
402419
self._numbers = Numbers(self)
403420
return self._numbers
404421

422+
@property
423+
def oauth(self) -> "Oauth":
424+
"""
425+
Access the Oauth Twilio Domain
426+
427+
:returns: Oauth Twilio Domain
428+
"""
429+
if self._oauth is None:
430+
from twilio.rest.oauth import Oauth
431+
432+
self._oauth = Oauth(self)
433+
return self._oauth
434+
405435
@property
406436
def preview(self) -> "Preview":
407437
"""

twilio/rest/accounts/v1/credential/aws.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ def create(
321321
322322
:returns: The created AwsInstance
323323
"""
324-
325324
data = values.of(
326325
{
327326
"Credentials": credentials,
@@ -353,7 +352,6 @@ async def create_async(
353352
354353
:returns: The created AwsInstance
355354
"""
356-
357355
data = values.of(
358356
{
359357
"Credentials": credentials,

twilio/rest/accounts/v1/credential/public_key.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ def create(
325325
326326
:returns: The created PublicKeyInstance
327327
"""
328-
329328
data = values.of(
330329
{
331330
"PublicKey": public_key,
@@ -357,7 +356,6 @@ async def create_async(
357356
358357
:returns: The created PublicKeyInstance
359358
"""
360-
361359
data = values.of(
362360
{
363361
"PublicKey": public_key,

twilio/rest/accounts/v1/safelist.py

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"""
1414

1515

16-
from typing import Any, Dict, Optional, Union
16+
from typing import Any, Dict, Optional
1717
from twilio.base import values
1818

1919
from twilio.base.instance_resource import InstanceResource
@@ -64,7 +64,6 @@ def create(self, phone_number: str) -> SafelistInstance:
6464
6565
:returns: The created SafelistInstance
6666
"""
67-
6867
data = values.of(
6968
{
7069
"PhoneNumber": phone_number,
@@ -87,7 +86,6 @@ async def create_async(self, phone_number: str) -> SafelistInstance:
8786
8887
:returns: The created SafelistInstance
8988
"""
90-
9189
data = values.of(
9290
{
9391
"PhoneNumber": phone_number,
@@ -102,77 +100,23 @@ async def create_async(self, phone_number: str) -> SafelistInstance:
102100

103101
return SafelistInstance(self._version, payload)
104102

105-
def delete(self, phone_number: Union[str, object] = values.unset) -> bool:
106-
"""
107-
Asynchronously delete the SafelistInstance
108-
109-
:param phone_number: The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
110-
:returns: True if delete succeeds, False otherwise
111-
"""
112-
113-
params = values.of(
114-
{
115-
"PhoneNumber": phone_number,
116-
}
117-
)
118-
return self._version.delete(method="DELETE", uri=self._uri, params=params)
119-
120-
async def delete_async(
121-
self, phone_number: Union[str, object] = values.unset
122-
) -> bool:
123-
"""
124-
Asynchronously delete the SafelistInstance
125-
126-
:param phone_number: The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
127-
:returns: True if delete succeeds, False otherwise
128-
"""
129-
130-
params = values.of(
131-
{
132-
"PhoneNumber": phone_number,
133-
}
134-
)
135-
return await self._version.delete_async(
136-
method="DELETE", uri=self._uri, params=params
137-
)
138-
139-
def fetch(
140-
self, phone_number: Union[str, object] = values.unset
141-
) -> SafelistInstance:
103+
def fetch(self) -> SafelistInstance:
142104
"""
143105
Asynchronously fetch the SafelistInstance
144106
145-
:param phone_number: The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
146107
:returns: The fetched SafelistInstance
147108
"""
148-
149-
params = values.of(
150-
{
151-
"PhoneNumber": phone_number,
152-
}
153-
)
154-
payload = self._version.fetch(method="GET", uri=self._uri, params=params)
109+
payload = self._version.fetch(method="GET", uri=self._uri)
155110

156111
return SafelistInstance(self._version, payload)
157112

158-
async def fetch_async(
159-
self, phone_number: Union[str, object] = values.unset
160-
) -> SafelistInstance:
113+
async def fetch_async(self) -> SafelistInstance:
161114
"""
162115
Asynchronously fetch the SafelistInstance
163116
164-
:param phone_number: The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
165117
:returns: The fetched SafelistInstance
166118
"""
167-
168-
params = values.of(
169-
{
170-
"PhoneNumber": phone_number,
171-
}
172-
)
173-
payload = await self._version.fetch_async(
174-
method="GET", uri=self._uri, params=params
175-
)
119+
payload = await self._version.fetch_async(method="GET", uri=self._uri)
176120

177121
return SafelistInstance(self._version, payload)
178122

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,6 @@ def create(
821821
822822
:returns: The created AccountInstance
823823
"""
824-
825824
data = values.of(
826825
{
827826
"FriendlyName": friendly_name,
@@ -846,7 +845,6 @@ async def create_async(
846845
847846
:returns: The created AccountInstance
848847
"""
849-
850848
data = values.of(
851849
{
852850
"FriendlyName": friendly_name,

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,6 @@ def create(
513513
514514
:returns: The created AddressInstance
515515
"""
516-
517516
data = values.of(
518517
{
519518
"CustomerName": customer_name,
@@ -568,7 +567,6 @@ async def create_async(
568567
569568
:returns: The created AddressInstance
570569
"""
571-
572570
data = values.of(
573571
{
574572
"CustomerName": customer_name,

twilio/rest/api/v2010/account/application.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,6 @@ def create(
602602
603603
:returns: The created ApplicationInstance
604604
"""
605-
606605
data = values.of(
607606
{
608607
"ApiVersion": api_version,
@@ -675,7 +674,6 @@ async def create_async(
675674
676675
:returns: The created ApplicationInstance
677676
"""
678-
679677
data = values.of(
680678
{
681679
"ApiVersion": api_version,

twilio/rest/api/v2010/account/authorized_connect_app.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
"""
1414

1515

16+
from datetime import datetime
1617
from typing import Any, Dict, List, Optional, Union, Iterator, AsyncIterator
17-
from twilio.base import values
18+
from twilio.base import deserialize, values
1819
from twilio.base.instance_context import InstanceContext
1920
from twilio.base.instance_resource import InstanceResource
2021
from twilio.base.list_resource import ListResource
@@ -34,6 +35,8 @@ class Permission(object):
3435
:ivar connect_app_friendly_name: The name of the Connect App.
3536
:ivar connect_app_homepage_url: The public URL for the Connect App.
3637
:ivar connect_app_sid: The SID that we assigned to the Connect App.
38+
:ivar date_created: The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
39+
:ivar date_updated: The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
3740
:ivar permissions: The set of permissions that you authorized for the Connect App. Can be: `get-all` or `post-all`.
3841
:ivar uri: The URI of the resource, relative to `https://api.twilio.com`.
3942
"""
@@ -61,6 +64,12 @@ def __init__(
6164
"connect_app_homepage_url"
6265
)
6366
self.connect_app_sid: Optional[str] = payload.get("connect_app_sid")
67+
self.date_created: Optional[datetime] = deserialize.rfc2822_datetime(
68+
payload.get("date_created")
69+
)
70+
self.date_updated: Optional[datetime] = deserialize.rfc2822_datetime(
71+
payload.get("date_updated")
72+
)
6473
self.permissions: Optional[
6574
List["AuthorizedConnectAppInstance.Permission"]
6675
] = payload.get("permissions")

twilio/rest/api/v2010/account/balance.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,8 @@ def fetch(self) -> BalanceInstance:
7070
"""
7171
Asynchronously fetch the BalanceInstance
7272
73-
7473
:returns: The fetched BalanceInstance
7574
"""
76-
7775
payload = self._version.fetch(method="GET", uri=self._uri)
7876

7977
return BalanceInstance(
@@ -84,10 +82,8 @@ async def fetch_async(self) -> BalanceInstance:
8482
"""
8583
Asynchronously fetch the BalanceInstance
8684
87-
8885
:returns: The fetched BalanceInstance
8986
"""
90-
9187
payload = await self._version.fetch_async(method="GET", uri=self._uri)
9288

9389
return BalanceInstance(

0 commit comments

Comments
 (0)