Skip to content

Commit 58f5223

Browse files
committed
[Librarian] Regenerated @ fffff4e2a9903902262deb482f4cefeb44c2d081
1 parent d40bb65 commit 58f5223

19 files changed

+1009
-280
lines changed

CHANGES.md

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

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

6+
[2023-05-18] Version 8.2.1
7+
--------------------------
8+
**Conversations**
9+
- Added `AddressCountry` parameter to Address Configuration endpoint, to support regional short code addresses
10+
- Added query parameters `start_date`, `end_date` and `state` in list Conversations resource for filtering
11+
12+
**Insights**
13+
- Added annotations parameters to list summary api
14+
15+
**Messaging**
16+
- Add GET domainByMessagingService endpoint to linkShortening service
17+
- Add `disable_https` to link shortening domain_config properties
18+
19+
**Numbers**
20+
- Add bulk_eligibility api under version `/v1`.
21+
22+
623
[2023-05-04] Version 8.2.0
724
--------------------------
825
**Conversations**

twilio/rest/conversations/v1/address_configuration.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class Type(object):
4949
:ivar date_created: The date that this resource was created.
5050
:ivar date_updated: The date that this resource was last updated.
5151
:ivar url: An absolute API resource URL for this address configuration.
52+
:ivar address_country: An ISO 3166-1 alpha-2n country code which the address belongs to. This is currently only applicable to short code addresses.
5253
"""
5354

5455
def __init__(
@@ -69,6 +70,7 @@ def __init__(
6970
payload.get("date_updated")
7071
)
7172
self.url: Optional[str] = payload.get("url")
73+
self.address_country: Optional[str] = payload.get("address_country")
7274

7375
self._solution = {
7476
"sid": sid or self.sid,
@@ -475,6 +477,7 @@ def create(
475477
auto_creation_webhook_filters: Union[List[str], object] = values.unset,
476478
auto_creation_studio_flow_sid: Union[str, object] = values.unset,
477479
auto_creation_studio_retry_count: Union[int, object] = values.unset,
480+
address_country: Union[str, object] = values.unset,
478481
) -> AddressConfigurationInstance:
479482
"""
480483
Create the AddressConfigurationInstance
@@ -490,6 +493,7 @@ def create(
490493
:param auto_creation_webhook_filters: The list of events, firing webhook event for this Conversation. Values can be any of the following: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationStateUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`, `onDeliveryUpdated`
491494
:param auto_creation_studio_flow_sid: For type `studio`, the studio flow SID where the webhook should be sent to.
492495
:param auto_creation_studio_retry_count: For type `studio`, number of times to retry the webhook request
496+
:param address_country: An ISO 3166-1 alpha-2n country code which the address belongs to. This is currently only applicable to short code addresses.
493497
494498
:returns: The created AddressConfigurationInstance
495499
"""
@@ -508,6 +512,7 @@ def create(
508512
),
509513
"AutoCreation.StudioFlowSid": auto_creation_studio_flow_sid,
510514
"AutoCreation.StudioRetryCount": auto_creation_studio_retry_count,
515+
"AddressCountry": address_country,
511516
}
512517
)
513518

@@ -536,6 +541,7 @@ async def create_async(
536541
auto_creation_webhook_filters: Union[List[str], object] = values.unset,
537542
auto_creation_studio_flow_sid: Union[str, object] = values.unset,
538543
auto_creation_studio_retry_count: Union[int, object] = values.unset,
544+
address_country: Union[str, object] = values.unset,
539545
) -> AddressConfigurationInstance:
540546
"""
541547
Asynchronously create the AddressConfigurationInstance
@@ -551,6 +557,7 @@ async def create_async(
551557
:param auto_creation_webhook_filters: The list of events, firing webhook event for this Conversation. Values can be any of the following: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationStateUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`, `onDeliveryUpdated`
552558
:param auto_creation_studio_flow_sid: For type `studio`, the studio flow SID where the webhook should be sent to.
553559
:param auto_creation_studio_retry_count: For type `studio`, number of times to retry the webhook request
560+
:param address_country: An ISO 3166-1 alpha-2n country code which the address belongs to. This is currently only applicable to short code addresses.
554561
555562
:returns: The created AddressConfigurationInstance
556563
"""
@@ -569,6 +576,7 @@ async def create_async(
569576
),
570577
"AutoCreation.StudioFlowSid": auto_creation_studio_flow_sid,
571578
"AutoCreation.StudioRetryCount": auto_creation_studio_retry_count,
579+
"AddressCountry": address_country,
572580
}
573581
)
574582

twilio/rest/conversations/v1/conversation/__init__.py

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,9 @@ async def create_async(
670670

671671
def stream(
672672
self,
673+
start_date: Union[str, object] = values.unset,
674+
end_date: Union[str, object] = values.unset,
675+
state: Union["ConversationInstance.State", object] = values.unset,
673676
limit: Optional[int] = None,
674677
page_size: Optional[int] = None,
675678
) -> Iterator[ConversationInstance]:
@@ -679,6 +682,9 @@ def stream(
679682
is reached.
680683
The results are returned as a generator, so this operation is memory efficient.
681684
685+
:param str start_date: Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
686+
:param str end_date: End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
687+
:param "ConversationInstance.State" state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
682688
:param limit: Upper limit for the number of records to return. stream()
683689
guarantees to never return more than limit. Default is no limit
684690
:param page_size: Number of records to fetch per request, when not set will use
@@ -689,12 +695,20 @@ def stream(
689695
:returns: Generator that will yield up to limit results
690696
"""
691697
limits = self._version.read_limits(limit, page_size)
692-
page = self.page(page_size=limits["page_size"])
698+
page = self.page(
699+
start_date=start_date,
700+
end_date=end_date,
701+
state=state,
702+
page_size=limits["page_size"],
703+
)
693704

694705
return self._version.stream(page, limits["limit"])
695706

696707
async def stream_async(
697708
self,
709+
start_date: Union[str, object] = values.unset,
710+
end_date: Union[str, object] = values.unset,
711+
state: Union["ConversationInstance.State", object] = values.unset,
698712
limit: Optional[int] = None,
699713
page_size: Optional[int] = None,
700714
) -> AsyncIterator[ConversationInstance]:
@@ -704,6 +718,9 @@ async def stream_async(
704718
is reached.
705719
The results are returned as a generator, so this operation is memory efficient.
706720
721+
:param str start_date: Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
722+
:param str end_date: End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
723+
:param "ConversationInstance.State" state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
707724
:param limit: Upper limit for the number of records to return. stream()
708725
guarantees to never return more than limit. Default is no limit
709726
:param page_size: Number of records to fetch per request, when not set will use
@@ -714,12 +731,20 @@ async def stream_async(
714731
:returns: Generator that will yield up to limit results
715732
"""
716733
limits = self._version.read_limits(limit, page_size)
717-
page = await self.page_async(page_size=limits["page_size"])
734+
page = await self.page_async(
735+
start_date=start_date,
736+
end_date=end_date,
737+
state=state,
738+
page_size=limits["page_size"],
739+
)
718740

719741
return self._version.stream_async(page, limits["limit"])
720742

721743
def list(
722744
self,
745+
start_date: Union[str, object] = values.unset,
746+
end_date: Union[str, object] = values.unset,
747+
state: Union["ConversationInstance.State", object] = values.unset,
723748
limit: Optional[int] = None,
724749
page_size: Optional[int] = None,
725750
) -> List[ConversationInstance]:
@@ -728,6 +753,9 @@ def list(
728753
Unlike stream(), this operation is eager and will load `limit` records into
729754
memory before returning.
730755
756+
:param str start_date: Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
757+
:param str end_date: End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
758+
:param "ConversationInstance.State" state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
731759
:param limit: Upper limit for the number of records to return. list() guarantees
732760
never to return more than limit. Default is no limit
733761
:param page_size: Number of records to fetch per request, when not set will use
@@ -739,13 +767,19 @@ def list(
739767
"""
740768
return list(
741769
self.stream(
770+
start_date=start_date,
771+
end_date=end_date,
772+
state=state,
742773
limit=limit,
743774
page_size=page_size,
744775
)
745776
)
746777

747778
async def list_async(
748779
self,
780+
start_date: Union[str, object] = values.unset,
781+
end_date: Union[str, object] = values.unset,
782+
state: Union["ConversationInstance.State", object] = values.unset,
749783
limit: Optional[int] = None,
750784
page_size: Optional[int] = None,
751785
) -> List[ConversationInstance]:
@@ -754,6 +788,9 @@ async def list_async(
754788
Unlike stream(), this operation is eager and will load `limit` records into
755789
memory before returning.
756790
791+
:param str start_date: Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
792+
:param str end_date: End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
793+
:param "ConversationInstance.State" state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
757794
:param limit: Upper limit for the number of records to return. list() guarantees
758795
never to return more than limit. Default is no limit
759796
:param page_size: Number of records to fetch per request, when not set will use
@@ -766,13 +803,19 @@ async def list_async(
766803
return [
767804
record
768805
async for record in await self.stream_async(
806+
start_date=start_date,
807+
end_date=end_date,
808+
state=state,
769809
limit=limit,
770810
page_size=page_size,
771811
)
772812
]
773813

774814
def page(
775815
self,
816+
start_date: Union[str, object] = values.unset,
817+
end_date: Union[str, object] = values.unset,
818+
state: Union["ConversationInstance.State", object] = values.unset,
776819
page_token: Union[str, object] = values.unset,
777820
page_number: Union[int, object] = values.unset,
778821
page_size: Union[int, object] = values.unset,
@@ -781,6 +824,9 @@ def page(
781824
Retrieve a single page of ConversationInstance records from the API.
782825
Request is executed immediately
783826
827+
:param start_date: Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
828+
:param end_date: End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
829+
:param state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
784830
:param page_token: PageToken provided by the API
785831
:param page_number: Page Number, this value is simply for client state
786832
:param page_size: Number of records to return, defaults to 50
@@ -789,6 +835,9 @@ def page(
789835
"""
790836
data = values.of(
791837
{
838+
"StartDate": start_date,
839+
"EndDate": end_date,
840+
"State": state,
792841
"PageToken": page_token,
793842
"Page": page_number,
794843
"PageSize": page_size,
@@ -800,6 +849,9 @@ def page(
800849

801850
async def page_async(
802851
self,
852+
start_date: Union[str, object] = values.unset,
853+
end_date: Union[str, object] = values.unset,
854+
state: Union["ConversationInstance.State", object] = values.unset,
803855
page_token: Union[str, object] = values.unset,
804856
page_number: Union[int, object] = values.unset,
805857
page_size: Union[int, object] = values.unset,
@@ -808,6 +860,9 @@ async def page_async(
808860
Asynchronously retrieve a single page of ConversationInstance records from the API.
809861
Request is executed immediately
810862
863+
:param start_date: Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters.
864+
:param end_date: End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters.
865+
:param state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
811866
:param page_token: PageToken provided by the API
812867
:param page_number: Page Number, this value is simply for client state
813868
:param page_size: Number of records to return, defaults to 50
@@ -816,6 +871,9 @@ async def page_async(
816871
"""
817872
data = values.of(
818873
{
874+
"StartDate": start_date,
875+
"EndDate": end_date,
876+
"State": state,
819877
"PageToken": page_token,
820878
"Page": page_number,
821879
"PageSize": page_size,

0 commit comments

Comments
 (0)