1818 async_to_streamed_response_wrapper ,
1919)
2020from ..._base_client import make_request_options
21- from ...types .projects import test_list_params , test_create_params
21+ from ...types .projects import test_list_params , test_create_params , test_update_params
2222from ...types .projects .test_list_response import TestListResponse
2323from ...types .projects .test_create_response import TestCreateResponse
24+ from ...types .projects .test_update_response import TestUpdateResponse
2425
2526__all__ = ["TestsResource" , "AsyncTestsResource" ]
2627
@@ -178,6 +179,41 @@ def create(
178179 cast_to = TestCreateResponse ,
179180 )
180181
182+ def update (
183+ self ,
184+ project_id : str ,
185+ * ,
186+ payloads : Iterable [test_update_params .Payload ],
187+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
188+ # The extra values given here take precedence over values defined on the client or passed to this method.
189+ extra_headers : Headers | None = None ,
190+ extra_query : Query | None = None ,
191+ extra_body : Body | None = None ,
192+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
193+ ) -> TestUpdateResponse :
194+ """
195+ Update tests.
196+
197+ Args:
198+ extra_headers: Send extra headers
199+
200+ extra_query: Add additional query parameters to the request
201+
202+ extra_body: Add additional JSON properties to the request
203+
204+ timeout: Override the client-level default timeout for this request, in seconds
205+ """
206+ if not project_id :
207+ raise ValueError (f"Expected a non-empty value for `project_id` but received { project_id !r} " )
208+ return self ._put (
209+ f"/projects/{ project_id } /tests" ,
210+ body = maybe_transform ({"payloads" : payloads }, test_update_params .TestUpdateParams ),
211+ options = make_request_options (
212+ extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
213+ ),
214+ cast_to = TestUpdateResponse ,
215+ )
216+
181217 def list (
182218 self ,
183219 project_id : str ,
@@ -400,6 +436,41 @@ async def create(
400436 cast_to = TestCreateResponse ,
401437 )
402438
439+ async def update (
440+ self ,
441+ project_id : str ,
442+ * ,
443+ payloads : Iterable [test_update_params .Payload ],
444+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
445+ # The extra values given here take precedence over values defined on the client or passed to this method.
446+ extra_headers : Headers | None = None ,
447+ extra_query : Query | None = None ,
448+ extra_body : Body | None = None ,
449+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
450+ ) -> TestUpdateResponse :
451+ """
452+ Update tests.
453+
454+ Args:
455+ extra_headers: Send extra headers
456+
457+ extra_query: Add additional query parameters to the request
458+
459+ extra_body: Add additional JSON properties to the request
460+
461+ timeout: Override the client-level default timeout for this request, in seconds
462+ """
463+ if not project_id :
464+ raise ValueError (f"Expected a non-empty value for `project_id` but received { project_id !r} " )
465+ return await self ._put (
466+ f"/projects/{ project_id } /tests" ,
467+ body = await async_maybe_transform ({"payloads" : payloads }, test_update_params .TestUpdateParams ),
468+ options = make_request_options (
469+ extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
470+ ),
471+ cast_to = TestUpdateResponse ,
472+ )
473+
403474 async def list (
404475 self ,
405476 project_id : str ,
@@ -480,6 +551,9 @@ def __init__(self, tests: TestsResource) -> None:
480551 self .create = to_raw_response_wrapper (
481552 tests .create ,
482553 )
554+ self .update = to_raw_response_wrapper (
555+ tests .update ,
556+ )
483557 self .list = to_raw_response_wrapper (
484558 tests .list ,
485559 )
@@ -492,6 +566,9 @@ def __init__(self, tests: AsyncTestsResource) -> None:
492566 self .create = async_to_raw_response_wrapper (
493567 tests .create ,
494568 )
569+ self .update = async_to_raw_response_wrapper (
570+ tests .update ,
571+ )
495572 self .list = async_to_raw_response_wrapper (
496573 tests .list ,
497574 )
@@ -506,6 +583,9 @@ def __init__(self, tests: TestsResource) -> None:
506583 self .create = to_streamed_response_wrapper (
507584 tests .create ,
508585 )
586+ self .update = to_streamed_response_wrapper (
587+ tests .update ,
588+ )
509589 self .list = to_streamed_response_wrapper (
510590 tests .list ,
511591 )
@@ -518,6 +598,9 @@ def __init__(self, tests: AsyncTestsResource) -> None:
518598 self .create = async_to_streamed_response_wrapper (
519599 tests .create ,
520600 )
601+ self .update = async_to_streamed_response_wrapper (
602+ tests .update ,
603+ )
521604 self .list = async_to_streamed_response_wrapper (
522605 tests .list ,
523606 )
0 commit comments