diff --git a/.stats.yml b/.stats.yml
index e163d63cd95..1ea0a9a80c1 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
-configured_endpoints: 1451
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-811ce6b3fb37e41c31b89ac40edb0f29791c03499a00e728955e3a317e664d82.yml
+configured_endpoints: 1449
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-65fb65b2114a872dda4e29b09cb0b33ea5fa3060819757a6c7a93bcc1a3a3422.yml
diff --git a/api.md b/api.md
index 555759435bf..69a87977345 100644
--- a/api.md
+++ b/api.md
@@ -4960,22 +4960,6 @@ Methods:
- client.zero_trust.devices.policies.default.fallback_domains.update(\*, account_id, \*\*params) -> Optional
- client.zero_trust.devices.policies.default.fallback_domains.get(\*, account_id) -> Optional
-##### Certificates
-
-Types:
-
-```python
-from cloudflare.types.zero_trust.devices.policies.default import (
- CertificateEditResponse,
- CertificateGetResponse,
-)
-```
-
-Methods:
-
-- client.zero_trust.devices.policies.default.certificates.edit(zone_tag, \*\*params) -> CertificateEditResponse
-- client.zero_trust.devices.policies.default.certificates.get(zone_tag) -> CertificateGetResponse
-
#### Custom
Types:
diff --git a/src/cloudflare/resources/zero_trust/devices/policies/default/__init__.py b/src/cloudflare/resources/zero_trust/devices/policies/default/__init__.py
index c22a715e1e2..8189ffe02c5 100644
--- a/src/cloudflare/resources/zero_trust/devices/policies/default/__init__.py
+++ b/src/cloudflare/resources/zero_trust/devices/policies/default/__init__.py
@@ -24,14 +24,6 @@
IncludesResourceWithStreamingResponse,
AsyncIncludesResourceWithStreamingResponse,
)
-from .certificates import (
- CertificatesResource,
- AsyncCertificatesResource,
- CertificatesResourceWithRawResponse,
- AsyncCertificatesResourceWithRawResponse,
- CertificatesResourceWithStreamingResponse,
- AsyncCertificatesResourceWithStreamingResponse,
-)
from .fallback_domains import (
FallbackDomainsResource,
AsyncFallbackDomainsResource,
@@ -60,12 +52,6 @@
"AsyncFallbackDomainsResourceWithRawResponse",
"FallbackDomainsResourceWithStreamingResponse",
"AsyncFallbackDomainsResourceWithStreamingResponse",
- "CertificatesResource",
- "AsyncCertificatesResource",
- "CertificatesResourceWithRawResponse",
- "AsyncCertificatesResourceWithRawResponse",
- "CertificatesResourceWithStreamingResponse",
- "AsyncCertificatesResourceWithStreamingResponse",
"DefaultResource",
"AsyncDefaultResource",
"DefaultResourceWithRawResponse",
diff --git a/src/cloudflare/resources/zero_trust/devices/policies/default/certificates.py b/src/cloudflare/resources/zero_trust/devices/policies/default/certificates.py
deleted file mode 100644
index d90227d8475..00000000000
--- a/src/cloudflare/resources/zero_trust/devices/policies/default/certificates.py
+++ /dev/null
@@ -1,300 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Any, cast
-
-import httpx
-
-from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ......_utils import (
- maybe_transform,
- async_maybe_transform,
-)
-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.zero_trust.devices.policies.default import certificate_edit_params
-from ......types.zero_trust.devices.policies.default.certificate_get_response import CertificateGetResponse
-from ......types.zero_trust.devices.policies.default.certificate_edit_response import CertificateEditResponse
-
-__all__ = ["CertificatesResource", "AsyncCertificatesResource"]
-
-
-class CertificatesResource(SyncAPIResource):
- @cached_property
- def with_raw_response(self) -> CertificatesResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return the
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
- """
- return CertificatesResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> CertificatesResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
- """
- return CertificatesResourceWithStreamingResponse(self)
-
- def edit(
- self,
- zone_tag: str,
- *,
- enabled: bool,
- # 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,
- ) -> CertificateEditResponse:
- """
- Enable Zero Trust Clients to provision a certificate, containing a x509 subject,
- and referenced by Access device posture policies when the client visits MTLS
- protected domains. This facilitates device posture without a WARP session.
-
- Args:
- enabled: The current status of the device policy certificate provisioning feature for
- WARP clients.
-
- 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_tag:
- raise ValueError(f"Expected a non-empty value for `zone_tag` but received {zone_tag!r}")
- return cast(
- CertificateEditResponse,
- self._patch(
- f"/zones/{zone_tag}/devices/policy/certificates",
- body=maybe_transform({"enabled": enabled}, certificate_edit_params.CertificateEditParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[CertificateEditResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[CertificateEditResponse]
- ), # Union types cannot be passed in as arguments in the type system
- ),
- )
-
- def get(
- self,
- zone_tag: 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,
- ) -> CertificateGetResponse:
- """
- Fetches device certificate provisioning
-
- Args:
- 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_tag:
- raise ValueError(f"Expected a non-empty value for `zone_tag` but received {zone_tag!r}")
- return cast(
- CertificateGetResponse,
- self._get(
- f"/zones/{zone_tag}/devices/policy/certificates",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[CertificateGetResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[CertificateGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
- ),
- )
-
-
-class AsyncCertificatesResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncCertificatesResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return the
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
- """
- return AsyncCertificatesResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncCertificatesResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
- """
- return AsyncCertificatesResourceWithStreamingResponse(self)
-
- async def edit(
- self,
- zone_tag: str,
- *,
- enabled: bool,
- # 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,
- ) -> CertificateEditResponse:
- """
- Enable Zero Trust Clients to provision a certificate, containing a x509 subject,
- and referenced by Access device posture policies when the client visits MTLS
- protected domains. This facilitates device posture without a WARP session.
-
- Args:
- enabled: The current status of the device policy certificate provisioning feature for
- WARP clients.
-
- 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_tag:
- raise ValueError(f"Expected a non-empty value for `zone_tag` but received {zone_tag!r}")
- return cast(
- CertificateEditResponse,
- await self._patch(
- f"/zones/{zone_tag}/devices/policy/certificates",
- body=await async_maybe_transform({"enabled": enabled}, certificate_edit_params.CertificateEditParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[CertificateEditResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[CertificateEditResponse]
- ), # Union types cannot be passed in as arguments in the type system
- ),
- )
-
- async def get(
- self,
- zone_tag: 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,
- ) -> CertificateGetResponse:
- """
- Fetches device certificate provisioning
-
- Args:
- 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_tag:
- raise ValueError(f"Expected a non-empty value for `zone_tag` but received {zone_tag!r}")
- return cast(
- CertificateGetResponse,
- await self._get(
- f"/zones/{zone_tag}/devices/policy/certificates",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[CertificateGetResponse]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[CertificateGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
- ),
- )
-
-
-class CertificatesResourceWithRawResponse:
- def __init__(self, certificates: CertificatesResource) -> None:
- self._certificates = certificates
-
- self.edit = to_raw_response_wrapper(
- certificates.edit,
- )
- self.get = to_raw_response_wrapper(
- certificates.get,
- )
-
-
-class AsyncCertificatesResourceWithRawResponse:
- def __init__(self, certificates: AsyncCertificatesResource) -> None:
- self._certificates = certificates
-
- self.edit = async_to_raw_response_wrapper(
- certificates.edit,
- )
- self.get = async_to_raw_response_wrapper(
- certificates.get,
- )
-
-
-class CertificatesResourceWithStreamingResponse:
- def __init__(self, certificates: CertificatesResource) -> None:
- self._certificates = certificates
-
- self.edit = to_streamed_response_wrapper(
- certificates.edit,
- )
- self.get = to_streamed_response_wrapper(
- certificates.get,
- )
-
-
-class AsyncCertificatesResourceWithStreamingResponse:
- def __init__(self, certificates: AsyncCertificatesResource) -> None:
- self._certificates = certificates
-
- self.edit = async_to_streamed_response_wrapper(
- certificates.edit,
- )
- self.get = async_to_streamed_response_wrapper(
- certificates.get,
- )
diff --git a/src/cloudflare/resources/zero_trust/devices/policies/default/default.py b/src/cloudflare/resources/zero_trust/devices/policies/default/default.py
index 5c0f7e71e53..1c8ce73a1de 100644
--- a/src/cloudflare/resources/zero_trust/devices/policies/default/default.py
+++ b/src/cloudflare/resources/zero_trust/devices/policies/default/default.py
@@ -28,14 +28,6 @@
async_maybe_transform,
)
from ......_compat import cached_property
-from .certificates import (
- CertificatesResource,
- AsyncCertificatesResource,
- CertificatesResourceWithRawResponse,
- AsyncCertificatesResourceWithRawResponse,
- CertificatesResourceWithStreamingResponse,
- AsyncCertificatesResourceWithStreamingResponse,
-)
from ......_resource import SyncAPIResource, AsyncAPIResource
from ......_response import (
to_raw_response_wrapper,
@@ -73,10 +65,6 @@ def includes(self) -> IncludesResource:
def fallback_domains(self) -> FallbackDomainsResource:
return FallbackDomainsResource(self._client)
- @cached_property
- def certificates(self) -> CertificatesResource:
- return CertificatesResource(self._client)
-
@cached_property
def with_raw_response(self) -> DefaultResourceWithRawResponse:
"""
@@ -234,10 +222,6 @@ def includes(self) -> AsyncIncludesResource:
def fallback_domains(self) -> AsyncFallbackDomainsResource:
return AsyncFallbackDomainsResource(self._client)
- @cached_property
- def certificates(self) -> AsyncCertificatesResource:
- return AsyncCertificatesResource(self._client)
-
@cached_property
def with_raw_response(self) -> AsyncDefaultResourceWithRawResponse:
"""
@@ -405,10 +389,6 @@ def includes(self) -> IncludesResourceWithRawResponse:
def fallback_domains(self) -> FallbackDomainsResourceWithRawResponse:
return FallbackDomainsResourceWithRawResponse(self._default.fallback_domains)
- @cached_property
- def certificates(self) -> CertificatesResourceWithRawResponse:
- return CertificatesResourceWithRawResponse(self._default.certificates)
-
class AsyncDefaultResourceWithRawResponse:
def __init__(self, default: AsyncDefaultResource) -> None:
@@ -433,10 +413,6 @@ def includes(self) -> AsyncIncludesResourceWithRawResponse:
def fallback_domains(self) -> AsyncFallbackDomainsResourceWithRawResponse:
return AsyncFallbackDomainsResourceWithRawResponse(self._default.fallback_domains)
- @cached_property
- def certificates(self) -> AsyncCertificatesResourceWithRawResponse:
- return AsyncCertificatesResourceWithRawResponse(self._default.certificates)
-
class DefaultResourceWithStreamingResponse:
def __init__(self, default: DefaultResource) -> None:
@@ -461,10 +437,6 @@ def includes(self) -> IncludesResourceWithStreamingResponse:
def fallback_domains(self) -> FallbackDomainsResourceWithStreamingResponse:
return FallbackDomainsResourceWithStreamingResponse(self._default.fallback_domains)
- @cached_property
- def certificates(self) -> CertificatesResourceWithStreamingResponse:
- return CertificatesResourceWithStreamingResponse(self._default.certificates)
-
class AsyncDefaultResourceWithStreamingResponse:
def __init__(self, default: AsyncDefaultResource) -> None:
@@ -488,7 +460,3 @@ def includes(self) -> AsyncIncludesResourceWithStreamingResponse:
@cached_property
def fallback_domains(self) -> AsyncFallbackDomainsResourceWithStreamingResponse:
return AsyncFallbackDomainsResourceWithStreamingResponse(self._default.fallback_domains)
-
- @cached_property
- def certificates(self) -> AsyncCertificatesResourceWithStreamingResponse:
- return AsyncCertificatesResourceWithStreamingResponse(self._default.certificates)
diff --git a/src/cloudflare/types/zero_trust/devices/policies/default/__init__.py b/src/cloudflare/types/zero_trust/devices/policies/default/__init__.py
index 02bf1198370..cb8c3df70ca 100644
--- a/src/cloudflare/types/zero_trust/devices/policies/default/__init__.py
+++ b/src/cloudflare/types/zero_trust/devices/policies/default/__init__.py
@@ -6,11 +6,8 @@
from .include_get_response import IncludeGetResponse as IncludeGetResponse
from .exclude_update_params import ExcludeUpdateParams as ExcludeUpdateParams
from .include_update_params import IncludeUpdateParams as IncludeUpdateParams
-from .certificate_edit_params import CertificateEditParams as CertificateEditParams
from .exclude_update_response import ExcludeUpdateResponse as ExcludeUpdateResponse
from .include_update_response import IncludeUpdateResponse as IncludeUpdateResponse
-from .certificate_get_response import CertificateGetResponse as CertificateGetResponse
-from .certificate_edit_response import CertificateEditResponse as CertificateEditResponse
from .fallback_domain_get_response import FallbackDomainGetResponse as FallbackDomainGetResponse
from .fallback_domain_update_params import FallbackDomainUpdateParams as FallbackDomainUpdateParams
from .fallback_domain_update_response import FallbackDomainUpdateResponse as FallbackDomainUpdateResponse
diff --git a/src/cloudflare/types/zero_trust/devices/policies/default/certificate_edit_params.py b/src/cloudflare/types/zero_trust/devices/policies/default/certificate_edit_params.py
deleted file mode 100644
index 489d724da51..00000000000
--- a/src/cloudflare/types/zero_trust/devices/policies/default/certificate_edit_params.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Required, TypedDict
-
-__all__ = ["CertificateEditParams"]
-
-
-class CertificateEditParams(TypedDict, total=False):
- enabled: Required[bool]
- """
- The current status of the device policy certificate provisioning feature for
- WARP clients.
- """
diff --git a/src/cloudflare/types/zero_trust/devices/policies/default/certificate_edit_response.py b/src/cloudflare/types/zero_trust/devices/policies/default/certificate_edit_response.py
deleted file mode 100644
index 0cd113c6420..00000000000
--- a/src/cloudflare/types/zero_trust/devices/policies/default/certificate_edit_response.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-from typing_extensions import TypeAlias
-
-__all__ = ["CertificateEditResponse"]
-
-CertificateEditResponse: TypeAlias = Union[Optional[str], Optional[object]]
diff --git a/src/cloudflare/types/zero_trust/devices/policies/default/certificate_get_response.py b/src/cloudflare/types/zero_trust/devices/policies/default/certificate_get_response.py
deleted file mode 100644
index 055be51f531..00000000000
--- a/src/cloudflare/types/zero_trust/devices/policies/default/certificate_get_response.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-from typing_extensions import TypeAlias
-
-__all__ = ["CertificateGetResponse"]
-
-CertificateGetResponse: TypeAlias = Union[Optional[str], Optional[object]]
diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py b/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py
deleted file mode 100644
index b5228f9964c..00000000000
--- a/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py
+++ /dev/null
@@ -1,185 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-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.zero_trust.devices.policies.default import (
- CertificateGetResponse,
- CertificateEditResponse,
-)
-
-base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-
-
-class TestCertificates:
- parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @parametrize
- def test_method_edit(self, client: Cloudflare) -> None:
- certificate = client.zero_trust.devices.policies.default.certificates.edit(
- zone_tag="699d98642c564d2e855e9661899b7252",
- enabled=True,
- )
- assert_matches_type(CertificateEditResponse, certificate, path=["response"])
-
- @parametrize
- def test_raw_response_edit(self, client: Cloudflare) -> None:
- response = client.zero_trust.devices.policies.default.certificates.with_raw_response.edit(
- zone_tag="699d98642c564d2e855e9661899b7252",
- enabled=True,
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- certificate = response.parse()
- assert_matches_type(CertificateEditResponse, certificate, path=["response"])
-
- @parametrize
- def test_streaming_response_edit(self, client: Cloudflare) -> None:
- with client.zero_trust.devices.policies.default.certificates.with_streaming_response.edit(
- zone_tag="699d98642c564d2e855e9661899b7252",
- enabled=True,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- certificate = response.parse()
- assert_matches_type(CertificateEditResponse, certificate, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- def test_path_params_edit(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_tag` but received ''"):
- client.zero_trust.devices.policies.default.certificates.with_raw_response.edit(
- zone_tag="",
- enabled=True,
- )
-
- @parametrize
- def test_method_get(self, client: Cloudflare) -> None:
- certificate = client.zero_trust.devices.policies.default.certificates.get(
- "699d98642c564d2e855e9661899b7252",
- )
- assert_matches_type(CertificateGetResponse, certificate, path=["response"])
-
- @parametrize
- def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.zero_trust.devices.policies.default.certificates.with_raw_response.get(
- "699d98642c564d2e855e9661899b7252",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- certificate = response.parse()
- assert_matches_type(CertificateGetResponse, certificate, path=["response"])
-
- @parametrize
- def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.zero_trust.devices.policies.default.certificates.with_streaming_response.get(
- "699d98642c564d2e855e9661899b7252",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- certificate = response.parse()
- assert_matches_type(CertificateGetResponse, certificate, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- def test_path_params_get(self, client: Cloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_tag` but received ''"):
- client.zero_trust.devices.policies.default.certificates.with_raw_response.get(
- "",
- )
-
-
-class TestAsyncCertificates:
- parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @parametrize
- async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
- certificate = await async_client.zero_trust.devices.policies.default.certificates.edit(
- zone_tag="699d98642c564d2e855e9661899b7252",
- enabled=True,
- )
- assert_matches_type(CertificateEditResponse, certificate, path=["response"])
-
- @parametrize
- async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.zero_trust.devices.policies.default.certificates.with_raw_response.edit(
- zone_tag="699d98642c564d2e855e9661899b7252",
- enabled=True,
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- certificate = await response.parse()
- assert_matches_type(CertificateEditResponse, certificate, path=["response"])
-
- @parametrize
- async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
- async with async_client.zero_trust.devices.policies.default.certificates.with_streaming_response.edit(
- zone_tag="699d98642c564d2e855e9661899b7252",
- enabled=True,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- certificate = await response.parse()
- assert_matches_type(CertificateEditResponse, certificate, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_tag` but received ''"):
- await async_client.zero_trust.devices.policies.default.certificates.with_raw_response.edit(
- zone_tag="",
- enabled=True,
- )
-
- @parametrize
- async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- certificate = await async_client.zero_trust.devices.policies.default.certificates.get(
- "699d98642c564d2e855e9661899b7252",
- )
- assert_matches_type(CertificateGetResponse, certificate, path=["response"])
-
- @parametrize
- async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.zero_trust.devices.policies.default.certificates.with_raw_response.get(
- "699d98642c564d2e855e9661899b7252",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- certificate = await response.parse()
- assert_matches_type(CertificateGetResponse, certificate, path=["response"])
-
- @parametrize
- async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.zero_trust.devices.policies.default.certificates.with_streaming_response.get(
- "699d98642c564d2e855e9661899b7252",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- certificate = await response.parse()
- assert_matches_type(CertificateGetResponse, certificate, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_tag` but received ''"):
- await async_client.zero_trust.devices.policies.default.certificates.with_raw_response.get(
- "",
- )