Skip to content

Commit f619885

Browse files
committed
[Librarian] Regenerated @ bb1ac274ed061aeecd32f3c2c4226d23c9c910ce
1 parent b9b32ef commit f619885

File tree

8 files changed

+305
-12
lines changed

8 files changed

+305
-12
lines changed

Diff for: CHANGES.md

+23
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,29 @@ twilio-python Changelog
33

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

6+
[2023-04-05] Version 8.0.0
7+
--------------------------
8+
**Note:** This release contains breaking changes, check our [upgrade guide](./UPGRADE.md###-2023-04-05-7xx-to-8xx) for detailed migration notes.
9+
10+
**Library - Feature**
11+
- [PR #702](https://github.com/twilio/twilio-python/pull/702): Merge branch '8.0.0-rc' to main. Thanks to [@childish-sambino](https://github.com/childish-sambino)! **(breaking change)**
12+
13+
**Conversations**
14+
- Expose query parameters `start_date`, `end_date` and `state` in list operation on Conversations resource for sorting and filtering
15+
16+
**Insights**
17+
- Added answered by filter in Call Summaries
18+
19+
**Lookups**
20+
- Remove `disposable_phone_number_risk` package **(breaking change)**
21+
22+
**Messaging**
23+
- Add support for `SOLE_PROPRIETOR` brand type and `SOLE_PROPRIETOR` campaign use case.
24+
- New Sole Proprietor Brands should be created with `SOLE_PROPRIETOR` brand type. Brand registration requests with `STARTER` brand type will be rejected.
25+
- New Sole Proprietor Campaigns should be created with `SOLE_PROPRIETOR` campaign use case. Campaign registration requests with `STARTER` campaign use case will be rejected.
26+
- Add Brand Registrations OTP API
27+
28+
629
[2023-03-22] Version 7.17.0
730
---------------------------
831
**Api**

Diff for: twilio/rest/conversations/v1/conversation/__init__.py

+60-2
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 in ISO8601 format for sorting and filtering list of Conversations.
686+
:param str end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
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 in ISO8601 format for sorting and filtering list of Conversations.
722+
:param str end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
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 in ISO8601 format for sorting and filtering list of Conversations.
757+
:param str end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
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 in ISO8601 format for sorting and filtering list of Conversations.
792+
:param str end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
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 in ISO8601 format for sorting and filtering list of Conversations.
828+
:param end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
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 in ISO8601 format for sorting and filtering list of Conversations.
864+
:param end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
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,

Diff for: twilio/rest/conversations/v1/service/conversation/__init__.py

+60-2
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,9 @@ async def create_async(
710710

711711
def stream(
712712
self,
713+
start_date: Union[str, object] = values.unset,
714+
end_date: Union[str, object] = values.unset,
715+
state: Union["ConversationInstance.State", object] = values.unset,
713716
limit: Optional[int] = None,
714717
page_size: Optional[int] = None,
715718
) -> Iterator[ConversationInstance]:
@@ -719,6 +722,9 @@ def stream(
719722
is reached.
720723
The results are returned as a generator, so this operation is memory efficient.
721724
725+
:param str start_date: Start date in ISO8601 format for sorting and filtering list of Conversations.
726+
:param str end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
727+
:param "ConversationInstance.State" state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
722728
:param limit: Upper limit for the number of records to return. stream()
723729
guarantees to never return more than limit. Default is no limit
724730
:param page_size: Number of records to fetch per request, when not set will use
@@ -729,12 +735,20 @@ def stream(
729735
:returns: Generator that will yield up to limit results
730736
"""
731737
limits = self._version.read_limits(limit, page_size)
732-
page = self.page(page_size=limits["page_size"])
738+
page = self.page(
739+
start_date=start_date,
740+
end_date=end_date,
741+
state=state,
742+
page_size=limits["page_size"],
743+
)
733744

734745
return self._version.stream(page, limits["limit"])
735746

736747
async def stream_async(
737748
self,
749+
start_date: Union[str, object] = values.unset,
750+
end_date: Union[str, object] = values.unset,
751+
state: Union["ConversationInstance.State", object] = values.unset,
738752
limit: Optional[int] = None,
739753
page_size: Optional[int] = None,
740754
) -> AsyncIterator[ConversationInstance]:
@@ -744,6 +758,9 @@ async def stream_async(
744758
is reached.
745759
The results are returned as a generator, so this operation is memory efficient.
746760
761+
:param str start_date: Start date in ISO8601 format for sorting and filtering list of Conversations.
762+
:param str end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
763+
:param "ConversationInstance.State" state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
747764
:param limit: Upper limit for the number of records to return. stream()
748765
guarantees to never return more than limit. Default is no limit
749766
:param page_size: Number of records to fetch per request, when not set will use
@@ -754,12 +771,20 @@ async def stream_async(
754771
:returns: Generator that will yield up to limit results
755772
"""
756773
limits = self._version.read_limits(limit, page_size)
757-
page = await self.page_async(page_size=limits["page_size"])
774+
page = await self.page_async(
775+
start_date=start_date,
776+
end_date=end_date,
777+
state=state,
778+
page_size=limits["page_size"],
779+
)
758780

759781
return self._version.stream_async(page, limits["limit"])
760782

761783
def list(
762784
self,
785+
start_date: Union[str, object] = values.unset,
786+
end_date: Union[str, object] = values.unset,
787+
state: Union["ConversationInstance.State", object] = values.unset,
763788
limit: Optional[int] = None,
764789
page_size: Optional[int] = None,
765790
) -> List[ConversationInstance]:
@@ -768,6 +793,9 @@ def list(
768793
Unlike stream(), this operation is eager and will load `limit` records into
769794
memory before returning.
770795
796+
:param str start_date: Start date in ISO8601 format for sorting and filtering list of Conversations.
797+
:param str end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
798+
:param "ConversationInstance.State" state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
771799
:param limit: Upper limit for the number of records to return. list() guarantees
772800
never to return more than limit. Default is no limit
773801
:param page_size: Number of records to fetch per request, when not set will use
@@ -779,13 +807,19 @@ def list(
779807
"""
780808
return list(
781809
self.stream(
810+
start_date=start_date,
811+
end_date=end_date,
812+
state=state,
782813
limit=limit,
783814
page_size=page_size,
784815
)
785816
)
786817

787818
async def list_async(
788819
self,
820+
start_date: Union[str, object] = values.unset,
821+
end_date: Union[str, object] = values.unset,
822+
state: Union["ConversationInstance.State", object] = values.unset,
789823
limit: Optional[int] = None,
790824
page_size: Optional[int] = None,
791825
) -> List[ConversationInstance]:
@@ -794,6 +828,9 @@ async def list_async(
794828
Unlike stream(), this operation is eager and will load `limit` records into
795829
memory before returning.
796830
831+
:param str start_date: Start date in ISO8601 format for sorting and filtering list of Conversations.
832+
:param str end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
833+
:param "ConversationInstance.State" state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
797834
:param limit: Upper limit for the number of records to return. list() guarantees
798835
never to return more than limit. Default is no limit
799836
:param page_size: Number of records to fetch per request, when not set will use
@@ -806,13 +843,19 @@ async def list_async(
806843
return [
807844
record
808845
async for record in await self.stream_async(
846+
start_date=start_date,
847+
end_date=end_date,
848+
state=state,
809849
limit=limit,
810850
page_size=page_size,
811851
)
812852
]
813853

814854
def page(
815855
self,
856+
start_date: Union[str, object] = values.unset,
857+
end_date: Union[str, object] = values.unset,
858+
state: Union["ConversationInstance.State", object] = values.unset,
816859
page_token: Union[str, object] = values.unset,
817860
page_number: Union[int, object] = values.unset,
818861
page_size: Union[int, object] = values.unset,
@@ -821,6 +864,9 @@ def page(
821864
Retrieve a single page of ConversationInstance records from the API.
822865
Request is executed immediately
823866
867+
:param start_date: Start date in ISO8601 format for sorting and filtering list of Conversations.
868+
:param end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
869+
:param state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
824870
:param page_token: PageToken provided by the API
825871
:param page_number: Page Number, this value is simply for client state
826872
:param page_size: Number of records to return, defaults to 50
@@ -829,6 +875,9 @@ def page(
829875
"""
830876
data = values.of(
831877
{
878+
"StartDate": start_date,
879+
"EndDate": end_date,
880+
"State": state,
832881
"PageToken": page_token,
833882
"Page": page_number,
834883
"PageSize": page_size,
@@ -840,6 +889,9 @@ def page(
840889

841890
async def page_async(
842891
self,
892+
start_date: Union[str, object] = values.unset,
893+
end_date: Union[str, object] = values.unset,
894+
state: Union["ConversationInstance.State", object] = values.unset,
843895
page_token: Union[str, object] = values.unset,
844896
page_number: Union[int, object] = values.unset,
845897
page_size: Union[int, object] = values.unset,
@@ -848,6 +900,9 @@ async def page_async(
848900
Asynchronously retrieve a single page of ConversationInstance records from the API.
849901
Request is executed immediately
850902
903+
:param start_date: Start date in ISO8601 format for sorting and filtering list of Conversations.
904+
:param end_date: End date in ISO8601 format for sorting and filtering list of Conversations.
905+
:param state: State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
851906
:param page_token: PageToken provided by the API
852907
:param page_number: Page Number, this value is simply for client state
853908
:param page_size: Number of records to return, defaults to 50
@@ -856,6 +911,9 @@ async def page_async(
856911
"""
857912
data = values.of(
858913
{
914+
"StartDate": start_date,
915+
"EndDate": end_date,
916+
"State": state,
859917
"PageToken": page_token,
860918
"Page": page_number,
861919
"PageSize": page_size,

0 commit comments

Comments
 (0)