@@ -57,10 +57,7 @@ def create(
57
57
waiting_room_id : str ,
58
58
* ,
59
59
zone_id : str ,
60
- action : Literal ["bypass_waiting_room" ],
61
- expression : str ,
62
- description : str | NotGiven = NOT_GIVEN ,
63
- enabled : bool | NotGiven = NOT_GIVEN ,
60
+ rules : rule_create_params .Rules ,
64
61
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
65
62
# The extra values given here take precedence over values defined on the client or passed to this method.
66
63
extra_headers : Headers | None = None ,
@@ -76,14 +73,6 @@ def create(
76
73
Args:
77
74
zone_id: Identifier
78
75
79
- action: The action to take when the expression matches.
80
-
81
- expression: Criteria defining when there is a match for the current rule.
82
-
83
- description: The description of the rule.
84
-
85
- enabled: When set to true, the rule is enabled.
86
-
87
76
extra_headers: Send extra headers
88
77
89
78
extra_query: Add additional query parameters to the request
@@ -98,15 +87,7 @@ def create(
98
87
raise ValueError (f"Expected a non-empty value for `waiting_room_id` but received { waiting_room_id !r} " )
99
88
return self ._post (
100
89
f"/zones/{ zone_id } /waiting_rooms/{ waiting_room_id } /rules" ,
101
- body = maybe_transform (
102
- {
103
- "action" : action ,
104
- "expression" : expression ,
105
- "description" : description ,
106
- "enabled" : enabled ,
107
- },
108
- rule_create_params .RuleCreateParams ,
109
- ),
90
+ body = maybe_transform (rules , rule_create_params .RuleCreateParams ),
110
91
options = make_request_options (
111
92
extra_headers = extra_headers ,
112
93
extra_query = extra_query ,
@@ -122,7 +103,7 @@ def update(
122
103
waiting_room_id : str ,
123
104
* ,
124
105
zone_id : str ,
125
- body : Iterable [rule_update_params .Body ],
106
+ rules : Iterable [rule_update_params .Rule ],
126
107
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
127
108
# The extra values given here take precedence over values defined on the client or passed to this method.
128
109
extra_headers : Headers | None = None ,
@@ -152,7 +133,7 @@ def update(
152
133
raise ValueError (f"Expected a non-empty value for `waiting_room_id` but received { waiting_room_id !r} " )
153
134
return self ._put (
154
135
f"/zones/{ zone_id } /waiting_rooms/{ waiting_room_id } /rules" ,
155
- body = maybe_transform (body , Iterable [rule_update_params .Body ]),
136
+ body = maybe_transform (rules , Iterable [rule_update_params .Rule ]),
156
137
options = make_request_options (
157
138
extra_headers = extra_headers ,
158
139
extra_query = extra_query ,
@@ -350,10 +331,7 @@ async def create(
350
331
waiting_room_id : str ,
351
332
* ,
352
333
zone_id : str ,
353
- action : Literal ["bypass_waiting_room" ],
354
- expression : str ,
355
- description : str | NotGiven = NOT_GIVEN ,
356
- enabled : bool | NotGiven = NOT_GIVEN ,
334
+ rules : rule_create_params .Rules ,
357
335
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
358
336
# The extra values given here take precedence over values defined on the client or passed to this method.
359
337
extra_headers : Headers | None = None ,
@@ -369,14 +347,6 @@ async def create(
369
347
Args:
370
348
zone_id: Identifier
371
349
372
- action: The action to take when the expression matches.
373
-
374
- expression: Criteria defining when there is a match for the current rule.
375
-
376
- description: The description of the rule.
377
-
378
- enabled: When set to true, the rule is enabled.
379
-
380
350
extra_headers: Send extra headers
381
351
382
352
extra_query: Add additional query parameters to the request
@@ -391,15 +361,7 @@ async def create(
391
361
raise ValueError (f"Expected a non-empty value for `waiting_room_id` but received { waiting_room_id !r} " )
392
362
return await self ._post (
393
363
f"/zones/{ zone_id } /waiting_rooms/{ waiting_room_id } /rules" ,
394
- body = await async_maybe_transform (
395
- {
396
- "action" : action ,
397
- "expression" : expression ,
398
- "description" : description ,
399
- "enabled" : enabled ,
400
- },
401
- rule_create_params .RuleCreateParams ,
402
- ),
364
+ body = await async_maybe_transform (rules , rule_create_params .RuleCreateParams ),
403
365
options = make_request_options (
404
366
extra_headers = extra_headers ,
405
367
extra_query = extra_query ,
@@ -415,7 +377,7 @@ async def update(
415
377
waiting_room_id : str ,
416
378
* ,
417
379
zone_id : str ,
418
- body : Iterable [rule_update_params .Body ],
380
+ rules : Iterable [rule_update_params .Rule ],
419
381
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
420
382
# The extra values given here take precedence over values defined on the client or passed to this method.
421
383
extra_headers : Headers | None = None ,
@@ -445,7 +407,7 @@ async def update(
445
407
raise ValueError (f"Expected a non-empty value for `waiting_room_id` but received { waiting_room_id !r} " )
446
408
return await self ._put (
447
409
f"/zones/{ zone_id } /waiting_rooms/{ waiting_room_id } /rules" ,
448
- body = await async_maybe_transform (body , Iterable [rule_update_params .Body ]),
410
+ body = await async_maybe_transform (rules , Iterable [rule_update_params .Rule ]),
449
411
options = make_request_options (
450
412
extra_headers = extra_headers ,
451
413
extra_query = extra_query ,
0 commit comments