Skip to content

Commit

Permalink
[Librarian] Regenerated @ e39e37b378f3772541a58f8f0d634533863f3f3e
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Mar 15, 2024
1 parent 0aa2975 commit 8251f5b
Show file tree
Hide file tree
Showing 15 changed files with 724 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ twilio-python Changelog

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

[2024-03-15] Version 9.0.2
--------------------------
**Oauth**
- Add new APIs for vendor authorize and token endpoints


[2024-03-12] Version 9.0.1
--------------------------
**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 @@ -34,6 +34,7 @@
from twilio.rest.monitor import Monitor
from twilio.rest.notify import Notify
from twilio.rest.numbers import Numbers
from twilio.rest.oauth import Oauth
from twilio.rest.preview import Preview
from twilio.rest.pricing import Pricing
from twilio.rest.proxy import Proxy
Expand Down Expand Up @@ -142,6 +143,7 @@ def __init__(
self._monitor: Optional["Monitor"] = None
self._notify: Optional["Notify"] = None
self._numbers: Optional["Numbers"] = None
self._oauth: Optional["Oauth"] = None
self._preview: Optional["Preview"] = None
self._pricing: Optional["Pricing"] = None
self._proxy: Optional["Proxy"] = None
Expand Down Expand Up @@ -418,6 +420,19 @@ def numbers(self) -> "Numbers":
self._numbers = Numbers(self)
return self._numbers

@property
def oauth(self) -> "Oauth":
"""
Access the Oauth Twilio Domain
:returns: Oauth Twilio Domain
"""
if self._oauth is None:
from twilio.rest.oauth import Oauth

self._oauth = Oauth(self)
return self._oauth

@property
def preview(self) -> "Preview":
"""
Expand Down
2 changes: 2 additions & 0 deletions twilio/rest/accounts/v1/safelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def fetch(
"PhoneNumber": phone_number,
}
)

payload = self._version.fetch(method="GET", uri=self._uri, params=params)

return SafelistInstance(self._version, payload)
Expand All @@ -169,6 +170,7 @@ async def fetch_async(
"PhoneNumber": phone_number,
}
)

payload = await self._version.fetch_async(
method="GET", uri=self._uri, params=params
)
Expand Down
72 changes: 72 additions & 0 deletions twilio/rest/api/v2010/account/call/__init__.py

Large diffs are not rendered by default.

72 changes: 72 additions & 0 deletions twilio/rest/api/v2010/account/conference/__init__.py

Large diffs are not rendered by default.

46 changes: 44 additions & 2 deletions twilio/rest/api/v2010/account/message/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,8 @@ def stream(
to: Union[str, object] = values.unset,
from_: Union[str, object] = values.unset,
date_sent: Union[datetime, object] = values.unset,
date_sent_before: Union[datetime, object] = values.unset,
date_sent_after: Union[datetime, object] = values.unset,
limit: Optional[int] = None,
page_size: Optional[int] = None,
) -> Iterator[MessageInstance]:
Expand All @@ -686,6 +688,8 @@ def stream(
:param str to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
:param str from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
:param datetime date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param datetime date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param datetime date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param limit: Upper limit for the number of records to return. stream()
guarantees to never return more than limit. Default is no limit
:param page_size: Number of records to fetch per request, when not set will use
Expand All @@ -697,7 +701,12 @@ def stream(
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
to=to, from_=from_, date_sent=date_sent, page_size=limits["page_size"]
to=to,
from_=from_,
date_sent=date_sent,
date_sent_before=date_sent_before,
date_sent_after=date_sent_after,
page_size=limits["page_size"],
)

return self._version.stream(page, limits["limit"])
Expand All @@ -707,6 +716,8 @@ async def stream_async(
to: Union[str, object] = values.unset,
from_: Union[str, object] = values.unset,
date_sent: Union[datetime, object] = values.unset,
date_sent_before: Union[datetime, object] = values.unset,
date_sent_after: Union[datetime, object] = values.unset,
limit: Optional[int] = None,
page_size: Optional[int] = None,
) -> AsyncIterator[MessageInstance]:
Expand All @@ -719,6 +730,8 @@ async def stream_async(
:param str to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
:param str from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
:param datetime date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param datetime date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param datetime date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param limit: Upper limit for the number of records to return. stream()
guarantees to never return more than limit. Default is no limit
:param page_size: Number of records to fetch per request, when not set will use
Expand All @@ -730,7 +743,12 @@ async def stream_async(
"""
limits = self._version.read_limits(limit, page_size)
page = await self.page_async(
to=to, from_=from_, date_sent=date_sent, page_size=limits["page_size"]
to=to,
from_=from_,
date_sent=date_sent,
date_sent_before=date_sent_before,
date_sent_after=date_sent_after,
page_size=limits["page_size"],
)

return self._version.stream_async(page, limits["limit"])
Expand All @@ -740,6 +758,8 @@ def list(
to: Union[str, object] = values.unset,
from_: Union[str, object] = values.unset,
date_sent: Union[datetime, object] = values.unset,
date_sent_before: Union[datetime, object] = values.unset,
date_sent_after: Union[datetime, object] = values.unset,
limit: Optional[int] = None,
page_size: Optional[int] = None,
) -> List[MessageInstance]:
Expand All @@ -751,6 +771,8 @@ def list(
:param str to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
:param str from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
:param datetime date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param datetime date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param datetime date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param limit: Upper limit for the number of records to return. list() guarantees
never to return more than limit. Default is no limit
:param page_size: Number of records to fetch per request, when not set will use
Expand All @@ -765,6 +787,8 @@ def list(
to=to,
from_=from_,
date_sent=date_sent,
date_sent_before=date_sent_before,
date_sent_after=date_sent_after,
limit=limit,
page_size=page_size,
)
Expand All @@ -775,6 +799,8 @@ async def list_async(
to: Union[str, object] = values.unset,
from_: Union[str, object] = values.unset,
date_sent: Union[datetime, object] = values.unset,
date_sent_before: Union[datetime, object] = values.unset,
date_sent_after: Union[datetime, object] = values.unset,
limit: Optional[int] = None,
page_size: Optional[int] = None,
) -> List[MessageInstance]:
Expand All @@ -786,6 +812,8 @@ async def list_async(
:param str to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
:param str from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
:param datetime date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param datetime date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param datetime date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param limit: Upper limit for the number of records to return. list() guarantees
never to return more than limit. Default is no limit
:param page_size: Number of records to fetch per request, when not set will use
Expand All @@ -801,6 +829,8 @@ async def list_async(
to=to,
from_=from_,
date_sent=date_sent,
date_sent_before=date_sent_before,
date_sent_after=date_sent_after,
limit=limit,
page_size=page_size,
)
Expand All @@ -811,6 +841,8 @@ def page(
to: Union[str, object] = values.unset,
from_: Union[str, object] = values.unset,
date_sent: Union[datetime, object] = values.unset,
date_sent_before: Union[datetime, object] = values.unset,
date_sent_after: Union[datetime, object] = values.unset,
page_token: Union[str, object] = values.unset,
page_number: Union[int, object] = values.unset,
page_size: Union[int, object] = values.unset,
Expand All @@ -822,6 +854,8 @@ def page(
:param to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
:param from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
:param date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param page_token: PageToken provided by the API
:param page_number: Page Number, this value is simply for client state
:param page_size: Number of records to return, defaults to 50
Expand All @@ -833,6 +867,8 @@ def page(
"To": to,
"From": from_,
"DateSent": serialize.iso8601_datetime(date_sent),
"DateSent<": serialize.iso8601_datetime(date_sent_before),
"DateSent>": serialize.iso8601_datetime(date_sent_after),
"PageToken": page_token,
"Page": page_number,
"PageSize": page_size,
Expand All @@ -847,6 +883,8 @@ async def page_async(
to: Union[str, object] = values.unset,
from_: Union[str, object] = values.unset,
date_sent: Union[datetime, object] = values.unset,
date_sent_before: Union[datetime, object] = values.unset,
date_sent_after: Union[datetime, object] = values.unset,
page_token: Union[str, object] = values.unset,
page_number: Union[int, object] = values.unset,
page_size: Union[int, object] = values.unset,
Expand All @@ -858,6 +896,8 @@ async def page_async(
:param to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
:param from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
:param date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
:param page_token: PageToken provided by the API
:param page_number: Page Number, this value is simply for client state
:param page_size: Number of records to return, defaults to 50
Expand All @@ -869,6 +909,8 @@ async def page_async(
"To": to,
"From": from_,
"DateSent": serialize.iso8601_datetime(date_sent),
"DateSent<": serialize.iso8601_datetime(date_sent_before),
"DateSent>": serialize.iso8601_datetime(date_sent_after),
"PageToken": page_token,
"Page": page_number,
"PageSize": page_size,
Expand Down
Loading

0 comments on commit 8251f5b

Please sign in to comment.