Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 22, 2024
1 parent 6bf76e3 commit f1c1451
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 90 deletions.
4 changes: 2 additions & 2 deletions src/cloudflare/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def __init__(
@property
@override
def qs(self) -> Querystring:
return Querystring(array_format="comma")
return Querystring(array_format="repeat")

@property
@override
Expand Down Expand Up @@ -697,7 +697,7 @@ def __init__(
@property
@override
def qs(self) -> Querystring:
return Querystring(array_format="comma")
return Querystring(array_format="repeat")

@property
@override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Union
from typing import Union, Optional

__all__ = ["GroupEditResponse"]

GroupEditResponse = Union[List[object], str, object]
GroupEditResponse = Union[Optional[str], Optional[object]]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Union
from typing import Union, Optional

__all__ = ["GroupGetResponse"]

GroupGetResponse = Union[List[object], str, object]
GroupGetResponse = Union[Optional[str], Optional[object]]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Union
from typing import Union, Optional

__all__ = ["RuleGetResponse"]

RuleGetResponse = Union[List[object], str, object]
RuleGetResponse = Union[Optional[str], Optional[object]]
32 changes: 16 additions & 16 deletions tests/api_resources/images/v1/test_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestKeys:
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
key = client.images.v1.keys.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ImagesImageKeys, key, path=["response"])
Expand All @@ -30,7 +30,7 @@ def test_method_update(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
response = client.images.v1.keys.with_raw_response.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)

Expand All @@ -43,7 +43,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
with client.images.v1.keys.with_streaming_response.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
Expand All @@ -59,7 +59,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.images.v1.keys.with_raw_response.update(
"string",
"someKey",
account_id="",
)

Expand Down Expand Up @@ -115,7 +115,7 @@ def test_path_params_list(self, client: Cloudflare) -> None:
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
key = client.images.v1.keys.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ImagesImageKeys, key, path=["response"])
Expand All @@ -124,7 +124,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
response = client.images.v1.keys.with_raw_response.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)

Expand All @@ -137,7 +137,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
with client.images.v1.keys.with_streaming_response.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
Expand All @@ -153,7 +153,7 @@ 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.images.v1.keys.with_raw_response.delete(
"string",
"someKey",
account_id="",
)

Expand All @@ -171,7 +171,7 @@ class TestAsyncKeys:
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
key = await async_client.images.v1.keys.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ImagesImageKeys, key, path=["response"])
Expand All @@ -180,7 +180,7 @@ 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.images.v1.keys.with_raw_response.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)

Expand All @@ -193,7 +193,7 @@ 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.images.v1.keys.with_streaming_response.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
Expand All @@ -209,7 +209,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.images.v1.keys.with_raw_response.update(
"string",
"someKey",
account_id="",
)

Expand Down Expand Up @@ -265,7 +265,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
key = await async_client.images.v1.keys.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ImagesImageKeys, key, path=["response"])
Expand All @@ -274,7 +274,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
response = await async_client.images.v1.keys.with_raw_response.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)

Expand All @@ -287,7 +287,7 @@ 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.images.v1.keys.with_streaming_response.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
Expand All @@ -303,7 +303,7 @@ 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.images.v1.keys.with_raw_response.delete(
"string",
"someKey",
account_id="",
)

Expand Down
Loading

0 comments on commit f1c1451

Please sign in to comment.