From f21869ffa917b954d9d35c451942fca34fd1284a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 13 Dec 2024 01:55:58 +0000
Subject: [PATCH] feat(api): Add PATCH zone hold update method (#2268)
---
api.md | 2 +-
src/cloudflare/resources/zones/holds.py | 146 +++++++++---------
src/cloudflare/types/zones/__init__.py | 2 +-
...d_edit_params.py => hold_update_params.py} | 4 +-
tests/api_resources/zones/test_holds.py | 92 +++++------
5 files changed, 123 insertions(+), 123 deletions(-)
rename src/cloudflare/types/zones/{hold_edit_params.py => hold_update_params.py} (92%)
diff --git a/api.md b/api.md
index 1d108198dc0..9db8996bff3 100644
--- a/api.md
+++ b/api.md
@@ -416,8 +416,8 @@ from cloudflare.types.zones import ZoneHold
Methods:
- client.zones.holds.create(\*, zone_id, \*\*params) -> ZoneHold
+- client.zones.holds.update(\*, zone_id, \*\*params) -> ZoneHold
- client.zones.holds.delete(\*, zone_id, \*\*params) -> ZoneHold
-- client.zones.holds.edit(\*, zone_id, \*\*params) -> ZoneHold
- client.zones.holds.get(\*, zone_id) -> ZoneHold
## Subscriptions
diff --git a/src/cloudflare/resources/zones/holds.py b/src/cloudflare/resources/zones/holds.py
index 50ff188a172..3a5e6854060 100644
--- a/src/cloudflare/resources/zones/holds.py
+++ b/src/cloudflare/resources/zones/holds.py
@@ -20,7 +20,7 @@
async_to_streamed_response_wrapper,
)
from ..._wrappers import ResultWrapper
-from ...types.zones import hold_edit_params, hold_create_params, hold_delete_params
+from ...types.zones import hold_create_params, hold_delete_params, hold_update_params
from ..._base_client import make_request_options
from ...types.zones.zone_hold import ZoneHold
@@ -94,11 +94,12 @@ def create(
cast_to=cast(Type[ZoneHold], ResultWrapper[ZoneHold]),
)
- def delete(
+ def update(
self,
*,
zone_id: str,
hold_after: str | NotGiven = NOT_GIVEN,
+ include_subdomains: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -107,15 +108,22 @@ def delete(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ZoneHold:
"""
- Stop enforcement of a zone hold on the zone, permanently or temporarily,
- allowing the creation and activation of zones with this zone's hostname.
+ Update the `hold_after` and/or `include_subdomains` values on an existing zone
+ hold. The hold is enabled if the `hold_after` date-time value is in the past.
Args:
zone_id: Identifier
- hold_after: If `hold_after` is provided, the hold will be temporarily disabled, then
- automatically re-enabled by the system at the time specified in this
- RFC3339-formatted timestamp. Otherwise, the hold will be disabled indefinitely.
+ hold_after: If `hold_after` is provided and future-dated, the hold will be temporarily
+ disabled, then automatically re-enabled by the system at the time specified in
+ this RFC3339-formatted timestamp. A past-dated `hold_after` value will have no
+ effect on an existing, enabled hold. Providing an empty string will set its
+ value to the current time.
+
+ include_subdomains: If `true`, the zone hold will extend to block any subdomain of the given zone,
+ as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with
+ the hostname 'example.com' and include_subdomains=true will block 'example.com',
+ 'staging.example.com', 'api.staging.example.com', etc.
extra_headers: Send extra headers
@@ -127,25 +135,30 @@ def delete(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return self._delete(
+ return self._patch(
f"/zones/{zone_id}/hold",
+ body=maybe_transform(
+ {
+ "hold_after": hold_after,
+ "include_subdomains": include_subdomains,
+ },
+ hold_update_params.HoldUpdateParams,
+ ),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- query=maybe_transform({"hold_after": hold_after}, hold_delete_params.HoldDeleteParams),
post_parser=ResultWrapper[ZoneHold]._unwrapper,
),
cast_to=cast(Type[ZoneHold], ResultWrapper[ZoneHold]),
)
- def edit(
+ def delete(
self,
*,
zone_id: str,
hold_after: str | NotGiven = NOT_GIVEN,
- include_subdomains: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -154,22 +167,15 @@ def edit(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ZoneHold:
"""
- Update the `hold_after` and/or `include_subdomains` values on an existing zone
- hold. The hold is enabled if the `hold_after` date-time value is in the past.
+ Stop enforcement of a zone hold on the zone, permanently or temporarily,
+ allowing the creation and activation of zones with this zone's hostname.
Args:
zone_id: Identifier
- hold_after: If `hold_after` is provided and future-dated, the hold will be temporarily
- disabled, then automatically re-enabled by the system at the time specified in
- this RFC3339-formatted timestamp. A past-dated `hold_after` value will have no
- effect on an existing, enabled hold. Providing an empty string will set its
- value to the current time.
-
- include_subdomains: If `true`, the zone hold will extend to block any subdomain of the given zone,
- as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with
- the hostname 'example.com' and include_subdomains=true will block 'example.com',
- 'staging.example.com', 'api.staging.example.com', etc.
+ hold_after: If `hold_after` is provided, the hold will be temporarily disabled, then
+ automatically re-enabled by the system at the time specified in this
+ RFC3339-formatted timestamp. Otherwise, the hold will be disabled indefinitely.
extra_headers: Send extra headers
@@ -181,20 +187,14 @@ def edit(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return self._patch(
+ return self._delete(
f"/zones/{zone_id}/hold",
- body=maybe_transform(
- {
- "hold_after": hold_after,
- "include_subdomains": include_subdomains,
- },
- hold_edit_params.HoldEditParams,
- ),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
+ query=maybe_transform({"hold_after": hold_after}, hold_delete_params.HoldDeleteParams),
post_parser=ResultWrapper[ZoneHold]._unwrapper,
),
cast_to=cast(Type[ZoneHold], ResultWrapper[ZoneHold]),
@@ -310,11 +310,12 @@ async def create(
cast_to=cast(Type[ZoneHold], ResultWrapper[ZoneHold]),
)
- async def delete(
+ async def update(
self,
*,
zone_id: str,
hold_after: str | NotGiven = NOT_GIVEN,
+ include_subdomains: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -323,15 +324,22 @@ async def delete(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ZoneHold:
"""
- Stop enforcement of a zone hold on the zone, permanently or temporarily,
- allowing the creation and activation of zones with this zone's hostname.
+ Update the `hold_after` and/or `include_subdomains` values on an existing zone
+ hold. The hold is enabled if the `hold_after` date-time value is in the past.
Args:
zone_id: Identifier
- hold_after: If `hold_after` is provided, the hold will be temporarily disabled, then
- automatically re-enabled by the system at the time specified in this
- RFC3339-formatted timestamp. Otherwise, the hold will be disabled indefinitely.
+ hold_after: If `hold_after` is provided and future-dated, the hold will be temporarily
+ disabled, then automatically re-enabled by the system at the time specified in
+ this RFC3339-formatted timestamp. A past-dated `hold_after` value will have no
+ effect on an existing, enabled hold. Providing an empty string will set its
+ value to the current time.
+
+ include_subdomains: If `true`, the zone hold will extend to block any subdomain of the given zone,
+ as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with
+ the hostname 'example.com' and include_subdomains=true will block 'example.com',
+ 'staging.example.com', 'api.staging.example.com', etc.
extra_headers: Send extra headers
@@ -343,25 +351,30 @@ async def delete(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return await self._delete(
+ return await self._patch(
f"/zones/{zone_id}/hold",
+ body=await async_maybe_transform(
+ {
+ "hold_after": hold_after,
+ "include_subdomains": include_subdomains,
+ },
+ hold_update_params.HoldUpdateParams,
+ ),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- query=await async_maybe_transform({"hold_after": hold_after}, hold_delete_params.HoldDeleteParams),
post_parser=ResultWrapper[ZoneHold]._unwrapper,
),
cast_to=cast(Type[ZoneHold], ResultWrapper[ZoneHold]),
)
- async def edit(
+ async def delete(
self,
*,
zone_id: str,
hold_after: str | NotGiven = NOT_GIVEN,
- include_subdomains: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -370,22 +383,15 @@ async def edit(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ZoneHold:
"""
- Update the `hold_after` and/or `include_subdomains` values on an existing zone
- hold. The hold is enabled if the `hold_after` date-time value is in the past.
+ Stop enforcement of a zone hold on the zone, permanently or temporarily,
+ allowing the creation and activation of zones with this zone's hostname.
Args:
zone_id: Identifier
- hold_after: If `hold_after` is provided and future-dated, the hold will be temporarily
- disabled, then automatically re-enabled by the system at the time specified in
- this RFC3339-formatted timestamp. A past-dated `hold_after` value will have no
- effect on an existing, enabled hold. Providing an empty string will set its
- value to the current time.
-
- include_subdomains: If `true`, the zone hold will extend to block any subdomain of the given zone,
- as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with
- the hostname 'example.com' and include_subdomains=true will block 'example.com',
- 'staging.example.com', 'api.staging.example.com', etc.
+ hold_after: If `hold_after` is provided, the hold will be temporarily disabled, then
+ automatically re-enabled by the system at the time specified in this
+ RFC3339-formatted timestamp. Otherwise, the hold will be disabled indefinitely.
extra_headers: Send extra headers
@@ -397,20 +403,14 @@ async def edit(
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
- return await self._patch(
+ return await self._delete(
f"/zones/{zone_id}/hold",
- body=await async_maybe_transform(
- {
- "hold_after": hold_after,
- "include_subdomains": include_subdomains,
- },
- hold_edit_params.HoldEditParams,
- ),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
+ query=await async_maybe_transform({"hold_after": hold_after}, hold_delete_params.HoldDeleteParams),
post_parser=ResultWrapper[ZoneHold]._unwrapper,
),
cast_to=cast(Type[ZoneHold], ResultWrapper[ZoneHold]),
@@ -464,12 +464,12 @@ def __init__(self, holds: HoldsResource) -> None:
self.create = to_raw_response_wrapper(
holds.create,
)
+ self.update = to_raw_response_wrapper(
+ holds.update,
+ )
self.delete = to_raw_response_wrapper(
holds.delete,
)
- self.edit = to_raw_response_wrapper(
- holds.edit,
- )
self.get = to_raw_response_wrapper(
holds.get,
)
@@ -482,12 +482,12 @@ def __init__(self, holds: AsyncHoldsResource) -> None:
self.create = async_to_raw_response_wrapper(
holds.create,
)
+ self.update = async_to_raw_response_wrapper(
+ holds.update,
+ )
self.delete = async_to_raw_response_wrapper(
holds.delete,
)
- self.edit = async_to_raw_response_wrapper(
- holds.edit,
- )
self.get = async_to_raw_response_wrapper(
holds.get,
)
@@ -500,12 +500,12 @@ def __init__(self, holds: HoldsResource) -> None:
self.create = to_streamed_response_wrapper(
holds.create,
)
+ self.update = to_streamed_response_wrapper(
+ holds.update,
+ )
self.delete = to_streamed_response_wrapper(
holds.delete,
)
- self.edit = to_streamed_response_wrapper(
- holds.edit,
- )
self.get = to_streamed_response_wrapper(
holds.get,
)
@@ -518,12 +518,12 @@ def __init__(self, holds: AsyncHoldsResource) -> None:
self.create = async_to_streamed_response_wrapper(
holds.create,
)
+ self.update = async_to_streamed_response_wrapper(
+ holds.update,
+ )
self.delete = async_to_streamed_response_wrapper(
holds.delete,
)
- self.edit = async_to_streamed_response_wrapper(
- holds.edit,
- )
self.get = async_to_streamed_response_wrapper(
holds.get,
)
diff --git a/src/cloudflare/types/zones/__init__.py b/src/cloudflare/types/zones/__init__.py
index 63621e80433..1147dc97203 100644
--- a/src/cloudflare/types/zones/__init__.py
+++ b/src/cloudflare/types/zones/__init__.py
@@ -49,7 +49,6 @@
from .websocket_param import WebsocketParam as WebsocketParam
from .always_use_https import AlwaysUseHTTPS as AlwaysUseHTTPS
from .development_mode import DevelopmentMode as DevelopmentMode
-from .hold_edit_params import HoldEditParams as HoldEditParams
from .orange_to_orange import OrangeToOrange as OrangeToOrange
from .prefetch_preload import PrefetchPreload as PrefetchPreload
from .security_headers import SecurityHeaders as SecurityHeaders
@@ -63,6 +62,7 @@
from .pseudo_ipv4_param import PseudoIPV4Param as PseudoIPV4Param
from .hold_create_params import HoldCreateParams as HoldCreateParams
from .hold_delete_params import HoldDeleteParams as HoldDeleteParams
+from .hold_update_params import HoldUpdateParams as HoldUpdateParams
from .hotlink_protection import HotlinkProtection as HotlinkProtection
from .proxy_read_timeout import ProxyReadTimeout as ProxyReadTimeout
from .response_buffering import ResponseBuffering as ResponseBuffering
diff --git a/src/cloudflare/types/zones/hold_edit_params.py b/src/cloudflare/types/zones/hold_update_params.py
similarity index 92%
rename from src/cloudflare/types/zones/hold_edit_params.py
rename to src/cloudflare/types/zones/hold_update_params.py
index fc5e878576f..57a86834c97 100644
--- a/src/cloudflare/types/zones/hold_edit_params.py
+++ b/src/cloudflare/types/zones/hold_update_params.py
@@ -4,10 +4,10 @@
from typing_extensions import Required, TypedDict
-__all__ = ["HoldEditParams"]
+__all__ = ["HoldUpdateParams"]
-class HoldEditParams(TypedDict, total=False):
+class HoldUpdateParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""
diff --git a/tests/api_resources/zones/test_holds.py b/tests/api_resources/zones/test_holds.py
index b34e5066342..31e1de2ef30 100644
--- a/tests/api_resources/zones/test_holds.py
+++ b/tests/api_resources/zones/test_holds.py
@@ -64,23 +64,24 @@ def test_path_params_create(self, client: Cloudflare) -> None:
)
@parametrize
- def test_method_delete(self, client: Cloudflare) -> None:
- hold = client.zones.holds.delete(
+ def test_method_update(self, client: Cloudflare) -> None:
+ hold = client.zones.holds.update(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
- hold = client.zones.holds.delete(
+ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
+ hold = client.zones.holds.update(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hold_after="hold_after",
+ hold_after="2023-01-31T15:56:36+00:00",
+ include_subdomains=True,
)
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.zones.holds.with_raw_response.delete(
+ def test_raw_response_update(self, client: Cloudflare) -> None:
+ response = client.zones.holds.with_raw_response.update(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -90,8 +91,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.zones.holds.with_streaming_response.delete(
+ def test_streaming_response_update(self, client: Cloudflare) -> None:
+ with client.zones.holds.with_streaming_response.update(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -103,31 +104,30 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
@parametrize
- def test_path_params_delete(self, client: Cloudflare) -> None:
+ def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.zones.holds.with_raw_response.delete(
+ client.zones.holds.with_raw_response.update(
zone_id="",
)
@parametrize
- def test_method_edit(self, client: Cloudflare) -> None:
- hold = client.zones.holds.edit(
+ def test_method_delete(self, client: Cloudflare) -> None:
+ hold = client.zones.holds.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
- hold = client.zones.holds.edit(
+ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
+ hold = client.zones.holds.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hold_after="2023-01-31T15:56:36+00:00",
- include_subdomains=True,
+ hold_after="hold_after",
)
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- def test_raw_response_edit(self, client: Cloudflare) -> None:
- response = client.zones.holds.with_raw_response.edit(
+ def test_raw_response_delete(self, client: Cloudflare) -> None:
+ response = client.zones.holds.with_raw_response.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -137,8 +137,8 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- def test_streaming_response_edit(self, client: Cloudflare) -> None:
- with client.zones.holds.with_streaming_response.edit(
+ def test_streaming_response_delete(self, client: Cloudflare) -> None:
+ with client.zones.holds.with_streaming_response.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -150,9 +150,9 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
@parametrize
- def test_path_params_edit(self, client: Cloudflare) -> None:
+ def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- client.zones.holds.with_raw_response.edit(
+ client.zones.holds.with_raw_response.delete(
zone_id="",
)
@@ -245,23 +245,24 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
)
@parametrize
- async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- hold = await async_client.zones.holds.delete(
+ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
+ hold = await async_client.zones.holds.update(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None:
- hold = await async_client.zones.holds.delete(
+ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ hold = await async_client.zones.holds.update(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hold_after="hold_after",
+ hold_after="2023-01-31T15:56:36+00:00",
+ include_subdomains=True,
)
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.zones.holds.with_raw_response.delete(
+ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zones.holds.with_raw_response.update(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -271,8 +272,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.zones.holds.with_streaming_response.delete(
+ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zones.holds.with_streaming_response.update(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -284,31 +285,30 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert cast(Any, response.is_closed) is True
@parametrize
- async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
+ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.zones.holds.with_raw_response.delete(
+ await async_client.zones.holds.with_raw_response.update(
zone_id="",
)
@parametrize
- async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
- hold = await async_client.zones.holds.edit(
+ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
+ hold = await async_client.zones.holds.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None:
- hold = await async_client.zones.holds.edit(
+ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ hold = await async_client.zones.holds.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
- hold_after="2023-01-31T15:56:36+00:00",
- include_subdomains=True,
+ hold_after="hold_after",
)
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.zones.holds.with_raw_response.edit(
+ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
+ response = await async_client.zones.holds.with_raw_response.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -318,8 +318,8 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
assert_matches_type(ZoneHold, hold, path=["response"])
@parametrize
- async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
- async with async_client.zones.holds.with_streaming_response.edit(
+ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
+ async with async_client.zones.holds.with_streaming_response.delete(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -331,9 +331,9 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert cast(Any, response.is_closed) is True
@parametrize
- async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
+ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
- await async_client.zones.holds.with_raw_response.edit(
+ await async_client.zones.holds.with_raw_response.delete(
zone_id="",
)