@@ -670,6 +670,9 @@ async def create_async(
670
670
671
671
def stream (
672
672
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 ,
673
676
limit : Optional [int ] = None ,
674
677
page_size : Optional [int ] = None ,
675
678
) -> Iterator [ConversationInstance ]:
@@ -679,6 +682,9 @@ def stream(
679
682
is reached.
680
683
The results are returned as a generator, so this operation is memory efficient.
681
684
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`
682
688
:param limit: Upper limit for the number of records to return. stream()
683
689
guarantees to never return more than limit. Default is no limit
684
690
:param page_size: Number of records to fetch per request, when not set will use
@@ -689,12 +695,20 @@ def stream(
689
695
:returns: Generator that will yield up to limit results
690
696
"""
691
697
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
+ )
693
704
694
705
return self ._version .stream (page , limits ["limit" ])
695
706
696
707
async def stream_async (
697
708
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 ,
698
712
limit : Optional [int ] = None ,
699
713
page_size : Optional [int ] = None ,
700
714
) -> AsyncIterator [ConversationInstance ]:
@@ -704,6 +718,9 @@ async def stream_async(
704
718
is reached.
705
719
The results are returned as a generator, so this operation is memory efficient.
706
720
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`
707
724
:param limit: Upper limit for the number of records to return. stream()
708
725
guarantees to never return more than limit. Default is no limit
709
726
:param page_size: Number of records to fetch per request, when not set will use
@@ -714,12 +731,20 @@ async def stream_async(
714
731
:returns: Generator that will yield up to limit results
715
732
"""
716
733
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
+ )
718
740
719
741
return self ._version .stream_async (page , limits ["limit" ])
720
742
721
743
def list (
722
744
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 ,
723
748
limit : Optional [int ] = None ,
724
749
page_size : Optional [int ] = None ,
725
750
) -> List [ConversationInstance ]:
@@ -728,6 +753,9 @@ def list(
728
753
Unlike stream(), this operation is eager and will load `limit` records into
729
754
memory before returning.
730
755
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`
731
759
:param limit: Upper limit for the number of records to return. list() guarantees
732
760
never to return more than limit. Default is no limit
733
761
:param page_size: Number of records to fetch per request, when not set will use
@@ -739,13 +767,19 @@ def list(
739
767
"""
740
768
return list (
741
769
self .stream (
770
+ start_date = start_date ,
771
+ end_date = end_date ,
772
+ state = state ,
742
773
limit = limit ,
743
774
page_size = page_size ,
744
775
)
745
776
)
746
777
747
778
async def list_async (
748
779
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 ,
749
783
limit : Optional [int ] = None ,
750
784
page_size : Optional [int ] = None ,
751
785
) -> List [ConversationInstance ]:
@@ -754,6 +788,9 @@ async def list_async(
754
788
Unlike stream(), this operation is eager and will load `limit` records into
755
789
memory before returning.
756
790
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`
757
794
:param limit: Upper limit for the number of records to return. list() guarantees
758
795
never to return more than limit. Default is no limit
759
796
:param page_size: Number of records to fetch per request, when not set will use
@@ -766,13 +803,19 @@ async def list_async(
766
803
return [
767
804
record
768
805
async for record in await self .stream_async (
806
+ start_date = start_date ,
807
+ end_date = end_date ,
808
+ state = state ,
769
809
limit = limit ,
770
810
page_size = page_size ,
771
811
)
772
812
]
773
813
774
814
def page (
775
815
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 ,
776
819
page_token : Union [str , object ] = values .unset ,
777
820
page_number : Union [int , object ] = values .unset ,
778
821
page_size : Union [int , object ] = values .unset ,
@@ -781,6 +824,9 @@ def page(
781
824
Retrieve a single page of ConversationInstance records from the API.
782
825
Request is executed immediately
783
826
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`
784
830
:param page_token: PageToken provided by the API
785
831
:param page_number: Page Number, this value is simply for client state
786
832
:param page_size: Number of records to return, defaults to 50
@@ -789,6 +835,9 @@ def page(
789
835
"""
790
836
data = values .of (
791
837
{
838
+ "StartDate" : start_date ,
839
+ "EndDate" : end_date ,
840
+ "State" : state ,
792
841
"PageToken" : page_token ,
793
842
"Page" : page_number ,
794
843
"PageSize" : page_size ,
@@ -800,6 +849,9 @@ def page(
800
849
801
850
async def page_async (
802
851
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 ,
803
855
page_token : Union [str , object ] = values .unset ,
804
856
page_number : Union [int , object ] = values .unset ,
805
857
page_size : Union [int , object ] = values .unset ,
@@ -808,6 +860,9 @@ async def page_async(
808
860
Asynchronously retrieve a single page of ConversationInstance records from the API.
809
861
Request is executed immediately
810
862
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`
811
866
:param page_token: PageToken provided by the API
812
867
:param page_number: Page Number, this value is simply for client state
813
868
:param page_size: Number of records to return, defaults to 50
@@ -816,6 +871,9 @@ async def page_async(
816
871
"""
817
872
data = values .of (
818
873
{
874
+ "StartDate" : start_date ,
875
+ "EndDate" : end_date ,
876
+ "State" : state ,
819
877
"PageToken" : page_token ,
820
878
"Page" : page_number ,
821
879
"PageSize" : page_size ,
0 commit comments