18
18
async_to_streamed_response_wrapper ,
19
19
)
20
20
from ..._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
22
22
from ...types .projects .test_list_response import TestListResponse
23
23
from ...types .projects .test_create_response import TestCreateResponse
24
+ from ...types .projects .test_update_response import TestUpdateResponse
24
25
25
26
__all__ = ["TestsResource" , "AsyncTestsResource" ]
26
27
@@ -178,6 +179,41 @@ def create(
178
179
cast_to = TestCreateResponse ,
179
180
)
180
181
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
+
181
217
def list (
182
218
self ,
183
219
project_id : str ,
@@ -400,6 +436,41 @@ async def create(
400
436
cast_to = TestCreateResponse ,
401
437
)
402
438
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
+
403
474
async def list (
404
475
self ,
405
476
project_id : str ,
@@ -480,6 +551,9 @@ def __init__(self, tests: TestsResource) -> None:
480
551
self .create = to_raw_response_wrapper (
481
552
tests .create ,
482
553
)
554
+ self .update = to_raw_response_wrapper (
555
+ tests .update ,
556
+ )
483
557
self .list = to_raw_response_wrapper (
484
558
tests .list ,
485
559
)
@@ -492,6 +566,9 @@ def __init__(self, tests: AsyncTestsResource) -> None:
492
566
self .create = async_to_raw_response_wrapper (
493
567
tests .create ,
494
568
)
569
+ self .update = async_to_raw_response_wrapper (
570
+ tests .update ,
571
+ )
495
572
self .list = async_to_raw_response_wrapper (
496
573
tests .list ,
497
574
)
@@ -506,6 +583,9 @@ def __init__(self, tests: TestsResource) -> None:
506
583
self .create = to_streamed_response_wrapper (
507
584
tests .create ,
508
585
)
586
+ self .update = to_streamed_response_wrapper (
587
+ tests .update ,
588
+ )
509
589
self .list = to_streamed_response_wrapper (
510
590
tests .list ,
511
591
)
@@ -518,6 +598,9 @@ def __init__(self, tests: AsyncTestsResource) -> None:
518
598
self .create = async_to_streamed_response_wrapper (
519
599
tests .create ,
520
600
)
601
+ self .update = async_to_streamed_response_wrapper (
602
+ tests .update ,
603
+ )
521
604
self .list = async_to_streamed_response_wrapper (
522
605
tests .list ,
523
606
)
0 commit comments