Skip to content

Commit

Permalink
feat: update via SDK Studio (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Mar 11, 2024
1 parent 33237d6 commit 2f6eef1
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 70 deletions.
4 changes: 2 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2352,7 +2352,7 @@ Methods:

# SecondaryDNS

## ForceAxfrs
## ForceAXFR

Types:

Expand All @@ -2362,7 +2362,7 @@ from cloudflare.types.secondary_dns import SecondaryDNSForceResult

Methods:

- <code title="post /zones/{zone_id}/secondary_dns/force_axfr">client.secondary_dns.force_axfrs.<a href="./src/cloudflare/resources/secondary_dns/force_axfrs.py">create</a>(\*, zone_id) -> <a href="./src/cloudflare/types/secondary_dns/secondary_dns_force_result.py">str</a></code>
- <code title="post /zones/{zone_id}/secondary_dns/force_axfr">client.secondary_dns.force_axfr.<a href="./src/cloudflare/resources/secondary_dns/force_axfr.py">create</a>(\*, zone_id) -> <a href="./src/cloudflare/types/secondary_dns/secondary_dns_force_result.py">str</a></code>

## Incoming

Expand Down
26 changes: 13 additions & 13 deletions src/cloudflare/resources/secondary_dns/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
OutgoingWithStreamingResponse,
AsyncOutgoingWithStreamingResponse,
)
from .force_axfrs import (
ForceAxfrs,
AsyncForceAxfrs,
ForceAxfrsWithRawResponse,
AsyncForceAxfrsWithRawResponse,
ForceAxfrsWithStreamingResponse,
AsyncForceAxfrsWithStreamingResponse,
from .force_axfr import (
ForceAXFR,
AsyncForceAXFR,
ForceAXFRWithRawResponse,
AsyncForceAXFRWithRawResponse,
ForceAXFRWithStreamingResponse,
AsyncForceAXFRWithStreamingResponse,
)
from .secondary_dns import (
SecondaryDNS,
Expand All @@ -58,12 +58,12 @@
)

__all__ = [
"ForceAxfrs",
"AsyncForceAxfrs",
"ForceAxfrsWithRawResponse",
"AsyncForceAxfrsWithRawResponse",
"ForceAxfrsWithStreamingResponse",
"AsyncForceAxfrsWithStreamingResponse",
"ForceAXFR",
"AsyncForceAXFR",
"ForceAXFRWithRawResponse",
"AsyncForceAXFRWithRawResponse",
"ForceAXFRWithStreamingResponse",
"AsyncForceAXFRWithStreamingResponse",
"Incoming",
"AsyncIncoming",
"IncomingWithRawResponse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
make_request_options,
)

__all__ = ["ForceAxfrs", "AsyncForceAxfrs"]
__all__ = ["ForceAXFR", "AsyncForceAXFR"]


class ForceAxfrs(SyncAPIResource):
class ForceAXFR(SyncAPIResource):
@cached_property
def with_raw_response(self) -> ForceAxfrsWithRawResponse:
return ForceAxfrsWithRawResponse(self)
def with_raw_response(self) -> ForceAXFRWithRawResponse:
return ForceAXFRWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> ForceAxfrsWithStreamingResponse:
return ForceAxfrsWithStreamingResponse(self)
def with_streaming_response(self) -> ForceAXFRWithStreamingResponse:
return ForceAXFRWithStreamingResponse(self)

def create(
self,
Expand Down Expand Up @@ -68,14 +68,14 @@ def create(
)


class AsyncForceAxfrs(AsyncAPIResource):
class AsyncForceAXFR(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncForceAxfrsWithRawResponse:
return AsyncForceAxfrsWithRawResponse(self)
def with_raw_response(self) -> AsyncForceAXFRWithRawResponse:
return AsyncForceAXFRWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncForceAxfrsWithStreamingResponse:
return AsyncForceAxfrsWithStreamingResponse(self)
def with_streaming_response(self) -> AsyncForceAXFRWithStreamingResponse:
return AsyncForceAXFRWithStreamingResponse(self)

async def create(
self,
Expand Down Expand Up @@ -113,37 +113,37 @@ async def create(
)


class ForceAxfrsWithRawResponse:
def __init__(self, force_axfrs: ForceAxfrs) -> None:
self._force_axfrs = force_axfrs
class ForceAXFRWithRawResponse:
def __init__(self, force_axfr: ForceAXFR) -> None:
self._force_axfr = force_axfr

self.create = to_raw_response_wrapper(
force_axfrs.create,
force_axfr.create,
)


class AsyncForceAxfrsWithRawResponse:
def __init__(self, force_axfrs: AsyncForceAxfrs) -> None:
self._force_axfrs = force_axfrs
class AsyncForceAXFRWithRawResponse:
def __init__(self, force_axfr: AsyncForceAXFR) -> None:
self._force_axfr = force_axfr

self.create = async_to_raw_response_wrapper(
force_axfrs.create,
force_axfr.create,
)


class ForceAxfrsWithStreamingResponse:
def __init__(self, force_axfrs: ForceAxfrs) -> None:
self._force_axfrs = force_axfrs
class ForceAXFRWithStreamingResponse:
def __init__(self, force_axfr: ForceAXFR) -> None:
self._force_axfr = force_axfr

self.create = to_streamed_response_wrapper(
force_axfrs.create,
force_axfr.create,
)


class AsyncForceAxfrsWithStreamingResponse:
def __init__(self, force_axfrs: AsyncForceAxfrs) -> None:
self._force_axfrs = force_axfrs
class AsyncForceAXFRWithStreamingResponse:
def __init__(self, force_axfr: AsyncForceAXFR) -> None:
self._force_axfr = force_axfr

self.create = async_to_streamed_response_wrapper(
force_axfrs.create,
force_axfr.create,
)
40 changes: 20 additions & 20 deletions src/cloudflare/resources/secondary_dns/secondary_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,24 @@
AsyncOutgoingWithStreamingResponse,
)
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from .force_axfrs import (
ForceAxfrs,
AsyncForceAxfrs,
ForceAxfrsWithRawResponse,
AsyncForceAxfrsWithRawResponse,
ForceAxfrsWithStreamingResponse,
AsyncForceAxfrsWithStreamingResponse,
from .force_axfr import (
ForceAXFR,
AsyncForceAXFR,
ForceAXFRWithRawResponse,
AsyncForceAXFRWithRawResponse,
ForceAXFRWithStreamingResponse,
AsyncForceAXFRWithStreamingResponse,
)
from ..._resource import SyncAPIResource, AsyncAPIResource
from .outgoing.outgoing import Outgoing, AsyncOutgoing

__all__ = ["SecondaryDNS", "AsyncSecondaryDNS"]


class SecondaryDNS(SyncAPIResource):
@cached_property
def force_axfrs(self) -> ForceAxfrs:
return ForceAxfrs(self._client)
def force_axfr(self) -> ForceAXFR:
return ForceAXFR(self._client)

@cached_property
def incoming(self) -> Incoming:
Expand Down Expand Up @@ -93,8 +93,8 @@ def with_streaming_response(self) -> SecondaryDNSWithStreamingResponse:

class AsyncSecondaryDNS(AsyncAPIResource):
@cached_property
def force_axfrs(self) -> AsyncForceAxfrs:
return AsyncForceAxfrs(self._client)
def force_axfr(self) -> AsyncForceAXFR:
return AsyncForceAXFR(self._client)

@cached_property
def incoming(self) -> AsyncIncoming:
Expand Down Expand Up @@ -130,8 +130,8 @@ def __init__(self, secondary_dns: SecondaryDNS) -> None:
self._secondary_dns = secondary_dns

@cached_property
def force_axfrs(self) -> ForceAxfrsWithRawResponse:
return ForceAxfrsWithRawResponse(self._secondary_dns.force_axfrs)
def force_axfr(self) -> ForceAXFRWithRawResponse:
return ForceAXFRWithRawResponse(self._secondary_dns.force_axfr)

@cached_property
def incoming(self) -> IncomingWithRawResponse:
Expand Down Expand Up @@ -159,8 +159,8 @@ def __init__(self, secondary_dns: AsyncSecondaryDNS) -> None:
self._secondary_dns = secondary_dns

@cached_property
def force_axfrs(self) -> AsyncForceAxfrsWithRawResponse:
return AsyncForceAxfrsWithRawResponse(self._secondary_dns.force_axfrs)
def force_axfr(self) -> AsyncForceAXFRWithRawResponse:
return AsyncForceAXFRWithRawResponse(self._secondary_dns.force_axfr)

@cached_property
def incoming(self) -> AsyncIncomingWithRawResponse:
Expand Down Expand Up @@ -188,8 +188,8 @@ def __init__(self, secondary_dns: SecondaryDNS) -> None:
self._secondary_dns = secondary_dns

@cached_property
def force_axfrs(self) -> ForceAxfrsWithStreamingResponse:
return ForceAxfrsWithStreamingResponse(self._secondary_dns.force_axfrs)
def force_axfr(self) -> ForceAXFRWithStreamingResponse:
return ForceAXFRWithStreamingResponse(self._secondary_dns.force_axfr)

@cached_property
def incoming(self) -> IncomingWithStreamingResponse:
Expand Down Expand Up @@ -217,8 +217,8 @@ def __init__(self, secondary_dns: AsyncSecondaryDNS) -> None:
self._secondary_dns = secondary_dns

@cached_property
def force_axfrs(self) -> AsyncForceAxfrsWithStreamingResponse:
return AsyncForceAxfrsWithStreamingResponse(self._secondary_dns.force_axfrs)
def force_axfr(self) -> AsyncForceAXFRWithStreamingResponse:
return AsyncForceAXFRWithStreamingResponse(self._secondary_dns.force_axfr)

@cached_property
def incoming(self) -> AsyncIncomingWithStreamingResponse:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")


class TestForceAxfrs:
class TestForceAXFR:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])

@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
force_axfr = client.secondary_dns.force_axfrs.create(
force_axfr = client.secondary_dns.force_axfr.create(
zone_id="269d8f4853475ca241c4e730be286b20",
)
assert_matches_type(str, force_axfr, path=["response"])

@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.secondary_dns.force_axfrs.with_raw_response.create(
response = client.secondary_dns.force_axfr.with_raw_response.create(
zone_id="269d8f4853475ca241c4e730be286b20",
)

Expand All @@ -39,7 +39,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.secondary_dns.force_axfrs.with_streaming_response.create(
with client.secondary_dns.force_axfr.with_streaming_response.create(
zone_id="269d8f4853475ca241c4e730be286b20",
) as response:
assert not response.is_closed
Expand All @@ -51,21 +51,21 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True


class TestAsyncForceAxfrs:
class TestAsyncForceAXFR:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])

@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
force_axfr = await async_client.secondary_dns.force_axfrs.create(
force_axfr = await async_client.secondary_dns.force_axfr.create(
zone_id="269d8f4853475ca241c4e730be286b20",
)
assert_matches_type(str, force_axfr, path=["response"])

@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.secondary_dns.force_axfrs.with_raw_response.create(
response = await async_client.secondary_dns.force_axfr.with_raw_response.create(
zone_id="269d8f4853475ca241c4e730be286b20",
)

Expand All @@ -77,7 +77,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
async with async_client.secondary_dns.force_axfrs.with_streaming_response.create(
async with async_client.secondary_dns.force_axfr.with_streaming_response.create(
zone_id="269d8f4853475ca241c4e730be286b20",
) as response:
assert not response.is_closed
Expand Down

0 comments on commit 2f6eef1

Please sign in to comment.