diff --git a/api.md b/api.md
index 08554fe1e9f7..3c42613e5e4d 100644
--- a/api.md
+++ b/api.md
@@ -1456,7 +1456,6 @@ Types:
```python
from cloudflare.types import (
CustomHostname,
- CustomMetadata,
UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1,
UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510,
UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1,
@@ -1673,16 +1672,16 @@ Methods:
Types:
```python
-from cloudflare.types.email_routing import Action, EmailRule, Matcher
+from cloudflare.types.email_routing import Action, EmailRoutingRule, Matcher
```
Methods:
-- client.email_routing.rules.create(zone_identifier, \*\*params) -> EmailRule
-- client.email_routing.rules.update(rule_identifier, \*, zone_identifier, \*\*params) -> EmailRule
-- client.email_routing.rules.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[EmailRule]
-- client.email_routing.rules.delete(rule_identifier, \*, zone_identifier) -> EmailRule
-- client.email_routing.rules.get(rule_identifier, \*, zone_identifier) -> EmailRule
+- client.email_routing.rules.create(zone_identifier, \*\*params) -> EmailRoutingRule
+- client.email_routing.rules.update(rule_identifier, \*, zone_identifier, \*\*params) -> EmailRoutingRule
+- client.email_routing.rules.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[EmailRoutingRule]
+- client.email_routing.rules.delete(rule_identifier, \*, zone_identifier) -> EmailRoutingRule
+- client.email_routing.rules.get(rule_identifier, \*, zone_identifier) -> EmailRoutingRule
### CatchAlls
diff --git a/src/cloudflare/resources/custom_hostnames/custom_hostnames.py b/src/cloudflare/resources/custom_hostnames/custom_hostnames.py
index 4f777142e292..2d94a983400a 100644
--- a/src/cloudflare/resources/custom_hostnames/custom_hostnames.py
+++ b/src/cloudflare/resources/custom_hostnames/custom_hostnames.py
@@ -9,7 +9,6 @@
from ...types import (
CustomHostname,
- CustomMetadataParam,
CustomHostnameDeleteResponse,
custom_hostname_edit_params,
custom_hostname_list_params,
@@ -66,7 +65,7 @@ def create(
zone_id: str,
hostname: str,
ssl: custom_hostname_create_params.SSL,
- custom_metadata: CustomMetadataParam | NotGiven = NOT_GIVEN,
+ custom_metadata: custom_hostname_create_params.CustomMetadata | 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,
@@ -244,7 +243,7 @@ def edit(
custom_hostname_id: str,
*,
zone_id: str,
- custom_metadata: CustomMetadataParam | NotGiven = NOT_GIVEN,
+ custom_metadata: custom_hostname_edit_params.CustomMetadata | NotGiven = NOT_GIVEN,
custom_origin_server: str | NotGiven = NOT_GIVEN,
custom_origin_sni: str | NotGiven = NOT_GIVEN,
ssl: custom_hostname_edit_params.SSL | NotGiven = NOT_GIVEN,
@@ -377,7 +376,7 @@ async def create(
zone_id: str,
hostname: str,
ssl: custom_hostname_create_params.SSL,
- custom_metadata: CustomMetadataParam | NotGiven = NOT_GIVEN,
+ custom_metadata: custom_hostname_create_params.CustomMetadata | 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,
@@ -555,7 +554,7 @@ async def edit(
custom_hostname_id: str,
*,
zone_id: str,
- custom_metadata: CustomMetadataParam | NotGiven = NOT_GIVEN,
+ custom_metadata: custom_hostname_edit_params.CustomMetadata | NotGiven = NOT_GIVEN,
custom_origin_server: str | NotGiven = NOT_GIVEN,
custom_origin_sni: str | NotGiven = NOT_GIVEN,
ssl: custom_hostname_edit_params.SSL | NotGiven = NOT_GIVEN,
diff --git a/src/cloudflare/resources/email_routing/rules/rules.py b/src/cloudflare/resources/email_routing/rules/rules.py
index f93d725b0ead..ab5a77d3f772 100644
--- a/src/cloudflare/resources/email_routing/rules/rules.py
+++ b/src/cloudflare/resources/email_routing/rules/rules.py
@@ -35,9 +35,9 @@
make_request_options,
)
from ....types.email_routing import (
- EmailRule,
ActionParam,
MatcherParam,
+ EmailRoutingRule,
rule_list_params,
rule_create_params,
rule_update_params,
@@ -74,7 +74,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EmailRule:
+ ) -> EmailRoutingRule:
"""
Rules consist of a set of criteria for matching emails (such as an email being
sent to a specific custom email address) plus a set of actions to take on the
@@ -122,7 +122,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[EmailRule], ResultWrapper[EmailRule]),
+ cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]),
)
def update(
@@ -141,7 +141,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EmailRule:
+ ) -> EmailRoutingRule:
"""
Update actions and matches, or enable/disable specific routing rules.
@@ -191,7 +191,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[EmailRule], ResultWrapper[EmailRule]),
+ cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]),
)
def list(
@@ -207,7 +207,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncV4PagePaginationArray[EmailRule]:
+ ) -> SyncV4PagePaginationArray[EmailRoutingRule]:
"""
Lists existing routing rules.
@@ -232,7 +232,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
return self._get_api_list(
f"/zones/{zone_identifier}/email/routing/rules",
- page=SyncV4PagePaginationArray[EmailRule],
+ page=SyncV4PagePaginationArray[EmailRoutingRule],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -247,7 +247,7 @@ def list(
rule_list_params.RuleListParams,
),
),
- model=EmailRule,
+ model=EmailRoutingRule,
)
def delete(
@@ -261,7 +261,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EmailRule:
+ ) -> EmailRoutingRule:
"""
Delete a specific routing rule.
@@ -291,7 +291,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[EmailRule], ResultWrapper[EmailRule]),
+ cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]),
)
def get(
@@ -305,7 +305,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EmailRule:
+ ) -> EmailRoutingRule:
"""
Get information for a specific routing rule already created.
@@ -335,7 +335,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[EmailRule], ResultWrapper[EmailRule]),
+ cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]),
)
@@ -367,7 +367,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EmailRule:
+ ) -> EmailRoutingRule:
"""
Rules consist of a set of criteria for matching emails (such as an email being
sent to a specific custom email address) plus a set of actions to take on the
@@ -415,7 +415,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[EmailRule], ResultWrapper[EmailRule]),
+ cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]),
)
async def update(
@@ -434,7 +434,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EmailRule:
+ ) -> EmailRoutingRule:
"""
Update actions and matches, or enable/disable specific routing rules.
@@ -484,7 +484,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[EmailRule], ResultWrapper[EmailRule]),
+ cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]),
)
def list(
@@ -500,7 +500,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[EmailRule, AsyncV4PagePaginationArray[EmailRule]]:
+ ) -> AsyncPaginator[EmailRoutingRule, AsyncV4PagePaginationArray[EmailRoutingRule]]:
"""
Lists existing routing rules.
@@ -525,7 +525,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
return self._get_api_list(
f"/zones/{zone_identifier}/email/routing/rules",
- page=AsyncV4PagePaginationArray[EmailRule],
+ page=AsyncV4PagePaginationArray[EmailRoutingRule],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -540,7 +540,7 @@ def list(
rule_list_params.RuleListParams,
),
),
- model=EmailRule,
+ model=EmailRoutingRule,
)
async def delete(
@@ -554,7 +554,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EmailRule:
+ ) -> EmailRoutingRule:
"""
Delete a specific routing rule.
@@ -584,7 +584,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[EmailRule], ResultWrapper[EmailRule]),
+ cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]),
)
async def get(
@@ -598,7 +598,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EmailRule:
+ ) -> EmailRoutingRule:
"""
Get information for a specific routing rule already created.
@@ -628,7 +628,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[EmailRule], ResultWrapper[EmailRule]),
+ cast_to=cast(Type[EmailRoutingRule], ResultWrapper[EmailRoutingRule]),
)
diff --git a/src/cloudflare/types/__init__.py b/src/cloudflare/types/__init__.py
index 59b8aa31094d..fd5dc24b9ccc 100644
--- a/src/cloudflare/types/__init__.py
+++ b/src/cloudflare/types/__init__.py
@@ -157,7 +157,6 @@
from .account_update_params import AccountUpdateParams as AccountUpdateParams
from .audit_log_list_params import AuditLogListParams as AuditLogListParams
from .calls_app_with_secret import CallsAppWithSecret as CallsAppWithSecret
-from .custom_metadata_param import CustomMetadataParam as CustomMetadataParam
from .origin_ca_certificate import OriginCACertificate as OriginCACertificate
from .origin_steering_param import OriginSteeringParam as OriginSteeringParam
from .queue_create_response import QueueCreateResponse as QueueCreateResponse
diff --git a/src/cloudflare/types/custom_hostname.py b/src/cloudflare/types/custom_hostname.py
index 64815518ec23..1b8f4d4d1a78 100644
--- a/src/cloudflare/types/custom_hostname.py
+++ b/src/cloudflare/types/custom_hostname.py
@@ -5,13 +5,13 @@
from typing_extensions import Literal
from .._models import BaseModel
-from .custom_metadata import CustomMetadata
from .unnamed_schema_ref_9a9935a9a770967bb604ae41a81e42e1 import UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1
from .unnamed_schema_ref_16aca57bde2963201c7e6e895436c1c1 import UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1
from .unnamed_schema_ref_78adb375f06c6d462dd92b99e2ecf510 import UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510
__all__ = [
"CustomHostname",
+ "CustomMetadata",
"OwnershipVerification",
"OwnershipVerificationHTTP",
"SSL",
@@ -21,6 +21,11 @@
]
+class CustomMetadata(BaseModel):
+ key: Optional[str] = None
+ """Unique metadata for this hostname."""
+
+
class OwnershipVerification(BaseModel):
name: Optional[str] = None
"""DNS Name for record."""
diff --git a/src/cloudflare/types/custom_hostname_create_params.py b/src/cloudflare/types/custom_hostname_create_params.py
index 105a0023c7c9..d6d0b3851734 100644
--- a/src/cloudflare/types/custom_hostname_create_params.py
+++ b/src/cloudflare/types/custom_hostname_create_params.py
@@ -5,12 +5,11 @@
from typing import List
from typing_extensions import Literal, Required, TypedDict
-from .custom_metadata_param import CustomMetadataParam
from .unnamed_schema_ref_9a9935a9a770967bb604ae41a81e42e1 import UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1
from .unnamed_schema_ref_16aca57bde2963201c7e6e895436c1c1 import UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1
from .unnamed_schema_ref_78adb375f06c6d462dd92b99e2ecf510 import UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510
-__all__ = ["CustomHostnameCreateParams", "SSL", "SSLSettings"]
+__all__ = ["CustomHostnameCreateParams", "SSL", "SSLSettings", "CustomMetadata"]
class CustomHostnameCreateParams(TypedDict, total=False):
@@ -23,7 +22,7 @@ class CustomHostnameCreateParams(TypedDict, total=False):
ssl: Required[SSL]
"""SSL properties used when creating the custom hostname."""
- custom_metadata: CustomMetadataParam
+ custom_metadata: CustomMetadata
"""These are per-hostname (customer) settings."""
@@ -79,3 +78,8 @@ class SSL(TypedDict, total=False):
wildcard: bool
"""Indicates whether the certificate covers a wildcard."""
+
+
+class CustomMetadata(TypedDict, total=False):
+ key: str
+ """Unique metadata for this hostname."""
diff --git a/src/cloudflare/types/custom_hostname_edit_params.py b/src/cloudflare/types/custom_hostname_edit_params.py
index 141459f8b09a..660b91453e43 100644
--- a/src/cloudflare/types/custom_hostname_edit_params.py
+++ b/src/cloudflare/types/custom_hostname_edit_params.py
@@ -5,19 +5,18 @@
from typing import List
from typing_extensions import Literal, Required, TypedDict
-from .custom_metadata_param import CustomMetadataParam
from .unnamed_schema_ref_9a9935a9a770967bb604ae41a81e42e1 import UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1
from .unnamed_schema_ref_16aca57bde2963201c7e6e895436c1c1 import UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1
from .unnamed_schema_ref_78adb375f06c6d462dd92b99e2ecf510 import UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510
-__all__ = ["CustomHostnameEditParams", "SSL", "SSLSettings"]
+__all__ = ["CustomHostnameEditParams", "CustomMetadata", "SSL", "SSLSettings"]
class CustomHostnameEditParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""
- custom_metadata: CustomMetadataParam
+ custom_metadata: CustomMetadata
"""These are per-hostname (customer) settings."""
custom_origin_server: str
@@ -39,6 +38,11 @@ class CustomHostnameEditParams(TypedDict, total=False):
"""SSL properties used when creating the custom hostname."""
+class CustomMetadata(TypedDict, total=False):
+ key: str
+ """Unique metadata for this hostname."""
+
+
class SSLSettings(TypedDict, total=False):
ciphers: List[str]
"""An allowlist of ciphers for TLS termination.
diff --git a/src/cloudflare/types/custom_metadata_param.py b/src/cloudflare/types/custom_metadata_param.py
deleted file mode 100644
index 303947835c79..000000000000
--- a/src/cloudflare/types/custom_metadata_param.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import TypedDict
-
-__all__ = ["CustomMetadataParam"]
-
-
-class CustomMetadataParam(TypedDict, total=False):
- key: str
- """Unique metadata for this hostname."""
diff --git a/src/cloudflare/types/email_routing/__init__.py b/src/cloudflare/types/email_routing/__init__.py
index 54f454abe15f..4fcda1b273a4 100644
--- a/src/cloudflare/types/email_routing/__init__.py
+++ b/src/cloudflare/types/email_routing/__init__.py
@@ -6,12 +6,11 @@
from .address import Address as Address
from .matcher import Matcher as Matcher
from .dns_record import DNSRecord as DNSRecord
-from .email_rule import EmailRule as EmailRule
from .action_param import ActionParam as ActionParam
from .matcher_param import MatcherParam as MatcherParam
from .dns_get_response import DNSGetResponse as DNSGetResponse
-from .email_rule_param import EmailRuleParam as EmailRuleParam
from .rule_list_params import RuleListParams as RuleListParams
+from .email_routing_rule import EmailRoutingRule as EmailRoutingRule
from .rule_create_params import RuleCreateParams as RuleCreateParams
from .rule_update_params import RuleUpdateParams as RuleUpdateParams
from .address_list_params import AddressListParams as AddressListParams
diff --git a/src/cloudflare/types/email_routing/email_rule.py b/src/cloudflare/types/email_routing/email_routing_rule.py
similarity index 92%
rename from src/cloudflare/types/email_routing/email_rule.py
rename to src/cloudflare/types/email_routing/email_routing_rule.py
index 035434aea1f4..1e90e61213f2 100644
--- a/src/cloudflare/types/email_routing/email_rule.py
+++ b/src/cloudflare/types/email_routing/email_routing_rule.py
@@ -7,10 +7,10 @@
from .matcher import Matcher
from ..._models import BaseModel
-__all__ = ["EmailRule"]
+__all__ = ["EmailRoutingRule"]
-class EmailRule(BaseModel):
+class EmailRoutingRule(BaseModel):
id: Optional[str] = None
"""Routing rule identifier."""
diff --git a/src/cloudflare/types/email_routing/email_rule_param.py b/src/cloudflare/types/email_routing/email_rule_param.py
deleted file mode 100644
index 605c1b2f6312..000000000000
--- a/src/cloudflare/types/email_routing/email_rule_param.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Iterable
-from typing_extensions import Literal, TypedDict
-
-from .action_param import ActionParam
-from .matcher_param import MatcherParam
-
-__all__ = ["EmailRuleParam"]
-
-
-class EmailRuleParam(TypedDict, total=False):
- actions: Iterable[ActionParam]
- """List actions patterns."""
-
- enabled: Literal[True, False]
- """Routing rule status."""
-
- matchers: Iterable[MatcherParam]
- """Matching patterns to forward to your actions."""
-
- name: str
- """Routing rule name."""
-
- priority: float
- """Priority of the routing rule."""
diff --git a/tests/api_resources/email_routing/test_rules.py b/tests/api_resources/email_routing/test_rules.py
index c18ee28f0327..f38bc2e6c60b 100644
--- a/tests/api_resources/email_routing/test_rules.py
+++ b/tests/api_resources/email_routing/test_rules.py
@@ -10,7 +10,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
-from cloudflare.types.email_routing import EmailRule
+from cloudflare.types.email_routing import EmailRoutingRule
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -67,7 +67,7 @@ def test_method_create(self, client: Cloudflare) -> None:
},
],
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -121,7 +121,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
name="Send to user@example.net rule.",
priority=0,
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -176,7 +176,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -231,7 +231,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -336,7 +336,7 @@ def test_method_update(self, client: Cloudflare) -> None:
},
],
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -391,7 +391,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
name="Send to user@example.net rule.",
priority=0,
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -447,7 +447,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -503,7 +503,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -614,7 +614,7 @@ def test_method_list(self, client: Cloudflare) -> None:
rule = client.email_routing.rules.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncV4PagePaginationArray[EmailRule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -625,7 +625,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
page=1,
per_page=5,
)
- assert_matches_type(SyncV4PagePaginationArray[EmailRule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -637,7 +637,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncV4PagePaginationArray[EmailRule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -649,7 +649,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncV4PagePaginationArray[EmailRule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -668,7 +668,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -681,7 +681,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -694,7 +694,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -720,7 +720,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -733,7 +733,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -746,7 +746,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -818,7 +818,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
},
],
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -872,7 +872,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
name="Send to user@example.net rule.",
priority=0,
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -927,7 +927,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -982,7 +982,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1087,7 +1087,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
},
],
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1142,7 +1142,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
name="Send to user@example.net rule.",
priority=0,
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1198,7 +1198,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1254,7 +1254,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1365,7 +1365,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
rule = await async_client.email_routing.rules.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncV4PagePaginationArray[EmailRule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1376,7 +1376,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
page=1,
per_page=5,
)
- assert_matches_type(AsyncV4PagePaginationArray[EmailRule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1388,7 +1388,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncV4PagePaginationArray[EmailRule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1400,7 +1400,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncV4PagePaginationArray[EmailRule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1419,7 +1419,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1432,7 +1432,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1445,7 +1445,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1471,7 +1471,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1484,7 +1484,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1497,7 +1497,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(EmailRule, rule, path=["response"])
+ assert_matches_type(EmailRoutingRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True