From 1b0618852846e3def179cd3f632c0cd730e07b15 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 10:09:22 +0000 Subject: [PATCH] feat(api): api update --- .stats.yml | 4 +- api.md | 18 +- src/cloudflare/_client.py | 38 -- src/cloudflare/resources/abuse_reports.py | 492 ------------------ .../addressing/address_maps/accounts.py | 16 +- .../addressing/address_maps/address_maps.py | 32 +- .../resources/addressing/address_maps/ips.py | 16 +- .../addressing/address_maps/zones.py | 24 +- .../resources/addressing/loa_documents.py | 8 +- .../prefixes/advertisement_status.py | 42 +- .../addressing/prefixes/bgp_prefixes.py | 40 +- .../addressing/prefixes/delegations.py | 28 +- .../resources/addressing/prefixes/prefixes.py | 32 +- .../addressing/prefixes/service_bindings.py | 46 +- .../resources/addressing/services.py | 4 +- .../origin_post_quantum_encryption.py | 127 ----- .../resources/zero_trust/organizations/doh.py | 12 +- .../types/abuse_reports/__init__.py | 3 - .../abuse_report_create_params.py | 140 ----- .../abuse_report_create_response.py | 7 - .../types/addressing/address_map.py | 2 +- .../addressing/address_map_create_params.py | 2 +- .../addressing/address_map_create_response.py | 2 +- .../addressing/address_map_edit_params.py | 2 +- .../addressing/address_map_get_response.py | 2 +- .../address_maps/account_update_params.py | 2 +- .../address_maps/ip_update_params.py | 4 +- .../address_maps/zone_update_params.py | 4 +- .../addressing/loa_document_create_params.py | 2 +- .../loa_document_create_response.py | 2 +- src/cloudflare/types/addressing/prefix.py | 4 +- .../types/addressing/prefix_create_params.py | 2 +- .../types/addressing/prefix_edit_params.py | 2 +- .../advertisement_status_edit_params.py | 8 +- .../advertisement_status_edit_response.py | 6 +- .../advertisement_status_get_response.py | 6 +- .../types/addressing/prefixes/bgp_prefix.py | 2 +- .../prefixes/bgp_prefix_create_params.py | 2 +- .../prefixes/bgp_prefix_edit_params.py | 4 +- .../prefixes/delegation_create_params.py | 2 +- .../prefixes/delegation_delete_response.py | 2 +- .../types/addressing/prefixes/delegations.py | 4 +- .../addressing/prefixes/service_binding.py | 7 +- .../prefixes/service_binding_create_params.py | 7 +- .../types/addressing/service_list_response.py | 5 +- src/cloudflare/types/dns/cname_record.py | 2 +- .../types/dns/cname_record_param.py | 2 +- .../types/dns/record_create_params.py | 2 +- .../types/dns/record_edit_params.py | 2 +- .../types/dns/record_update_params.py | 2 +- .../__init__.py | 6 - ...gin_post_quantum_encryption_edit_params.py | 15 - ...n_post_quantum_encryption_edit_response.py | 23 - src/cloudflare/types/workers/script.py | 22 +- .../types/workers/script_update_response.py | 22 +- .../namespaces/script_update_response.py | 22 +- .../organizations/doh_get_response.py | 16 +- .../organizations/doh_update_params.py | 2 +- .../organizations/doh_update_response.py | 16 +- .../addressing/address_maps/test_accounts.py | 64 +-- .../addressing/address_maps/test_ips.py | 80 +-- .../addressing/address_maps/test_zones.py | 120 ++--- .../prefixes/test_advertisement_status.py | 64 +-- .../addressing/prefixes/test_bgp_prefixes.py | 204 ++++---- .../addressing/prefixes/test_delegations.py | 104 ++-- .../prefixes/test_service_bindings.py | 192 +++---- .../addressing/test_address_maps.py | 132 ++--- .../addressing/test_loa_documents.py | 40 +- .../api_resources/addressing/test_prefixes.py | 120 ++--- .../api_resources/addressing/test_services.py | 12 +- tests/api_resources/test_abuse_reports.py | 243 --------- .../test_origin_post_quantum_encryption.py | 109 +--- .../zero_trust/organizations/test_doh.py | 4 +- 73 files changed, 812 insertions(+), 2046 deletions(-) delete mode 100644 src/cloudflare/resources/abuse_reports.py delete mode 100644 src/cloudflare/types/abuse_reports/abuse_report_create_params.py delete mode 100644 src/cloudflare/types/abuse_reports/abuse_report_create_response.py delete mode 100644 src/cloudflare/types/origin_post_quantum_encryption/origin_post_quantum_encryption_edit_params.py delete mode 100644 src/cloudflare/types/origin_post_quantum_encryption/origin_post_quantum_encryption_edit_response.py delete mode 100644 tests/api_resources/test_abuse_reports.py diff --git a/.stats.yml b/.stats.yml index 16a424f6b23..0f9aa7a8de3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1490 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-403275b7baabda647cf36b6e08211b6ea4aa63c6b547124bbc0eb377330f623a.yml +configured_endpoints: 1488 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-79dcf532de6a833b06fffc1a0e915a5eb7e0d5c06cff6b411595367d598ef1ec.yml diff --git a/api.md b/api.md index e37f2fa9403..321ffaf3733 100644 --- a/api.md +++ b/api.md @@ -7804,15 +7804,11 @@ Methods: Types: ```python -from cloudflare.types.origin_post_quantum_encryption import ( - OriginPostQuantumEncryptionEditResponse, - OriginPostQuantumEncryptionGetResponse, -) +from cloudflare.types.origin_post_quantum_encryption import OriginPostQuantumEncryptionGetResponse ``` Methods: -- client.origin_post_quantum_encryption.edit(\*, zone_id, \*\*params) -> Optional[OriginPostQuantumEncryptionEditResponse] - client.origin_post_quantum_encryption.get(\*, zone_id) -> Optional[OriginPostQuantumEncryptionGetResponse] # Speed @@ -8488,18 +8484,6 @@ Methods: - client.content_scanning.settings.get(\*, zone_id) -> SettingGetResponse -# AbuseReports - -Types: - -```python -from cloudflare.types.abuse_reports import AbuseReportCreateResponse -``` - -Methods: - -- client.abuse_reports.create(report_type, \*, account_id, \*\*params) -> str - # AI Types: diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py index f48b5ae2359..0a874fee17f 100644 --- a/src/cloudflare/_client.py +++ b/src/cloudflare/_client.py @@ -92,7 +92,6 @@ dns_firewall, healthchecks, security_txt, - abuse_reports, email_routing, magic_transit, waiting_rooms, @@ -151,7 +150,6 @@ from .resources.speed.speed import SpeedResource, AsyncSpeedResource from .resources.zones.zones import ZonesResource, AsyncZonesResource from .resources.security_txt import SecurityTXTResource, AsyncSecurityTXTResource - from .resources.abuse_reports import AbuseReportsResource, AsyncAbuseReportsResource from .resources.images.images import ImagesResource, AsyncImagesResource from .resources.queues.queues import QueuesResource, AsyncQueuesResource from .resources.stream.stream import StreamResource, AsyncStreamResource @@ -820,12 +818,6 @@ def content_scanning(self) -> ContentScanningResource: return ContentScanningResource(self) - @cached_property - def abuse_reports(self) -> AbuseReportsResource: - from .resources.abuse_reports import AbuseReportsResource - - return AbuseReportsResource(self) - @cached_property def ai(self) -> AIResource: from .resources.ai import AIResource @@ -1591,12 +1583,6 @@ def content_scanning(self) -> AsyncContentScanningResource: return AsyncContentScanningResource(self) - @cached_property - def abuse_reports(self) -> AsyncAbuseReportsResource: - from .resources.abuse_reports import AsyncAbuseReportsResource - - return AsyncAbuseReportsResource(self) - @cached_property def ai(self) -> AsyncAIResource: from .resources.ai import AsyncAIResource @@ -2297,12 +2283,6 @@ def content_scanning(self) -> content_scanning.ContentScanningResourceWithRawRes return ContentScanningResourceWithRawResponse(self._client.content_scanning) - @cached_property - def abuse_reports(self) -> abuse_reports.AbuseReportsResourceWithRawResponse: - from .resources.abuse_reports import AbuseReportsResourceWithRawResponse - - return AbuseReportsResourceWithRawResponse(self._client.abuse_reports) - @cached_property def ai(self) -> ai.AIResourceWithRawResponse: from .resources.ai import AIResourceWithRawResponse @@ -2822,12 +2802,6 @@ def content_scanning(self) -> content_scanning.AsyncContentScanningResourceWithR return AsyncContentScanningResourceWithRawResponse(self._client.content_scanning) - @cached_property - def abuse_reports(self) -> abuse_reports.AsyncAbuseReportsResourceWithRawResponse: - from .resources.abuse_reports import AsyncAbuseReportsResourceWithRawResponse - - return AsyncAbuseReportsResourceWithRawResponse(self._client.abuse_reports) - @cached_property def ai(self) -> ai.AsyncAIResourceWithRawResponse: from .resources.ai import AsyncAIResourceWithRawResponse @@ -3347,12 +3321,6 @@ def content_scanning(self) -> content_scanning.ContentScanningResourceWithStream return ContentScanningResourceWithStreamingResponse(self._client.content_scanning) - @cached_property - def abuse_reports(self) -> abuse_reports.AbuseReportsResourceWithStreamingResponse: - from .resources.abuse_reports import AbuseReportsResourceWithStreamingResponse - - return AbuseReportsResourceWithStreamingResponse(self._client.abuse_reports) - @cached_property def ai(self) -> ai.AIResourceWithStreamingResponse: from .resources.ai import AIResourceWithStreamingResponse @@ -3882,12 +3850,6 @@ def content_scanning(self) -> content_scanning.AsyncContentScanningResourceWithS return AsyncContentScanningResourceWithStreamingResponse(self._client.content_scanning) - @cached_property - def abuse_reports(self) -> abuse_reports.AsyncAbuseReportsResourceWithStreamingResponse: - from .resources.abuse_reports import AsyncAbuseReportsResourceWithStreamingResponse - - return AsyncAbuseReportsResourceWithStreamingResponse(self._client.abuse_reports) - @cached_property def ai(self) -> ai.AsyncAIResourceWithStreamingResponse: from .resources.ai import AsyncAIResourceWithStreamingResponse diff --git a/src/cloudflare/resources/abuse_reports.py b/src/cloudflare/resources/abuse_reports.py deleted file mode 100644 index 45241233b4a..00000000000 --- a/src/cloudflare/resources/abuse_reports.py +++ /dev/null @@ -1,492 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, cast -from typing_extensions import Literal - -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.abuse_reports import abuse_report_create_params -from ..types.abuse_reports.abuse_report_create_response import AbuseReportCreateResponse - -__all__ = ["AbuseReportsResource", "AsyncAbuseReportsResource"] - - -class AbuseReportsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> AbuseReportsResourceWithRawResponse: - """ - 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 AbuseReportsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AbuseReportsResourceWithStreamingResponse: - """ - 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 AbuseReportsResourceWithStreamingResponse(self) - - def create( - self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], - *, - account_id: str, - act: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], - email: str, - email2: str, - host_notification: Literal["send", "send-anon", "none"], - ncmec_notification: Literal["send", "send-anon", "none"], - owner_notification: Literal["send", "send-anon", "none"], - urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, - comments: str | NotGiven = NOT_GIVEN, - company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, - tele: str | NotGiven = NOT_GIVEN, - title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: str | 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> str: - """ - Submit the Abuse Report of a particular type - - Args: - report_type: The abuse report type - - act: The abuse report type - - email: A valid email of the abuse reporter - - email2: Should match the value provided in `email` - - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique - - address1: Text not exceeding 100 characters - - agent_name: The name of the copyright holder. Text not exceeding 60 characters. - - agree: Can be 0 or 1 - - city: Text not exceeding 255 characters - - comments: Any additional comments about the infringement not exceeding 2000 characters - - company: Text not exceeding 100 characters - - country: Text not exceeding 255 characters - - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - name: Text not exceeding 255 characters - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report - - original_work: Text not exceeding 255 characters - - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters - - tele: Text not exceeding 20 characters - - title: Text not exceeding 255 characters - - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - - 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 account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not report_type: - raise ValueError(f"Expected a non-empty value for `report_type` but received {report_type!r}") - return self._post( - f"/accounts/{account_id}/v1/abuse-reports/{report_type}", - body=maybe_transform( - { - "act": act, - "email": email, - "email2": email2, - "host_notification": host_notification, - "ncmec_notification": ncmec_notification, - "owner_notification": owner_notification, - "urls": urls, - "address1": address1, - "agent_name": agent_name, - "agree": agree, - "city": city, - "comments": comments, - "company": company, - "country": country, - "destination_ips": destination_ips, - "justification": justification, - "name": name, - "ncsei_subject_representation": ncsei_subject_representation, - "original_work": original_work, - "ports_protocols": ports_protocols, - "signature": signature, - "source_ips": source_ips, - "state": state, - "tele": tele, - "title": title, - "trademark_number": trademark_number, - "trademark_office": trademark_office, - "trademark_symbol": trademark_symbol, - }, - abuse_report_create_params.AbuseReportCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[AbuseReportCreateResponse]._unwrapper, - ), - cast_to=cast(Type[str], ResultWrapper[str]), - ) - - -class AsyncAbuseReportsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncAbuseReportsResourceWithRawResponse: - """ - 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 AsyncAbuseReportsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncAbuseReportsResourceWithStreamingResponse: - """ - 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 AsyncAbuseReportsResourceWithStreamingResponse(self) - - async def create( - self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], - *, - account_id: str, - act: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], - email: str, - email2: str, - host_notification: Literal["send", "send-anon", "none"], - ncmec_notification: Literal["send", "send-anon", "none"], - owner_notification: Literal["send", "send-anon", "none"], - urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, - comments: str | NotGiven = NOT_GIVEN, - company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, - tele: str | NotGiven = NOT_GIVEN, - title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: str | 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> str: - """ - Submit the Abuse Report of a particular type - - Args: - report_type: The abuse report type - - act: The abuse report type - - email: A valid email of the abuse reporter - - email2: Should match the value provided in `email` - - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique - - address1: Text not exceeding 100 characters - - agent_name: The name of the copyright holder. Text not exceeding 60 characters. - - agree: Can be 0 or 1 - - city: Text not exceeding 255 characters - - comments: Any additional comments about the infringement not exceeding 2000 characters - - company: Text not exceeding 100 characters - - country: Text not exceeding 255 characters - - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - name: Text not exceeding 255 characters - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report - - original_work: Text not exceeding 255 characters - - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters - - tele: Text not exceeding 20 characters - - title: Text not exceeding 255 characters - - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - - 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 account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not report_type: - raise ValueError(f"Expected a non-empty value for `report_type` but received {report_type!r}") - return await self._post( - f"/accounts/{account_id}/v1/abuse-reports/{report_type}", - body=await async_maybe_transform( - { - "act": act, - "email": email, - "email2": email2, - "host_notification": host_notification, - "ncmec_notification": ncmec_notification, - "owner_notification": owner_notification, - "urls": urls, - "address1": address1, - "agent_name": agent_name, - "agree": agree, - "city": city, - "comments": comments, - "company": company, - "country": country, - "destination_ips": destination_ips, - "justification": justification, - "name": name, - "ncsei_subject_representation": ncsei_subject_representation, - "original_work": original_work, - "ports_protocols": ports_protocols, - "signature": signature, - "source_ips": source_ips, - "state": state, - "tele": tele, - "title": title, - "trademark_number": trademark_number, - "trademark_office": trademark_office, - "trademark_symbol": trademark_symbol, - }, - abuse_report_create_params.AbuseReportCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[AbuseReportCreateResponse]._unwrapper, - ), - cast_to=cast(Type[str], ResultWrapper[str]), - ) - - -class AbuseReportsResourceWithRawResponse: - def __init__(self, abuse_reports: AbuseReportsResource) -> None: - self._abuse_reports = abuse_reports - - self.create = to_raw_response_wrapper( - abuse_reports.create, - ) - - -class AsyncAbuseReportsResourceWithRawResponse: - def __init__(self, abuse_reports: AsyncAbuseReportsResource) -> None: - self._abuse_reports = abuse_reports - - self.create = async_to_raw_response_wrapper( - abuse_reports.create, - ) - - -class AbuseReportsResourceWithStreamingResponse: - def __init__(self, abuse_reports: AbuseReportsResource) -> None: - self._abuse_reports = abuse_reports - - self.create = to_streamed_response_wrapper( - abuse_reports.create, - ) - - -class AsyncAbuseReportsResourceWithStreamingResponse: - def __init__(self, abuse_reports: AsyncAbuseReportsResource) -> None: - self._abuse_reports = abuse_reports - - self.create = async_to_streamed_response_wrapper( - abuse_reports.create, - ) diff --git a/src/cloudflare/resources/addressing/address_maps/accounts.py b/src/cloudflare/resources/addressing/address_maps/accounts.py index 38533ca9ce1..a5279ff240c 100644 --- a/src/cloudflare/resources/addressing/address_maps/accounts.py +++ b/src/cloudflare/resources/addressing/address_maps/accounts.py @@ -62,9 +62,9 @@ def update( Add an account as a member of a particular address map. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers @@ -103,9 +103,9 @@ def delete( Remove an account as a member of a particular address map. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers @@ -165,9 +165,9 @@ async def update( Add an account as a member of a particular address map. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers @@ -206,9 +206,9 @@ async def delete( Remove an account as a member of a particular address map. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers diff --git a/src/cloudflare/resources/addressing/address_maps/address_maps.py b/src/cloudflare/resources/addressing/address_maps/address_maps.py index 34106c3241e..b3a6fda77c9 100644 --- a/src/cloudflare/resources/addressing/address_maps/address_maps.py +++ b/src/cloudflare/resources/addressing/address_maps/address_maps.py @@ -106,7 +106,7 @@ def create( Create a new address map under the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. description: An optional description field which may be used to describe the types of IPs or zones on the map. @@ -163,7 +163,7 @@ def list( List all address maps owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. extra_headers: Send extra headers @@ -202,9 +202,9 @@ def delete( disabled before it can be deleted. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers @@ -245,9 +245,9 @@ def edit( Modify properties of an address map owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. default_sni: If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS @@ -309,9 +309,9 @@ def get( Show a particular address map owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers @@ -389,7 +389,7 @@ async def create( Create a new address map under the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. description: An optional description field which may be used to describe the types of IPs or zones on the map. @@ -446,7 +446,7 @@ def list( List all address maps owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. extra_headers: Send extra headers @@ -485,9 +485,9 @@ async def delete( disabled before it can be deleted. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers @@ -528,9 +528,9 @@ async def edit( Modify properties of an address map owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. default_sni: If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS @@ -592,9 +592,9 @@ async def get( Show a particular address map owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers diff --git a/src/cloudflare/resources/addressing/address_maps/ips.py b/src/cloudflare/resources/addressing/address_maps/ips.py index 77e0d36e133..15c999ab654 100644 --- a/src/cloudflare/resources/addressing/address_maps/ips.py +++ b/src/cloudflare/resources/addressing/address_maps/ips.py @@ -63,9 +63,9 @@ def update( Add an IP from a prefix owned by the account to a particular address map. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. ip_address: An IPv4 or IPv6 address. @@ -109,9 +109,9 @@ def delete( Remove an IP from a particular address map. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. ip_address: An IPv4 or IPv6 address. @@ -176,9 +176,9 @@ async def update( Add an IP from a prefix owned by the account to a particular address map. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. ip_address: An IPv4 or IPv6 address. @@ -222,9 +222,9 @@ async def delete( Remove an IP from a particular address map. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. ip_address: An IPv4 or IPv6 address. diff --git a/src/cloudflare/resources/addressing/address_maps/zones.py b/src/cloudflare/resources/addressing/address_maps/zones.py index f2a68645e31..d7f859f2617 100644 --- a/src/cloudflare/resources/addressing/address_maps/zones.py +++ b/src/cloudflare/resources/addressing/address_maps/zones.py @@ -63,11 +63,11 @@ def update( Add a zone as a member of a particular address map. Args: - zone_id: Identifier + zone_id: Identifier of a zone. - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers @@ -109,11 +109,11 @@ def delete( Remove a zone as a member of a particular address map. Args: - zone_id: Identifier + zone_id: Identifier of a zone. - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers @@ -176,11 +176,11 @@ async def update( Add a zone as a member of a particular address map. Args: - zone_id: Identifier + zone_id: Identifier of a zone. - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers @@ -222,11 +222,11 @@ async def delete( Remove a zone as a member of a particular address map. Args: - zone_id: Identifier + zone_id: Identifier of a zone. - account_id: Identifier + account_id: Identifier of a Cloudflare account. - address_map_id: Identifier + address_map_id: Identifier of an Address Map. extra_headers: Send extra headers diff --git a/src/cloudflare/resources/addressing/loa_documents.py b/src/cloudflare/resources/addressing/loa_documents.py index 10fef943718..c4db454b8c2 100644 --- a/src/cloudflare/resources/addressing/loa_documents.py +++ b/src/cloudflare/resources/addressing/loa_documents.py @@ -71,7 +71,7 @@ def create( Submit LOA document (pdf format) under the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. loa_document: LOA document to upload. @@ -118,7 +118,7 @@ def get( Download specified LOA document under the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. loa_document_id: Identifier for the uploaded LOA document. @@ -180,7 +180,7 @@ async def create( Submit LOA document (pdf format) under the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. loa_document: LOA document to upload. @@ -229,7 +229,7 @@ async def get( Download specified LOA document under the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. loa_document_id: Identifier for the uploaded LOA document. diff --git a/src/cloudflare/resources/addressing/prefixes/advertisement_status.py b/src/cloudflare/resources/addressing/prefixes/advertisement_status.py index 4253a22570e..4ca0b677f15 100644 --- a/src/cloudflare/resources/addressing/prefixes/advertisement_status.py +++ b/src/cloudflare/resources/addressing/prefixes/advertisement_status.py @@ -62,14 +62,18 @@ def edit( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[AdvertisementStatusEditResponse]: """ - Advertise or withdraw BGP route for a prefix. + Advertise or withdraw the BGP route for a prefix. + + **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for + advertising and withdrawing subnets of an IP prefix. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - advertised: Enablement of prefix advertisement to the Internet. + advertised: Advertisement status of the prefix. If `true`, the BGP route for the prefix is + advertised to the Internet. If `false`, the BGP route is withdrawn. extra_headers: Send extra headers @@ -113,12 +117,15 @@ def get( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[AdvertisementStatusGetResponse]: """ - List the current advertisement state for a prefix. + View the current advertisement state for a prefix. + + **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for + advertising and withdrawing subnets of an IP prefix. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers @@ -179,14 +186,18 @@ async def edit( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[AdvertisementStatusEditResponse]: """ - Advertise or withdraw BGP route for a prefix. + Advertise or withdraw the BGP route for a prefix. + + **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for + advertising and withdrawing subnets of an IP prefix. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - advertised: Enablement of prefix advertisement to the Internet. + advertised: Advertisement status of the prefix. If `true`, the BGP route for the prefix is + advertised to the Internet. If `false`, the BGP route is withdrawn. extra_headers: Send extra headers @@ -230,12 +241,15 @@ async def get( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[AdvertisementStatusGetResponse]: """ - List the current advertisement state for a prefix. + View the current advertisement state for a prefix. + + **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for + advertising and withdrawing subnets of an IP prefix. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers diff --git a/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py b/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py index ecd6a70e261..3f65acd83ad 100644 --- a/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py +++ b/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py @@ -67,9 +67,9 @@ def create( advertised with the Update BGP Prefix API. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. cidr: IP Prefix in Classless Inter-Domain Routing format. @@ -118,9 +118,9 @@ def list( Prefixes. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers @@ -162,11 +162,11 @@ def edit( status (advertised or withdrawn). Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - bgp_prefix_id: Identifier + bgp_prefix_id: Identifier of BGP Prefix. extra_headers: Send extra headers @@ -212,11 +212,11 @@ def get( Retrieve a single BGP Prefix according to its identifier Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - bgp_prefix_id: Identifier + bgp_prefix_id: Identifier of BGP Prefix. extra_headers: Send extra headers @@ -284,9 +284,9 @@ async def create( advertised with the Update BGP Prefix API. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. cidr: IP Prefix in Classless Inter-Domain Routing format. @@ -335,9 +335,9 @@ def list( Prefixes. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers @@ -379,11 +379,11 @@ async def edit( status (advertised or withdrawn). Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - bgp_prefix_id: Identifier + bgp_prefix_id: Identifier of BGP Prefix. extra_headers: Send extra headers @@ -429,11 +429,11 @@ async def get( Retrieve a single BGP Prefix according to its identifier Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - bgp_prefix_id: Identifier + bgp_prefix_id: Identifier of BGP Prefix. extra_headers: Send extra headers diff --git a/src/cloudflare/resources/addressing/prefixes/delegations.py b/src/cloudflare/resources/addressing/prefixes/delegations.py index b35f31a2893..93870db9319 100644 --- a/src/cloudflare/resources/addressing/prefixes/delegations.py +++ b/src/cloudflare/resources/addressing/prefixes/delegations.py @@ -67,9 +67,9 @@ def create( Create a new account delegation for a given IP prefix. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. cidr: IP Prefix in Classless Inter-Domain Routing format. @@ -122,9 +122,9 @@ def list( List all delegations for a given account IP prefix. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers @@ -164,11 +164,11 @@ def delete( Delete an account delegation for a given IP prefix. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - delegation_id: Delegation identifier tag. + delegation_id: Identifier of a Delegation. extra_headers: Send extra headers @@ -235,9 +235,9 @@ async def create( Create a new account delegation for a given IP prefix. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. cidr: IP Prefix in Classless Inter-Domain Routing format. @@ -290,9 +290,9 @@ def list( List all delegations for a given account IP prefix. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers @@ -332,11 +332,11 @@ async def delete( Delete an account delegation for a given IP prefix. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - delegation_id: Delegation identifier tag. + delegation_id: Identifier of a Delegation. extra_headers: Send extra headers diff --git a/src/cloudflare/resources/addressing/prefixes/prefixes.py b/src/cloudflare/resources/addressing/prefixes/prefixes.py index 09dacaeaf11..b9620460953 100644 --- a/src/cloudflare/resources/addressing/prefixes/prefixes.py +++ b/src/cloudflare/resources/addressing/prefixes/prefixes.py @@ -115,7 +115,7 @@ def create( Add a new prefix under the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. asn: Autonomous System Number (ASN) the prefix will be advertised under. @@ -168,7 +168,7 @@ def list( List all prefixes owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. extra_headers: Send extra headers @@ -205,9 +205,9 @@ def delete( Delete an unapproved prefix owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers @@ -246,9 +246,9 @@ def edit( Modify the description for a prefix owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. description: Description of the prefix. @@ -293,9 +293,9 @@ def get( List a particular prefix owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers @@ -376,7 +376,7 @@ async def create( Add a new prefix under the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. asn: Autonomous System Number (ASN) the prefix will be advertised under. @@ -429,7 +429,7 @@ def list( List all prefixes owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. extra_headers: Send extra headers @@ -466,9 +466,9 @@ async def delete( Delete an unapproved prefix owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers @@ -507,9 +507,9 @@ async def edit( Modify the description for a prefix owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. description: Description of the prefix. @@ -554,9 +554,9 @@ async def get( List a particular prefix owned by the account. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers diff --git a/src/cloudflare/resources/addressing/prefixes/service_bindings.py b/src/cloudflare/resources/addressing/prefixes/service_bindings.py index 2757851a716..c5be5b730ca 100644 --- a/src/cloudflare/resources/addressing/prefixes/service_bindings.py +++ b/src/cloudflare/resources/addressing/prefixes/service_bindings.py @@ -70,13 +70,14 @@ def create( allows creating service bindings for the Cloudflare CDN or Cloudflare Spectrum. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. cidr: IP Prefix in Classless Inter-Domain Routing format. - service_id: Identifier + service_id: Identifier of a Service on the Cloudflare network. Available services and their + IDs may be found in the **List Services** endpoint. extra_headers: Send extra headers @@ -131,9 +132,9 @@ def list( IPs in the prefix to Cloudflare Magic Transit. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers @@ -173,11 +174,11 @@ def delete( Delete a Service Binding Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - binding_id: Identifier + binding_id: Identifier of a Service Binding. extra_headers: Send extra headers @@ -218,11 +219,11 @@ def get( Fetch a single Service Binding Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - binding_id: Identifier + binding_id: Identifier of a Service Binding. extra_headers: Send extra headers @@ -292,13 +293,14 @@ async def create( allows creating service bindings for the Cloudflare CDN or Cloudflare Spectrum. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. cidr: IP Prefix in Classless Inter-Domain Routing format. - service_id: Identifier + service_id: Identifier of a Service on the Cloudflare network. Available services and their + IDs may be found in the **List Services** endpoint. extra_headers: Send extra headers @@ -353,9 +355,9 @@ def list( IPs in the prefix to Cloudflare Magic Transit. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. extra_headers: Send extra headers @@ -395,11 +397,11 @@ async def delete( Delete a Service Binding Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - binding_id: Identifier + binding_id: Identifier of a Service Binding. extra_headers: Send extra headers @@ -440,11 +442,11 @@ async def get( Fetch a single Service Binding Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. - prefix_id: Identifier + prefix_id: Identifier of an IP Prefix. - binding_id: Identifier + binding_id: Identifier of a Service Binding. extra_headers: Send extra headers diff --git a/src/cloudflare/resources/addressing/services.py b/src/cloudflare/resources/addressing/services.py index 56fe70d70b9..e73f0c62298 100644 --- a/src/cloudflare/resources/addressing/services.py +++ b/src/cloudflare/resources/addressing/services.py @@ -58,7 +58,7 @@ def list( the Cloudflare network, and their service IDs. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. extra_headers: Send extra headers @@ -118,7 +118,7 @@ def list( the Cloudflare network, and their service IDs. Args: - account_id: Identifier + account_id: Identifier of a Cloudflare account. extra_headers: Send extra headers diff --git a/src/cloudflare/resources/origin_post_quantum_encryption.py b/src/cloudflare/resources/origin_post_quantum_encryption.py index a59a30d9108..496eaf5495f 100644 --- a/src/cloudflare/resources/origin_post_quantum_encryption.py +++ b/src/cloudflare/resources/origin_post_quantum_encryption.py @@ -3,15 +3,10 @@ from __future__ import annotations from typing import Type, Optional, cast -from typing_extensions import Literal 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 ( @@ -22,13 +17,9 @@ ) from .._wrappers import ResultWrapper from .._base_client import make_request_options -from ..types.origin_post_quantum_encryption import origin_post_quantum_encryption_edit_params from ..types.origin_post_quantum_encryption.origin_post_quantum_encryption_get_response import ( OriginPostQuantumEncryptionGetResponse, ) -from ..types.origin_post_quantum_encryption.origin_post_quantum_encryption_edit_response import ( - OriginPostQuantumEncryptionEditResponse, -) __all__ = ["OriginPostQuantumEncryptionResource", "AsyncOriginPostQuantumEncryptionResource"] @@ -53,59 +44,6 @@ def with_streaming_response(self) -> OriginPostQuantumEncryptionResourceWithStre """ return OriginPostQuantumEncryptionResourceWithStreamingResponse(self) - def edit( - self, - *, - zone_id: str, - value: Literal["preferred", "supported", "off"], - # 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, - ) -> Optional[OriginPostQuantumEncryptionEditResponse]: - """ - Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when - connecting to your origin. Preferred instructs Cloudflare to opportunistically - send a Post-Quantum keyshare in the first message to the origin (for fastest - connections when the origin supports and prefers PQ), supported means that PQ - algorithms are advertised but only used when requested by the origin, and off - means that PQ algorithms are not advertised - - Args: - zone_id: Identifier - - value: Value of the Origin Post Quantum Encryption Setting. - - 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_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._patch( - f"/zones/{zone_id}/cache/origin_post_quantum_encryption", - body=maybe_transform( - {"value": value}, origin_post_quantum_encryption_edit_params.OriginPostQuantumEncryptionEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OriginPostQuantumEncryptionEditResponse]]._unwrapper, - ), - cast_to=cast( - Type[Optional[OriginPostQuantumEncryptionEditResponse]], - ResultWrapper[OriginPostQuantumEncryptionEditResponse], - ), - ) - def get( self, *, @@ -174,59 +112,6 @@ def with_streaming_response(self) -> AsyncOriginPostQuantumEncryptionResourceWit """ return AsyncOriginPostQuantumEncryptionResourceWithStreamingResponse(self) - async def edit( - self, - *, - zone_id: str, - value: Literal["preferred", "supported", "off"], - # 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, - ) -> Optional[OriginPostQuantumEncryptionEditResponse]: - """ - Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when - connecting to your origin. Preferred instructs Cloudflare to opportunistically - send a Post-Quantum keyshare in the first message to the origin (for fastest - connections when the origin supports and prefers PQ), supported means that PQ - algorithms are advertised but only used when requested by the origin, and off - means that PQ algorithms are not advertised - - Args: - zone_id: Identifier - - value: Value of the Origin Post Quantum Encryption Setting. - - 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_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._patch( - f"/zones/{zone_id}/cache/origin_post_quantum_encryption", - body=await async_maybe_transform( - {"value": value}, origin_post_quantum_encryption_edit_params.OriginPostQuantumEncryptionEditParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[OriginPostQuantumEncryptionEditResponse]]._unwrapper, - ), - cast_to=cast( - Type[Optional[OriginPostQuantumEncryptionEditResponse]], - ResultWrapper[OriginPostQuantumEncryptionEditResponse], - ), - ) - async def get( self, *, @@ -279,9 +164,6 @@ class OriginPostQuantumEncryptionResourceWithRawResponse: def __init__(self, origin_post_quantum_encryption: OriginPostQuantumEncryptionResource) -> None: self._origin_post_quantum_encryption = origin_post_quantum_encryption - self.edit = to_raw_response_wrapper( - origin_post_quantum_encryption.edit, - ) self.get = to_raw_response_wrapper( origin_post_quantum_encryption.get, ) @@ -291,9 +173,6 @@ class AsyncOriginPostQuantumEncryptionResourceWithRawResponse: def __init__(self, origin_post_quantum_encryption: AsyncOriginPostQuantumEncryptionResource) -> None: self._origin_post_quantum_encryption = origin_post_quantum_encryption - self.edit = async_to_raw_response_wrapper( - origin_post_quantum_encryption.edit, - ) self.get = async_to_raw_response_wrapper( origin_post_quantum_encryption.get, ) @@ -303,9 +182,6 @@ class OriginPostQuantumEncryptionResourceWithStreamingResponse: def __init__(self, origin_post_quantum_encryption: OriginPostQuantumEncryptionResource) -> None: self._origin_post_quantum_encryption = origin_post_quantum_encryption - self.edit = to_streamed_response_wrapper( - origin_post_quantum_encryption.edit, - ) self.get = to_streamed_response_wrapper( origin_post_quantum_encryption.get, ) @@ -315,9 +191,6 @@ class AsyncOriginPostQuantumEncryptionResourceWithStreamingResponse: def __init__(self, origin_post_quantum_encryption: AsyncOriginPostQuantumEncryptionResource) -> None: self._origin_post_quantum_encryption = origin_post_quantum_encryption - self.edit = async_to_streamed_response_wrapper( - origin_post_quantum_encryption.edit, - ) self.get = async_to_streamed_response_wrapper( origin_post_quantum_encryption.get, ) diff --git a/src/cloudflare/resources/zero_trust/organizations/doh.py b/src/cloudflare/resources/zero_trust/organizations/doh.py index d16604fe4b7..70518bc0925 100644 --- a/src/cloudflare/resources/zero_trust/organizations/doh.py +++ b/src/cloudflare/resources/zero_trust/organizations/doh.py @@ -52,7 +52,7 @@ def update( self, *, account_id: str, - jwt_duration: str | NotGiven = NOT_GIVEN, + doh_jwt_duration: str | NotGiven = NOT_GIVEN, service_token_id: str | 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. @@ -67,7 +67,7 @@ def update( Args: account_id: Identifier - jwt_duration: The duration the DoH JWT is valid for. Must be in the format `300ms` or `2h45m`. + doh_jwt_duration: The duration the DoH JWT is valid for. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. Note that the maximum duration for this setting is the same as the key rotation period on the account. Default expiration is 24h @@ -88,7 +88,7 @@ def update( f"/accounts/{account_id}/access/organizations/doh", body=maybe_transform( { - "jwt_duration": jwt_duration, + "doh_jwt_duration": doh_jwt_duration, "service_token_id": service_token_id, }, doh_update_params.DOHUpdateParams, @@ -167,7 +167,7 @@ async def update( self, *, account_id: str, - jwt_duration: str | NotGiven = NOT_GIVEN, + doh_jwt_duration: str | NotGiven = NOT_GIVEN, service_token_id: str | 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. @@ -182,7 +182,7 @@ async def update( Args: account_id: Identifier - jwt_duration: The duration the DoH JWT is valid for. Must be in the format `300ms` or `2h45m`. + doh_jwt_duration: The duration the DoH JWT is valid for. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. Note that the maximum duration for this setting is the same as the key rotation period on the account. Default expiration is 24h @@ -203,7 +203,7 @@ async def update( f"/accounts/{account_id}/access/organizations/doh", body=await async_maybe_transform( { - "jwt_duration": jwt_duration, + "doh_jwt_duration": doh_jwt_duration, "service_token_id": service_token_id, }, doh_update_params.DOHUpdateParams, diff --git a/src/cloudflare/types/abuse_reports/__init__.py b/src/cloudflare/types/abuse_reports/__init__.py index c17465cb40c..f8ee8b14b1c 100644 --- a/src/cloudflare/types/abuse_reports/__init__.py +++ b/src/cloudflare/types/abuse_reports/__init__.py @@ -1,6 +1,3 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations - -from .abuse_report_create_params import AbuseReportCreateParams as AbuseReportCreateParams -from .abuse_report_create_response import AbuseReportCreateResponse as AbuseReportCreateResponse diff --git a/src/cloudflare/types/abuse_reports/abuse_report_create_params.py b/src/cloudflare/types/abuse_reports/abuse_report_create_params.py deleted file mode 100644 index ff19f93f7c5..00000000000 --- a/src/cloudflare/types/abuse_reports/abuse_report_create_params.py +++ /dev/null @@ -1,140 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["AbuseReportCreateParams"] - - -class AbuseReportCreateParams(TypedDict, total=False): - account_id: Required[str] - - act: Required[ - Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ] - ] - """The abuse report type""" - - email: Required[str] - """A valid email of the abuse reporter""" - - email2: Required[str] - """Should match the value provided in `email`""" - - host_notification: Required[Literal["send", "send-anon", "none"]] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - ncmec_notification: Required[Literal["send", "send-anon", "none"]] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - owner_notification: Required[Literal["send", "send-anon", "none"]] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - urls: Required[str] - """A list of valid URLs separated by ‘ ’ (new line character). - - The list of the URLs should not exceed 250 URLs. All URLs should have the same - hostname. Each URL should be unique - """ - - address1: str - """Text not exceeding 100 characters""" - - agent_name: str - """The name of the copyright holder. Text not exceeding 60 characters.""" - - agree: Literal[0, 1] - """Can be 0 or 1""" - - city: str - """Text not exceeding 255 characters""" - - comments: str - """Any additional comments about the infringement not exceeding 2000 characters""" - - company: str - """Text not exceeding 100 characters""" - - country: str - """Text not exceeding 255 characters""" - - destination_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of destination IPs should not exceed 30 IP addresses. Each one of the - IP addresses ought to be unique - """ - - justification: str - """ - A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - """ - - name: str - """Text not exceeding 255 characters""" - - ncsei_subject_representation: bool - """If the submitter is the target of NCSEI in the URLs of the abuse report""" - - original_work: str - """Text not exceeding 255 characters""" - - ports_protocols: str - """A comma separated list of ports and protocols e.g. - - 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. - Each individual port/protocol should not exceed 100 characters. The list should - not have more than 30 unique ports and protocols. - """ - - signature: str - """Required for DMCA reports, should be same as Name. - - An affirmation that all information in the report is true and accurate while - agreeing to the policies of Cloudflare's abuse reports - """ - - source_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of source IPs should not exceed 30 IP addresses. Each one of the IP - addresses ought to be unique - """ - - state: str - """Text not exceeding 255 characters""" - - tele: str - """Text not exceeding 20 characters""" - - title: str - """Text not exceeding 255 characters""" - - trademark_number: str - """Text not exceeding 1000 characters""" - - trademark_office: str - """Text not exceeding 1000 characters""" - - trademark_symbol: str - """Text not exceeding 1000 characters""" diff --git a/src/cloudflare/types/abuse_reports/abuse_report_create_response.py b/src/cloudflare/types/abuse_reports/abuse_report_create_response.py deleted file mode 100644 index 03fc4011e68..00000000000 --- a/src/cloudflare/types/abuse_reports/abuse_report_create_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing_extensions import TypeAlias - -__all__ = ["AbuseReportCreateResponse"] - -AbuseReportCreateResponse: TypeAlias = str diff --git a/src/cloudflare/types/addressing/address_map.py b/src/cloudflare/types/addressing/address_map.py index dff7660e50c..1ff0f0ab4f2 100644 --- a/src/cloudflare/types/addressing/address_map.py +++ b/src/cloudflare/types/addressing/address_map.py @@ -10,7 +10,7 @@ class AddressMap(BaseModel): id: Optional[str] = None - """Identifier""" + """Identifier of an Address Map.""" can_delete: Optional[bool] = None """If set to false, then the Address Map cannot be deleted via API. diff --git a/src/cloudflare/types/addressing/address_map_create_params.py b/src/cloudflare/types/addressing/address_map_create_params.py index ac313102d61..bef1dcc72a9 100644 --- a/src/cloudflare/types/addressing/address_map_create_params.py +++ b/src/cloudflare/types/addressing/address_map_create_params.py @@ -12,7 +12,7 @@ class AddressMapCreateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" description: Optional[str] """ diff --git a/src/cloudflare/types/addressing/address_map_create_response.py b/src/cloudflare/types/addressing/address_map_create_response.py index 032e1166d18..08303310e4e 100644 --- a/src/cloudflare/types/addressing/address_map_create_response.py +++ b/src/cloudflare/types/addressing/address_map_create_response.py @@ -31,7 +31,7 @@ class Membership(BaseModel): class AddressMapCreateResponse(BaseModel): id: Optional[str] = None - """Identifier""" + """Identifier of an Address Map.""" can_delete: Optional[bool] = None """If set to false, then the Address Map cannot be deleted via API. diff --git a/src/cloudflare/types/addressing/address_map_edit_params.py b/src/cloudflare/types/addressing/address_map_edit_params.py index 5d91c15dab3..78a94270693 100644 --- a/src/cloudflare/types/addressing/address_map_edit_params.py +++ b/src/cloudflare/types/addressing/address_map_edit_params.py @@ -10,7 +10,7 @@ class AddressMapEditParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" default_sni: Optional[str] """ diff --git a/src/cloudflare/types/addressing/address_map_get_response.py b/src/cloudflare/types/addressing/address_map_get_response.py index 0eb306ccdbd..2eda9977d94 100644 --- a/src/cloudflare/types/addressing/address_map_get_response.py +++ b/src/cloudflare/types/addressing/address_map_get_response.py @@ -31,7 +31,7 @@ class Membership(BaseModel): class AddressMapGetResponse(BaseModel): id: Optional[str] = None - """Identifier""" + """Identifier of an Address Map.""" can_delete: Optional[bool] = None """If set to false, then the Address Map cannot be deleted via API. diff --git a/src/cloudflare/types/addressing/address_maps/account_update_params.py b/src/cloudflare/types/addressing/address_maps/account_update_params.py index f06483675c1..ff618f7f917 100644 --- a/src/cloudflare/types/addressing/address_maps/account_update_params.py +++ b/src/cloudflare/types/addressing/address_maps/account_update_params.py @@ -9,6 +9,6 @@ class AccountUpdateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" body: Required[object] diff --git a/src/cloudflare/types/addressing/address_maps/ip_update_params.py b/src/cloudflare/types/addressing/address_maps/ip_update_params.py index 41cd04d50b1..7c4e1611411 100644 --- a/src/cloudflare/types/addressing/address_maps/ip_update_params.py +++ b/src/cloudflare/types/addressing/address_maps/ip_update_params.py @@ -9,9 +9,9 @@ class IPUpdateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" address_map_id: Required[str] - """Identifier""" + """Identifier of an Address Map.""" body: Required[object] diff --git a/src/cloudflare/types/addressing/address_maps/zone_update_params.py b/src/cloudflare/types/addressing/address_maps/zone_update_params.py index 3cd7060a7ed..04047f85fc0 100644 --- a/src/cloudflare/types/addressing/address_maps/zone_update_params.py +++ b/src/cloudflare/types/addressing/address_maps/zone_update_params.py @@ -9,9 +9,9 @@ class ZoneUpdateParams(TypedDict, total=False): zone_id: Required[str] - """Identifier""" + """Identifier of a zone.""" account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" body: Required[object] diff --git a/src/cloudflare/types/addressing/loa_document_create_params.py b/src/cloudflare/types/addressing/loa_document_create_params.py index 4f8da69a2a5..3ea6bd6de69 100644 --- a/src/cloudflare/types/addressing/loa_document_create_params.py +++ b/src/cloudflare/types/addressing/loa_document_create_params.py @@ -9,7 +9,7 @@ class LOADocumentCreateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" loa_document: Required[str] """LOA document to upload.""" diff --git a/src/cloudflare/types/addressing/loa_document_create_response.py b/src/cloudflare/types/addressing/loa_document_create_response.py index 915d2b130c4..dd84b6a3b39 100644 --- a/src/cloudflare/types/addressing/loa_document_create_response.py +++ b/src/cloudflare/types/addressing/loa_document_create_response.py @@ -13,7 +13,7 @@ class LOADocumentCreateResponse(BaseModel): """Identifier for the uploaded LOA document.""" account_id: Optional[str] = None - """Identifier""" + """Identifier of a Cloudflare account.""" created: Optional[datetime] = None diff --git a/src/cloudflare/types/addressing/prefix.py b/src/cloudflare/types/addressing/prefix.py index 9dd12947704..7a680d672f4 100644 --- a/src/cloudflare/types/addressing/prefix.py +++ b/src/cloudflare/types/addressing/prefix.py @@ -10,10 +10,10 @@ class Prefix(BaseModel): id: Optional[str] = None - """Identifier""" + """Identifier of an IP Prefix.""" account_id: Optional[str] = None - """Identifier""" + """Identifier of a Cloudflare account.""" advertised: Optional[bool] = None """Prefix advertisement status to the Internet. diff --git a/src/cloudflare/types/addressing/prefix_create_params.py b/src/cloudflare/types/addressing/prefix_create_params.py index edbe51ebcf4..b2d40ba7d01 100644 --- a/src/cloudflare/types/addressing/prefix_create_params.py +++ b/src/cloudflare/types/addressing/prefix_create_params.py @@ -10,7 +10,7 @@ class PrefixCreateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" asn: Required[Optional[int]] """Autonomous System Number (ASN) the prefix will be advertised under.""" diff --git a/src/cloudflare/types/addressing/prefix_edit_params.py b/src/cloudflare/types/addressing/prefix_edit_params.py index 9f4b08a8b40..b1ad60bb46f 100644 --- a/src/cloudflare/types/addressing/prefix_edit_params.py +++ b/src/cloudflare/types/addressing/prefix_edit_params.py @@ -9,7 +9,7 @@ class PrefixEditParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" description: Required[str] """Description of the prefix.""" diff --git a/src/cloudflare/types/addressing/prefixes/advertisement_status_edit_params.py b/src/cloudflare/types/addressing/prefixes/advertisement_status_edit_params.py index 767d0f47af0..5de84a7f1d0 100644 --- a/src/cloudflare/types/addressing/prefixes/advertisement_status_edit_params.py +++ b/src/cloudflare/types/addressing/prefixes/advertisement_status_edit_params.py @@ -9,7 +9,11 @@ class AdvertisementStatusEditParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" advertised: Required[bool] - """Enablement of prefix advertisement to the Internet.""" + """Advertisement status of the prefix. + + If `true`, the BGP route for the prefix is advertised to the Internet. If + `false`, the BGP route is withdrawn. + """ diff --git a/src/cloudflare/types/addressing/prefixes/advertisement_status_edit_response.py b/src/cloudflare/types/addressing/prefixes/advertisement_status_edit_response.py index 0abcad0875b..3c32d04dfcd 100644 --- a/src/cloudflare/types/addressing/prefixes/advertisement_status_edit_response.py +++ b/src/cloudflare/types/addressing/prefixes/advertisement_status_edit_response.py @@ -10,7 +10,11 @@ class AdvertisementStatusEditResponse(BaseModel): advertised: Optional[bool] = None - """Enablement of prefix advertisement to the Internet.""" + """Advertisement status of the prefix. + + If `true`, the BGP route for the prefix is advertised to the Internet. If + `false`, the BGP route is withdrawn. + """ advertised_modified_at: Optional[datetime] = None """Last time the advertisement status was changed. diff --git a/src/cloudflare/types/addressing/prefixes/advertisement_status_get_response.py b/src/cloudflare/types/addressing/prefixes/advertisement_status_get_response.py index f56585ab154..86260979361 100644 --- a/src/cloudflare/types/addressing/prefixes/advertisement_status_get_response.py +++ b/src/cloudflare/types/addressing/prefixes/advertisement_status_get_response.py @@ -10,7 +10,11 @@ class AdvertisementStatusGetResponse(BaseModel): advertised: Optional[bool] = None - """Enablement of prefix advertisement to the Internet.""" + """Advertisement status of the prefix. + + If `true`, the BGP route for the prefix is advertised to the Internet. If + `false`, the BGP route is withdrawn. + """ advertised_modified_at: Optional[datetime] = None """Last time the advertisement status was changed. diff --git a/src/cloudflare/types/addressing/prefixes/bgp_prefix.py b/src/cloudflare/types/addressing/prefixes/bgp_prefix.py index f13f144985b..e58c9ebdd33 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp_prefix.py +++ b/src/cloudflare/types/addressing/prefixes/bgp_prefix.py @@ -50,7 +50,7 @@ class OnDemand(BaseModel): class BGPPrefix(BaseModel): id: Optional[str] = None - """Identifier""" + """Identifier of BGP Prefix.""" asn: Optional[int] = None """Autonomous System Number (ASN) the prefix will be advertised under.""" diff --git a/src/cloudflare/types/addressing/prefixes/bgp_prefix_create_params.py b/src/cloudflare/types/addressing/prefixes/bgp_prefix_create_params.py index 09c650098ea..387be0b879f 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp_prefix_create_params.py +++ b/src/cloudflare/types/addressing/prefixes/bgp_prefix_create_params.py @@ -9,7 +9,7 @@ class BGPPrefixCreateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" cidr: str """IP Prefix in Classless Inter-Domain Routing format.""" diff --git a/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py b/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py index 579828d7901..5822fc5a307 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py +++ b/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py @@ -9,10 +9,10 @@ class BGPPrefixEditParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" prefix_id: Required[str] - """Identifier""" + """Identifier of an IP Prefix.""" on_demand: OnDemand diff --git a/src/cloudflare/types/addressing/prefixes/delegation_create_params.py b/src/cloudflare/types/addressing/prefixes/delegation_create_params.py index f8f9c9719f2..948fe969d3e 100644 --- a/src/cloudflare/types/addressing/prefixes/delegation_create_params.py +++ b/src/cloudflare/types/addressing/prefixes/delegation_create_params.py @@ -9,7 +9,7 @@ class DelegationCreateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" cidr: Required[str] """IP Prefix in Classless Inter-Domain Routing format.""" diff --git a/src/cloudflare/types/addressing/prefixes/delegation_delete_response.py b/src/cloudflare/types/addressing/prefixes/delegation_delete_response.py index 3581f2c3c0a..352868765b9 100644 --- a/src/cloudflare/types/addressing/prefixes/delegation_delete_response.py +++ b/src/cloudflare/types/addressing/prefixes/delegation_delete_response.py @@ -9,4 +9,4 @@ class DelegationDeleteResponse(BaseModel): id: Optional[str] = None - """Delegation identifier tag.""" + """Identifier of a Delegation.""" diff --git a/src/cloudflare/types/addressing/prefixes/delegations.py b/src/cloudflare/types/addressing/prefixes/delegations.py index 8a2d2d8fea8..c9b97dfc3d5 100644 --- a/src/cloudflare/types/addressing/prefixes/delegations.py +++ b/src/cloudflare/types/addressing/prefixes/delegations.py @@ -10,7 +10,7 @@ class Delegations(BaseModel): id: Optional[str] = None - """Delegation identifier tag.""" + """Identifier of a Delegation.""" cidr: Optional[str] = None """IP Prefix in Classless Inter-Domain Routing format.""" @@ -23,4 +23,4 @@ class Delegations(BaseModel): modified_at: Optional[datetime] = None parent_prefix_id: Optional[str] = None - """Identifier""" + """Identifier of an IP Prefix.""" diff --git a/src/cloudflare/types/addressing/prefixes/service_binding.py b/src/cloudflare/types/addressing/prefixes/service_binding.py index 22babc8c0ff..34bbeabd065 100644 --- a/src/cloudflare/types/addressing/prefixes/service_binding.py +++ b/src/cloudflare/types/addressing/prefixes/service_binding.py @@ -18,7 +18,7 @@ class Provisioning(BaseModel): class ServiceBinding(BaseModel): id: Optional[str] = None - """Identifier""" + """Identifier of a Service Binding.""" cidr: Optional[str] = None """IP Prefix in Classless Inter-Domain Routing format.""" @@ -27,7 +27,10 @@ class ServiceBinding(BaseModel): """Status of a Service Binding's deployment to the Cloudflare network""" service_id: Optional[str] = None - """Identifier""" + """Identifier of a Service on the Cloudflare network. + + Available services and their IDs may be found in the **List Services** endpoint. + """ service_name: Optional[str] = None """Name of a service running on the Cloudflare network""" diff --git a/src/cloudflare/types/addressing/prefixes/service_binding_create_params.py b/src/cloudflare/types/addressing/prefixes/service_binding_create_params.py index 9df88871bb3..6e1f0420211 100644 --- a/src/cloudflare/types/addressing/prefixes/service_binding_create_params.py +++ b/src/cloudflare/types/addressing/prefixes/service_binding_create_params.py @@ -9,10 +9,13 @@ class ServiceBindingCreateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier of a Cloudflare account.""" cidr: str """IP Prefix in Classless Inter-Domain Routing format.""" service_id: str - """Identifier""" + """Identifier of a Service on the Cloudflare network. + + Available services and their IDs may be found in the **List Services** endpoint. + """ diff --git a/src/cloudflare/types/addressing/service_list_response.py b/src/cloudflare/types/addressing/service_list_response.py index e4e66040091..a97b11929a2 100644 --- a/src/cloudflare/types/addressing/service_list_response.py +++ b/src/cloudflare/types/addressing/service_list_response.py @@ -9,7 +9,10 @@ class ServiceListResponse(BaseModel): id: Optional[str] = None - """Identifier""" + """Identifier of a Service on the Cloudflare network. + + Available services and their IDs may be found in the **List Services** endpoint. + """ name: Optional[str] = None """Name of a service running on the Cloudflare network""" diff --git a/src/cloudflare/types/dns/cname_record.py b/src/cloudflare/types/dns/cname_record.py index a6c9dd7fae1..acbb165c725 100644 --- a/src/cloudflare/types/dns/cname_record.py +++ b/src/cloudflare/types/dns/cname_record.py @@ -15,7 +15,7 @@ class Settings(BaseModel): """ If enabled, causes the CNAME record to be resolved externally and the resulting address records (e.g., A and AAAA) to be returned instead of the CNAME record - itself. This setting has no effect on proxied records, which are always + itself. This setting is unavailable for proxied records, since they are always flattened. """ diff --git a/src/cloudflare/types/dns/cname_record_param.py b/src/cloudflare/types/dns/cname_record_param.py index fd5f4dc9907..122daccc16c 100644 --- a/src/cloudflare/types/dns/cname_record_param.py +++ b/src/cloudflare/types/dns/cname_record_param.py @@ -16,7 +16,7 @@ class Settings(TypedDict, total=False): """ If enabled, causes the CNAME record to be resolved externally and the resulting address records (e.g., A and AAAA) to be returned instead of the CNAME record - itself. This setting has no effect on proxied records, which are always + itself. This setting is unavailable for proxied records, since they are always flattened. """ diff --git a/src/cloudflare/types/dns/record_create_params.py b/src/cloudflare/types/dns/record_create_params.py index cfa25b1f388..c04cfc7995e 100644 --- a/src/cloudflare/types/dns/record_create_params.py +++ b/src/cloudflare/types/dns/record_create_params.py @@ -365,7 +365,7 @@ class CNAMERecordSettings(TypedDict, total=False): """ If enabled, causes the CNAME record to be resolved externally and the resulting address records (e.g., A and AAAA) to be returned instead of the CNAME record - itself. This setting has no effect on proxied records, which are always + itself. This setting is unavailable for proxied records, since they are always flattened. """ diff --git a/src/cloudflare/types/dns/record_edit_params.py b/src/cloudflare/types/dns/record_edit_params.py index a946133b5da..179b94923d9 100644 --- a/src/cloudflare/types/dns/record_edit_params.py +++ b/src/cloudflare/types/dns/record_edit_params.py @@ -365,7 +365,7 @@ class CNAMERecordSettings(TypedDict, total=False): """ If enabled, causes the CNAME record to be resolved externally and the resulting address records (e.g., A and AAAA) to be returned instead of the CNAME record - itself. This setting has no effect on proxied records, which are always + itself. This setting is unavailable for proxied records, since they are always flattened. """ diff --git a/src/cloudflare/types/dns/record_update_params.py b/src/cloudflare/types/dns/record_update_params.py index cc4bb87851b..e594247fb7e 100644 --- a/src/cloudflare/types/dns/record_update_params.py +++ b/src/cloudflare/types/dns/record_update_params.py @@ -365,7 +365,7 @@ class CNAMERecordSettings(TypedDict, total=False): """ If enabled, causes the CNAME record to be resolved externally and the resulting address records (e.g., A and AAAA) to be returned instead of the CNAME record - itself. This setting has no effect on proxied records, which are always + itself. This setting is unavailable for proxied records, since they are always flattened. """ diff --git a/src/cloudflare/types/origin_post_quantum_encryption/__init__.py b/src/cloudflare/types/origin_post_quantum_encryption/__init__.py index 2b3fa07fabc..273631df76f 100644 --- a/src/cloudflare/types/origin_post_quantum_encryption/__init__.py +++ b/src/cloudflare/types/origin_post_quantum_encryption/__init__.py @@ -2,12 +2,6 @@ from __future__ import annotations -from .origin_post_quantum_encryption_edit_params import ( - OriginPostQuantumEncryptionEditParams as OriginPostQuantumEncryptionEditParams, -) from .origin_post_quantum_encryption_get_response import ( OriginPostQuantumEncryptionGetResponse as OriginPostQuantumEncryptionGetResponse, ) -from .origin_post_quantum_encryption_edit_response import ( - OriginPostQuantumEncryptionEditResponse as OriginPostQuantumEncryptionEditResponse, -) diff --git a/src/cloudflare/types/origin_post_quantum_encryption/origin_post_quantum_encryption_edit_params.py b/src/cloudflare/types/origin_post_quantum_encryption/origin_post_quantum_encryption_edit_params.py deleted file mode 100644 index ff276589cf3..00000000000 --- a/src/cloudflare/types/origin_post_quantum_encryption/origin_post_quantum_encryption_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 Literal, Required, TypedDict - -__all__ = ["OriginPostQuantumEncryptionEditParams"] - - -class OriginPostQuantumEncryptionEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - value: Required[Literal["preferred", "supported", "off"]] - """Value of the Origin Post Quantum Encryption Setting.""" diff --git a/src/cloudflare/types/origin_post_quantum_encryption/origin_post_quantum_encryption_edit_response.py b/src/cloudflare/types/origin_post_quantum_encryption/origin_post_quantum_encryption_edit_response.py deleted file mode 100644 index 34c81bb373e..00000000000 --- a/src/cloudflare/types/origin_post_quantum_encryption/origin_post_quantum_encryption_edit_response.py +++ /dev/null @@ -1,23 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["OriginPostQuantumEncryptionEditResponse"] - - -class OriginPostQuantumEncryptionEditResponse(BaseModel): - id: Literal["origin_pqe"] - """Value of the zone setting.""" - - editable: bool - """Whether the setting is editable""" - - value: Literal["preferred", "supported", "off"] - """The value of the feature""" - - modified_on: Optional[datetime] = None - """Last time this setting was modified.""" diff --git a/src/cloudflare/types/workers/script.py b/src/cloudflare/types/workers/script.py index 69ba006953e..336e5797a4f 100644 --- a/src/cloudflare/types/workers/script.py +++ b/src/cloudflare/types/workers/script.py @@ -17,16 +17,7 @@ class Placement(BaseModel): [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). """ - status: Optional[ - Literal[ - "SUCCESS", - "NO_VALID_HOSTS", - "NO_VALID_BINDINGS", - "UNSUPPORTED_APPLICATION", - "INSUFFICIENT_INVOCATIONS", - "INSUFFICIENT_SUBREQUESTS", - ] - ] = None + status: Optional[Literal["SUCCESS", "UNSUPPORTED_APPLICATION", "INSUFFICIENT_INVOCATIONS"]] = None """ Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). @@ -67,16 +58,7 @@ class Script(BaseModel): [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). """ - placement_status: Optional[ - Literal[ - "SUCCESS", - "NO_VALID_HOSTS", - "NO_VALID_BINDINGS", - "UNSUPPORTED_APPLICATION", - "INSUFFICIENT_INVOCATIONS", - "INSUFFICIENT_SUBREQUESTS", - ] - ] = None + placement_status: Optional[Literal["SUCCESS", "UNSUPPORTED_APPLICATION", "INSUFFICIENT_INVOCATIONS"]] = None """ Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). diff --git a/src/cloudflare/types/workers/script_update_response.py b/src/cloudflare/types/workers/script_update_response.py index f9f0d89ef55..53d735b8638 100644 --- a/src/cloudflare/types/workers/script_update_response.py +++ b/src/cloudflare/types/workers/script_update_response.py @@ -17,16 +17,7 @@ class Placement(BaseModel): [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). """ - status: Optional[ - Literal[ - "SUCCESS", - "NO_VALID_HOSTS", - "NO_VALID_BINDINGS", - "UNSUPPORTED_APPLICATION", - "INSUFFICIENT_INVOCATIONS", - "INSUFFICIENT_SUBREQUESTS", - ] - ] = None + status: Optional[Literal["SUCCESS", "UNSUPPORTED_APPLICATION", "INSUFFICIENT_INVOCATIONS"]] = None """ Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). @@ -67,16 +58,7 @@ class ScriptUpdateResponse(BaseModel): [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). """ - placement_status: Optional[ - Literal[ - "SUCCESS", - "NO_VALID_HOSTS", - "NO_VALID_BINDINGS", - "UNSUPPORTED_APPLICATION", - "INSUFFICIENT_INVOCATIONS", - "INSUFFICIENT_SUBREQUESTS", - ] - ] = None + placement_status: Optional[Literal["SUCCESS", "UNSUPPORTED_APPLICATION", "INSUFFICIENT_INVOCATIONS"]] = None """ Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_response.py index 47380eecb7e..d79a5e9b267 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_response.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_response.py @@ -17,16 +17,7 @@ class Placement(BaseModel): [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). """ - status: Optional[ - Literal[ - "SUCCESS", - "NO_VALID_HOSTS", - "NO_VALID_BINDINGS", - "UNSUPPORTED_APPLICATION", - "INSUFFICIENT_INVOCATIONS", - "INSUFFICIENT_SUBREQUESTS", - ] - ] = None + status: Optional[Literal["SUCCESS", "UNSUPPORTED_APPLICATION", "INSUFFICIENT_INVOCATIONS"]] = None """ Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). @@ -67,16 +58,7 @@ class ScriptUpdateResponse(BaseModel): [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). """ - placement_status: Optional[ - Literal[ - "SUCCESS", - "NO_VALID_HOSTS", - "NO_VALID_BINDINGS", - "UNSUPPORTED_APPLICATION", - "INSUFFICIENT_INVOCATIONS", - "INSUFFICIENT_SUBREQUESTS", - ] - ] = None + placement_status: Optional[Literal["SUCCESS", "UNSUPPORTED_APPLICATION", "INSUFFICIENT_INVOCATIONS"]] = None """ Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). diff --git a/src/cloudflare/types/zero_trust/organizations/doh_get_response.py b/src/cloudflare/types/zero_trust/organizations/doh_get_response.py index 45cb3c7a793..adb3be9867c 100644 --- a/src/cloudflare/types/zero_trust/organizations/doh_get_response.py +++ b/src/cloudflare/types/zero_trust/organizations/doh_get_response.py @@ -20,6 +20,14 @@ class DOHGetResponse(BaseModel): created_at: Optional[datetime] = None + doh_jwt_duration: Optional[str] = None + """The duration the DoH JWT is valid for. + + Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), + ms, s, m, h. Note that the maximum duration for this setting is the same as the + key rotation period on the account. + """ + duration: Optional[str] = None """The duration for how long the service token will be valid. @@ -29,14 +37,6 @@ class DOHGetResponse(BaseModel): expires_at: Optional[datetime] = None - jwt_duration: Optional[str] = None - """The duration the DoH JWT is valid for. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. Note that the maximum duration for this setting is the same as the - key rotation period on the account. - """ - name: Optional[str] = None """The name of the service token.""" diff --git a/src/cloudflare/types/zero_trust/organizations/doh_update_params.py b/src/cloudflare/types/zero_trust/organizations/doh_update_params.py index 46ff3ae5df6..2392abf7fe0 100644 --- a/src/cloudflare/types/zero_trust/organizations/doh_update_params.py +++ b/src/cloudflare/types/zero_trust/organizations/doh_update_params.py @@ -11,7 +11,7 @@ class DOHUpdateParams(TypedDict, total=False): account_id: Required[str] """Identifier""" - jwt_duration: str + doh_jwt_duration: str """The duration the DoH JWT is valid for. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), diff --git a/src/cloudflare/types/zero_trust/organizations/doh_update_response.py b/src/cloudflare/types/zero_trust/organizations/doh_update_response.py index 4a9196368f9..128469eebb3 100644 --- a/src/cloudflare/types/zero_trust/organizations/doh_update_response.py +++ b/src/cloudflare/types/zero_trust/organizations/doh_update_response.py @@ -20,6 +20,14 @@ class DOHUpdateResponse(BaseModel): created_at: Optional[datetime] = None + doh_jwt_duration: Optional[str] = None + """The duration the DoH JWT is valid for. + + Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), + ms, s, m, h. Note that the maximum duration for this setting is the same as the + key rotation period on the account. Default expiration is 24h + """ + duration: Optional[str] = None """The duration for how long the service token will be valid. @@ -29,14 +37,6 @@ class DOHUpdateResponse(BaseModel): expires_at: Optional[datetime] = None - jwt_duration: Optional[str] = None - """The duration the DoH JWT is valid for. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. Note that the maximum duration for this setting is the same as the - key rotation period on the account. Default expiration is 24h - """ - name: Optional[str] = None """The name of the service token.""" diff --git a/tests/api_resources/addressing/address_maps/test_accounts.py b/tests/api_resources/addressing/address_maps/test_accounts.py index b84e7ea91ed..3bb5dc17626 100644 --- a/tests/api_resources/addressing/address_maps/test_accounts.py +++ b/tests/api_resources/addressing/address_maps/test_accounts.py @@ -20,8 +20,8 @@ class TestAccounts: @parametrize def test_method_update(self, client: Cloudflare) -> None: account = client.addressing.address_maps.accounts.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) assert_matches_type(AccountUpdateResponse, account, path=["response"]) @@ -29,8 +29,8 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.accounts.with_raw_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) @@ -42,8 +42,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.accounts.with_streaming_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) as response: assert not response.is_closed @@ -58,7 +58,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="", body={}, ) @@ -66,23 +66,23 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.update( address_map_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: account = client.addressing.address_maps.accounts.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(AccountDeleteResponse, account, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.accounts.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -93,8 +93,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.accounts.with_streaming_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -108,14 +108,14 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.delete( address_map_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @@ -125,8 +125,8 @@ class TestAsyncAccounts: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: account = await async_client.addressing.address_maps.accounts.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) assert_matches_type(AccountUpdateResponse, account, path=["response"]) @@ -134,8 +134,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.accounts.with_raw_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) @@ -147,8 +147,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.accounts.with_streaming_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) as response: assert not response.is_closed @@ -163,7 +163,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="", body={}, ) @@ -171,23 +171,23 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.update( address_map_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: account = await async_client.addressing.address_maps.accounts.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(AccountDeleteResponse, account, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.accounts.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -198,8 +198,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.accounts.with_streaming_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -213,12 +213,12 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.delete( address_map_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) diff --git a/tests/api_resources/addressing/address_maps/test_ips.py b/tests/api_resources/addressing/address_maps/test_ips.py index 8525eee077b..63221153f3a 100644 --- a/tests/api_resources/addressing/address_maps/test_ips.py +++ b/tests/api_resources/addressing/address_maps/test_ips.py @@ -21,8 +21,8 @@ class TestIPs: def test_method_update(self, client: Cloudflare) -> None: ip = client.addressing.address_maps.ips.update( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", body={}, ) assert_matches_type(IPUpdateResponse, ip, path=["response"]) @@ -31,8 +31,8 @@ def test_method_update(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.ips.with_raw_response.update( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", body={}, ) @@ -45,8 +45,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.ips.with_streaming_response.update( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", body={}, ) as response: assert not response.is_closed @@ -63,14 +63,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: client.addressing.address_maps.ips.with_raw_response.update( ip_address="192.0.2.1", account_id="", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.ips.with_raw_response.update( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", address_map_id="", body={}, ) @@ -78,8 +78,8 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): client.addressing.address_maps.ips.with_raw_response.update( ip_address="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", body={}, ) @@ -87,8 +87,8 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_delete(self, client: Cloudflare) -> None: ip = client.addressing.address_maps.ips.delete( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", ) assert_matches_type(IPDeleteResponse, ip, path=["response"]) @@ -96,8 +96,8 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.ips.with_raw_response.delete( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", ) assert response.is_closed is True @@ -109,8 +109,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.ips.with_streaming_response.delete( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -126,21 +126,21 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.addressing.address_maps.ips.with_raw_response.delete( ip_address="192.0.2.1", account_id="", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.ips.with_raw_response.delete( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", address_map_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): client.addressing.address_maps.ips.with_raw_response.delete( ip_address="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", ) @@ -151,8 +151,8 @@ class TestAsyncIPs: async def test_method_update(self, async_client: AsyncCloudflare) -> None: ip = await async_client.addressing.address_maps.ips.update( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", body={}, ) assert_matches_type(IPUpdateResponse, ip, path=["response"]) @@ -161,8 +161,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.ips.with_raw_response.update( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", body={}, ) @@ -175,8 +175,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.ips.with_streaming_response.update( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", body={}, ) as response: assert not response.is_closed @@ -193,14 +193,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: await async_client.addressing.address_maps.ips.with_raw_response.update( ip_address="192.0.2.1", account_id="", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.update( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", address_map_id="", body={}, ) @@ -208,8 +208,8 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.update( ip_address="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", body={}, ) @@ -217,8 +217,8 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ip = await async_client.addressing.address_maps.ips.delete( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", ) assert_matches_type(IPDeleteResponse, ip, path=["response"]) @@ -226,8 +226,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.ips.with_raw_response.delete( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", ) assert response.is_closed is True @@ -239,8 +239,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.ips.with_streaming_response.delete( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -256,19 +256,19 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.addressing.address_maps.ips.with_raw_response.delete( ip_address="192.0.2.1", account_id="", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.delete( ip_address="192.0.2.1", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", address_map_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.delete( ip_address="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + address_map_id="055817b111884e0227e1be16a0be6ee0", ) diff --git a/tests/api_resources/addressing/address_maps/test_zones.py b/tests/api_resources/addressing/address_maps/test_zones.py index 12786fdfd14..f0fe5d2d2bb 100644 --- a/tests/api_resources/addressing/address_maps/test_zones.py +++ b/tests/api_resources/addressing/address_maps/test_zones.py @@ -20,9 +20,9 @@ class TestZones: @parametrize def test_method_update(self, client: Cloudflare) -> None: zone = client.addressing.address_maps.zones.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) assert_matches_type(ZoneUpdateResponse, zone, path=["response"]) @@ -30,9 +30,9 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.zones.with_raw_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) @@ -44,9 +44,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.zones.with_streaming_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) as response: assert not response.is_closed @@ -61,16 +61,16 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", zone_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", account_id="", body={}, ) @@ -78,26 +78,26 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.update( address_map_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: zone = client.addressing.address_maps.zones.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(ZoneDeleteResponse, zone, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.zones.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -108,9 +108,9 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.zones.with_streaming_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -124,23 +124,23 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", zone_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.delete( address_map_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @@ -150,9 +150,9 @@ class TestAsyncZones: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: zone = await async_client.addressing.address_maps.zones.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) assert_matches_type(ZoneUpdateResponse, zone, path=["response"]) @@ -160,9 +160,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.zones.with_raw_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) @@ -174,9 +174,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.zones.with_streaming_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) as response: assert not response.is_closed @@ -191,16 +191,16 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", zone_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.update( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", account_id="", body={}, ) @@ -208,26 +208,26 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.update( address_map_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: zone = await async_client.addressing.address_maps.zones.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(ZoneDeleteResponse, zone, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.zones.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -238,9 +238,9 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.zones.with_streaming_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -254,21 +254,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", zone_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + zone_id="8ac8489932db6327334c9b6d58544cfe", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.delete( address_map_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="8ac8489932db6327334c9b6d58544cfe", + account_id="258def64c72dae45f3e4c8516e2111f2", ) diff --git a/tests/api_resources/addressing/prefixes/test_advertisement_status.py b/tests/api_resources/addressing/prefixes/test_advertisement_status.py index e267f3e7021..49a7236d5d7 100644 --- a/tests/api_resources/addressing/prefixes/test_advertisement_status.py +++ b/tests/api_resources/addressing/prefixes/test_advertisement_status.py @@ -23,8 +23,8 @@ class TestAdvertisementStatus: @parametrize def test_method_edit(self, client: Cloudflare) -> None: advertisement_status = client.addressing.prefixes.advertisement_status.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", advertised=True, ) assert_matches_type(Optional[AdvertisementStatusEditResponse], advertisement_status, path=["response"]) @@ -32,8 +32,8 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.advertisement_status.with_raw_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", advertised=True, ) @@ -45,8 +45,8 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.advertisement_status.with_streaming_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", advertised=True, ) as response: assert not response.is_closed @@ -61,7 +61,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.advertisement_status.with_raw_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", advertised=True, ) @@ -69,23 +69,23 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.advertisement_status.with_raw_response.edit( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", advertised=True, ) @parametrize def test_method_get(self, client: Cloudflare) -> None: advertisement_status = client.addressing.prefixes.advertisement_status.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[AdvertisementStatusGetResponse], advertisement_status, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.advertisement_status.with_raw_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -96,8 +96,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.advertisement_status.with_streaming_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -111,14 +111,14 @@ def test_streaming_response_get(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 `account_id` but received ''"): client.addressing.prefixes.advertisement_status.with_raw_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.advertisement_status.with_raw_response.get( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @@ -128,8 +128,8 @@ class TestAsyncAdvertisementStatus: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: advertisement_status = await async_client.addressing.prefixes.advertisement_status.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", advertised=True, ) assert_matches_type(Optional[AdvertisementStatusEditResponse], advertisement_status, path=["response"]) @@ -137,8 +137,8 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.advertisement_status.with_raw_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", advertised=True, ) @@ -150,8 +150,8 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.advertisement_status.with_streaming_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", advertised=True, ) as response: assert not response.is_closed @@ -166,7 +166,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.advertisement_status.with_raw_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", advertised=True, ) @@ -174,23 +174,23 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.advertisement_status.with_raw_response.edit( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", advertised=True, ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: advertisement_status = await async_client.addressing.prefixes.advertisement_status.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[AdvertisementStatusGetResponse], advertisement_status, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.advertisement_status.with_raw_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -201,8 +201,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.advertisement_status.with_streaming_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -216,12 +216,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.advertisement_status.with_raw_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.advertisement_status.with_raw_response.get( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) diff --git a/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py b/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py index d8e2aab7f72..06fe971018a 100644 --- a/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py +++ b/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py @@ -21,16 +21,16 @@ class TestBGPPrefixes: @parametrize def test_method_create(self, client: Cloudflare) -> None: bgp_prefix = client.addressing.prefixes.bgp_prefixes.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: bgp_prefix = client.addressing.prefixes.bgp_prefixes.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) @@ -38,8 +38,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp_prefixes.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -50,8 +50,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp_prefixes.with_streaming_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -65,29 +65,29 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp_prefixes.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp_prefixes.with_raw_response.create( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: bgp_prefix = client.addressing.prefixes.bgp_prefixes.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(SyncSinglePage[BGPPrefix], bgp_prefix, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp_prefixes.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -98,8 +98,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp_prefixes.with_streaming_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -113,31 +113,31 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp_prefixes.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp_prefixes.with_raw_response.list( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: bgp_prefix = client.addressing.prefixes.bgp_prefixes.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: bgp_prefix = client.addressing.prefixes.bgp_prefixes.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", on_demand={"advertised": True}, ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) @@ -145,9 +145,9 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp_prefixes.with_raw_response.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert response.is_closed is True @@ -158,9 +158,9 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp_prefixes.with_streaming_response.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -174,40 +174,40 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp_prefixes.with_raw_response.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", account_id="", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp_prefixes.with_raw_response.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): client.addressing.prefixes.bgp_prefixes.with_raw_response.edit( bgp_prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: bgp_prefix = client.addressing.prefixes.bgp_prefixes.get( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp_prefixes.with_raw_response.get( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert response.is_closed is True @@ -218,9 +218,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp_prefixes.with_streaming_response.get( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -234,23 +234,23 @@ def test_streaming_response_get(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 `account_id` but received ''"): client.addressing.prefixes.bgp_prefixes.with_raw_response.get( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", account_id="", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp_prefixes.with_raw_response.get( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): client.addressing.prefixes.bgp_prefixes.with_raw_response.get( bgp_prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) @@ -260,16 +260,16 @@ class TestAsyncBGPPrefixes: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: bgp_prefix = await async_client.addressing.prefixes.bgp_prefixes.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: bgp_prefix = await async_client.addressing.prefixes.bgp_prefixes.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) @@ -277,8 +277,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -289,8 +289,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp_prefixes.with_streaming_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -304,29 +304,29 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.create( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: bgp_prefix = await async_client.addressing.prefixes.bgp_prefixes.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(AsyncSinglePage[BGPPrefix], bgp_prefix, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -337,8 +337,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp_prefixes.with_streaming_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -352,31 +352,31 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.list( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: bgp_prefix = await async_client.addressing.prefixes.bgp_prefixes.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: bgp_prefix = await async_client.addressing.prefixes.bgp_prefixes.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", on_demand={"advertised": True}, ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) @@ -384,9 +384,9 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert response.is_closed is True @@ -397,9 +397,9 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp_prefixes.with_streaming_response.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -413,40 +413,40 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", account_id="", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.edit( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.edit( bgp_prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bgp_prefix = await async_client.addressing.prefixes.bgp_prefixes.get( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.get( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert response.is_closed is True @@ -457,9 +457,9 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp_prefixes.with_streaming_response.get( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -473,21 +473,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.get( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", account_id="", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.get( - bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="7009ba364c7a5760798ceb430e603b74", + account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): await async_client.addressing.prefixes.bgp_prefixes.with_raw_response.get( bgp_prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) diff --git a/tests/api_resources/addressing/prefixes/test_delegations.py b/tests/api_resources/addressing/prefixes/test_delegations.py index dd17a7ac44b..83ec07279cc 100644 --- a/tests/api_resources/addressing/prefixes/test_delegations.py +++ b/tests/api_resources/addressing/prefixes/test_delegations.py @@ -21,8 +21,8 @@ class TestDelegations: @parametrize def test_method_create(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) @@ -31,8 +31,8 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) @@ -45,8 +45,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) as response: @@ -62,7 +62,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -71,7 +71,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.create( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) @@ -79,16 +79,16 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(SyncSinglePage[Delegations], delegation, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -99,8 +99,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -114,22 +114,22 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.list( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.delete( delegation_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert_matches_type(Optional[DelegationDeleteResponse], delegation, path=["response"]) @@ -137,8 +137,8 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.delete( delegation_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert response.is_closed is True @@ -150,8 +150,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.delete( delegation_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -167,21 +167,21 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.addressing.prefixes.delegations.with_raw_response.delete( delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.delete( delegation_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `delegation_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.delete( delegation_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) @@ -191,8 +191,8 @@ class TestAsyncDelegations: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) @@ -201,8 +201,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) @@ -215,8 +215,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) as response: @@ -232,7 +232,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -241,7 +241,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.create( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) @@ -249,16 +249,16 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(AsyncSinglePage[Delegations], delegation, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -269,8 +269,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -284,22 +284,22 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.list( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.delete( delegation_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert_matches_type(Optional[DelegationDeleteResponse], delegation, path=["response"]) @@ -307,8 +307,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.delete( delegation_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert response.is_closed is True @@ -320,8 +320,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.delete( delegation_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -337,19 +337,19 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.addressing.prefixes.delegations.with_raw_response.delete( delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.delete( delegation_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `delegation_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.delete( delegation_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) diff --git a/tests/api_resources/addressing/prefixes/test_service_bindings.py b/tests/api_resources/addressing/prefixes/test_service_bindings.py index 15fb7378606..98156802f9c 100644 --- a/tests/api_resources/addressing/prefixes/test_service_bindings.py +++ b/tests/api_resources/addressing/prefixes/test_service_bindings.py @@ -24,16 +24,16 @@ class TestServiceBindings: @parametrize def test_method_create(self, client: Cloudflare) -> None: service_binding = client.addressing.prefixes.service_bindings.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[ServiceBinding], service_binding, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: service_binding = client.addressing.prefixes.service_bindings.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", service_id="2db684ee7ca04e159946fd05b99e1bcd", ) @@ -42,8 +42,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.prefixes.service_bindings.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -54,8 +54,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.prefixes.service_bindings.with_streaming_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,29 +69,29 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.service_bindings.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.service_bindings.with_raw_response.create( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: service_binding = client.addressing.prefixes.service_bindings.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(SyncSinglePage[ServiceBinding], service_binding, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.service_bindings.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -102,8 +102,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.service_bindings.with_streaming_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -117,31 +117,31 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.service_bindings.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.service_bindings.with_raw_response.list( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: service_binding = client.addressing.prefixes.service_bindings.delete( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert_matches_type(ServiceBindingDeleteResponse, service_binding, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.service_bindings.with_raw_response.delete( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert response.is_closed is True @@ -152,9 +152,9 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.service_bindings.with_streaming_response.delete( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -168,40 +168,40 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.service_bindings.with_raw_response.delete( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", account_id="", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.service_bindings.with_raw_response.delete( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): client.addressing.prefixes.service_bindings.with_raw_response.delete( binding_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: service_binding = client.addressing.prefixes.service_bindings.get( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert_matches_type(Optional[ServiceBinding], service_binding, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.service_bindings.with_raw_response.get( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert response.is_closed is True @@ -212,9 +212,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.service_bindings.with_streaming_response.get( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -228,23 +228,23 @@ def test_streaming_response_get(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 `account_id` but received ''"): client.addressing.prefixes.service_bindings.with_raw_response.get( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", account_id="", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.service_bindings.with_raw_response.get( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): client.addressing.prefixes.service_bindings.with_raw_response.get( binding_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) @@ -254,16 +254,16 @@ class TestAsyncServiceBindings: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: service_binding = await async_client.addressing.prefixes.service_bindings.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[ServiceBinding], service_binding, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: service_binding = await async_client.addressing.prefixes.service_bindings.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", cidr="192.0.2.0/24", service_id="2db684ee7ca04e159946fd05b99e1bcd", ) @@ -272,8 +272,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.service_bindings.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -284,8 +284,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.service_bindings.with_streaming_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -299,29 +299,29 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.service_bindings.with_raw_response.create( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.service_bindings.with_raw_response.create( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: service_binding = await async_client.addressing.prefixes.service_bindings.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(AsyncSinglePage[ServiceBinding], service_binding, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.service_bindings.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -332,8 +332,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.service_bindings.with_streaming_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -347,31 +347,31 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.service_bindings.with_raw_response.list( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.service_bindings.with_raw_response.list( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: service_binding = await async_client.addressing.prefixes.service_bindings.delete( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert_matches_type(ServiceBindingDeleteResponse, service_binding, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.service_bindings.with_raw_response.delete( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert response.is_closed is True @@ -382,9 +382,9 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.service_bindings.with_streaming_response.delete( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -398,40 +398,40 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.service_bindings.with_raw_response.delete( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", account_id="", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.service_bindings.with_raw_response.delete( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): await async_client.addressing.prefixes.service_bindings.with_raw_response.delete( binding_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: service_binding = await async_client.addressing.prefixes.service_bindings.get( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert_matches_type(Optional[ServiceBinding], service_binding, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.service_bindings.with_raw_response.get( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) assert response.is_closed is True @@ -442,9 +442,9 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.service_bindings.with_streaming_response.get( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -458,21 +458,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.service_bindings.with_raw_response.get( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", account_id="", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.service_bindings.with_raw_response.get( - binding_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + binding_id="0429b49b6a5155297b78e75a44b09e14", + account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): await async_client.addressing.prefixes.service_bindings.with_raw_response.get( binding_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", + prefix_id="2af39739cc4e3b5910c918468bb89828", ) diff --git a/tests/api_resources/addressing/test_address_maps.py b/tests/api_resources/addressing/test_address_maps.py index 217bc4bbe15..ed645091db9 100644 --- a/tests/api_resources/addressing/test_address_maps.py +++ b/tests/api_resources/addressing/test_address_maps.py @@ -26,14 +26,14 @@ class TestAddressMaps: @parametrize def test_method_create(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[AddressMapCreateResponse], address_map, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", description="My Ecommerce zones", enabled=True, ips=["192.0.2.1"], @@ -49,7 +49,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -60,7 +60,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -80,14 +80,14 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(SyncSinglePage[AddressMap], address_map, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -98,7 +98,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -118,16 +118,16 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(AddressMapDeleteResponse, address_map, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -138,8 +138,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -153,29 +153,29 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.with_raw_response.delete( address_map_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.edit( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[AddressMap], address_map, path=["response"]) @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.edit( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", default_sni="*.example.com", description="My Ecommerce zones", enabled=True, @@ -185,8 +185,8 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.edit( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -197,8 +197,8 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.edit( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -212,29 +212,29 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.with_raw_response.edit( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.with_raw_response.edit( address_map_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.get( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[AddressMapGetResponse], address_map, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.get( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -245,8 +245,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.get( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -260,14 +260,14 @@ def test_streaming_response_get(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 `account_id` but received ''"): client.addressing.address_maps.with_raw_response.get( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.with_raw_response.get( address_map_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @@ -277,14 +277,14 @@ class TestAsyncAddressMaps: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[AddressMapCreateResponse], address_map, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", description="My Ecommerce zones", enabled=True, ips=["192.0.2.1"], @@ -300,7 +300,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -311,7 +311,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -331,14 +331,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(AsyncSinglePage[AddressMap], address_map, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -349,7 +349,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -369,16 +369,16 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(AddressMapDeleteResponse, address_map, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -389,8 +389,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -404,29 +404,29 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.delete( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.delete( address_map_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.edit( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[AddressMap], address_map, path=["response"]) @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.edit( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", default_sni="*.example.com", description="My Ecommerce zones", enabled=True, @@ -436,8 +436,8 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.edit( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -448,8 +448,8 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.edit( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -463,29 +463,29 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.edit( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.edit( address_map_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.get( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[AddressMapGetResponse], address_map, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.get( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -496,8 +496,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.get( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -511,12 +511,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.get( - address_map_id="023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.get( address_map_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) diff --git a/tests/api_resources/addressing/test_loa_documents.py b/tests/api_resources/addressing/test_loa_documents.py index 142049a4664..6cfbe04f072 100644 --- a/tests/api_resources/addressing/test_loa_documents.py +++ b/tests/api_resources/addressing/test_loa_documents.py @@ -29,7 +29,7 @@ class TestLOADocuments: @parametrize def test_method_create(self, client: Cloudflare) -> None: loa_document = client.addressing.loa_documents.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", loa_document="@document.pdf", ) assert_matches_type(Optional[LOADocumentCreateResponse], loa_document, path=["response"]) @@ -38,7 +38,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.loa_documents.with_raw_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", loa_document="@document.pdf", ) @@ -51,7 +51,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.loa_documents.with_streaming_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", loa_document="@document.pdf", ) as response: assert not response.is_closed @@ -78,11 +78,11 @@ def test_path_params_create(self, client: Cloudflare) -> None: @pytest.mark.respx(base_url=base_url) def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: respx_mock.get( - "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" + "/accounts/258def64c72dae45f3e4c8516e2111f2/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) loa_document = client.addressing.loa_documents.get( loa_document_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert loa_document.is_closed assert loa_document.json() == {"foo": "bar"} @@ -96,12 +96,12 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @pytest.mark.respx(base_url=base_url) def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: respx_mock.get( - "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" + "/accounts/258def64c72dae45f3e4c8516e2111f2/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) loa_document = client.addressing.loa_documents.with_raw_response.get( loa_document_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert loa_document.is_closed is True @@ -116,11 +116,11 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N @pytest.mark.respx(base_url=base_url) def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: respx_mock.get( - "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" + "/accounts/258def64c72dae45f3e4c8516e2111f2/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.addressing.loa_documents.with_streaming_response.get( loa_document_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as loa_document: assert not loa_document.is_closed assert loa_document.http_request.headers.get("X-Stainless-Lang") == "python" @@ -146,7 +146,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `loa_document_id` but received ''"): client.addressing.loa_documents.with_raw_response.get( loa_document_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @@ -157,7 +157,7 @@ class TestAsyncLOADocuments: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: loa_document = await async_client.addressing.loa_documents.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", loa_document="@document.pdf", ) assert_matches_type(Optional[LOADocumentCreateResponse], loa_document, path=["response"]) @@ -166,7 +166,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.loa_documents.with_raw_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", loa_document="@document.pdf", ) @@ -179,7 +179,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.loa_documents.with_streaming_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", loa_document="@document.pdf", ) as response: assert not response.is_closed @@ -206,11 +206,11 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @pytest.mark.respx(base_url=base_url) async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: respx_mock.get( - "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" + "/accounts/258def64c72dae45f3e4c8516e2111f2/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) loa_document = await async_client.addressing.loa_documents.get( loa_document_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert loa_document.is_closed assert await loa_document.json() == {"foo": "bar"} @@ -224,12 +224,12 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR @pytest.mark.respx(base_url=base_url) async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: respx_mock.get( - "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" + "/accounts/258def64c72dae45f3e4c8516e2111f2/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) loa_document = await async_client.addressing.loa_documents.with_raw_response.get( loa_document_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert loa_document.is_closed is True @@ -244,11 +244,11 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: @pytest.mark.respx(base_url=base_url) async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: respx_mock.get( - "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" + "/accounts/258def64c72dae45f3e4c8516e2111f2/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.addressing.loa_documents.with_streaming_response.get( loa_document_id="d933b1530bc56c9953cf8ce166da8004", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as loa_document: assert not loa_document.is_closed assert loa_document.http_request.headers.get("X-Stainless-Lang") == "python" @@ -274,5 +274,5 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `loa_document_id` but received ''"): await async_client.addressing.loa_documents.with_raw_response.get( loa_document_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) diff --git a/tests/api_resources/addressing/test_prefixes.py b/tests/api_resources/addressing/test_prefixes.py index bf75c6e7bd0..955b4eaa157 100644 --- a/tests/api_resources/addressing/test_prefixes.py +++ b/tests/api_resources/addressing/test_prefixes.py @@ -21,7 +21,7 @@ class TestPrefixes: @parametrize def test_method_create(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", asn=209242, cidr="192.0.2.0/24", loa_document_id="d933b1530bc56c9953cf8ce166da8004", @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", asn=209242, cidr="192.0.2.0/24", loa_document_id="d933b1530bc56c9953cf8ce166da8004", @@ -45,7 +45,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", asn=209242, cidr="192.0.2.0/24", loa_document_id="d933b1530bc56c9953cf8ce166da8004", @@ -71,14 +71,14 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(SyncSinglePage[Prefix], prefix, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -89,7 +89,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -109,16 +109,16 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.delete( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(PrefixDeleteResponse, prefix, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.delete( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -129,8 +129,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.delete( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -144,21 +144,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.with_raw_response.delete( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.with_raw_response.delete( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", description="Internal test prefix", ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) @@ -166,8 +166,8 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", description="Internal test prefix", ) @@ -179,8 +179,8 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", description="Internal test prefix", ) as response: assert not response.is_closed @@ -195,7 +195,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.with_raw_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", description="Internal test prefix", ) @@ -203,23 +203,23 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.with_raw_response.edit( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", description="Internal test prefix", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -230,8 +230,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -245,14 +245,14 @@ def test_streaming_response_get(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 `account_id` but received ''"): client.addressing.prefixes.with_raw_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.with_raw_response.get( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @@ -262,7 +262,7 @@ class TestAsyncPrefixes: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", asn=209242, cidr="192.0.2.0/24", loa_document_id="d933b1530bc56c9953cf8ce166da8004", @@ -272,7 +272,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", asn=209242, cidr="192.0.2.0/24", loa_document_id="d933b1530bc56c9953cf8ce166da8004", @@ -286,7 +286,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.create( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", asn=209242, cidr="192.0.2.0/24", loa_document_id="d933b1530bc56c9953cf8ce166da8004", @@ -312,14 +312,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(AsyncSinglePage[Prefix], prefix, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -330,7 +330,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -350,16 +350,16 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.delete( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(PrefixDeleteResponse, prefix, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.delete( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -370,8 +370,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.delete( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -385,21 +385,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.delete( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.delete( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", description="Internal test prefix", ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) @@ -407,8 +407,8 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", description="Internal test prefix", ) @@ -420,8 +420,8 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", description="Internal test prefix", ) as response: assert not response.is_closed @@ -436,7 +436,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.edit( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", description="Internal test prefix", ) @@ -444,23 +444,23 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.edit( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", description="Internal test prefix", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -471,8 +471,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -486,12 +486,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.get( - prefix_id="023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="2af39739cc4e3b5910c918468bb89828", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.get( prefix_id="", - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) diff --git a/tests/api_resources/addressing/test_services.py b/tests/api_resources/addressing/test_services.py index e54cb33ece0..8d51e635ff9 100644 --- a/tests/api_resources/addressing/test_services.py +++ b/tests/api_resources/addressing/test_services.py @@ -21,14 +21,14 @@ class TestServices: @parametrize def test_method_list(self, client: Cloudflare) -> None: service = client.addressing.services.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(SyncSinglePage[ServiceListResponse], service, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.services.with_raw_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.services.with_streaming_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -63,14 +63,14 @@ class TestAsyncServices: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: service = await async_client.addressing.services.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert_matches_type(AsyncSinglePage[ServiceListResponse], service, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.services.with_raw_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) assert response.is_closed is True @@ -81,7 +81,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.services.with_streaming_response.list( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="258def64c72dae45f3e4c8516e2111f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_abuse_reports.py b/tests/api_resources/test_abuse_reports.py deleted file mode 100644 index ff8d92dee38..00000000000 --- a/tests/api_resources/test_abuse_reports.py +++ /dev/null @@ -1,243 +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 - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestAbuseReports: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") - @parametrize - def test_method_create(self, client: Cloudflare) -> None: - abuse_report = client.abuse_reports.create( - report_type="abuse_dmca", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - email="email", - email2="email2", - host_notification="send", - ncmec_notification="send", - owner_notification="send", - urls="urls", - ) - assert_matches_type(str, abuse_report, path=["response"]) - - @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") - @parametrize - def test_method_create_with_all_params(self, client: Cloudflare) -> None: - abuse_report = client.abuse_reports.create( - report_type="abuse_dmca", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - email="email", - email2="email2", - host_notification="send", - ncmec_notification="send", - owner_notification="send", - urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", - comments="x", - company="x", - country="x", - destination_ips="destination_ips", - justification="x", - name="x", - ncsei_subject_representation=True, - original_work="x", - ports_protocols="ports_protocols", - signature="signature", - source_ips="source_ips", - state="x", - tele="x", - title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", - ) - assert_matches_type(str, abuse_report, path=["response"]) - - @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") - @parametrize - def test_raw_response_create(self, client: Cloudflare) -> None: - response = client.abuse_reports.with_raw_response.create( - report_type="abuse_dmca", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - email="email", - email2="email2", - host_notification="send", - ncmec_notification="send", - owner_notification="send", - urls="urls", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - abuse_report = response.parse() - assert_matches_type(str, abuse_report, path=["response"]) - - @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") - @parametrize - def test_streaming_response_create(self, client: Cloudflare) -> None: - with client.abuse_reports.with_streaming_response.create( - report_type="abuse_dmca", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - email="email", - email2="email2", - host_notification="send", - ncmec_notification="send", - owner_notification="send", - urls="urls", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - abuse_report = response.parse() - assert_matches_type(str, abuse_report, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") - @parametrize - def test_path_params_create(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.abuse_reports.with_raw_response.create( - report_type="abuse_dmca", - account_id="", - act="abuse_dmca", - email="email", - email2="email2", - host_notification="send", - ncmec_notification="send", - owner_notification="send", - urls="urls", - ) - - -class TestAsyncAbuseReports: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") - @parametrize - async def test_method_create(self, async_client: AsyncCloudflare) -> None: - abuse_report = await async_client.abuse_reports.create( - report_type="abuse_dmca", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - email="email", - email2="email2", - host_notification="send", - ncmec_notification="send", - owner_notification="send", - urls="urls", - ) - assert_matches_type(str, abuse_report, path=["response"]) - - @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: - abuse_report = await async_client.abuse_reports.create( - report_type="abuse_dmca", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - email="email", - email2="email2", - host_notification="send", - ncmec_notification="send", - owner_notification="send", - urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", - comments="x", - company="x", - country="x", - destination_ips="destination_ips", - justification="x", - name="x", - ncsei_subject_representation=True, - original_work="x", - ports_protocols="ports_protocols", - signature="signature", - source_ips="source_ips", - state="x", - tele="x", - title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", - ) - assert_matches_type(str, abuse_report, path=["response"]) - - @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") - @parametrize - async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: - response = await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_dmca", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - email="email", - email2="email2", - host_notification="send", - ncmec_notification="send", - owner_notification="send", - urls="urls", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - abuse_report = await response.parse() - assert_matches_type(str, abuse_report, path=["response"]) - - @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") - @parametrize - async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: - async with async_client.abuse_reports.with_streaming_response.create( - report_type="abuse_dmca", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - email="email", - email2="email2", - host_notification="send", - ncmec_notification="send", - owner_notification="send", - urls="urls", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - abuse_report = await response.parse() - assert_matches_type(str, abuse_report, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") - @parametrize - async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_dmca", - account_id="", - act="abuse_dmca", - email="email", - email2="email2", - host_notification="send", - ncmec_notification="send", - owner_notification="send", - urls="urls", - ) diff --git a/tests/api_resources/test_origin_post_quantum_encryption.py b/tests/api_resources/test_origin_post_quantum_encryption.py index c3be9266319..68dff01d3e0 100644 --- a/tests/api_resources/test_origin_post_quantum_encryption.py +++ b/tests/api_resources/test_origin_post_quantum_encryption.py @@ -9,10 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.origin_post_quantum_encryption import ( - OriginPostQuantumEncryptionGetResponse, - OriginPostQuantumEncryptionEditResponse, -) +from cloudflare.types.origin_post_quantum_encryption import OriginPostQuantumEncryptionGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,58 +17,6 @@ class TestOriginPostQuantumEncryption: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="TODO: investigate broken test") - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - origin_post_quantum_encryption = client.origin_post_quantum_encryption.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="preferred", - ) - assert_matches_type( - Optional[OriginPostQuantumEncryptionEditResponse], origin_post_quantum_encryption, path=["response"] - ) - - @pytest.mark.skip(reason="TODO: investigate broken test") - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.origin_post_quantum_encryption.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="preferred", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - origin_post_quantum_encryption = response.parse() - assert_matches_type( - Optional[OriginPostQuantumEncryptionEditResponse], origin_post_quantum_encryption, path=["response"] - ) - - @pytest.mark.skip(reason="TODO: investigate broken test") - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.origin_post_quantum_encryption.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="preferred", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - origin_post_quantum_encryption = response.parse() - assert_matches_type( - Optional[OriginPostQuantumEncryptionEditResponse], origin_post_quantum_encryption, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: investigate broken test") - @parametrize - def test_path_params_edit(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.origin_post_quantum_encryption.with_raw_response.edit( - zone_id="", - value="preferred", - ) - @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: @@ -124,58 +69,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginPostQuantumEncryption: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="TODO: investigate broken test") - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - origin_post_quantum_encryption = await async_client.origin_post_quantum_encryption.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="preferred", - ) - assert_matches_type( - Optional[OriginPostQuantumEncryptionEditResponse], origin_post_quantum_encryption, path=["response"] - ) - - @pytest.mark.skip(reason="TODO: investigate broken test") - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.origin_post_quantum_encryption.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="preferred", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - origin_post_quantum_encryption = await response.parse() - assert_matches_type( - Optional[OriginPostQuantumEncryptionEditResponse], origin_post_quantum_encryption, path=["response"] - ) - - @pytest.mark.skip(reason="TODO: investigate broken test") - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.origin_post_quantum_encryption.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - value="preferred", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - origin_post_quantum_encryption = await response.parse() - assert_matches_type( - Optional[OriginPostQuantumEncryptionEditResponse], origin_post_quantum_encryption, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: investigate broken test") - @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_id` but received ''"): - await async_client.origin_post_quantum_encryption.with_raw_response.edit( - zone_id="", - value="preferred", - ) - @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/organizations/test_doh.py b/tests/api_resources/zero_trust/organizations/test_doh.py index 3b0c04a90dc..58ac94ae30a 100644 --- a/tests/api_resources/zero_trust/organizations/test_doh.py +++ b/tests/api_resources/zero_trust/organizations/test_doh.py @@ -28,7 +28,7 @@ def test_method_update(self, client: Cloudflare) -> None: def test_method_update_with_all_params(self, client: Cloudflare) -> None: doh = client.zero_trust.organizations.doh.update( account_id="023e105f4ecef8ad9ca31a8372d0c353", - jwt_duration="800h", + doh_jwt_duration="800h", service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) assert_matches_type(Optional[DOHUpdateResponse], doh, path=["response"]) @@ -117,7 +117,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: doh = await async_client.zero_trust.organizations.doh.update( account_id="023e105f4ecef8ad9ca31a8372d0c353", - jwt_duration="800h", + doh_jwt_duration="800h", service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) assert_matches_type(Optional[DOHUpdateResponse], doh, path=["response"])