From 71a147c4a18bc98b153a31971cbae2181a6e3007 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 01:45:48 +0000 Subject: [PATCH] feat: update via SDK Studio (#112) --- api.md | 35 +-- .../email_routing/routing/__init__.py | 28 -- .../email_routing/routing/disables.py | 162 ----------- .../email_routing/routing/enables.py | 160 ----------- .../email_routing/routing/routing.py | 252 +++++++++++++----- .../resources/page_shield/page_shield.py | 20 +- .../types/email_routing/__init__.py | 2 + .../types/email_routing/routing/__init__.py | 2 - ...esponse.py => routing_disable_response.py} | 6 +- ...response.py => routing_enable_response.py} | 6 +- .../email_routing/routing/test_disables.py | 106 -------- .../email_routing/routing/test_enables.py | 106 -------- .../email_routing/test_routing.py | 170 +++++++++++- tests/api_resources/test_page_shield.py | 32 +-- 14 files changed, 399 insertions(+), 688 deletions(-) delete mode 100644 src/cloudflare/resources/email_routing/routing/disables.py delete mode 100644 src/cloudflare/resources/email_routing/routing/enables.py rename src/cloudflare/types/email_routing/{routing/disable_create_response.py => routing_disable_response.py} (90%) rename src/cloudflare/types/email_routing/{routing/enable_create_response.py => routing_enable_response.py} (90%) delete mode 100644 tests/api_resources/email_routing/routing/test_disables.py delete mode 100644 tests/api_resources/email_routing/routing/test_enables.py diff --git a/api.md b/api.md index 1cdc1cbd5..64c85ae28 100644 --- a/api.md +++ b/api.md @@ -1765,25 +1765,20 @@ Methods: Types: ```python -from cloudflare.types.email_routing import EmailSettings, RoutingGetResponse +from cloudflare.types.email_routing import ( + EmailSettings, + RoutingDisableResponse, + RoutingEnableResponse, + RoutingGetResponse, +) ``` Methods: +- client.email_routing.routing.disable(zone_identifier) -> RoutingDisableResponse +- client.email_routing.routing.enable(zone_identifier) -> RoutingEnableResponse - client.email_routing.routing.get(zone_identifier) -> RoutingGetResponse -### Disables - -Types: - -```python -from cloudflare.types.email_routing.routing import DisableCreateResponse -``` - -Methods: - -- client.email_routing.routing.disables.create(zone_identifier) -> DisableCreateResponse - ### DNS Types: @@ -1796,18 +1791,6 @@ Methods: - client.email_routing.routing.dns.get(zone_identifier) -> Optional -### Enables - -Types: - -```python -from cloudflare.types.email_routing.routing import EnableCreateResponse -``` - -Methods: - -- client.email_routing.routing.enables.create(zone_identifier) -> EnableCreateResponse - ### Rules Types: @@ -3060,7 +3043,7 @@ from cloudflare.types import PageShieldGetZoneSettings, PageShieldUpdateZoneSett Methods: - client.page_shield.update(\*, zone_id, \*\*params) -> PageShieldUpdateZoneSettings -- client.page_shield.list(\*, zone_id) -> PageShieldGetZoneSettings +- client.page_shield.get(\*, zone_id) -> PageShieldGetZoneSettings ## Policies diff --git a/src/cloudflare/resources/email_routing/routing/__init__.py b/src/cloudflare/resources/email_routing/routing/__init__.py index f3bd91060..a46a7e5a0 100644 --- a/src/cloudflare/resources/email_routing/routing/__init__.py +++ b/src/cloudflare/resources/email_routing/routing/__init__.py @@ -16,14 +16,6 @@ from .rules import ( RulesWithStreamingResponse, AsyncRulesWithStreamingResponse, ) -from .enables import ( - Enables, - AsyncEnables, - EnablesWithRawResponse, - AsyncEnablesWithRawResponse, - EnablesWithStreamingResponse, - AsyncEnablesWithStreamingResponse, -) from .routing import ( Routing, AsyncRouting, @@ -32,14 +24,6 @@ from .routing import ( RoutingWithStreamingResponse, AsyncRoutingWithStreamingResponse, ) -from .disables import ( - Disables, - AsyncDisables, - DisablesWithRawResponse, - AsyncDisablesWithRawResponse, - DisablesWithStreamingResponse, - AsyncDisablesWithStreamingResponse, -) from .addresses import ( Addresses, AsyncAddresses, @@ -50,24 +34,12 @@ from .addresses import ( ) __all__ = [ - "Disables", - "AsyncDisables", - "DisablesWithRawResponse", - "AsyncDisablesWithRawResponse", - "DisablesWithStreamingResponse", - "AsyncDisablesWithStreamingResponse", "DNS", "AsyncDNS", "DNSWithRawResponse", "AsyncDNSWithRawResponse", "DNSWithStreamingResponse", "AsyncDNSWithStreamingResponse", - "Enables", - "AsyncEnables", - "EnablesWithRawResponse", - "AsyncEnablesWithRawResponse", - "EnablesWithStreamingResponse", - "AsyncEnablesWithStreamingResponse", "Rules", "AsyncRules", "RulesWithRawResponse", diff --git a/src/cloudflare/resources/email_routing/routing/disables.py b/src/cloudflare/resources/email_routing/routing/disables.py deleted file mode 100644 index fa83ea772..000000000 --- a/src/cloudflare/resources/email_routing/routing/disables.py +++ /dev/null @@ -1,162 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from __future__ import annotations - -from typing import Type, cast - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.email_routing.routing import DisableCreateResponse - -__all__ = ["Disables", "AsyncDisables"] - - -class Disables(SyncAPIResource): - @cached_property - def with_raw_response(self) -> DisablesWithRawResponse: - return DisablesWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> DisablesWithStreamingResponse: - return DisablesWithStreamingResponse(self) - - def create( - self, - zone_identifier: str, - *, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DisableCreateResponse: - """Disable your Email Routing zone. - - Also removes additional MX records previously - required for Email Routing to work. - - Args: - zone_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return self._post( - f"/zones/{zone_identifier}/email/routing/disable", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast(Type[DisableCreateResponse], ResultWrapper[DisableCreateResponse]), - ) - - -class AsyncDisables(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncDisablesWithRawResponse: - return AsyncDisablesWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncDisablesWithStreamingResponse: - return AsyncDisablesWithStreamingResponse(self) - - async def create( - self, - zone_identifier: str, - *, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DisableCreateResponse: - """Disable your Email Routing zone. - - Also removes additional MX records previously - required for Email Routing to work. - - Args: - zone_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return await self._post( - f"/zones/{zone_identifier}/email/routing/disable", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast(Type[DisableCreateResponse], ResultWrapper[DisableCreateResponse]), - ) - - -class DisablesWithRawResponse: - def __init__(self, disables: Disables) -> None: - self._disables = disables - - self.create = to_raw_response_wrapper( - disables.create, - ) - - -class AsyncDisablesWithRawResponse: - def __init__(self, disables: AsyncDisables) -> None: - self._disables = disables - - self.create = async_to_raw_response_wrapper( - disables.create, - ) - - -class DisablesWithStreamingResponse: - def __init__(self, disables: Disables) -> None: - self._disables = disables - - self.create = to_streamed_response_wrapper( - disables.create, - ) - - -class AsyncDisablesWithStreamingResponse: - def __init__(self, disables: AsyncDisables) -> None: - self._disables = disables - - self.create = async_to_streamed_response_wrapper( - disables.create, - ) diff --git a/src/cloudflare/resources/email_routing/routing/enables.py b/src/cloudflare/resources/email_routing/routing/enables.py deleted file mode 100644 index 835eb4e0b..000000000 --- a/src/cloudflare/resources/email_routing/routing/enables.py +++ /dev/null @@ -1,160 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from __future__ import annotations - -from typing import Type, cast - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import ( - make_request_options, -) -from ....types.email_routing.routing import EnableCreateResponse - -__all__ = ["Enables", "AsyncEnables"] - - -class Enables(SyncAPIResource): - @cached_property - def with_raw_response(self) -> EnablesWithRawResponse: - return EnablesWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> EnablesWithStreamingResponse: - return EnablesWithStreamingResponse(self) - - def create( - self, - zone_identifier: str, - *, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EnableCreateResponse: - """Enable you Email Routing zone. - - Add and lock the necessary MX and SPF records. - - Args: - zone_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return self._post( - f"/zones/{zone_identifier}/email/routing/enable", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast(Type[EnableCreateResponse], ResultWrapper[EnableCreateResponse]), - ) - - -class AsyncEnables(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncEnablesWithRawResponse: - return AsyncEnablesWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncEnablesWithStreamingResponse: - return AsyncEnablesWithStreamingResponse(self) - - async def create( - self, - zone_identifier: str, - *, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EnableCreateResponse: - """Enable you Email Routing zone. - - Add and lock the necessary MX and SPF records. - - Args: - zone_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_identifier: - raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return await self._post( - f"/zones/{zone_identifier}/email/routing/enable", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast(Type[EnableCreateResponse], ResultWrapper[EnableCreateResponse]), - ) - - -class EnablesWithRawResponse: - def __init__(self, enables: Enables) -> None: - self._enables = enables - - self.create = to_raw_response_wrapper( - enables.create, - ) - - -class AsyncEnablesWithRawResponse: - def __init__(self, enables: AsyncEnables) -> None: - self._enables = enables - - self.create = async_to_raw_response_wrapper( - enables.create, - ) - - -class EnablesWithStreamingResponse: - def __init__(self, enables: Enables) -> None: - self._enables = enables - - self.create = to_streamed_response_wrapper( - enables.create, - ) - - -class AsyncEnablesWithStreamingResponse: - def __init__(self, enables: AsyncEnables) -> None: - self._enables = enables - - self.create = async_to_streamed_response_wrapper( - enables.create, - ) diff --git a/src/cloudflare/resources/email_routing/routing/routing.py b/src/cloudflare/resources/email_routing/routing/routing.py index bb305f092..e1cefcc4b 100644 --- a/src/cloudflare/resources/email_routing/routing/routing.py +++ b/src/cloudflare/resources/email_routing/routing/routing.py @@ -22,22 +22,6 @@ from .rules import ( RulesWithStreamingResponse, AsyncRulesWithStreamingResponse, ) -from .enables import ( - Enables, - AsyncEnables, - EnablesWithRawResponse, - AsyncEnablesWithRawResponse, - EnablesWithStreamingResponse, - AsyncEnablesWithStreamingResponse, -) -from .disables import ( - Disables, - AsyncDisables, - DisablesWithRawResponse, - AsyncDisablesWithRawResponse, - DisablesWithStreamingResponse, - AsyncDisablesWithStreamingResponse, -) from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .addresses import ( Addresses, @@ -60,24 +44,16 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.email_routing import RoutingGetResponse +from ....types.email_routing import RoutingGetResponse, RoutingEnableResponse, RoutingDisableResponse __all__ = ["Routing", "AsyncRouting"] class Routing(SyncAPIResource): - @cached_property - def disables(self) -> Disables: - return Disables(self._client) - @cached_property def dns(self) -> DNS: return DNS(self._client) - @cached_property - def enables(self) -> Enables: - return Enables(self._client) - @cached_property def rules(self) -> Rules: return Rules(self._client) @@ -94,6 +70,87 @@ class Routing(SyncAPIResource): def with_streaming_response(self) -> RoutingWithStreamingResponse: return RoutingWithStreamingResponse(self) + def disable( + self, + zone_identifier: str, + *, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> RoutingDisableResponse: + """Disable your Email Routing zone. + + Also removes additional MX records previously + required for Email Routing to work. + + Args: + zone_identifier: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_identifier: + raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + return self._post( + f"/zones/{zone_identifier}/email/routing/disable", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper._unwrapper, + ), + cast_to=cast(Type[RoutingDisableResponse], ResultWrapper[RoutingDisableResponse]), + ) + + def enable( + self, + zone_identifier: str, + *, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> RoutingEnableResponse: + """Enable you Email Routing zone. + + Add and lock the necessary MX and SPF records. + + Args: + zone_identifier: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_identifier: + raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + return self._post( + f"/zones/{zone_identifier}/email/routing/enable", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper._unwrapper, + ), + cast_to=cast(Type[RoutingEnableResponse], ResultWrapper[RoutingEnableResponse]), + ) + def get( self, zone_identifier: str, @@ -135,18 +192,10 @@ class Routing(SyncAPIResource): class AsyncRouting(AsyncAPIResource): - @cached_property - def disables(self) -> AsyncDisables: - return AsyncDisables(self._client) - @cached_property def dns(self) -> AsyncDNS: return AsyncDNS(self._client) - @cached_property - def enables(self) -> AsyncEnables: - return AsyncEnables(self._client) - @cached_property def rules(self) -> AsyncRules: return AsyncRules(self._client) @@ -163,6 +212,87 @@ class AsyncRouting(AsyncAPIResource): def with_streaming_response(self) -> AsyncRoutingWithStreamingResponse: return AsyncRoutingWithStreamingResponse(self) + async def disable( + self, + zone_identifier: str, + *, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> RoutingDisableResponse: + """Disable your Email Routing zone. + + Also removes additional MX records previously + required for Email Routing to work. + + Args: + zone_identifier: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_identifier: + raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + return await self._post( + f"/zones/{zone_identifier}/email/routing/disable", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper._unwrapper, + ), + cast_to=cast(Type[RoutingDisableResponse], ResultWrapper[RoutingDisableResponse]), + ) + + async def enable( + self, + zone_identifier: str, + *, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> RoutingEnableResponse: + """Enable you Email Routing zone. + + Add and lock the necessary MX and SPF records. + + Args: + zone_identifier: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_identifier: + raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") + return await self._post( + f"/zones/{zone_identifier}/email/routing/enable", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper._unwrapper, + ), + cast_to=cast(Type[RoutingEnableResponse], ResultWrapper[RoutingEnableResponse]), + ) + async def get( self, zone_identifier: str, @@ -207,22 +337,20 @@ class RoutingWithRawResponse: def __init__(self, routing: Routing) -> None: self._routing = routing + self.disable = to_raw_response_wrapper( + routing.disable, + ) + self.enable = to_raw_response_wrapper( + routing.enable, + ) self.get = to_raw_response_wrapper( routing.get, ) - @cached_property - def disables(self) -> DisablesWithRawResponse: - return DisablesWithRawResponse(self._routing.disables) - @cached_property def dns(self) -> DNSWithRawResponse: return DNSWithRawResponse(self._routing.dns) - @cached_property - def enables(self) -> EnablesWithRawResponse: - return EnablesWithRawResponse(self._routing.enables) - @cached_property def rules(self) -> RulesWithRawResponse: return RulesWithRawResponse(self._routing.rules) @@ -236,22 +364,20 @@ class AsyncRoutingWithRawResponse: def __init__(self, routing: AsyncRouting) -> None: self._routing = routing + self.disable = async_to_raw_response_wrapper( + routing.disable, + ) + self.enable = async_to_raw_response_wrapper( + routing.enable, + ) self.get = async_to_raw_response_wrapper( routing.get, ) - @cached_property - def disables(self) -> AsyncDisablesWithRawResponse: - return AsyncDisablesWithRawResponse(self._routing.disables) - @cached_property def dns(self) -> AsyncDNSWithRawResponse: return AsyncDNSWithRawResponse(self._routing.dns) - @cached_property - def enables(self) -> AsyncEnablesWithRawResponse: - return AsyncEnablesWithRawResponse(self._routing.enables) - @cached_property def rules(self) -> AsyncRulesWithRawResponse: return AsyncRulesWithRawResponse(self._routing.rules) @@ -265,22 +391,20 @@ class RoutingWithStreamingResponse: def __init__(self, routing: Routing) -> None: self._routing = routing + self.disable = to_streamed_response_wrapper( + routing.disable, + ) + self.enable = to_streamed_response_wrapper( + routing.enable, + ) self.get = to_streamed_response_wrapper( routing.get, ) - @cached_property - def disables(self) -> DisablesWithStreamingResponse: - return DisablesWithStreamingResponse(self._routing.disables) - @cached_property def dns(self) -> DNSWithStreamingResponse: return DNSWithStreamingResponse(self._routing.dns) - @cached_property - def enables(self) -> EnablesWithStreamingResponse: - return EnablesWithStreamingResponse(self._routing.enables) - @cached_property def rules(self) -> RulesWithStreamingResponse: return RulesWithStreamingResponse(self._routing.rules) @@ -294,22 +418,20 @@ class AsyncRoutingWithStreamingResponse: def __init__(self, routing: AsyncRouting) -> None: self._routing = routing + self.disable = async_to_streamed_response_wrapper( + routing.disable, + ) + self.enable = async_to_streamed_response_wrapper( + routing.enable, + ) self.get = async_to_streamed_response_wrapper( routing.get, ) - @cached_property - def disables(self) -> AsyncDisablesWithStreamingResponse: - return AsyncDisablesWithStreamingResponse(self._routing.disables) - @cached_property def dns(self) -> AsyncDNSWithStreamingResponse: return AsyncDNSWithStreamingResponse(self._routing.dns) - @cached_property - def enables(self) -> AsyncEnablesWithStreamingResponse: - return AsyncEnablesWithStreamingResponse(self._routing.enables) - @cached_property def rules(self) -> AsyncRulesWithStreamingResponse: return AsyncRulesWithStreamingResponse(self._routing.rules) diff --git a/src/cloudflare/resources/page_shield/page_shield.py b/src/cloudflare/resources/page_shield/page_shield.py index 632dcd0d4..f9ea11674 100644 --- a/src/cloudflare/resources/page_shield/page_shield.py +++ b/src/cloudflare/resources/page_shield/page_shield.py @@ -130,7 +130,7 @@ class PageShield(SyncAPIResource): cast_to=cast(Type[PageShieldUpdateZoneSettings], ResultWrapper[PageShieldUpdateZoneSettings]), ) - def list( + def get( self, *, zone_id: str, @@ -248,7 +248,7 @@ class AsyncPageShield(AsyncAPIResource): cast_to=cast(Type[PageShieldUpdateZoneSettings], ResultWrapper[PageShieldUpdateZoneSettings]), ) - async def list( + async def get( self, *, zone_id: str, @@ -295,8 +295,8 @@ class PageShieldWithRawResponse: self.update = to_raw_response_wrapper( page_shield.update, ) - self.list = to_raw_response_wrapper( - page_shield.list, + self.get = to_raw_response_wrapper( + page_shield.get, ) @cached_property @@ -319,8 +319,8 @@ class AsyncPageShieldWithRawResponse: self.update = async_to_raw_response_wrapper( page_shield.update, ) - self.list = async_to_raw_response_wrapper( - page_shield.list, + self.get = async_to_raw_response_wrapper( + page_shield.get, ) @cached_property @@ -343,8 +343,8 @@ class PageShieldWithStreamingResponse: self.update = to_streamed_response_wrapper( page_shield.update, ) - self.list = to_streamed_response_wrapper( - page_shield.list, + self.get = to_streamed_response_wrapper( + page_shield.get, ) @cached_property @@ -367,8 +367,8 @@ class AsyncPageShieldWithStreamingResponse: self.update = async_to_streamed_response_wrapper( page_shield.update, ) - self.list = async_to_streamed_response_wrapper( - page_shield.list, + self.get = async_to_streamed_response_wrapper( + page_shield.get, ) @cached_property diff --git a/src/cloudflare/types/email_routing/__init__.py b/src/cloudflare/types/email_routing/__init__.py index 7c1b7e205..a4341ba46 100644 --- a/src/cloudflare/types/email_routing/__init__.py +++ b/src/cloudflare/types/email_routing/__init__.py @@ -3,3 +3,5 @@ from __future__ import annotations from .routing_get_response import RoutingGetResponse as RoutingGetResponse +from .routing_enable_response import RoutingEnableResponse as RoutingEnableResponse +from .routing_disable_response import RoutingDisableResponse as RoutingDisableResponse diff --git a/src/cloudflare/types/email_routing/routing/__init__.py b/src/cloudflare/types/email_routing/routing/__init__.py index 0f8dfea01..a26aae254 100644 --- a/src/cloudflare/types/email_routing/routing/__init__.py +++ b/src/cloudflare/types/email_routing/routing/__init__.py @@ -16,7 +16,5 @@ from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse from .rule_update_response import RuleUpdateResponse as RuleUpdateResponse from .address_create_params import AddressCreateParams as AddressCreateParams from .address_list_response import AddressListResponse as AddressListResponse -from .enable_create_response import EnableCreateResponse as EnableCreateResponse from .address_create_response import AddressCreateResponse as AddressCreateResponse from .address_delete_response import AddressDeleteResponse as AddressDeleteResponse -from .disable_create_response import DisableCreateResponse as DisableCreateResponse diff --git a/src/cloudflare/types/email_routing/routing/disable_create_response.py b/src/cloudflare/types/email_routing/routing_disable_response.py similarity index 90% rename from src/cloudflare/types/email_routing/routing/disable_create_response.py rename to src/cloudflare/types/email_routing/routing_disable_response.py index a204b3843..ca7198555 100644 --- a/src/cloudflare/types/email_routing/routing/disable_create_response.py +++ b/src/cloudflare/types/email_routing/routing_disable_response.py @@ -4,12 +4,12 @@ from typing import Optional from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel -__all__ = ["DisableCreateResponse"] +__all__ = ["RoutingDisableResponse"] -class DisableCreateResponse(BaseModel): +class RoutingDisableResponse(BaseModel): id: Optional[str] = None """Email Routing settings identifier.""" diff --git a/src/cloudflare/types/email_routing/routing/enable_create_response.py b/src/cloudflare/types/email_routing/routing_enable_response.py similarity index 90% rename from src/cloudflare/types/email_routing/routing/enable_create_response.py rename to src/cloudflare/types/email_routing/routing_enable_response.py index e6ac827b2..ba247cd81 100644 --- a/src/cloudflare/types/email_routing/routing/enable_create_response.py +++ b/src/cloudflare/types/email_routing/routing_enable_response.py @@ -4,12 +4,12 @@ from typing import Optional from datetime import datetime from typing_extensions import Literal -from ...._models import BaseModel +from ..._models import BaseModel -__all__ = ["EnableCreateResponse"] +__all__ = ["RoutingEnableResponse"] -class EnableCreateResponse(BaseModel): +class RoutingEnableResponse(BaseModel): id: Optional[str] = None """Email Routing settings identifier.""" diff --git a/tests/api_resources/email_routing/routing/test_disables.py b/tests/api_resources/email_routing/routing/test_disables.py deleted file mode 100644 index 682be7b3e..000000000 --- a/tests/api_resources/email_routing/routing/test_disables.py +++ /dev/null @@ -1,106 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.email_routing.routing import DisableCreateResponse - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestDisables: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip() - @parametrize - def test_method_create(self, client: Cloudflare) -> None: - disable = client.email_routing.routing.disables.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(DisableCreateResponse, disable, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_create(self, client: Cloudflare) -> None: - response = client.email_routing.routing.disables.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - disable = response.parse() - assert_matches_type(DisableCreateResponse, disable, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_create(self, client: Cloudflare) -> None: - with client.email_routing.routing.disables.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - disable = response.parse() - assert_matches_type(DisableCreateResponse, disable, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_create(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): - client.email_routing.routing.disables.with_raw_response.create( - "", - ) - - -class TestAsyncDisables: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip() - @parametrize - async def test_method_create(self, async_client: AsyncCloudflare) -> None: - disable = await async_client.email_routing.routing.disables.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(DisableCreateResponse, disable, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: - response = await async_client.email_routing.routing.disables.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - disable = await response.parse() - assert_matches_type(DisableCreateResponse, disable, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: - async with async_client.email_routing.routing.disables.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - disable = await response.parse() - assert_matches_type(DisableCreateResponse, disable, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): - await async_client.email_routing.routing.disables.with_raw_response.create( - "", - ) diff --git a/tests/api_resources/email_routing/routing/test_enables.py b/tests/api_resources/email_routing/routing/test_enables.py deleted file mode 100644 index 830a26f33..000000000 --- a/tests/api_resources/email_routing/routing/test_enables.py +++ /dev/null @@ -1,106 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.email_routing.routing import EnableCreateResponse - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestEnables: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip() - @parametrize - def test_method_create(self, client: Cloudflare) -> None: - enable = client.email_routing.routing.enables.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(EnableCreateResponse, enable, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_create(self, client: Cloudflare) -> None: - response = client.email_routing.routing.enables.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - enable = response.parse() - assert_matches_type(EnableCreateResponse, enable, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_create(self, client: Cloudflare) -> None: - with client.email_routing.routing.enables.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - enable = response.parse() - assert_matches_type(EnableCreateResponse, enable, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_create(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): - client.email_routing.routing.enables.with_raw_response.create( - "", - ) - - -class TestAsyncEnables: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip() - @parametrize - async def test_method_create(self, async_client: AsyncCloudflare) -> None: - enable = await async_client.email_routing.routing.enables.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(EnableCreateResponse, enable, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: - response = await async_client.email_routing.routing.enables.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - enable = await response.parse() - assert_matches_type(EnableCreateResponse, enable, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: - async with async_client.email_routing.routing.enables.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - enable = await response.parse() - assert_matches_type(EnableCreateResponse, enable, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): - await async_client.email_routing.routing.enables.with_raw_response.create( - "", - ) diff --git a/tests/api_resources/email_routing/test_routing.py b/tests/api_resources/email_routing/test_routing.py index 81a701835..b65a4738a 100644 --- a/tests/api_resources/email_routing/test_routing.py +++ b/tests/api_resources/email_routing/test_routing.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.email_routing import RoutingGetResponse +from cloudflare.types.email_routing import RoutingGetResponse, RoutingEnableResponse, RoutingDisableResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,6 +17,90 @@ base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") class TestRouting: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() + @parametrize + def test_method_disable(self, client: Cloudflare) -> None: + routing = client.email_routing.routing.disable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(RoutingDisableResponse, routing, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_raw_response_disable(self, client: Cloudflare) -> None: + response = client.email_routing.routing.with_raw_response.disable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + routing = response.parse() + assert_matches_type(RoutingDisableResponse, routing, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_streaming_response_disable(self, client: Cloudflare) -> None: + with client.email_routing.routing.with_streaming_response.disable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + routing = response.parse() + assert_matches_type(RoutingDisableResponse, routing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip() + @parametrize + def test_path_params_disable(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + client.email_routing.routing.with_raw_response.disable( + "", + ) + + @pytest.mark.skip() + @parametrize + def test_method_enable(self, client: Cloudflare) -> None: + routing = client.email_routing.routing.enable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(RoutingEnableResponse, routing, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_raw_response_enable(self, client: Cloudflare) -> None: + response = client.email_routing.routing.with_raw_response.enable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + routing = response.parse() + assert_matches_type(RoutingEnableResponse, routing, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_streaming_response_enable(self, client: Cloudflare) -> None: + with client.email_routing.routing.with_streaming_response.enable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + routing = response.parse() + assert_matches_type(RoutingEnableResponse, routing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip() + @parametrize + def test_path_params_enable(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + client.email_routing.routing.with_raw_response.enable( + "", + ) + @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: @@ -63,6 +147,90 @@ class TestRouting: class TestAsyncRouting: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() + @parametrize + async def test_method_disable(self, async_client: AsyncCloudflare) -> None: + routing = await async_client.email_routing.routing.disable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(RoutingDisableResponse, routing, path=["response"]) + + @pytest.mark.skip() + @parametrize + async def test_raw_response_disable(self, async_client: AsyncCloudflare) -> None: + response = await async_client.email_routing.routing.with_raw_response.disable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + routing = await response.parse() + assert_matches_type(RoutingDisableResponse, routing, path=["response"]) + + @pytest.mark.skip() + @parametrize + async def test_streaming_response_disable(self, async_client: AsyncCloudflare) -> None: + async with async_client.email_routing.routing.with_streaming_response.disable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + routing = await response.parse() + assert_matches_type(RoutingDisableResponse, routing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip() + @parametrize + async def test_path_params_disable(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + await async_client.email_routing.routing.with_raw_response.disable( + "", + ) + + @pytest.mark.skip() + @parametrize + async def test_method_enable(self, async_client: AsyncCloudflare) -> None: + routing = await async_client.email_routing.routing.enable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(RoutingEnableResponse, routing, path=["response"]) + + @pytest.mark.skip() + @parametrize + async def test_raw_response_enable(self, async_client: AsyncCloudflare) -> None: + response = await async_client.email_routing.routing.with_raw_response.enable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + routing = await response.parse() + assert_matches_type(RoutingEnableResponse, routing, path=["response"]) + + @pytest.mark.skip() + @parametrize + async def test_streaming_response_enable(self, async_client: AsyncCloudflare) -> None: + async with async_client.email_routing.routing.with_streaming_response.enable( + "023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + routing = await response.parse() + assert_matches_type(RoutingEnableResponse, routing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip() + @parametrize + async def test_path_params_enable(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): + await async_client.email_routing.routing.with_raw_response.enable( + "", + ) + @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_page_shield.py b/tests/api_resources/test_page_shield.py index 94a3c70a6..9a484a3d8 100644 --- a/tests/api_resources/test_page_shield.py +++ b/tests/api_resources/test_page_shield.py @@ -72,16 +72,16 @@ class TestPageShield: @pytest.mark.skip() @parametrize - def test_method_list(self, client: Cloudflare) -> None: - page_shield = client.page_shield.list( + def test_method_get(self, client: Cloudflare) -> None: + page_shield = client.page_shield.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize - def test_raw_response_list(self, client: Cloudflare) -> None: - response = client.page_shield.with_raw_response.list( + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.page_shield.with_raw_response.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,8 +92,8 @@ class TestPageShield: @pytest.mark.skip() @parametrize - def test_streaming_response_list(self, client: Cloudflare) -> None: - with client.page_shield.with_streaming_response.list( + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.page_shield.with_streaming_response.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -106,9 +106,9 @@ class TestPageShield: @pytest.mark.skip() @parametrize - def test_path_params_list(self, client: Cloudflare) -> None: + def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.page_shield.with_raw_response.list( + client.page_shield.with_raw_response.get( zone_id="", ) @@ -171,16 +171,16 @@ class TestAsyncPageShield: @pytest.mark.skip() @parametrize - async def test_method_list(self, async_client: AsyncCloudflare) -> None: - page_shield = await async_client.page_shield.list( + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + page_shield = await async_client.page_shield.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize - async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: - response = await async_client.page_shield.with_raw_response.list( + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.page_shield.with_raw_response.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -191,8 +191,8 @@ class TestAsyncPageShield: @pytest.mark.skip() @parametrize - async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: - async with async_client.page_shield.with_streaming_response.list( + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.page_shield.with_streaming_response.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -205,8 +205,8 @@ class TestAsyncPageShield: @pytest.mark.skip() @parametrize - async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.page_shield.with_raw_response.list( + await async_client.page_shield.with_raw_response.get( zone_id="", )