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

Skip to content

Commit fda3707

Browse files
chore: sync with main
2 parents b1c7bea + 98dab31 commit fda3707

File tree

493 files changed

+1037
-1268
lines changed

Some content is hidden

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

493 files changed

+1037
-1268
lines changed

twilio/rest/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
https://openapi-generator.tech
99
Do not edit the class manually.
1010
"""
11+
1112
from typing import TYPE_CHECKING, Optional
1213

1314
from twilio.base.client_base import ClientBase
@@ -34,6 +35,7 @@
3435
from twilio.rest.monitor import Monitor
3536
from twilio.rest.notify import Notify
3637
from twilio.rest.numbers import Numbers
38+
from twilio.rest.oauth import Oauth
3739
from twilio.rest.preview import Preview
3840
from twilio.rest.pricing import Pricing
3941
from twilio.rest.proxy import Proxy
@@ -143,6 +145,7 @@ def __init__(
143145
self._monitor: Optional["Monitor"] = None
144146
self._notify: Optional["Notify"] = None
145147
self._numbers: Optional["Numbers"] = None
148+
self._oauth: Optional["Oauth"] = None
146149
self._preview: Optional["Preview"] = None
147150
self._pricing: Optional["Pricing"] = None
148151
self._proxy: Optional["Proxy"] = None
@@ -432,6 +435,19 @@ def numbers(self) -> "Numbers":
432435
self._numbers = Numbers(self)
433436
return self._numbers
434437

438+
@property
439+
def oauth(self) -> "Oauth":
440+
"""
441+
Access the Oauth Twilio Domain
442+
443+
:returns: Oauth Twilio Domain
444+
"""
445+
if self._oauth is None:
446+
from twilio.rest.oauth import Oauth
447+
448+
self._oauth = Oauth(self)
449+
return self._oauth
450+
435451
@property
436452
def preview(self) -> "Preview":
437453
"""

twilio/rest/accounts/v1/auth_token_promotion.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Do not edit the class manually.
1313
"""
1414

15-
1615
from datetime import datetime
1716
from typing import Any, Dict, Optional
1817
from twilio.base import deserialize, values
@@ -23,7 +22,6 @@
2322

2423

2524
class AuthTokenPromotionInstance(InstanceResource):
26-
2725
"""
2826
:ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for.
2927
:ivar auth_token: The promoted Auth Token that must be used to authenticate future API requests.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Do not edit the class manually.
1313
"""
1414

15-
1615
from typing import Optional
1716

1817

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Do not edit the class manually.
1313
"""
1414

15-
1615
from datetime import datetime
1716
from typing import Any, Dict, List, Optional, Union, Iterator, AsyncIterator
1817
from twilio.base import deserialize, values
@@ -24,7 +23,6 @@
2423

2524

2625
class AwsInstance(InstanceResource):
27-
2826
"""
2927
:ivar sid: The unique string that we created to identify the AWS resource.
3028
:ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AWS resource.

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Do not edit the class manually.
1313
"""
1414

15-
1615
from datetime import datetime
1716
from typing import Any, Dict, List, Optional, Union, Iterator, AsyncIterator
1817
from twilio.base import deserialize, values
@@ -24,7 +23,6 @@
2423

2524

2625
class PublicKeyInstance(InstanceResource):
27-
2826
"""
2927
:ivar sid: The unique string that that we created to identify the PublicKey resource.
3028
:ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Credential that the PublicKey resource belongs to.

twilio/rest/accounts/v1/safelist.py

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
Do not edit the class manually.
1313
"""
1414

15-
16-
from typing import Any, Dict, Optional, Union
15+
from typing import Any, Dict, Optional
1716
from twilio.base import values
1817

1918
from twilio.base.instance_resource import InstanceResource
@@ -22,7 +21,6 @@
2221

2322

2423
class SafelistInstance(InstanceResource):
25-
2624
"""
2725
:ivar sid: The unique string that we created to identify the SafeList resource.
2826
:ivar phone_number: The phone number in SafeList.
@@ -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/accounts/v1/secondary_auth_token.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Do not edit the class manually.
1313
"""
1414

15-
1615
from datetime import datetime
1716
from typing import Any, Dict, Optional
1817
from twilio.base import deserialize, values
@@ -23,7 +22,6 @@
2322

2423

2524
class SecondaryAuthTokenInstance(InstanceResource):
26-
2725
"""
2826
:ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for.
2927
:ivar date_created: The date and time in UTC when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Do not edit the class manually.
1313
"""
1414

15-
1615
from datetime import datetime
1716
from typing import Any, Dict, List, Optional, Union, Iterator, AsyncIterator
1817
from twilio.base import deserialize, values

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Do not edit the class manually.
1313
"""
1414

15-
1615
from datetime import datetime
1716
from typing import Any, Dict, List, Optional, Union, Iterator, AsyncIterator
1817
from twilio.base import deserialize, values
@@ -27,7 +26,6 @@
2726

2827

2928
class AddressInstance(InstanceResource):
30-
3129
"""
3230
:ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource.
3331
:ivar city: The city in which the address is located.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Do not edit the class manually.
1313
"""
1414

15-
1615
from datetime import datetime
1716
from typing import Any, Dict, List, Optional, Union, Iterator, AsyncIterator
1817
from twilio.base import deserialize, values

0 commit comments

Comments
 (0)