Skip to content

Commit

Permalink
[Librarian] Regenerated @ 08c0904bec7ba6e5da9e5db6c4e0f74dfc97fb10
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Dec 14, 2023
1 parent d25c43c commit 4eb8c08
Show file tree
Hide file tree
Showing 8 changed files with 419 additions and 23 deletions.
28 changes: 28 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@ twilio-python Changelog

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

[2023-12-14] Version 8.11.0
---------------------------
**Library - Chore**
- [PR #741](https://github.com/twilio/twilio-python/pull/741): upgrade to python 3.12. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
- [PR #740](https://github.com/twilio/twilio-python/pull/740): bump aiohttp. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!

**Api**
- Updated service base url for connect apps and authorized connect apps APIs **(breaking change)**

**Events**
- Marked as GA

**Insights**
- decommission voice-qualitystats-endpoint role

**Numbers**
- Add Get Port In request api

**Taskrouter**
- Add `jitter_buffer_size` param in update reservation

**Trusthub**
- Add additional optional fields in compliance_tollfree_inquiry.json

**Verify**
- Remove `Tags` from Public Docs **(breaking change)**


[2023-12-01] Version 8.10.3
---------------------------
**Verify**
Expand Down
11 changes: 1 addition & 10 deletions twilio/rest/api/v2010/account/authorized_connect_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
"""


from datetime import datetime
from typing import Any, Dict, List, Optional, Union, Iterator, AsyncIterator
from twilio.base import deserialize, values
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
Expand All @@ -35,8 +34,6 @@ 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`.
"""
Expand Down Expand Up @@ -64,12 +61,6 @@ 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")
Expand Down
14 changes: 7 additions & 7 deletions twilio/rest/events/v1/subscription/subscribed_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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
"""
Expand All @@ -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
"""
Expand Down Expand Up @@ -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
"""
Expand Down Expand Up @@ -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
"""
Expand Down Expand Up @@ -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
"""
Expand Down Expand Up @@ -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
"""
Expand Down
8 changes: 8 additions & 0 deletions twilio/rest/numbers/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
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


Expand All @@ -30,6 +31,7 @@ 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
Expand All @@ -44,6 +46,12 @@ 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:
Expand Down
217 changes: 217 additions & 0 deletions twilio/rest/numbers/v1/porting_port_in_fetch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
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 "<Twilio.Numbers.V1.PortingPortInFetchInstance {}>".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 "<Twilio.Numbers.V1.PortingPortInFetchContext {}>".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 "<Twilio.Numbers.V1.PortingPortInFetchList>"
Loading

0 comments on commit 4eb8c08

Please sign in to comment.