diff --git a/CHANGES.md b/CHANGES.md index f3b7a49ddb..b9e9c6e477 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,26 @@ twilio-python Changelog Here you can see the full list of changes between each twilio-python release. +[2024-01-25] Version 8.12.0 +--------------------------- +**Oauth** +- updated openid discovery endpoint uri **(breaking change)** +- Added device code authorization endpoint +- added oauth JWKS endpoint +- Get userinfo resource +- OpenID discovery resource +- Add new API for token endpoint + + +[2024-01-14] Version 8.11.1 +--------------------------- +**Library - Chore** +- [PR #749](https://github.com/twilio/twilio-python/pull/749): removing webhook test. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)! + +**Push** +- Migrated to new Push API V4 with Resilient Notification Delivery. + + [2023-12-14] Version 8.11.0 --------------------------- **Library - Chore** diff --git a/setup.py b/setup.py index 1737206707..213c094a09 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( name="twilio", - version="8.11.0", + version="8.12.0", description="Twilio API client and TwiML generator", author="Twilio", help_center="https://www.twilio.com/help/contact", diff --git a/tests/cluster/test_webhook.py b/tests/cluster/test_webhook.py index 37c0dda3b1..307cf3d397 100644 --- a/tests/cluster/test_webhook.py +++ b/tests/cluster/test_webhook.py @@ -1,12 +1,7 @@ import os -import unittest -import time -import _thread -from http.server import BaseHTTPRequestHandler, HTTPServer -from pyngrok import ngrok +from http.server import BaseHTTPRequestHandler from twilio.request_validator import RequestValidator -from twilio.rest import Client class RequestHandler(BaseHTTPRequestHandler): @@ -34,81 +29,81 @@ def process_request(self): ) -class WebhookTest(unittest.TestCase): - def setUp(self): - api_key = os.environ["TWILIO_API_KEY"] - api_secret = os.environ["TWILIO_API_SECRET"] - account_sid = os.environ["TWILIO_ACCOUNT_SID"] - self.client = Client(api_key, api_secret, account_sid) - - portNumber = 7777 - self.validation_server = HTTPServer(("", portNumber), RequestHandler) - self.tunnel = ngrok.connect(portNumber) - self.flow_sid = "" - _thread.start_new_thread(self.start_http_server, ()) - - def start_http_server(self): - self.validation_server.serve_forever() - - def tearDown(self): - self.client.studio.v2.flows(self.flow_sid).delete() - ngrok.kill() - self.validation_server.shutdown() - self.validation_server.server_close() - - def create_studio_flow(self, url, method): - flow = self.client.studio.v2.flows.create( - friendly_name="Python Cluster Test Flow", - status="published", - definition={ - "description": "Studio Flow", - "states": [ - { - "name": "Trigger", - "type": "trigger", - "transitions": [ - { - "next": "httpRequest", - "event": "incomingRequest", - }, - ], - "properties": {}, - }, - { - "name": "httpRequest", - "type": "make-http-request", - "transitions": [], - "properties": { - "method": method, - "content_type": "application/x-www-form-urlencoded;charset=utf-8", - "url": url, - }, - }, - ], - "initial_state": "Trigger", - "flags": { - "allow_concurrent_calls": True, - }, - }, - ) - return flow - - def validate(self, method): - flow = self.create_studio_flow(url=self.tunnel.public_url, method=method) - self.flow_sid = flow.sid - time.sleep(5) - self.client.studio.v2.flows(self.flow_sid).executions.create( - to="to", from_="from" - ) - - def test_get(self): - time.sleep(5) - self.validate("GET") - time.sleep(5) - self.assertEqual(RequestHandler.is_request_valid, True) - - def test_post(self): - time.sleep(5) - self.validate("POST") - time.sleep(5) - self.assertEqual(RequestHandler.is_request_valid, True) +# class WebhookTest(unittest.TestCase): +# def setUp(self): +# api_key = os.environ["TWILIO_API_KEY"] +# api_secret = os.environ["TWILIO_API_SECRET"] +# account_sid = os.environ["TWILIO_ACCOUNT_SID"] +# self.client = Client(api_key, api_secret, account_sid) +# +# portNumber = 7777 +# self.validation_server = HTTPServer(("", portNumber), RequestHandler) +# self.tunnel = ngrok.connect(portNumber) +# self.flow_sid = "" +# _thread.start_new_thread(self.start_http_server, ()) +# +# def start_http_server(self): +# self.validation_server.serve_forever() +# +# def tearDown(self): +# self.client.studio.v2.flows(self.flow_sid).delete() +# ngrok.kill() +# self.validation_server.shutdown() +# self.validation_server.server_close() +# +# def create_studio_flow(self, url, method): +# flow = self.client.studio.v2.flows.create( +# friendly_name="Python Cluster Test Flow", +# status="published", +# definition={ +# "description": "Studio Flow", +# "states": [ +# { +# "name": "Trigger", +# "type": "trigger", +# "transitions": [ +# { +# "next": "httpRequest", +# "event": "incomingRequest", +# }, +# ], +# "properties": {}, +# }, +# { +# "name": "httpRequest", +# "type": "make-http-request", +# "transitions": [], +# "properties": { +# "method": method, +# "content_type": "application/x-www-form-urlencoded;charset=utf-8", +# "url": url, +# }, +# }, +# ], +# "initial_state": "Trigger", +# "flags": { +# "allow_concurrent_calls": True, +# }, +# }, +# ) +# return flow +# +# def validate(self, method): +# flow = self.create_studio_flow(url=self.tunnel.public_url, method=method) +# self.flow_sid = flow.sid +# time.sleep(5) +# self.client.studio.v2.flows(self.flow_sid).executions.create( +# to="to", from_="from" +# ) +# +# def test_get(self): +# time.sleep(5) +# self.validate("GET") +# time.sleep(5) +# self.assertEqual(RequestHandler.is_request_valid, True) +# +# def test_post(self): +# time.sleep(5) +# self.validate("POST") +# time.sleep(5) +# self.assertEqual(RequestHandler.is_request_valid, True) diff --git a/twilio/__init__.py b/twilio/__init__.py index ed70a4bc1f..cda97201bf 100644 --- a/twilio/__init__.py +++ b/twilio/__init__.py @@ -1,2 +1,2 @@ -__version_info__ = ("8", "11", "0") +__version_info__ = ("8", "12", "0") __version__ = ".".join(__version_info__) diff --git a/twilio/rest/__init__.py b/twilio/rest/__init__.py index 1206b29b0b..e883e66ec7 100644 --- a/twilio/rest/__init__.py +++ b/twilio/rest/__init__.py @@ -33,6 +33,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 @@ -141,6 +142,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 @@ -417,6 +419,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": """ diff --git a/twilio/rest/accounts/v1/safelist.py b/twilio/rest/accounts/v1/safelist.py index ce4f33ebae..fb658a677f 100644 --- a/twilio/rest/accounts/v1/safelist.py +++ b/twilio/rest/accounts/v1/safelist.py @@ -13,7 +13,7 @@ """ -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, Optional from twilio.base import values from twilio.base.instance_resource import InstanceResource @@ -100,77 +100,23 @@ async def create_async(self, phone_number: str) -> SafelistInstance: return SafelistInstance(self._version, payload) - def delete(self, phone_number: Union[str, object] = values.unset) -> bool: - """ - Asynchronously delete the SafelistInstance - - :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). - :returns: True if delete succeeds, False otherwise - """ - - params = values.of( - { - "PhoneNumber": phone_number, - } - ) - return self._version.delete(method="DELETE", uri=self._uri, params=params) - - async def delete_async( - self, phone_number: Union[str, object] = values.unset - ) -> bool: - """ - Asynchronously delete the SafelistInstance - - :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). - :returns: True if delete succeeds, False otherwise - """ - - params = values.of( - { - "PhoneNumber": phone_number, - } - ) - return await self._version.delete_async( - method="DELETE", uri=self._uri, params=params - ) - - def fetch( - self, phone_number: Union[str, object] = values.unset - ) -> SafelistInstance: + def fetch(self) -> SafelistInstance: """ Asynchronously fetch the SafelistInstance - :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). :returns: The fetched SafelistInstance """ - - params = values.of( - { - "PhoneNumber": phone_number, - } - ) - payload = self._version.fetch(method="GET", uri=self._uri, params=params) + payload = self._version.fetch(method="GET", uri=self._uri) return SafelistInstance(self._version, payload) - async def fetch_async( - self, phone_number: Union[str, object] = values.unset - ) -> SafelistInstance: + async def fetch_async(self) -> SafelistInstance: """ Asynchronously fetch the SafelistInstance - :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). :returns: The fetched SafelistInstance """ - - params = values.of( - { - "PhoneNumber": phone_number, - } - ) - payload = await self._version.fetch_async( - method="GET", uri=self._uri, params=params - ) + payload = await self._version.fetch_async(method="GET", uri=self._uri) return SafelistInstance(self._version, payload) diff --git a/twilio/rest/api/v2010/account/authorized_connect_app.py b/twilio/rest/api/v2010/account/authorized_connect_app.py index a62da5a760..4d71766b62 100644 --- a/twilio/rest/api/v2010/account/authorized_connect_app.py +++ b/twilio/rest/api/v2010/account/authorized_connect_app.py @@ -13,8 +13,9 @@ """ +from datetime import datetime from typing import Any, Dict, List, Optional, Union, Iterator, AsyncIterator -from twilio.base import values +from twilio.base import deserialize, values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource @@ -34,6 +35,8 @@ class Permission(object): :ivar connect_app_friendly_name: The name of the Connect App. :ivar connect_app_homepage_url: The public URL for the Connect App. :ivar connect_app_sid: The SID that we assigned to the Connect App. + :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. + :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. :ivar permissions: The set of permissions that you authorized for the Connect App. Can be: `get-all` or `post-all`. :ivar uri: The URI of the resource, relative to `https://api.twilio.com`. """ @@ -61,6 +64,12 @@ def __init__( "connect_app_homepage_url" ) self.connect_app_sid: Optional[str] = payload.get("connect_app_sid") + self.date_created: Optional[datetime] = deserialize.rfc2822_datetime( + payload.get("date_created") + ) + self.date_updated: Optional[datetime] = deserialize.rfc2822_datetime( + payload.get("date_updated") + ) self.permissions: Optional[ List["AuthorizedConnectAppInstance.Permission"] ] = payload.get("permissions") diff --git a/twilio/rest/api/v2010/account/balance.py b/twilio/rest/api/v2010/account/balance.py index befb75e694..e3c2d5e7e4 100644 --- a/twilio/rest/api/v2010/account/balance.py +++ b/twilio/rest/api/v2010/account/balance.py @@ -70,10 +70,8 @@ def fetch(self) -> BalanceInstance: """ Asynchronously fetch the BalanceInstance - :returns: The fetched BalanceInstance """ - payload = self._version.fetch(method="GET", uri=self._uri) return BalanceInstance( @@ -84,10 +82,8 @@ async def fetch_async(self) -> BalanceInstance: """ Asynchronously fetch the BalanceInstance - :returns: The fetched BalanceInstance """ - payload = await self._version.fetch_async(method="GET", uri=self._uri) return BalanceInstance( diff --git a/twilio/rest/api/v2010/account/conference/participant.py b/twilio/rest/api/v2010/account/conference/participant.py index f1fa87fd88..e1c2e90b36 100644 --- a/twilio/rest/api/v2010/account/conference/participant.py +++ b/twilio/rest/api/v2010/account/conference/participant.py @@ -571,7 +571,6 @@ def create( amd_status_callback: Union[str, object] = values.unset, amd_status_callback_method: Union[str, object] = values.unset, trim: Union[str, object] = values.unset, - call_token: Union[str, object] = values.unset, ) -> ParticipantInstance: """ Create the ParticipantInstance @@ -623,7 +622,6 @@ def create( :param amd_status_callback: The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. :param amd_status_callback_method: The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. :param trim: Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. - :param call_token: A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call. :returns: The created ParticipantInstance """ @@ -684,7 +682,6 @@ def create( "AmdStatusCallback": amd_status_callback, "AmdStatusCallbackMethod": amd_status_callback_method, "Trim": trim, - "CallToken": call_token, } ) @@ -752,7 +749,6 @@ async def create_async( amd_status_callback: Union[str, object] = values.unset, amd_status_callback_method: Union[str, object] = values.unset, trim: Union[str, object] = values.unset, - call_token: Union[str, object] = values.unset, ) -> ParticipantInstance: """ Asynchronously create the ParticipantInstance @@ -804,7 +800,6 @@ async def create_async( :param amd_status_callback: The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. :param amd_status_callback_method: The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. :param trim: Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. - :param call_token: A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call. :returns: The created ParticipantInstance """ @@ -865,7 +860,6 @@ async def create_async( "AmdStatusCallback": amd_status_callback, "AmdStatusCallbackMethod": amd_status_callback_method, "Trim": trim, - "CallToken": call_token, } ) diff --git a/twilio/rest/api/v2010/account/message/__init__.py b/twilio/rest/api/v2010/account/message/__init__.py index c521973e9c..58ea4f32b8 100644 --- a/twilio/rest/api/v2010/account/message/__init__.py +++ b/twilio/rest/api/v2010/account/message/__init__.py @@ -69,7 +69,7 @@ class UpdateStatus(object): :ivar body: The text content of the message :ivar num_segments: The number of segments that make up the complete message. SMS message bodies that exceed the [character limit](https://www.twilio.com/docs/glossary/what-sms-character-limit) are segmented and charged as multiple messages. Note: For messages sent via a Messaging Service, `num_segments` is initially `0`, since a sender hasn't yet been assigned. :ivar direction: - :ivar from_: The sender's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent. + :ivar from_: The sender's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent. :ivar to: The recipient's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format) or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g. `whatsapp:+15552229999`) :ivar date_updated: The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message resource was last updated :ivar price: The amount billed for the message in the currency specified by `price_unit`. The `price` is populated after the message has been sent/received, and may not be immediately availalble. View the [Pricing page](https://www.twilio.com/en-us/pricing) for more details. @@ -515,16 +515,16 @@ def create( :param address_retention: :param smart_encoded: Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. :param persistent_action: Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp). - :param shorten_urls: For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. + :param shorten_urls: For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. :param schedule_type: :param send_at: The time that Twilio will send the message. Must be in ISO 8601 format. :param send_as_mms: If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media. :param content_variables: For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used. :param risk_check: - :param from_: The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool. + :param from_: The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool. :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool. :param body: The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages). - :param media_url: The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. + :param media_url: The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. :param content_sid: For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources). :returns: The created MessageInstance @@ -612,16 +612,16 @@ async def create_async( :param address_retention: :param smart_encoded: Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. :param persistent_action: Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp). - :param shorten_urls: For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. + :param shorten_urls: For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. :param schedule_type: :param send_at: The time that Twilio will send the message. Must be in ISO 8601 format. :param send_as_mms: If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media. :param content_variables: For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used. :param risk_check: - :param from_: The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool. + :param from_: The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool. :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool. :param body: The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages). - :param media_url: The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. + :param media_url: The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. :param content_sid: For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources). :returns: The created MessageInstance diff --git a/twilio/rest/chat/v2/service/channel/__init__.py b/twilio/rest/chat/v2/service/channel/__init__.py index 14387550c9..82fc71f80b 100644 --- a/twilio/rest/chat/v2/service/channel/__init__.py +++ b/twilio/rest/chat/v2/service/channel/__init__.py @@ -620,7 +620,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -672,7 +671,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/chat/v2/service/channel/member.py b/twilio/rest/chat/v2/service/channel/member.py index 0a43c7bd4b..aa03d8bac3 100644 --- a/twilio/rest/chat/v2/service/channel/member.py +++ b/twilio/rest/chat/v2/service/channel/member.py @@ -549,7 +549,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -606,7 +605,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/chat/v2/service/channel/message.py b/twilio/rest/chat/v2/service/channel/message.py index bda88dfab8..07f6a9dc90 100644 --- a/twilio/rest/chat/v2/service/channel/message.py +++ b/twilio/rest/chat/v2/service/channel/message.py @@ -551,7 +551,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -606,7 +605,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/chat/v2/service/user/__init__.py b/twilio/rest/chat/v2/service/user/__init__.py index 9e593863fc..9977023e7f 100644 --- a/twilio/rest/chat/v2/service/user/__init__.py +++ b/twilio/rest/chat/v2/service/user/__init__.py @@ -489,7 +489,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -532,7 +531,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/content/v1/content/__init__.py b/twilio/rest/content/v1/content/__init__.py index 860d76fe33..b0eaaa0fad 100644 --- a/twilio/rest/content/v1/content/__init__.py +++ b/twilio/rest/content/v1/content/__init__.py @@ -34,7 +34,7 @@ class ContentInstance(InstanceResource): :ivar friendly_name: A string name used to describe the Content resource. Not visible to the end recipient. :ivar language: Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in. :ivar variables: Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}. - :ivar types: The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource. + :ivar types: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource. :ivar url: The URL of the resource, relative to `https://content.twilio.com`. :ivar links: A list of links related to the Content resource, such as approval_fetch and approval_create """ diff --git a/twilio/rest/content/v1/content_and_approvals.py b/twilio/rest/content/v1/content_and_approvals.py index f7bb8a53f9..914376ea0b 100644 --- a/twilio/rest/content/v1/content_and_approvals.py +++ b/twilio/rest/content/v1/content_and_approvals.py @@ -33,7 +33,7 @@ class ContentAndApprovalsInstance(InstanceResource): :ivar friendly_name: A string name used to describe the Content resource. Not visible to the end recipient. :ivar language: Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in. :ivar variables: Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}. - :ivar types: The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource. + :ivar types: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource. :ivar approval_requests: The submitted information and approval request status of the Content resource. """ diff --git a/twilio/rest/content/v1/legacy_content.py b/twilio/rest/content/v1/legacy_content.py index 73df905114..9a1370b98a 100644 --- a/twilio/rest/content/v1/legacy_content.py +++ b/twilio/rest/content/v1/legacy_content.py @@ -33,7 +33,7 @@ class LegacyContentInstance(InstanceResource): :ivar friendly_name: A string name used to describe the Content resource. Not visible to the end recipient. :ivar language: Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in. :ivar variables: Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}. - :ivar types: The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource. + :ivar types: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource. :ivar legacy_template_name: The string name of the legacy content template associated with this Content resource, unique across all template names for its account. Only lowercase letters, numbers and underscores are allowed :ivar legacy_body: The string body field of the legacy content template associated with this Content resource :ivar url: The URL of the resource, relative to `https://content.twilio.com`. diff --git a/twilio/rest/conversations/v1/conversation/__init__.py b/twilio/rest/conversations/v1/conversation/__init__.py index 88e12f1ccd..9194b30934 100644 --- a/twilio/rest/conversations/v1/conversation/__init__.py +++ b/twilio/rest/conversations/v1/conversation/__init__.py @@ -637,7 +637,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -699,7 +698,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/conversations/v1/conversation/message/__init__.py b/twilio/rest/conversations/v1/conversation/message/__init__.py index 28b875e229..3250a59dd8 100644 --- a/twilio/rest/conversations/v1/conversation/message/__init__.py +++ b/twilio/rest/conversations/v1/conversation/message/__init__.py @@ -50,7 +50,7 @@ class WebhookEnabledType(object): :ivar url: An absolute API resource API URL for this message. :ivar delivery: An object that contains the summary of delivery statuses for the message to non-chat participants. :ivar links: Contains an absolute API resource URL to access the delivery & read receipts of this message. - :ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template. + :ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template. """ def __init__( @@ -540,7 +540,7 @@ def create( :param date_updated: The date that this resource was last updated. `null` if the message has not been edited. :param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. :param media_sid: The Media SID to be attached to the new Message. - :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. + :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. :param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables. :param subject: The subject of the message, can be up to 256 characters long. @@ -564,7 +564,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -598,7 +597,7 @@ async def create_async( :param date_updated: The date that this resource was last updated. `null` if the message has not been edited. :param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. :param media_sid: The Media SID to be attached to the new Message. - :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. + :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. :param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables. :param subject: The subject of the message, can be up to 256 characters long. @@ -622,7 +621,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/conversations/v1/conversation/participant.py b/twilio/rest/conversations/v1/conversation/participant.py index 3f17d0a4e2..e9cb028ff3 100644 --- a/twilio/rest/conversations/v1/conversation/participant.py +++ b/twilio/rest/conversations/v1/conversation/participant.py @@ -566,7 +566,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -621,7 +620,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/conversations/v1/service/conversation/__init__.py b/twilio/rest/conversations/v1/service/conversation/__init__.py index b3719682ab..3fe88d5564 100644 --- a/twilio/rest/conversations/v1/service/conversation/__init__.py +++ b/twilio/rest/conversations/v1/service/conversation/__init__.py @@ -673,7 +673,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -737,7 +736,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/conversations/v1/service/conversation/message/__init__.py b/twilio/rest/conversations/v1/service/conversation/message/__init__.py index a3cf06e06c..3c42151531 100644 --- a/twilio/rest/conversations/v1/service/conversation/message/__init__.py +++ b/twilio/rest/conversations/v1/service/conversation/message/__init__.py @@ -51,7 +51,7 @@ class WebhookEnabledType(object): :ivar delivery: An object that contains the summary of delivery statuses for the message to non-chat participants. :ivar url: An absolute API resource URL for this message. :ivar links: Contains an absolute API resource URL to access the delivery & read receipts of this message. - :ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template. + :ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template. """ def __init__( @@ -559,7 +559,7 @@ def create( :param date_updated: The date that this resource was last updated. `null` if the message has not been edited. :param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. :param media_sid: The Media SID to be attached to the new Message. - :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. + :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. :param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables. :param subject: The subject of the message, can be up to 256 characters long. @@ -583,7 +583,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -620,7 +619,7 @@ async def create_async( :param date_updated: The date that this resource was last updated. `null` if the message has not been edited. :param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. :param media_sid: The Media SID to be attached to the new Message. - :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. + :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. :param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables. :param subject: The subject of the message, can be up to 256 characters long. @@ -644,7 +643,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/conversations/v1/service/conversation/participant.py b/twilio/rest/conversations/v1/service/conversation/participant.py index cf394affbc..70345aed67 100644 --- a/twilio/rest/conversations/v1/service/conversation/participant.py +++ b/twilio/rest/conversations/v1/service/conversation/participant.py @@ -584,7 +584,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -642,7 +641,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/conversations/v1/service/user/__init__.py b/twilio/rest/conversations/v1/service/user/__init__.py index 01e0d34522..10747179bf 100644 --- a/twilio/rest/conversations/v1/service/user/__init__.py +++ b/twilio/rest/conversations/v1/service/user/__init__.py @@ -501,7 +501,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -544,7 +543,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/conversations/v1/user/__init__.py b/twilio/rest/conversations/v1/user/__init__.py index 25eafb1c34..72a285885e 100644 --- a/twilio/rest/conversations/v1/user/__init__.py +++ b/twilio/rest/conversations/v1/user/__init__.py @@ -471,7 +471,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -512,7 +511,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/events/v1/subscription/subscribed_event.py b/twilio/rest/events/v1/subscription/subscribed_event.py index 7cccb1cb8c..f45fe0b2e0 100644 --- a/twilio/rest/events/v1/subscription/subscribed_event.py +++ b/twilio/rest/events/v1/subscription/subscribed_event.py @@ -27,7 +27,7 @@ class SubscribedEventInstance(InstanceResource): """ :ivar account_sid: The unique SID identifier of the Account. :ivar type: Type of event being subscribed to. - :ivar schema_version: The schema version that the Subscription should use. + :ivar schema_version: The schema version that the subscription should use. :ivar subscription_sid: The unique SID identifier of the Subscription. :ivar url: The URL of this resource. """ @@ -113,7 +113,7 @@ def update( """ Update the SubscribedEventInstance - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The updated SubscribedEventInstance """ @@ -127,7 +127,7 @@ async def update_async( """ Asynchronous coroutine to update the SubscribedEventInstance - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The updated SubscribedEventInstance """ @@ -235,7 +235,7 @@ def update( """ Update the SubscribedEventInstance - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The updated SubscribedEventInstance """ @@ -264,7 +264,7 @@ async def update_async( """ Asynchronous coroutine to update the SubscribedEventInstance - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The updated SubscribedEventInstance """ @@ -343,7 +343,7 @@ def create( Create the SubscribedEventInstance :param type: Type of event being subscribed to. - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The created SubscribedEventInstance """ @@ -371,7 +371,7 @@ async def create_async( Asynchronously create the SubscribedEventInstance :param type: Type of event being subscribed to. - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The created SubscribedEventInstance """ diff --git a/twilio/rest/flex_api/v1/__init__.py b/twilio/rest/flex_api/v1/__init__.py index 59e697bd9e..64701c623f 100644 --- a/twilio/rest/flex_api/v1/__init__.py +++ b/twilio/rest/flex_api/v1/__init__.py @@ -40,7 +40,6 @@ ) from twilio.rest.flex_api.v1.insights_user_roles import InsightsUserRolesList from twilio.rest.flex_api.v1.interaction import InteractionList -from twilio.rest.flex_api.v1.provisioning_status import ProvisioningStatusList from twilio.rest.flex_api.v1.web_channel import WebChannelList @@ -75,7 +74,6 @@ def __init__(self, domain: Domain): self._insights_settings_comment: Optional[InsightsSettingsCommentList] = None self._insights_user_roles: Optional[InsightsUserRolesList] = None self._interaction: Optional[InteractionList] = None - self._provisioning_status: Optional[ProvisioningStatusList] = None self._web_channel: Optional[WebChannelList] = None @property @@ -172,12 +170,6 @@ def interaction(self) -> InteractionList: self._interaction = InteractionList(self) return self._interaction - @property - def provisioning_status(self) -> ProvisioningStatusList: - if self._provisioning_status is None: - self._provisioning_status = ProvisioningStatusList(self) - return self._provisioning_status - @property def web_channel(self) -> WebChannelList: if self._web_channel is None: diff --git a/twilio/rest/flex_api/v1/assessments.py b/twilio/rest/flex_api/v1/assessments.py index 036d0248c4..06a335189c 100644 --- a/twilio/rest/flex_api/v1/assessments.py +++ b/twilio/rest/flex_api/v1/assessments.py @@ -326,7 +326,6 @@ def create( "Authorization": authorization, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -383,7 +382,6 @@ async def create_async( "Authorization": authorization, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/flex_api/v1/configuration.py b/twilio/rest/flex_api/v1/configuration.py index 24edb5eaa4..d46150795a 100644 --- a/twilio/rest/flex_api/v1/configuration.py +++ b/twilio/rest/flex_api/v1/configuration.py @@ -76,7 +76,6 @@ class Status(object): :ivar flex_ui_status_report: Configurable parameters for Flex UI Status report. :ivar agent_conv_end_methods: Agent conversation end methods. :ivar citrix_voice_vdi: Citrix voice vdi configuration and settings. - :ivar offline_config: Presence and presence ttl configuration """ def __init__(self, version: Version, payload: Dict[str, Any]): @@ -185,7 +184,6 @@ def __init__(self, version: Version, payload: Dict[str, Any]): self.citrix_voice_vdi: Optional[Dict[str, object]] = payload.get( "citrix_voice_vdi" ) - self.offline_config: Optional[Dict[str, object]] = payload.get("offline_config") self._context: Optional[ConfigurationContext] = None diff --git a/twilio/rest/flex_api/v1/insights_assessments_comment.py b/twilio/rest/flex_api/v1/insights_assessments_comment.py index 127774d572..05b2dfb3e7 100644 --- a/twilio/rest/flex_api/v1/insights_assessments_comment.py +++ b/twilio/rest/flex_api/v1/insights_assessments_comment.py @@ -135,7 +135,6 @@ def create( "Authorization": authorization, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -180,7 +179,6 @@ async def create_async( "Authorization": authorization, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/flex_api/v1/insights_questionnaires.py b/twilio/rest/flex_api/v1/insights_questionnaires.py index 978bf8807d..d65c33aaf4 100644 --- a/twilio/rest/flex_api/v1/insights_questionnaires.py +++ b/twilio/rest/flex_api/v1/insights_questionnaires.py @@ -454,7 +454,6 @@ def create( "Authorization": authorization, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -493,7 +492,6 @@ async def create_async( "Authorization": authorization, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/flex_api/v1/insights_questionnaires_category.py b/twilio/rest/flex_api/v1/insights_questionnaires_category.py index 2659f277e8..74a05e68b3 100644 --- a/twilio/rest/flex_api/v1/insights_questionnaires_category.py +++ b/twilio/rest/flex_api/v1/insights_questionnaires_category.py @@ -313,7 +313,6 @@ def create( "Authorization": authorization, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -341,7 +340,6 @@ async def create_async( "Authorization": authorization, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/flex_api/v1/insights_questionnaires_question.py b/twilio/rest/flex_api/v1/insights_questionnaires_question.py index 53405e772e..78739bbcbb 100644 --- a/twilio/rest/flex_api/v1/insights_questionnaires_question.py +++ b/twilio/rest/flex_api/v1/insights_questionnaires_question.py @@ -395,7 +395,6 @@ def create( "Authorization": authorization, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -437,7 +436,6 @@ async def create_async( "Authorization": authorization, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/flex_api/v1/insights_settings_answer_sets.py b/twilio/rest/flex_api/v1/insights_settings_answer_sets.py index 46762d48af..4a38d3b137 100644 --- a/twilio/rest/flex_api/v1/insights_settings_answer_sets.py +++ b/twilio/rest/flex_api/v1/insights_settings_answer_sets.py @@ -13,8 +13,7 @@ """ -from typing import Any, Dict, Optional, Union -from twilio.base import values +from typing import Any, Dict, Optional from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource @@ -64,43 +63,23 @@ def __init__(self, version: Version): self._uri = "/Insights/QualityManagement/Settings/AnswerSets" - def fetch( - self, authorization: Union[str, object] = values.unset - ) -> InsightsSettingsAnswerSetsInstance: + def fetch(self) -> InsightsSettingsAnswerSetsInstance: """ Asynchronously fetch the InsightsSettingsAnswerSetsInstance - :param authorization: The Authorization HTTP request header :returns: The fetched InsightsSettingsAnswerSetsInstance """ - headers = values.of( - { - "Authorization": authorization, - } - ) - - payload = self._version.fetch(method="GET", uri=self._uri, headers=headers) + payload = self._version.fetch(method="GET", uri=self._uri) return InsightsSettingsAnswerSetsInstance(self._version, payload) - async def fetch_async( - self, authorization: Union[str, object] = values.unset - ) -> InsightsSettingsAnswerSetsInstance: + async def fetch_async(self) -> InsightsSettingsAnswerSetsInstance: """ Asynchronously fetch the InsightsSettingsAnswerSetsInstance - :param authorization: The Authorization HTTP request header :returns: The fetched InsightsSettingsAnswerSetsInstance """ - headers = values.of( - { - "Authorization": authorization, - } - ) - - payload = await self._version.fetch_async( - method="GET", uri=self._uri, headers=headers - ) + payload = await self._version.fetch_async(method="GET", uri=self._uri) return InsightsSettingsAnswerSetsInstance(self._version, payload) diff --git a/twilio/rest/flex_api/v1/insights_settings_comment.py b/twilio/rest/flex_api/v1/insights_settings_comment.py index 92b135e85e..681dc5800d 100644 --- a/twilio/rest/flex_api/v1/insights_settings_comment.py +++ b/twilio/rest/flex_api/v1/insights_settings_comment.py @@ -13,8 +13,7 @@ """ -from typing import Any, Dict, Optional, Union -from twilio.base import values +from typing import Any, Dict, Optional from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource @@ -58,43 +57,23 @@ def __init__(self, version: Version): self._uri = "/Insights/QualityManagement/Settings/CommentTags" - def fetch( - self, authorization: Union[str, object] = values.unset - ) -> InsightsSettingsCommentInstance: + def fetch(self) -> InsightsSettingsCommentInstance: """ Asynchronously fetch the InsightsSettingsCommentInstance - :param authorization: The Authorization HTTP request header :returns: The fetched InsightsSettingsCommentInstance """ - headers = values.of( - { - "Authorization": authorization, - } - ) - - payload = self._version.fetch(method="GET", uri=self._uri, headers=headers) + payload = self._version.fetch(method="GET", uri=self._uri) return InsightsSettingsCommentInstance(self._version, payload) - async def fetch_async( - self, authorization: Union[str, object] = values.unset - ) -> InsightsSettingsCommentInstance: + async def fetch_async(self) -> InsightsSettingsCommentInstance: """ Asynchronously fetch the InsightsSettingsCommentInstance - :param authorization: The Authorization HTTP request header :returns: The fetched InsightsSettingsCommentInstance """ - headers = values.of( - { - "Authorization": authorization, - } - ) - - payload = await self._version.fetch_async( - method="GET", uri=self._uri, headers=headers - ) + payload = await self._version.fetch_async(method="GET", uri=self._uri) return InsightsSettingsCommentInstance(self._version, payload) diff --git a/twilio/rest/insights/v1/call/annotation.py b/twilio/rest/insights/v1/call/annotation.py index a282dcbba0..acb2567549 100644 --- a/twilio/rest/insights/v1/call/annotation.py +++ b/twilio/rest/insights/v1/call/annotation.py @@ -45,7 +45,7 @@ class ConnectivityIssue(object): :ivar call_score: Specifies the Call Score, if available. This is of type integer. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad]. :ivar comment: Specifies any comments pertaining to the call. Twilio does not treat this field as PII, so no PII should be included in comments. :ivar incident: Incident or support ticket associated with this call. The `incident` property is of type string with a maximum character limit of 100. Twilio does not treat this field as PII, so no PII should be included in `incident`. - :ivar url: + :ivar url: The URL of this resource. """ def __init__(self, version: Version, payload: Dict[str, Any], call_sid: str): diff --git a/twilio/rest/intelligence/v2/service.py b/twilio/rest/intelligence/v2/service.py index 8f7647ed4a..ae63037ed0 100644 --- a/twilio/rest/intelligence/v2/service.py +++ b/twilio/rest/intelligence/v2/service.py @@ -34,7 +34,7 @@ class HttpMethod(object): :ivar auto_redaction: Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service. :ivar media_redaction: Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise. :ivar auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :ivar data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :ivar data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :ivar date_created: The date that this Service was created, given in ISO 8601 format. :ivar date_updated: The date that this Service was updated, given in ISO 8601 format. :ivar friendly_name: A human readable description of this resource, up to 64 characters. @@ -148,7 +148,7 @@ def update( :param if_match: The If-Match HTTP request header :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. @@ -190,7 +190,7 @@ async def update_async( :param if_match: The If-Match HTTP request header :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. @@ -320,7 +320,7 @@ def update( :param if_match: The If-Match HTTP request header :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. @@ -374,7 +374,7 @@ async def update_async( :param if_match: The If-Match HTTP request header :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. @@ -467,7 +467,7 @@ def create( :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param auto_redaction: Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service. @@ -516,7 +516,7 @@ async def create_async( :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param auto_redaction: Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service. diff --git a/twilio/rest/intelligence/v2/transcript/__init__.py b/twilio/rest/intelligence/v2/transcript/__init__.py index 72bb4bdc1e..7b479526cb 100644 --- a/twilio/rest/intelligence/v2/transcript/__init__.py +++ b/twilio/rest/intelligence/v2/transcript/__init__.py @@ -42,7 +42,7 @@ class Status(object): :ivar date_updated: The date that this Transcript was updated, given in ISO 8601 format. :ivar status: :ivar channel: Media Channel describing Transcript Source and Participant Mapping - :ivar data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :ivar data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :ivar language_code: The default language code of the audio. :ivar customer_key: :ivar media_start_time: The date that this Transcript's media was started, given in ISO 8601 format. diff --git a/twilio/rest/intelligence/v2/transcript/operator_result.py b/twilio/rest/intelligence/v2/transcript/operator_result.py index 40e4e58886..662828ce51 100644 --- a/twilio/rest/intelligence/v2/transcript/operator_result.py +++ b/twilio/rest/intelligence/v2/transcript/operator_result.py @@ -43,7 +43,6 @@ class OperatorType(object): :ivar predicted_probability: Percentage of 'matching' class needed to consider a sentence matches. :ivar label_probabilities: The labels probabilities. This might be available on conversation classify model outputs. :ivar extract_results: List of text extraction results. This might be available on classify-extract model outputs. - :ivar text_generation_results: Output of a text generation operator for example Conversation Sumamary. :ivar transcript_sid: A 34 character string that uniquely identifies this Transcript. :ivar url: The URL of this resource. """ @@ -81,9 +80,6 @@ def __init__( self.extract_results: Optional[Dict[str, object]] = payload.get( "extract_results" ) - self.text_generation_results: Optional[Dict[str, object]] = payload.get( - "text_generation_results" - ) self.transcript_sid: Optional[str] = payload.get("transcript_sid") self.url: Optional[str] = payload.get("url") diff --git a/twilio/rest/ip_messaging/v2/service/channel/__init__.py b/twilio/rest/ip_messaging/v2/service/channel/__init__.py index 55c5b749a5..6e62c31093 100644 --- a/twilio/rest/ip_messaging/v2/service/channel/__init__.py +++ b/twilio/rest/ip_messaging/v2/service/channel/__init__.py @@ -620,7 +620,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -672,7 +671,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/ip_messaging/v2/service/channel/member.py b/twilio/rest/ip_messaging/v2/service/channel/member.py index b001bc1b49..823c37b6df 100644 --- a/twilio/rest/ip_messaging/v2/service/channel/member.py +++ b/twilio/rest/ip_messaging/v2/service/channel/member.py @@ -549,7 +549,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -606,7 +605,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/ip_messaging/v2/service/channel/message.py b/twilio/rest/ip_messaging/v2/service/channel/message.py index f55afedbc1..c2401c53f9 100644 --- a/twilio/rest/ip_messaging/v2/service/channel/message.py +++ b/twilio/rest/ip_messaging/v2/service/channel/message.py @@ -551,7 +551,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -606,7 +605,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/ip_messaging/v2/service/user/__init__.py b/twilio/rest/ip_messaging/v2/service/user/__init__.py index 3acb88284d..1f11793877 100644 --- a/twilio/rest/ip_messaging/v2/service/user/__init__.py +++ b/twilio/rest/ip_messaging/v2/service/user/__init__.py @@ -489,7 +489,6 @@ def create( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = self._version.create( method="POST", uri=self._uri, data=data, headers=headers ) @@ -532,7 +531,6 @@ async def create_async( "X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled, } ) - payload = await self._version.create_async( method="POST", uri=self._uri, data=data, headers=headers ) diff --git a/twilio/rest/messaging/v1/service/channel_sender.py b/twilio/rest/messaging/v1/service/channel_sender.py index 17a147dd16..579c6d39fd 100644 --- a/twilio/rest/messaging/v1/service/channel_sender.py +++ b/twilio/rest/messaging/v1/service/channel_sender.py @@ -34,7 +34,7 @@ class ChannelSenderInstance(InstanceResource): :ivar country_code: The 2-character [ISO Country Code](https://www.iso.org/iso-3166-country-codes.html) of the number. :ivar date_created: The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. :ivar date_updated: The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - :ivar url: The absolute URL of the ChannelSender resource. + :ivar url: """ def __init__( diff --git a/twilio/rest/messaging/v1/service/us_app_to_person_usecase.py b/twilio/rest/messaging/v1/service/us_app_to_person_usecase.py index 41dbec7878..0c25e6892c 100644 --- a/twilio/rest/messaging/v1/service/us_app_to_person_usecase.py +++ b/twilio/rest/messaging/v1/service/us_app_to_person_usecase.py @@ -13,8 +13,7 @@ """ -from typing import Any, Dict, List, Optional, Union -from twilio.base import values +from typing import Any, Dict, List, Optional from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource @@ -71,22 +70,13 @@ def __init__(self, version: Version, messaging_service_sid: str): ) ) - def fetch( - self, brand_registration_sid: Union[str, object] = values.unset - ) -> UsAppToPersonUsecaseInstance: + def fetch(self) -> UsAppToPersonUsecaseInstance: """ Asynchronously fetch the UsAppToPersonUsecaseInstance - :param brand_registration_sid: The unique string to identify the A2P brand. :returns: The fetched UsAppToPersonUsecaseInstance """ - - params = values.of( - { - "BrandRegistrationSid": brand_registration_sid, - } - ) - payload = self._version.fetch(method="GET", uri=self._uri, params=params) + payload = self._version.fetch(method="GET", uri=self._uri) return UsAppToPersonUsecaseInstance( self._version, @@ -94,24 +84,13 @@ def fetch( messaging_service_sid=self._solution["messaging_service_sid"], ) - async def fetch_async( - self, brand_registration_sid: Union[str, object] = values.unset - ) -> UsAppToPersonUsecaseInstance: + async def fetch_async(self) -> UsAppToPersonUsecaseInstance: """ Asynchronously fetch the UsAppToPersonUsecaseInstance - :param brand_registration_sid: The unique string to identify the A2P brand. :returns: The fetched UsAppToPersonUsecaseInstance """ - - params = values.of( - { - "BrandRegistrationSid": brand_registration_sid, - } - ) - payload = await self._version.fetch_async( - method="GET", uri=self._uri, params=params - ) + payload = await self._version.fetch_async(method="GET", uri=self._uri) return UsAppToPersonUsecaseInstance( self._version, diff --git a/twilio/rest/messaging/v1/tollfree_verification.py b/twilio/rest/messaging/v1/tollfree_verification.py index 7efbbc78a6..47b73d7da6 100644 --- a/twilio/rest/messaging/v1/tollfree_verification.py +++ b/twilio/rest/messaging/v1/tollfree_verification.py @@ -71,7 +71,6 @@ class Status(object): :ivar rejection_reason: The rejection reason given when a Tollfree Verification has been rejected. :ivar error_code: The error code given when a Tollfree Verification has been rejected. :ivar edit_expiration: The date and time when the ability to edit a rejected verification expires. - :ivar edit_allowed: If a rejected verification is allowed to be edited/resubmitted. Some rejection reasons allow editing and some do not. :ivar resource_links: The URLs of the documents associated with the Tollfree Verification resource. :ivar external_reference_id: An optional external reference ID supplied by customer and echoed back on status retrieval. """ @@ -146,7 +145,6 @@ def __init__( self.edit_expiration: Optional[datetime] = deserialize.iso8601_datetime( payload.get("edit_expiration") ) - self.edit_allowed: Optional[bool] = payload.get("edit_allowed") self.resource_links: Optional[Dict[str, object]] = payload.get("resource_links") self.external_reference_id: Optional[str] = payload.get("external_reference_id") @@ -170,24 +168,6 @@ def _proxy(self) -> "TollfreeVerificationContext": ) return self._context - def delete(self) -> bool: - """ - Deletes the TollfreeVerificationInstance - - - :returns: True if delete succeeds, False otherwise - """ - return self._proxy.delete() - - async def delete_async(self) -> bool: - """ - Asynchronous coroutine that deletes the TollfreeVerificationInstance - - - :returns: True if delete succeeds, False otherwise - """ - return await self._proxy.delete_async() - def fetch(self) -> "TollfreeVerificationInstance": """ Fetch the TollfreeVerificationInstance @@ -230,7 +210,6 @@ def update( business_contact_last_name: Union[str, object] = values.unset, business_contact_email: Union[str, object] = values.unset, business_contact_phone: Union[str, object] = values.unset, - edit_reason: Union[str, object] = values.unset, ) -> "TollfreeVerificationInstance": """ Update the TollfreeVerificationInstance @@ -255,7 +234,6 @@ def update( :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number. :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number. :param business_contact_phone: The phone number of the contact for the business or organization using the Tollfree number. - :param edit_reason: Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'. :returns: The updated TollfreeVerificationInstance """ @@ -280,7 +258,6 @@ def update( business_contact_last_name=business_contact_last_name, business_contact_email=business_contact_email, business_contact_phone=business_contact_phone, - edit_reason=edit_reason, ) async def update_async( @@ -307,7 +284,6 @@ async def update_async( business_contact_last_name: Union[str, object] = values.unset, business_contact_email: Union[str, object] = values.unset, business_contact_phone: Union[str, object] = values.unset, - edit_reason: Union[str, object] = values.unset, ) -> "TollfreeVerificationInstance": """ Asynchronous coroutine to update the TollfreeVerificationInstance @@ -332,7 +308,6 @@ async def update_async( :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number. :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number. :param business_contact_phone: The phone number of the contact for the business or organization using the Tollfree number. - :param edit_reason: Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'. :returns: The updated TollfreeVerificationInstance """ @@ -357,7 +332,6 @@ async def update_async( business_contact_last_name=business_contact_last_name, business_contact_email=business_contact_email, business_contact_phone=business_contact_phone, - edit_reason=edit_reason, ) def __repr__(self) -> str: @@ -386,30 +360,6 @@ def __init__(self, version: Version, sid: str): } self._uri = "/Tollfree/Verifications/{sid}".format(**self._solution) - def delete(self) -> bool: - """ - Deletes the TollfreeVerificationInstance - - - :returns: True if delete succeeds, False otherwise - """ - return self._version.delete( - method="DELETE", - uri=self._uri, - ) - - async def delete_async(self) -> bool: - """ - Asynchronous coroutine that deletes the TollfreeVerificationInstance - - - :returns: True if delete succeeds, False otherwise - """ - return await self._version.delete_async( - method="DELETE", - uri=self._uri, - ) - def fetch(self) -> TollfreeVerificationInstance: """ Fetch the TollfreeVerificationInstance @@ -472,7 +422,6 @@ def update( business_contact_last_name: Union[str, object] = values.unset, business_contact_email: Union[str, object] = values.unset, business_contact_phone: Union[str, object] = values.unset, - edit_reason: Union[str, object] = values.unset, ) -> TollfreeVerificationInstance: """ Update the TollfreeVerificationInstance @@ -497,7 +446,6 @@ def update( :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number. :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number. :param business_contact_phone: The phone number of the contact for the business or organization using the Tollfree number. - :param edit_reason: Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'. :returns: The updated TollfreeVerificationInstance """ @@ -523,7 +471,6 @@ def update( "BusinessContactLastName": business_contact_last_name, "BusinessContactEmail": business_contact_email, "BusinessContactPhone": business_contact_phone, - "EditReason": edit_reason, } ) @@ -561,7 +508,6 @@ async def update_async( business_contact_last_name: Union[str, object] = values.unset, business_contact_email: Union[str, object] = values.unset, business_contact_phone: Union[str, object] = values.unset, - edit_reason: Union[str, object] = values.unset, ) -> TollfreeVerificationInstance: """ Asynchronous coroutine to update the TollfreeVerificationInstance @@ -586,7 +532,6 @@ async def update_async( :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number. :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number. :param business_contact_phone: The phone number of the contact for the business or organization using the Tollfree number. - :param edit_reason: Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'. :returns: The updated TollfreeVerificationInstance """ @@ -612,7 +557,6 @@ async def update_async( "BusinessContactLastName": business_contact_last_name, "BusinessContactEmail": business_contact_email, "BusinessContactPhone": business_contact_phone, - "EditReason": edit_reason, } ) diff --git a/twilio/rest/messaging/v1/usecase.py b/twilio/rest/messaging/v1/usecase.py index 4b455d8c67..ba65e8b106 100644 --- a/twilio/rest/messaging/v1/usecase.py +++ b/twilio/rest/messaging/v1/usecase.py @@ -57,10 +57,8 @@ def fetch(self) -> UsecaseInstance: """ Asynchronously fetch the UsecaseInstance - :returns: The fetched UsecaseInstance """ - payload = self._version.fetch(method="GET", uri=self._uri) return UsecaseInstance(self._version, payload) @@ -69,10 +67,8 @@ async def fetch_async(self) -> UsecaseInstance: """ Asynchronously fetch the UsecaseInstance - :returns: The fetched UsecaseInstance """ - payload = await self._version.fetch_async(method="GET", uri=self._uri) return UsecaseInstance(self._version, payload) diff --git a/twilio/rest/notify/v1/service/__init__.py b/twilio/rest/notify/v1/service/__init__.py index b53ca2658b..fa07045470 100644 --- a/twilio/rest/notify/v1/service/__init__.py +++ b/twilio/rest/notify/v1/service/__init__.py @@ -36,7 +36,7 @@ class ServiceInstance(InstanceResource): :ivar apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :ivar gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. :ivar fcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. - :ivar messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. In order to send SMS notifications this parameter has to be set. + :ivar messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. In order to send SMS notifications this parameter has to be set. :ivar facebook_messenger_page_id: Deprecated. :ivar default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :ivar default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -171,7 +171,7 @@ def update( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -225,7 +225,7 @@ async def update_async( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -384,7 +384,7 @@ def update( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -448,7 +448,7 @@ async def update_async( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -576,7 +576,7 @@ def create( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -640,7 +640,7 @@ async def create_async( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. diff --git a/twilio/rest/notify/v1/service/notification.py b/twilio/rest/notify/v1/service/notification.py index 40234fb072..980dbe633c 100644 --- a/twilio/rest/notify/v1/service/notification.py +++ b/twilio/rest/notify/v1/service/notification.py @@ -144,7 +144,7 @@ def create( :param data: The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels. :param apn: The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. :param gcm: The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref). - :param sms: The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/quickstart) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. + :param sms: The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. :param facebook_messenger: Deprecated. :param fcm: The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel. :param segment: The Segment resource is deprecated. Use the `tag` parameter, instead. @@ -222,7 +222,7 @@ async def create_async( :param data: The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels. :param apn: The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. :param gcm: The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref). - :param sms: The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/quickstart) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. + :param sms: The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. :param facebook_messenger: Deprecated. :param fcm: The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel. :param segment: The Segment resource is deprecated. Use the `tag` parameter, instead. diff --git a/twilio/rest/numbers/v1/__init__.py b/twilio/rest/numbers/v1/__init__.py index a9285ae496..e7ee222a47 100644 --- a/twilio/rest/numbers/v1/__init__.py +++ b/twilio/rest/numbers/v1/__init__.py @@ -17,7 +17,6 @@ from twilio.base.domain import Domain from twilio.rest.numbers.v1.bulk_eligibility import BulkEligibilityList from twilio.rest.numbers.v1.porting_bulk_portability import PortingBulkPortabilityList -from twilio.rest.numbers.v1.porting_port_in_fetch import PortingPortInFetchList from twilio.rest.numbers.v1.porting_portability import PortingPortabilityList @@ -31,7 +30,6 @@ def __init__(self, domain: Domain): super().__init__(domain, "v1") self._bulk_eligibilities: Optional[BulkEligibilityList] = None self._porting_bulk_portabilities: Optional[PortingBulkPortabilityList] = None - self._porting_port_ins: Optional[PortingPortInFetchList] = None self._porting_portabilities: Optional[PortingPortabilityList] = None @property @@ -46,12 +44,6 @@ def porting_bulk_portabilities(self) -> PortingBulkPortabilityList: self._porting_bulk_portabilities = PortingBulkPortabilityList(self) return self._porting_bulk_portabilities - @property - def porting_port_ins(self) -> PortingPortInFetchList: - if self._porting_port_ins is None: - self._porting_port_ins = PortingPortInFetchList(self) - return self._porting_port_ins - @property def porting_portabilities(self) -> PortingPortabilityList: if self._porting_portabilities is None: diff --git a/twilio/rest/numbers/v1/porting_port_in_fetch.py b/twilio/rest/numbers/v1/porting_port_in_fetch.py deleted file mode 100644 index 0ac469fe6f..0000000000 --- a/twilio/rest/numbers/v1/porting_port_in_fetch.py +++ /dev/null @@ -1,217 +0,0 @@ -r""" - This code was generated by - ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - - Twilio - Numbers - 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 datetime import date -from typing import Any, Dict, List, Optional -from twilio.base import deserialize -from twilio.base.instance_context import InstanceContext -from twilio.base.instance_resource import InstanceResource -from twilio.base.list_resource import ListResource -from twilio.base.version import Version - - -class PortingPortInFetchInstance(InstanceResource): - - """ - :ivar port_in_request_sid: The SID of the Port In request. This is a unique identifier of the port in request. - :ivar url: The URL of this Port In request - :ivar account_sid: The Account SID that the numbers will be added to after they are ported into Twilio. - :ivar notification_emails: List of emails for getting notifications about the LOA signing process. Allowed Max 10 emails. - :ivar target_port_in_date: Minimum number of days in the future (at least 2 days) needs to be established with the Ops team for validation. - :ivar target_port_in_time_range_start: Minimum hour in the future needs to be established with the Ops team for validation. - :ivar target_port_in_time_range_end: Maximum hour in the future needs to be established with the Ops team for validation. - :ivar losing_carrier_information: The information for the losing carrier. - :ivar phone_numbers: The list of phone numbers to Port in. Phone numbers are in E.164 format (e.g. +16175551212). - :ivar documents: The list of documents SID referencing a utility bills - """ - - def __init__( - self, - version: Version, - payload: Dict[str, Any], - port_in_request_sid: Optional[str] = None, - ): - super().__init__(version) - - self.port_in_request_sid: Optional[str] = payload.get("port_in_request_sid") - self.url: Optional[str] = payload.get("url") - self.account_sid: Optional[str] = payload.get("account_sid") - self.notification_emails: Optional[List[str]] = payload.get( - "notification_emails" - ) - self.target_port_in_date: Optional[date] = deserialize.iso8601_date( - payload.get("target_port_in_date") - ) - self.target_port_in_time_range_start: Optional[str] = payload.get( - "target_port_in_time_range_start" - ) - self.target_port_in_time_range_end: Optional[str] = payload.get( - "target_port_in_time_range_end" - ) - self.losing_carrier_information: Optional[Dict[str, object]] = payload.get( - "losing_carrier_information" - ) - self.phone_numbers: Optional[List[object]] = payload.get("phone_numbers") - self.documents: Optional[List[str]] = payload.get("documents") - - self._solution = { - "port_in_request_sid": port_in_request_sid or self.port_in_request_sid, - } - self._context: Optional[PortingPortInFetchContext] = None - - @property - def _proxy(self) -> "PortingPortInFetchContext": - """ - Generate an instance context for the instance, the context is capable of - performing various actions. All instance actions are proxied to the context - - :returns: PortingPortInFetchContext for this PortingPortInFetchInstance - """ - if self._context is None: - self._context = PortingPortInFetchContext( - self._version, - port_in_request_sid=self._solution["port_in_request_sid"], - ) - return self._context - - def fetch(self) -> "PortingPortInFetchInstance": - """ - Fetch the PortingPortInFetchInstance - - - :returns: The fetched PortingPortInFetchInstance - """ - return self._proxy.fetch() - - async def fetch_async(self) -> "PortingPortInFetchInstance": - """ - Asynchronous coroutine to fetch the PortingPortInFetchInstance - - - :returns: The fetched PortingPortInFetchInstance - """ - return await self._proxy.fetch_async() - - def __repr__(self) -> str: - """ - Provide a friendly representation - - :returns: Machine friendly representation - """ - context = " ".join("{}={}".format(k, v) for k, v in self._solution.items()) - return "".format(context) - - -class PortingPortInFetchContext(InstanceContext): - def __init__(self, version: Version, port_in_request_sid: str): - """ - Initialize the PortingPortInFetchContext - - :param version: Version that contains the resource - :param port_in_request_sid: The SID of the Port In request. This is a unique identifier of the port in request. - """ - super().__init__(version) - - # Path Solution - self._solution = { - "port_in_request_sid": port_in_request_sid, - } - self._uri = "/Porting/PortIn/{port_in_request_sid}".format(**self._solution) - - def fetch(self) -> PortingPortInFetchInstance: - """ - Fetch the PortingPortInFetchInstance - - - :returns: The fetched PortingPortInFetchInstance - """ - - payload = self._version.fetch( - method="GET", - uri=self._uri, - ) - - return PortingPortInFetchInstance( - self._version, - payload, - port_in_request_sid=self._solution["port_in_request_sid"], - ) - - async def fetch_async(self) -> PortingPortInFetchInstance: - """ - Asynchronous coroutine to fetch the PortingPortInFetchInstance - - - :returns: The fetched PortingPortInFetchInstance - """ - - payload = await self._version.fetch_async( - method="GET", - uri=self._uri, - ) - - return PortingPortInFetchInstance( - self._version, - payload, - port_in_request_sid=self._solution["port_in_request_sid"], - ) - - def __repr__(self) -> str: - """ - Provide a friendly representation - - :returns: Machine friendly representation - """ - context = " ".join("{}={}".format(k, v) for k, v in self._solution.items()) - return "".format(context) - - -class PortingPortInFetchList(ListResource): - def __init__(self, version: Version): - """ - Initialize the PortingPortInFetchList - - :param version: Version that contains the resource - - """ - super().__init__(version) - - def get(self, port_in_request_sid: str) -> PortingPortInFetchContext: - """ - Constructs a PortingPortInFetchContext - - :param port_in_request_sid: The SID of the Port In request. This is a unique identifier of the port in request. - """ - return PortingPortInFetchContext( - self._version, port_in_request_sid=port_in_request_sid - ) - - def __call__(self, port_in_request_sid: str) -> PortingPortInFetchContext: - """ - Constructs a PortingPortInFetchContext - - :param port_in_request_sid: The SID of the Port In request. This is a unique identifier of the port in request. - """ - return PortingPortInFetchContext( - self._version, port_in_request_sid=port_in_request_sid - ) - - def __repr__(self) -> str: - """ - Provide a friendly representation - - :returns: Machine friendly representation - """ - return "" diff --git a/twilio/rest/oauth/OauthBase.py b/twilio/rest/oauth/OauthBase.py new file mode 100644 index 0000000000..3df051d0fc --- /dev/null +++ b/twilio/rest/oauth/OauthBase.py @@ -0,0 +1,43 @@ +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.oauth.v1 import V1 + + +class OauthBase(Domain): + def __init__(self, twilio: Client): + """ + Initialize the Oauth Domain + + :returns: Domain for Oauth + """ + super().__init__(twilio, "https://oauth.twilio.com") + self._v1: Optional[V1] = None + + @property + def v1(self) -> V1: + """ + :returns: Versions v1 of Oauth + """ + 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 "" diff --git a/twilio/rest/oauth/v1/__init__.py b/twilio/rest/oauth/v1/__init__.py new file mode 100644 index 0000000000..36aaa90ff3 --- /dev/null +++ b/twilio/rest/oauth/v1/__init__.py @@ -0,0 +1,74 @@ +r""" + This code was generated by + ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + + Twilio - Oauth + 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.oauth.v1.device_code import DeviceCodeList +from twilio.rest.oauth.v1.oauth import OauthList +from twilio.rest.oauth.v1.openid_discovery import OpenidDiscoveryList +from twilio.rest.oauth.v1.token import TokenList +from twilio.rest.oauth.v1.user_info import UserInfoList + + +class V1(Version): + def __init__(self, domain: Domain): + """ + Initialize the V1 version of Oauth + + :param domain: The Twilio.oauth domain + """ + super().__init__(domain, "v1") + self._device_code: Optional[DeviceCodeList] = None + self._oauth: Optional[OauthList] = None + self._openid_discovery: Optional[OpenidDiscoveryList] = None + self._token: Optional[TokenList] = None + self._user_info: Optional[UserInfoList] = None + + @property + def device_code(self) -> DeviceCodeList: + if self._device_code is None: + self._device_code = DeviceCodeList(self) + return self._device_code + + @property + def oauth(self) -> OauthList: + if self._oauth is None: + self._oauth = OauthList(self) + return self._oauth + + @property + def openid_discovery(self) -> OpenidDiscoveryList: + if self._openid_discovery is None: + self._openid_discovery = OpenidDiscoveryList(self) + return self._openid_discovery + + @property + def token(self) -> TokenList: + if self._token is None: + self._token = TokenList(self) + return self._token + + @property + def user_info(self) -> UserInfoList: + if self._user_info is None: + self._user_info = UserInfoList(self) + return self._user_info + + def __repr__(self) -> str: + """ + Provide a friendly representation + :returns: Machine friendly representation + """ + return "" diff --git a/twilio/rest/oauth/v1/device_code.py b/twilio/rest/oauth/v1/device_code.py new file mode 100644 index 0000000000..ed0998ee94 --- /dev/null +++ b/twilio/rest/oauth/v1/device_code.py @@ -0,0 +1,137 @@ +r""" + This code was generated by + ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + + Twilio - Oauth + 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 Any, Dict, List, Optional, Union +from twilio.base import deserialize, serialize, values + +from twilio.base.instance_resource import InstanceResource +from twilio.base.list_resource import ListResource +from twilio.base.version import Version + + +class DeviceCodeInstance(InstanceResource): + + """ + :ivar device_code: The device verification code. + :ivar user_code: The verification code which end user uses to verify authorization request. + :ivar verification_uri: The URI that the end user visits to verify authorization request. + :ivar verification_uri_complete: The URI with user_code that the end-user alternatively visits to verify authorization request. + :ivar expires_in: The expiration time of the device_code and user_code in seconds. + :ivar interval: The minimum amount of time in seconds that the client should wait between polling requests to the token endpoint. + """ + + def __init__(self, version: Version, payload: Dict[str, Any]): + super().__init__(version) + + self.device_code: Optional[str] = payload.get("device_code") + self.user_code: Optional[str] = payload.get("user_code") + self.verification_uri: Optional[str] = payload.get("verification_uri") + self.verification_uri_complete: Optional[str] = payload.get( + "verification_uri_complete" + ) + self.expires_in: Optional[int] = payload.get("expires_in") + self.interval: Optional[int] = deserialize.integer(payload.get("interval")) + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + + return "" + + +class DeviceCodeList(ListResource): + def __init__(self, version: Version): + """ + Initialize the DeviceCodeList + + :param version: Version that contains the resource + + """ + super().__init__(version) + + self._uri = "/device/code" + + def create( + self, + client_sid: str, + scopes: List[str], + audiences: Union[List[str], object] = values.unset, + ) -> DeviceCodeInstance: + """ + Create the DeviceCodeInstance + + :param client_sid: A 34 character string that uniquely identifies this OAuth App. + :param scopes: An Array of scopes for authorization request + :param audiences: An array of intended audiences for token requests + + :returns: The created DeviceCodeInstance + """ + data = values.of( + { + "ClientSid": client_sid, + "Scopes": serialize.map(scopes, lambda e: e), + "Audiences": serialize.map(audiences, lambda e: e), + } + ) + + payload = self._version.create( + method="POST", + uri=self._uri, + data=data, + ) + + return DeviceCodeInstance(self._version, payload) + + async def create_async( + self, + client_sid: str, + scopes: List[str], + audiences: Union[List[str], object] = values.unset, + ) -> DeviceCodeInstance: + """ + Asynchronously create the DeviceCodeInstance + + :param client_sid: A 34 character string that uniquely identifies this OAuth App. + :param scopes: An Array of scopes for authorization request + :param audiences: An array of intended audiences for token requests + + :returns: The created DeviceCodeInstance + """ + data = values.of( + { + "ClientSid": client_sid, + "Scopes": serialize.map(scopes, lambda e: e), + "Audiences": serialize.map(audiences, lambda e: e), + } + ) + + payload = await self._version.create_async( + method="POST", + uri=self._uri, + data=data, + ) + + return DeviceCodeInstance(self._version, payload) + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + return "" diff --git a/twilio/rest/oauth/v1/oauth.py b/twilio/rest/oauth/v1/oauth.py new file mode 100644 index 0000000000..3765b65180 --- /dev/null +++ b/twilio/rest/oauth/v1/oauth.py @@ -0,0 +1,167 @@ +r""" + This code was generated by + ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + + Twilio - Oauth + 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 Any, Dict, Optional +from twilio.base.instance_context import InstanceContext +from twilio.base.instance_resource import InstanceResource +from twilio.base.list_resource import ListResource +from twilio.base.version import Version + + +class OauthInstance(InstanceResource): + + """ + :ivar keys: A collection of certificates where are signed Twilio-issued tokens. + :ivar url: + """ + + def __init__(self, version: Version, payload: Dict[str, Any]): + super().__init__(version) + + self.keys: Optional[Dict[str, object]] = payload.get("keys") + self.url: Optional[str] = payload.get("url") + + self._context: Optional[OauthContext] = None + + @property + def _proxy(self) -> "OauthContext": + """ + Generate an instance context for the instance, the context is capable of + performing various actions. All instance actions are proxied to the context + + :returns: OauthContext for this OauthInstance + """ + if self._context is None: + self._context = OauthContext( + self._version, + ) + return self._context + + def fetch(self) -> "OauthInstance": + """ + Fetch the OauthInstance + + + :returns: The fetched OauthInstance + """ + return self._proxy.fetch() + + async def fetch_async(self) -> "OauthInstance": + """ + Asynchronous coroutine to fetch the OauthInstance + + + :returns: The fetched OauthInstance + """ + return await self._proxy.fetch_async() + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + + return "" + + +class OauthContext(InstanceContext): + def __init__(self, version: Version): + """ + Initialize the OauthContext + + :param version: Version that contains the resource + """ + super().__init__(version) + + self._uri = "/certs" + + def fetch(self) -> OauthInstance: + """ + Fetch the OauthInstance + + + :returns: The fetched OauthInstance + """ + + payload = self._version.fetch( + method="GET", + uri=self._uri, + ) + + return OauthInstance( + self._version, + payload, + ) + + async def fetch_async(self) -> OauthInstance: + """ + Asynchronous coroutine to fetch the OauthInstance + + + :returns: The fetched OauthInstance + """ + + payload = await self._version.fetch_async( + method="GET", + uri=self._uri, + ) + + return OauthInstance( + self._version, + payload, + ) + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + + return "" + + +class OauthList(ListResource): + def __init__(self, version: Version): + """ + Initialize the OauthList + + :param version: Version that contains the resource + + """ + super().__init__(version) + + def get(self) -> OauthContext: + """ + Constructs a OauthContext + + """ + return OauthContext(self._version) + + def __call__(self) -> OauthContext: + """ + Constructs a OauthContext + + """ + return OauthContext(self._version) + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + return "" diff --git a/twilio/rest/oauth/v1/openid_discovery.py b/twilio/rest/oauth/v1/openid_discovery.py new file mode 100644 index 0000000000..00a551a2fe --- /dev/null +++ b/twilio/rest/oauth/v1/openid_discovery.py @@ -0,0 +1,199 @@ +r""" + This code was generated by + ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + + Twilio - Oauth + 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 Any, Dict, List, Optional +from twilio.base.instance_context import InstanceContext +from twilio.base.instance_resource import InstanceResource +from twilio.base.list_resource import ListResource +from twilio.base.version import Version + + +class OpenidDiscoveryInstance(InstanceResource): + + """ + :ivar issuer: The URL of the party that will create the token and sign it with its private key. + :ivar authorization_endpoint: The endpoint that validates all authorization requests. + :ivar device_authorization_endpoint: The endpoint that validates all device code related authorization requests. + :ivar token_endpoint: The URL of the token endpoint. After a client has received an authorization code, that code is presented to the token endpoint and exchanged for an identity token, an access token, and a refresh token. + :ivar userinfo_endpoint: The URL of the user info endpoint, which returns user profile information to a client. Keep in mind that the user info endpoint returns only the information that has been requested. + :ivar revocation_endpoint: The endpoint used to revoke access or refresh tokens issued by the authorization server. + :ivar jwk_uri: The URL of your JSON Web Key Set. This set is a collection of JSON Web Keys, a standard method for representing cryptographic keys in a JSON structure. + :ivar response_type_supported: A collection of response type supported by authorization server. + :ivar subject_type_supported: A collection of subject by authorization server. + :ivar id_token_signing_alg_values_supported: A collection of JWS signing algorithms supported by authorization server to sign identity token. + :ivar scopes_supported: A collection of scopes supported by authorization server for identity token + :ivar claims_supported: A collection of claims supported by authorization server for identity token + :ivar url: + """ + + def __init__(self, version: Version, payload: Dict[str, Any]): + super().__init__(version) + + self.issuer: Optional[str] = payload.get("issuer") + self.authorization_endpoint: Optional[str] = payload.get( + "authorization_endpoint" + ) + self.device_authorization_endpoint: Optional[str] = payload.get( + "device_authorization_endpoint" + ) + self.token_endpoint: Optional[str] = payload.get("token_endpoint") + self.userinfo_endpoint: Optional[str] = payload.get("userinfo_endpoint") + self.revocation_endpoint: Optional[str] = payload.get("revocation_endpoint") + self.jwk_uri: Optional[str] = payload.get("jwk_uri") + self.response_type_supported: Optional[List[str]] = payload.get( + "response_type_supported" + ) + self.subject_type_supported: Optional[List[str]] = payload.get( + "subject_type_supported" + ) + self.id_token_signing_alg_values_supported: Optional[List[str]] = payload.get( + "id_token_signing_alg_values_supported" + ) + self.scopes_supported: Optional[List[str]] = payload.get("scopes_supported") + self.claims_supported: Optional[List[str]] = payload.get("claims_supported") + self.url: Optional[str] = payload.get("url") + + self._context: Optional[OpenidDiscoveryContext] = None + + @property + def _proxy(self) -> "OpenidDiscoveryContext": + """ + Generate an instance context for the instance, the context is capable of + performing various actions. All instance actions are proxied to the context + + :returns: OpenidDiscoveryContext for this OpenidDiscoveryInstance + """ + if self._context is None: + self._context = OpenidDiscoveryContext( + self._version, + ) + return self._context + + def fetch(self) -> "OpenidDiscoveryInstance": + """ + Fetch the OpenidDiscoveryInstance + + + :returns: The fetched OpenidDiscoveryInstance + """ + return self._proxy.fetch() + + async def fetch_async(self) -> "OpenidDiscoveryInstance": + """ + Asynchronous coroutine to fetch the OpenidDiscoveryInstance + + + :returns: The fetched OpenidDiscoveryInstance + """ + return await self._proxy.fetch_async() + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + + return "" + + +class OpenidDiscoveryContext(InstanceContext): + def __init__(self, version: Version): + """ + Initialize the OpenidDiscoveryContext + + :param version: Version that contains the resource + """ + super().__init__(version) + + self._uri = "/.well-known/openid-configuration" + + def fetch(self) -> OpenidDiscoveryInstance: + """ + Fetch the OpenidDiscoveryInstance + + + :returns: The fetched OpenidDiscoveryInstance + """ + + payload = self._version.fetch( + method="GET", + uri=self._uri, + ) + + return OpenidDiscoveryInstance( + self._version, + payload, + ) + + async def fetch_async(self) -> OpenidDiscoveryInstance: + """ + Asynchronous coroutine to fetch the OpenidDiscoveryInstance + + + :returns: The fetched OpenidDiscoveryInstance + """ + + payload = await self._version.fetch_async( + method="GET", + uri=self._uri, + ) + + return OpenidDiscoveryInstance( + self._version, + payload, + ) + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + + return "" + + +class OpenidDiscoveryList(ListResource): + def __init__(self, version: Version): + """ + Initialize the OpenidDiscoveryList + + :param version: Version that contains the resource + + """ + super().__init__(version) + + def get(self) -> OpenidDiscoveryContext: + """ + Constructs a OpenidDiscoveryContext + + """ + return OpenidDiscoveryContext(self._version) + + def __call__(self) -> OpenidDiscoveryContext: + """ + Constructs a OpenidDiscoveryContext + + """ + return OpenidDiscoveryContext(self._version) + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + return "" diff --git a/twilio/rest/oauth/v1/token.py b/twilio/rest/oauth/v1/token.py new file mode 100644 index 0000000000..d236731a9f --- /dev/null +++ b/twilio/rest/oauth/v1/token.py @@ -0,0 +1,168 @@ +r""" + This code was generated by + ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + + Twilio - Oauth + 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 datetime import datetime +from typing import Any, Dict, Optional, Union +from twilio.base import deserialize, values + +from twilio.base.instance_resource import InstanceResource +from twilio.base.list_resource import ListResource +from twilio.base.version import Version + + +class TokenInstance(InstanceResource): + + """ + :ivar access_token: Token which carries the necessary information to access a Twilio resource directly. + :ivar refresh_token: Token which carries the information necessary to get a new access token. + :ivar id_token: + :ivar refresh_token_expires_at: The date and time in GMT when the refresh token expires in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + :ivar access_token_expires_at: The date and time in GMT when the refresh token expires in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + """ + + def __init__(self, version: Version, payload: Dict[str, Any]): + super().__init__(version) + + self.access_token: Optional[str] = payload.get("access_token") + self.refresh_token: Optional[str] = payload.get("refresh_token") + self.id_token: Optional[str] = payload.get("id_token") + self.refresh_token_expires_at: Optional[ + datetime + ] = deserialize.iso8601_datetime(payload.get("refresh_token_expires_at")) + self.access_token_expires_at: Optional[datetime] = deserialize.iso8601_datetime( + payload.get("access_token_expires_at") + ) + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + + return "" + + +class TokenList(ListResource): + def __init__(self, version: Version): + """ + Initialize the TokenList + + :param version: Version that contains the resource + + """ + super().__init__(version) + + self._uri = "/token" + + def create( + self, + grant_type: str, + client_sid: str, + client_secret: Union[str, object] = values.unset, + code: Union[str, object] = values.unset, + code_verifier: Union[str, object] = values.unset, + device_code: Union[str, object] = values.unset, + refresh_token: Union[str, object] = values.unset, + device_id: Union[str, object] = values.unset, + ) -> TokenInstance: + """ + Create the TokenInstance + + :param grant_type: Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token. + :param client_sid: A 34 character string that uniquely identifies this OAuth App. + :param client_secret: The credential for confidential OAuth App. + :param code: JWT token related to the authorization code grant type. + :param code_verifier: A code which is generation cryptographically. + :param device_code: JWT token related to the device code grant type. + :param refresh_token: JWT token related to the refresh token grant type. + :param device_id: The Id of the device associated with the token (refresh token). + + :returns: The created TokenInstance + """ + data = values.of( + { + "GrantType": grant_type, + "ClientSid": client_sid, + "ClientSecret": client_secret, + "Code": code, + "CodeVerifier": code_verifier, + "DeviceCode": device_code, + "RefreshToken": refresh_token, + "DeviceId": device_id, + } + ) + + payload = self._version.create( + method="POST", + uri=self._uri, + data=data, + ) + + return TokenInstance(self._version, payload) + + async def create_async( + self, + grant_type: str, + client_sid: str, + client_secret: Union[str, object] = values.unset, + code: Union[str, object] = values.unset, + code_verifier: Union[str, object] = values.unset, + device_code: Union[str, object] = values.unset, + refresh_token: Union[str, object] = values.unset, + device_id: Union[str, object] = values.unset, + ) -> TokenInstance: + """ + Asynchronously create the TokenInstance + + :param grant_type: Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token. + :param client_sid: A 34 character string that uniquely identifies this OAuth App. + :param client_secret: The credential for confidential OAuth App. + :param code: JWT token related to the authorization code grant type. + :param code_verifier: A code which is generation cryptographically. + :param device_code: JWT token related to the device code grant type. + :param refresh_token: JWT token related to the refresh token grant type. + :param device_id: The Id of the device associated with the token (refresh token). + + :returns: The created TokenInstance + """ + data = values.of( + { + "GrantType": grant_type, + "ClientSid": client_sid, + "ClientSecret": client_secret, + "Code": code, + "CodeVerifier": code_verifier, + "DeviceCode": device_code, + "RefreshToken": refresh_token, + "DeviceId": device_id, + } + ) + + payload = await self._version.create_async( + method="POST", + uri=self._uri, + data=data, + ) + + return TokenInstance(self._version, payload) + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + return "" diff --git a/twilio/rest/flex_api/v1/provisioning_status.py b/twilio/rest/oauth/v1/user_info.py similarity index 54% rename from twilio/rest/flex_api/v1/provisioning_status.py rename to twilio/rest/oauth/v1/user_info.py index 7b00927e0e..f7b7f0f5df 100644 --- a/twilio/rest/flex_api/v1/provisioning_status.py +++ b/twilio/rest/oauth/v1/user_info.py @@ -4,7 +4,7 @@ | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - Twilio - Flex + Twilio - Oauth This is the public Twilio REST API. NOTE: This class is auto generated by OpenAPI Generator. @@ -20,57 +20,58 @@ from twilio.base.version import Version -class ProvisioningStatusInstance(InstanceResource): - class Status(object): - ACTIVE = "active" - IN_PROGRESS = "in-progress" - NOT_CONFIGURED = "not-configured" - FAILED = "failed" +class UserInfoInstance(InstanceResource): """ - :ivar status: - :ivar url: The absolute URL of the resource. + :ivar user_sid: The URL of the party that will create the token and sign it with its private key. + :ivar first_name: The first name of the end-user. + :ivar last_name: The last name of the end-user. + :ivar friendly_name: The friendly name of the end-user. + :ivar email: The end-user's preferred email address. + :ivar url: """ def __init__(self, version: Version, payload: Dict[str, Any]): super().__init__(version) - self.status: Optional["ProvisioningStatusInstance.Status"] = payload.get( - "status" - ) + self.user_sid: Optional[str] = payload.get("user_sid") + self.first_name: Optional[str] = payload.get("first_name") + self.last_name: Optional[str] = payload.get("last_name") + self.friendly_name: Optional[str] = payload.get("friendly_name") + self.email: Optional[str] = payload.get("email") self.url: Optional[str] = payload.get("url") - self._context: Optional[ProvisioningStatusContext] = None + self._context: Optional[UserInfoContext] = None @property - def _proxy(self) -> "ProvisioningStatusContext": + def _proxy(self) -> "UserInfoContext": """ Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context - :returns: ProvisioningStatusContext for this ProvisioningStatusInstance + :returns: UserInfoContext for this UserInfoInstance """ if self._context is None: - self._context = ProvisioningStatusContext( + self._context = UserInfoContext( self._version, ) return self._context - def fetch(self) -> "ProvisioningStatusInstance": + def fetch(self) -> "UserInfoInstance": """ - Fetch the ProvisioningStatusInstance + Fetch the UserInfoInstance - :returns: The fetched ProvisioningStatusInstance + :returns: The fetched UserInfoInstance """ return self._proxy.fetch() - async def fetch_async(self) -> "ProvisioningStatusInstance": + async def fetch_async(self) -> "UserInfoInstance": """ - Asynchronous coroutine to fetch the ProvisioningStatusInstance + Asynchronous coroutine to fetch the UserInfoInstance - :returns: The fetched ProvisioningStatusInstance + :returns: The fetched UserInfoInstance """ return await self._proxy.fetch_async() @@ -81,26 +82,26 @@ def __repr__(self) -> str: :returns: Machine friendly representation """ - return "" + return "" -class ProvisioningStatusContext(InstanceContext): +class UserInfoContext(InstanceContext): def __init__(self, version: Version): """ - Initialize the ProvisioningStatusContext + Initialize the UserInfoContext :param version: Version that contains the resource """ super().__init__(version) - self._uri = "/account/provision/status" + self._uri = "/userinfo" - def fetch(self) -> ProvisioningStatusInstance: + def fetch(self) -> UserInfoInstance: """ - Fetch the ProvisioningStatusInstance + Fetch the UserInfoInstance - :returns: The fetched ProvisioningStatusInstance + :returns: The fetched UserInfoInstance """ payload = self._version.fetch( @@ -108,17 +109,17 @@ def fetch(self) -> ProvisioningStatusInstance: uri=self._uri, ) - return ProvisioningStatusInstance( + return UserInfoInstance( self._version, payload, ) - async def fetch_async(self) -> ProvisioningStatusInstance: + async def fetch_async(self) -> UserInfoInstance: """ - Asynchronous coroutine to fetch the ProvisioningStatusInstance + Asynchronous coroutine to fetch the UserInfoInstance - :returns: The fetched ProvisioningStatusInstance + :returns: The fetched UserInfoInstance """ payload = await self._version.fetch_async( @@ -126,7 +127,7 @@ async def fetch_async(self) -> ProvisioningStatusInstance: uri=self._uri, ) - return ProvisioningStatusInstance( + return UserInfoInstance( self._version, payload, ) @@ -138,32 +139,32 @@ def __repr__(self) -> str: :returns: Machine friendly representation """ - return "" + return "" -class ProvisioningStatusList(ListResource): +class UserInfoList(ListResource): def __init__(self, version: Version): """ - Initialize the ProvisioningStatusList + Initialize the UserInfoList :param version: Version that contains the resource """ super().__init__(version) - def get(self) -> ProvisioningStatusContext: + def get(self) -> UserInfoContext: """ - Constructs a ProvisioningStatusContext + Constructs a UserInfoContext """ - return ProvisioningStatusContext(self._version) + return UserInfoContext(self._version) - def __call__(self) -> ProvisioningStatusContext: + def __call__(self) -> UserInfoContext: """ - Constructs a ProvisioningStatusContext + Constructs a UserInfoContext """ - return ProvisioningStatusContext(self._version) + return UserInfoContext(self._version) def __repr__(self) -> str: """ @@ -171,4 +172,4 @@ def __repr__(self) -> str: :returns: Machine friendly representation """ - return "" + return "" diff --git a/twilio/rest/proxy/v1/service/session/interaction.py b/twilio/rest/proxy/v1/service/session/interaction.py index 8ce2846d51..145da3a703 100644 --- a/twilio/rest/proxy/v1/service/session/interaction.py +++ b/twilio/rest/proxy/v1/service/session/interaction.py @@ -60,7 +60,7 @@ class Type(object): :ivar data: A JSON string that includes the message body of message interactions (e.g. `{\"body\": \"hello\"}`) or the call duration (when available) of a call (e.g. `{\"duration\": \"5\"}`). :ivar type: :ivar inbound_participant_sid: The SID of the inbound [Participant](https://www.twilio.com/docs/proxy/api/participant) resource. - :ivar inbound_resource_sid: The SID of the inbound resource; either the [Call](https://www.twilio.com/docs/voice/api/call-resource) or [Message](https://www.twilio.com/docs/sms/api/message-resource). + :ivar inbound_resource_sid: The SID of the inbound resource; either the [Call](https://www.twilio.com/docs/voice/api/call-resource) or [Message](https://www.twilio.com/docs/sms/api/message. :ivar inbound_resource_status: :ivar inbound_resource_type: The inbound resource type. Can be [Call](https://www.twilio.com/docs/voice/api/call-resource) or [Message](https://www.twilio.com/docs/sms/api/message-resource). :ivar inbound_resource_url: The URL of the Twilio inbound resource diff --git a/twilio/rest/proxy/v1/service/short_code.py b/twilio/rest/proxy/v1/service/short_code.py index f440a944ee..27dc8467f1 100644 --- a/twilio/rest/proxy/v1/service/short_code.py +++ b/twilio/rest/proxy/v1/service/short_code.py @@ -349,7 +349,7 @@ def create(self, sid: str) -> ShortCodeInstance: """ Create the ShortCodeInstance - :param sid: The SID of a Twilio [ShortCode](https://www.twilio.com/en-us/messaging/channels/sms/short-codes) resource that represents the short code you would like to assign to your Proxy Service. + :param sid: The SID of a Twilio [ShortCode](https://www.twilio.com/docs/sms/api/short-code) resource that represents the short code you would like to assign to your Proxy Service. :returns: The created ShortCodeInstance """ @@ -373,7 +373,7 @@ async def create_async(self, sid: str) -> ShortCodeInstance: """ Asynchronously create the ShortCodeInstance - :param sid: The SID of a Twilio [ShortCode](https://www.twilio.com/en-us/messaging/channels/sms/short-codes) resource that represents the short code you would like to assign to your Proxy Service. + :param sid: The SID of a Twilio [ShortCode](https://www.twilio.com/docs/sms/api/short-code) resource that represents the short code you would like to assign to your Proxy Service. :returns: The created ShortCodeInstance """ diff --git a/twilio/rest/serverless/v1/service/build/__init__.py b/twilio/rest/serverless/v1/service/build/__init__.py index e5dbe3f9ef..0fe3b8f923 100644 --- a/twilio/rest/serverless/v1/service/build/__init__.py +++ b/twilio/rest/serverless/v1/service/build/__init__.py @@ -32,7 +32,6 @@ class Runtime(object): NODE12 = "node12" NODE14 = "node14" NODE16 = "node16" - NODE18 = "node18" class Status(object): BUILDING = "building" @@ -313,7 +312,6 @@ def create(self, asset_versions: Union[List[str], object]=values.unset, function 'Runtime': runtime, }) - payload = self._version.create(method='POST', uri=self._uri, data=data,) return BuildInstance(self._version, payload, service_sid=self._solution['service_sid']) @@ -336,7 +334,6 @@ async def create_async(self, asset_versions: Union[List[str], object]=values.uns 'Runtime': runtime, }) - payload = await self._version.create_async(method='POST', uri=self._uri, data=data,) return BuildInstance(self._version, payload, service_sid=self._solution['service_sid']) diff --git a/twilio/rest/supersim/v1/esim_profile.py b/twilio/rest/supersim/v1/esim_profile.py index 082441dda9..230ac298a8 100644 --- a/twilio/rest/supersim/v1/esim_profile.py +++ b/twilio/rest/supersim/v1/esim_profile.py @@ -36,7 +36,7 @@ class Status(object): :ivar sid: The unique string that we created to identify the eSIM Profile resource. :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) to which the eSIM Profile resource belongs. :ivar iccid: The [ICCID](https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with the Sim resource. - :ivar sim_sid: The SID of the [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource that this eSIM Profile controls. + :ivar sim_sid: The SID of the [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource that this eSIM Profile controls. :ivar status: :ivar eid: Identifier of the eUICC that can claim the eSIM Profile. :ivar smdp_plus_address: Address of the SM-DP+ server from which the Profile will be downloaded. The URL will appear once the eSIM Profile reaches the status `available`. @@ -298,7 +298,7 @@ def stream( The results are returned as a generator, so this operation is memory efficient. :param str eid: List the eSIM Profiles that have been associated with an EId. - :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param "EsimProfileInstance.Status" status: List the eSIM Profiles that are in a given status. :param limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit @@ -331,7 +331,7 @@ async def stream_async( The results are returned as a generator, so this operation is memory efficient. :param str eid: List the eSIM Profiles that have been associated with an EId. - :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param "EsimProfileInstance.Status" status: List the eSIM Profiles that are in a given status. :param limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit @@ -363,7 +363,7 @@ def list( memory before returning. :param str eid: List the eSIM Profiles that have been associated with an EId. - :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param "EsimProfileInstance.Status" status: List the eSIM Profiles that are in a given status. :param limit: Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit @@ -398,7 +398,7 @@ async def list_async( memory before returning. :param str eid: List the eSIM Profiles that have been associated with an EId. - :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param "EsimProfileInstance.Status" status: List the eSIM Profiles that are in a given status. :param limit: Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit @@ -434,7 +434,7 @@ def page( Request is executed immediately :param eid: List the eSIM Profiles that have been associated with an EId. - :param sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param status: List the eSIM Profiles that are in a given status. :param page_token: PageToken provided by the API :param page_number: Page Number, this value is simply for client state @@ -470,7 +470,7 @@ async def page_async( Request is executed immediately :param eid: List the eSIM Profiles that have been associated with an EId. - :param sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param status: List the eSIM Profiles that are in a given status. :param page_token: PageToken provided by the API :param page_number: Page Number, this value is simply for client state diff --git a/twilio/rest/taskrouter/v1/workspace/task/__init__.py b/twilio/rest/taskrouter/v1/workspace/task/__init__.py index 2687a2de3b..74c5a8fee4 100644 --- a/twilio/rest/taskrouter/v1/workspace/task/__init__.py +++ b/twilio/rest/taskrouter/v1/workspace/task/__init__.py @@ -38,7 +38,7 @@ class Status(object): :ivar age: The number of seconds since the Task was created. :ivar assignment_status: :ivar attributes: The JSON string with custom attributes of the work. **Note** If this property has been assigned a value, it will only be displayed in FETCH action that returns a single resource. Otherwise, it will be null. - :ivar addons: An object that contains the [Add-on](https://www.twilio.com/docs/add-ons) data for all installed Add-ons. + :ivar addons: An object that contains the [addon](https://www.twilio.com/docs/taskrouter/marketplace) data for all installed addons. :ivar date_created: The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. :ivar date_updated: The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. :ivar task_queue_entered_date: The date and time in GMT when the Task entered the TaskQueue, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. @@ -619,7 +619,7 @@ def stream( :param str task_queue_name: The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name. :param str evaluate_task_attributes: The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. :param str ordering: How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. - :param bool has_addons: Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons. + :param bool has_addons: Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. :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 @@ -673,7 +673,7 @@ async def stream_async( :param str task_queue_name: The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name. :param str evaluate_task_attributes: The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. :param str ordering: How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. - :param bool has_addons: Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons. + :param bool has_addons: Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. :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 @@ -726,7 +726,7 @@ def list( :param str task_queue_name: The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name. :param str evaluate_task_attributes: The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. :param str ordering: How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. - :param bool has_addons: Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons. + :param bool has_addons: Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. :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 @@ -779,7 +779,7 @@ async def list_async( :param str task_queue_name: The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name. :param str evaluate_task_attributes: The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. :param str ordering: How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. - :param bool has_addons: Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons. + :param bool has_addons: Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. :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 @@ -833,7 +833,7 @@ def page( :param task_queue_name: The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name. :param evaluate_task_attributes: The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. :param ordering: How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. - :param has_addons: Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons. + :param has_addons: Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. :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 @@ -887,7 +887,7 @@ async def page_async( :param task_queue_name: The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name. :param evaluate_task_attributes: The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. :param ordering: How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. - :param has_addons: Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons. + :param has_addons: Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. :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 diff --git a/twilio/rest/taskrouter/v1/workspace/task/reservation.py b/twilio/rest/taskrouter/v1/workspace/task/reservation.py index af50984004..32e7c6b4da 100644 --- a/twilio/rest/taskrouter/v1/workspace/task/reservation.py +++ b/twilio/rest/taskrouter/v1/workspace/task/reservation.py @@ -200,7 +200,6 @@ def update( supervisor: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> "ReservationInstance": """ Update the ReservationInstance @@ -259,7 +258,6 @@ def update( :param supervisor: The Supervisor SID/URI when executing the Supervise instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -318,7 +316,6 @@ def update( supervisor=supervisor, end_conference_on_customer_exit=end_conference_on_customer_exit, beep_on_customer_entrance=beep_on_customer_entrance, - jitter_buffer_size=jitter_buffer_size, ) async def update_async( @@ -383,7 +380,6 @@ async def update_async( supervisor: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> "ReservationInstance": """ Asynchronous coroutine to update the ReservationInstance @@ -442,7 +438,6 @@ async def update_async( :param supervisor: The Supervisor SID/URI when executing the Supervise instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -501,7 +496,6 @@ async def update_async( supervisor=supervisor, end_conference_on_customer_exit=end_conference_on_customer_exit, beep_on_customer_entrance=beep_on_customer_entrance, - jitter_buffer_size=jitter_buffer_size, ) def __repr__(self) -> str: @@ -642,7 +636,6 @@ def update( supervisor: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> ReservationInstance: """ Update the ReservationInstance @@ -701,7 +694,6 @@ def update( :param supervisor: The Supervisor SID/URI when executing the Supervise instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -766,7 +758,6 @@ def update( "Supervisor": supervisor, "EndConferenceOnCustomerExit": end_conference_on_customer_exit, "BeepOnCustomerEntrance": beep_on_customer_entrance, - "JitterBufferSize": jitter_buffer_size, } ) headers = values.of( @@ -849,7 +840,6 @@ async def update_async( supervisor: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> ReservationInstance: """ Asynchronous coroutine to update the ReservationInstance @@ -908,7 +898,6 @@ async def update_async( :param supervisor: The Supervisor SID/URI when executing the Supervise instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -973,7 +962,6 @@ async def update_async( "Supervisor": supervisor, "EndConferenceOnCustomerExit": end_conference_on_customer_exit, "BeepOnCustomerEntrance": beep_on_customer_entrance, - "JitterBufferSize": jitter_buffer_size, } ) headers = values.of( diff --git a/twilio/rest/taskrouter/v1/workspace/worker/reservation.py b/twilio/rest/taskrouter/v1/workspace/worker/reservation.py index 24727b114d..e99705d669 100644 --- a/twilio/rest/taskrouter/v1/workspace/worker/reservation.py +++ b/twilio/rest/taskrouter/v1/workspace/worker/reservation.py @@ -191,7 +191,6 @@ def update( post_work_activity_sid: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> "ReservationInstance": """ Update the ReservationInstance @@ -248,7 +247,6 @@ def update( :param post_work_activity_sid: The new worker activity SID after executing a Conference instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -305,7 +303,6 @@ def update( post_work_activity_sid=post_work_activity_sid, end_conference_on_customer_exit=end_conference_on_customer_exit, beep_on_customer_entrance=beep_on_customer_entrance, - jitter_buffer_size=jitter_buffer_size, ) async def update_async( @@ -366,7 +363,6 @@ async def update_async( post_work_activity_sid: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> "ReservationInstance": """ Asynchronous coroutine to update the ReservationInstance @@ -423,7 +419,6 @@ async def update_async( :param post_work_activity_sid: The new worker activity SID after executing a Conference instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -480,7 +475,6 @@ async def update_async( post_work_activity_sid=post_work_activity_sid, end_conference_on_customer_exit=end_conference_on_customer_exit, beep_on_customer_entrance=beep_on_customer_entrance, - jitter_buffer_size=jitter_buffer_size, ) def __repr__(self) -> str: @@ -615,7 +609,6 @@ def update( post_work_activity_sid: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> ReservationInstance: """ Update the ReservationInstance @@ -672,7 +665,6 @@ def update( :param post_work_activity_sid: The new worker activity SID after executing a Conference instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -735,7 +727,6 @@ def update( "PostWorkActivitySid": post_work_activity_sid, "EndConferenceOnCustomerExit": end_conference_on_customer_exit, "BeepOnCustomerEntrance": beep_on_customer_entrance, - "JitterBufferSize": jitter_buffer_size, } ) headers = values.of( @@ -814,7 +805,6 @@ async def update_async( post_work_activity_sid: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> ReservationInstance: """ Asynchronous coroutine to update the ReservationInstance @@ -871,7 +861,6 @@ async def update_async( :param post_work_activity_sid: The new worker activity SID after executing a Conference instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -934,7 +923,6 @@ async def update_async( "PostWorkActivitySid": post_work_activity_sid, "EndConferenceOnCustomerExit": end_conference_on_customer_exit, "BeepOnCustomerEntrance": beep_on_customer_entrance, - "JitterBufferSize": jitter_buffer_size, } ) headers = values.of( diff --git a/twilio/rest/trusthub/v1/__init__.py b/twilio/rest/trusthub/v1/__init__.py index 7d11abd1ec..10c3fd825b 100644 --- a/twilio/rest/trusthub/v1/__init__.py +++ b/twilio/rest/trusthub/v1/__init__.py @@ -16,9 +16,6 @@ from twilio.base.version import Version from twilio.base.domain import Domain from twilio.rest.trusthub.v1.compliance_inquiries import ComplianceInquiriesList -from twilio.rest.trusthub.v1.compliance_tollfree_inquiries import ( - ComplianceTollfreeInquiriesList, -) from twilio.rest.trusthub.v1.customer_profiles import CustomerProfilesList from twilio.rest.trusthub.v1.end_user import EndUserList from twilio.rest.trusthub.v1.end_user_type import EndUserTypeList @@ -37,9 +34,6 @@ def __init__(self, domain: Domain): """ super().__init__(domain, "v1") self._compliance_inquiries: Optional[ComplianceInquiriesList] = None - self._compliance_tollfree_inquiries: Optional[ - ComplianceTollfreeInquiriesList - ] = None self._customer_profiles: Optional[CustomerProfilesList] = None self._end_users: Optional[EndUserList] = None self._end_user_types: Optional[EndUserTypeList] = None @@ -54,12 +48,6 @@ def compliance_inquiries(self) -> ComplianceInquiriesList: self._compliance_inquiries = ComplianceInquiriesList(self) return self._compliance_inquiries - @property - def compliance_tollfree_inquiries(self) -> ComplianceTollfreeInquiriesList: - if self._compliance_tollfree_inquiries is None: - self._compliance_tollfree_inquiries = ComplianceTollfreeInquiriesList(self) - return self._compliance_tollfree_inquiries - @property def customer_profiles(self) -> CustomerProfilesList: if self._customer_profiles is None: diff --git a/twilio/rest/trusthub/v1/compliance_tollfree_inquiries.py b/twilio/rest/trusthub/v1/compliance_tollfree_inquiries.py deleted file mode 100644 index f2059c4e52..0000000000 --- a/twilio/rest/trusthub/v1/compliance_tollfree_inquiries.py +++ /dev/null @@ -1,249 +0,0 @@ -r""" - This code was generated by - ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - - Twilio - Trusthub - 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 Any, Dict, List, Optional, Union -from twilio.base import serialize, values - -from twilio.base.instance_resource import InstanceResource -from twilio.base.list_resource import ListResource -from twilio.base.version import Version - - -class ComplianceTollfreeInquiriesInstance(InstanceResource): - class OptInType(object): - VERBAL = "VERBAL" - WEB_FORM = "WEB_FORM" - PAPER_FORM = "PAPER_FORM" - VIA_TEXT = "VIA_TEXT" - MOBILE_QR_CODE = "MOBILE_QR_CODE" - - """ - :ivar inquiry_id: The unique ID used to start an embedded compliance registration session. - :ivar inquiry_session_token: The session token used to start an embedded compliance registration session. - :ivar registration_id: The TolfreeId matching the Tollfree Profile that should be resumed or resubmitted for editing. - :ivar url: The URL of this resource. - """ - - def __init__(self, version: Version, payload: Dict[str, Any]): - super().__init__(version) - - self.inquiry_id: Optional[str] = payload.get("inquiry_id") - self.inquiry_session_token: Optional[str] = payload.get("inquiry_session_token") - self.registration_id: Optional[str] = payload.get("registration_id") - self.url: Optional[str] = payload.get("url") - - def __repr__(self) -> str: - """ - Provide a friendly representation - - :returns: Machine friendly representation - """ - - return "" - - -class ComplianceTollfreeInquiriesList(ListResource): - def __init__(self, version: Version): - """ - Initialize the ComplianceTollfreeInquiriesList - - :param version: Version that contains the resource - - """ - super().__init__(version) - - self._uri = "/ComplianceInquiries/Tollfree/Initialize" - - def create( - self, - tollfree_phone_number: str, - notification_email: str, - business_name: Union[str, object] = values.unset, - business_website: Union[str, object] = values.unset, - use_case_categories: Union[List[str], object] = values.unset, - use_case_summary: Union[str, object] = values.unset, - production_message_sample: Union[str, object] = values.unset, - opt_in_image_urls: Union[List[str], object] = values.unset, - opt_in_type: Union[ - "ComplianceTollfreeInquiriesInstance.OptInType", object - ] = values.unset, - message_volume: Union[str, object] = values.unset, - business_street_address: Union[str, object] = values.unset, - business_street_address2: Union[str, object] = values.unset, - business_city: Union[str, object] = values.unset, - business_state_province_region: Union[str, object] = values.unset, - business_postal_code: Union[str, object] = values.unset, - business_country: Union[str, object] = values.unset, - additional_information: Union[str, object] = values.unset, - business_contact_first_name: Union[str, object] = values.unset, - business_contact_last_name: Union[str, object] = values.unset, - business_contact_email: Union[str, object] = values.unset, - business_contact_phone: Union[str, object] = values.unset, - ) -> ComplianceTollfreeInquiriesInstance: - """ - Create the ComplianceTollfreeInquiriesInstance - - :param tollfree_phone_number: The Tollfree phone number to be verified - :param notification_email: The email address to receive the notification about the verification result. - :param business_name: The name of the business or organization using the Tollfree number. - :param business_website: The website of the business or organization using the Tollfree number. - :param use_case_categories: The category of the use case for the Tollfree Number. List as many are applicable.. - :param use_case_summary: Use this to further explain how messaging is used by the business or organization. - :param production_message_sample: An example of message content, i.e. a sample message. - :param opt_in_image_urls: Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL. - :param opt_in_type: - :param message_volume: Estimate monthly volume of messages from the Tollfree Number. - :param business_street_address: The address of the business or organization using the Tollfree number. - :param business_street_address2: The address of the business or organization using the Tollfree number. - :param business_city: The city of the business or organization using the Tollfree number. - :param business_state_province_region: The state/province/region of the business or organization using the Tollfree number. - :param business_postal_code: The postal code of the business or organization using the Tollfree number. - :param business_country: The country of the business or organization using the Tollfree number. - :param additional_information: Additional information to be provided for verification. - :param business_contact_first_name: The first name of the contact for the business or organization using the Tollfree number. - :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number. - :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number. - :param business_contact_phone: The phone number of the contact for the business or organization using the Tollfree number. - - :returns: The created ComplianceTollfreeInquiriesInstance - """ - data = values.of( - { - "TollfreePhoneNumber": tollfree_phone_number, - "NotificationEmail": notification_email, - "BusinessName": business_name, - "BusinessWebsite": business_website, - "UseCaseCategories": serialize.map(use_case_categories, lambda e: e), - "UseCaseSummary": use_case_summary, - "ProductionMessageSample": production_message_sample, - "OptInImageUrls": serialize.map(opt_in_image_urls, lambda e: e), - "OptInType": opt_in_type, - "MessageVolume": message_volume, - "BusinessStreetAddress": business_street_address, - "BusinessStreetAddress2": business_street_address2, - "BusinessCity": business_city, - "BusinessStateProvinceRegion": business_state_province_region, - "BusinessPostalCode": business_postal_code, - "BusinessCountry": business_country, - "AdditionalInformation": additional_information, - "BusinessContactFirstName": business_contact_first_name, - "BusinessContactLastName": business_contact_last_name, - "BusinessContactEmail": business_contact_email, - "BusinessContactPhone": business_contact_phone, - } - ) - - payload = self._version.create( - method="POST", - uri=self._uri, - data=data, - ) - - return ComplianceTollfreeInquiriesInstance(self._version, payload) - - async def create_async( - self, - tollfree_phone_number: str, - notification_email: str, - business_name: Union[str, object] = values.unset, - business_website: Union[str, object] = values.unset, - use_case_categories: Union[List[str], object] = values.unset, - use_case_summary: Union[str, object] = values.unset, - production_message_sample: Union[str, object] = values.unset, - opt_in_image_urls: Union[List[str], object] = values.unset, - opt_in_type: Union[ - "ComplianceTollfreeInquiriesInstance.OptInType", object - ] = values.unset, - message_volume: Union[str, object] = values.unset, - business_street_address: Union[str, object] = values.unset, - business_street_address2: Union[str, object] = values.unset, - business_city: Union[str, object] = values.unset, - business_state_province_region: Union[str, object] = values.unset, - business_postal_code: Union[str, object] = values.unset, - business_country: Union[str, object] = values.unset, - additional_information: Union[str, object] = values.unset, - business_contact_first_name: Union[str, object] = values.unset, - business_contact_last_name: Union[str, object] = values.unset, - business_contact_email: Union[str, object] = values.unset, - business_contact_phone: Union[str, object] = values.unset, - ) -> ComplianceTollfreeInquiriesInstance: - """ - Asynchronously create the ComplianceTollfreeInquiriesInstance - - :param tollfree_phone_number: The Tollfree phone number to be verified - :param notification_email: The email address to receive the notification about the verification result. - :param business_name: The name of the business or organization using the Tollfree number. - :param business_website: The website of the business or organization using the Tollfree number. - :param use_case_categories: The category of the use case for the Tollfree Number. List as many are applicable.. - :param use_case_summary: Use this to further explain how messaging is used by the business or organization. - :param production_message_sample: An example of message content, i.e. a sample message. - :param opt_in_image_urls: Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL. - :param opt_in_type: - :param message_volume: Estimate monthly volume of messages from the Tollfree Number. - :param business_street_address: The address of the business or organization using the Tollfree number. - :param business_street_address2: The address of the business or organization using the Tollfree number. - :param business_city: The city of the business or organization using the Tollfree number. - :param business_state_province_region: The state/province/region of the business or organization using the Tollfree number. - :param business_postal_code: The postal code of the business or organization using the Tollfree number. - :param business_country: The country of the business or organization using the Tollfree number. - :param additional_information: Additional information to be provided for verification. - :param business_contact_first_name: The first name of the contact for the business or organization using the Tollfree number. - :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number. - :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number. - :param business_contact_phone: The phone number of the contact for the business or organization using the Tollfree number. - - :returns: The created ComplianceTollfreeInquiriesInstance - """ - data = values.of( - { - "TollfreePhoneNumber": tollfree_phone_number, - "NotificationEmail": notification_email, - "BusinessName": business_name, - "BusinessWebsite": business_website, - "UseCaseCategories": serialize.map(use_case_categories, lambda e: e), - "UseCaseSummary": use_case_summary, - "ProductionMessageSample": production_message_sample, - "OptInImageUrls": serialize.map(opt_in_image_urls, lambda e: e), - "OptInType": opt_in_type, - "MessageVolume": message_volume, - "BusinessStreetAddress": business_street_address, - "BusinessStreetAddress2": business_street_address2, - "BusinessCity": business_city, - "BusinessStateProvinceRegion": business_state_province_region, - "BusinessPostalCode": business_postal_code, - "BusinessCountry": business_country, - "AdditionalInformation": additional_information, - "BusinessContactFirstName": business_contact_first_name, - "BusinessContactLastName": business_contact_last_name, - "BusinessContactEmail": business_contact_email, - "BusinessContactPhone": business_contact_phone, - } - ) - - payload = await self._version.create_async( - method="POST", - uri=self._uri, - data=data, - ) - - return ComplianceTollfreeInquiriesInstance(self._version, payload) - - def __repr__(self) -> str: - """ - Provide a friendly representation - - :returns: Machine friendly representation - """ - return "" diff --git a/twilio/rest/verify/v2/service/__init__.py b/twilio/rest/verify/v2/service/__init__.py index 4e0bfadc35..32685a079e 100644 --- a/twilio/rest/verify/v2/service/__init__.py +++ b/twilio/rest/verify/v2/service/__init__.py @@ -49,7 +49,6 @@ class ServiceInstance(InstanceResource): :ivar push: Configurations for the Push factors (channel) created under this Service. :ivar totp: Configurations for the TOTP factors (channel) created under this Service. :ivar default_template_sid: - :ivar verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :ivar date_created: The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. :ivar date_updated: The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. :ivar url: The absolute URL of the resource. @@ -81,9 +80,6 @@ def __init__( self.push: Optional[Dict[str, object]] = payload.get("push") self.totp: Optional[Dict[str, object]] = payload.get("totp") self.default_template_sid: Optional[str] = payload.get("default_template_sid") - self.verify_event_subscription_enabled: Optional[bool] = payload.get( - "verify_event_subscription_enabled" - ) self.date_created: Optional[datetime] = deserialize.iso8601_datetime( payload.get("date_created") ) @@ -168,7 +164,6 @@ def update( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> "ServiceInstance": """ Update the ServiceInstance @@ -190,7 +185,6 @@ def update( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The updated ServiceInstance """ @@ -212,7 +206,6 @@ def update( totp_code_length=totp_code_length, totp_skew=totp_skew, default_template_sid=default_template_sid, - verify_event_subscription_enabled=verify_event_subscription_enabled, ) async def update_async( @@ -234,7 +227,6 @@ async def update_async( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> "ServiceInstance": """ Asynchronous coroutine to update the ServiceInstance @@ -256,7 +248,6 @@ async def update_async( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The updated ServiceInstance """ @@ -278,7 +269,6 @@ async def update_async( totp_code_length=totp_code_length, totp_skew=totp_skew, default_template_sid=default_template_sid, - verify_event_subscription_enabled=verify_event_subscription_enabled, ) @property @@ -445,7 +435,6 @@ def update( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> ServiceInstance: """ Update the ServiceInstance @@ -467,7 +456,6 @@ def update( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The updated ServiceInstance """ @@ -490,7 +478,6 @@ def update( "Totp.CodeLength": totp_code_length, "Totp.Skew": totp_skew, "DefaultTemplateSid": default_template_sid, - "VerifyEventSubscriptionEnabled": verify_event_subscription_enabled, } ) @@ -521,7 +508,6 @@ async def update_async( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> ServiceInstance: """ Asynchronous coroutine to update the ServiceInstance @@ -543,7 +529,6 @@ async def update_async( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The updated ServiceInstance """ @@ -566,7 +551,6 @@ async def update_async( "Totp.CodeLength": totp_code_length, "Totp.Skew": totp_skew, "DefaultTemplateSid": default_template_sid, - "VerifyEventSubscriptionEnabled": verify_event_subscription_enabled, } ) @@ -721,7 +705,6 @@ def create( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> ServiceInstance: """ Create the ServiceInstance @@ -743,7 +726,6 @@ def create( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The created ServiceInstance """ @@ -766,7 +748,6 @@ def create( "Totp.CodeLength": totp_code_length, "Totp.Skew": totp_skew, "DefaultTemplateSid": default_template_sid, - "VerifyEventSubscriptionEnabled": verify_event_subscription_enabled, } ) @@ -797,7 +778,6 @@ async def create_async( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> ServiceInstance: """ Asynchronously create the ServiceInstance @@ -819,7 +799,6 @@ async def create_async( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The created ServiceInstance """ @@ -842,7 +821,6 @@ async def create_async( "Totp.CodeLength": totp_code_length, "Totp.Skew": totp_skew, "DefaultTemplateSid": default_template_sid, - "VerifyEventSubscriptionEnabled": verify_event_subscription_enabled, } ) diff --git a/twilio/rest/verify/v2/service/verification.py b/twilio/rest/verify/v2/service/verification.py index 068e392c0f..91acb3d7e0 100644 --- a/twilio/rest/verify/v2/service/verification.py +++ b/twilio/rest/verify/v2/service/verification.py @@ -324,7 +324,6 @@ def create( template_custom_substitutions: Union[str, object] = values.unset, device_ip: Union[str, object] = values.unset, risk_check: Union["VerificationInstance.RiskCheck", object] = values.unset, - tags: Union[str, object] = values.unset, ) -> VerificationInstance: """ Create the VerificationInstance @@ -345,7 +344,6 @@ def create( :param template_custom_substitutions: A stringified JSON object in which the keys are the template's special variables and the values are the variables substitutions. :param device_ip: Strongly encouraged if using the auto channel. The IP address of the client's device. If provided, it has to be a valid IPv4 or IPv6 address. :param risk_check: - :param tags: A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length. :returns: The created VerificationInstance """ @@ -367,7 +365,6 @@ def create( "TemplateCustomSubstitutions": template_custom_substitutions, "DeviceIp": device_ip, "RiskCheck": risk_check, - "Tags": tags, } ) @@ -399,7 +396,6 @@ async def create_async( template_custom_substitutions: Union[str, object] = values.unset, device_ip: Union[str, object] = values.unset, risk_check: Union["VerificationInstance.RiskCheck", object] = values.unset, - tags: Union[str, object] = values.unset, ) -> VerificationInstance: """ Asynchronously create the VerificationInstance @@ -420,7 +416,6 @@ async def create_async( :param template_custom_substitutions: A stringified JSON object in which the keys are the template's special variables and the values are the variables substitutions. :param device_ip: Strongly encouraged if using the auto channel. The IP address of the client's device. If provided, it has to be a valid IPv4 or IPv6 address. :param risk_check: - :param tags: A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length. :returns: The created VerificationInstance """ @@ -442,7 +437,6 @@ async def create_async( "TemplateCustomSubstitutions": template_custom_substitutions, "DeviceIp": device_ip, "RiskCheck": risk_check, - "Tags": tags, } ) diff --git a/twilio/rest/verify/v2/verification_attempt.py b/twilio/rest/verify/v2/verification_attempt.py index 009291550a..8ed27f6775 100644 --- a/twilio/rest/verify/v2/verification_attempt.py +++ b/twilio/rest/verify/v2/verification_attempt.py @@ -43,7 +43,7 @@ class ConversionStatus(object): :ivar date_updated: The date that this Attempt was updated, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. :ivar conversion_status: :ivar channel: - :ivar price: An object containing the charge for this verification attempt related to the channel costs and the currency used. The costs related to the succeeded verifications are not included. May not be immediately available. More information on pricing is available [here](https://www.twilio.com/en-us/verify/pricing). + :ivar price: An object containing the charge for this verification attempt related to the channel costs and the currency used. The costs related to the succeeded verifications are not included. May not be immediately available. More information on pricing is available [here](https://www.twilio.com/verify/pricing). :ivar channel_data: An object containing the channel specific information for an attempt. :ivar url: """ diff --git a/twilio/rest/video/v1/room/participant/subscribe_rules.py b/twilio/rest/video/v1/room/participant/subscribe_rules.py index 286f912cf5..28e3976d15 100644 --- a/twilio/rest/video/v1/room/participant/subscribe_rules.py +++ b/twilio/rest/video/v1/room/participant/subscribe_rules.py @@ -93,10 +93,8 @@ def fetch(self) -> SubscribeRulesInstance: """ Asynchronously fetch the SubscribeRulesInstance - :returns: The fetched SubscribeRulesInstance """ - payload = self._version.fetch(method="GET", uri=self._uri) return SubscribeRulesInstance( @@ -110,10 +108,8 @@ async def fetch_async(self) -> SubscribeRulesInstance: """ Asynchronously fetch the SubscribeRulesInstance - :returns: The fetched SubscribeRulesInstance """ - payload = await self._version.fetch_async(method="GET", uri=self._uri) return SubscribeRulesInstance( diff --git a/twilio/rest/video/v1/room/recording_rules.py b/twilio/rest/video/v1/room/recording_rules.py index 862d90e4b2..68adaed070 100644 --- a/twilio/rest/video/v1/room/recording_rules.py +++ b/twilio/rest/video/v1/room/recording_rules.py @@ -78,10 +78,8 @@ def fetch(self) -> RecordingRulesInstance: """ Asynchronously fetch the RecordingRulesInstance - :returns: The fetched RecordingRulesInstance """ - payload = self._version.fetch(method="GET", uri=self._uri) return RecordingRulesInstance( @@ -92,10 +90,8 @@ async def fetch_async(self) -> RecordingRulesInstance: """ Asynchronously fetch the RecordingRulesInstance - :returns: The fetched RecordingRulesInstance """ - payload = await self._version.fetch_async(method="GET", uri=self._uri) return RecordingRulesInstance(