Skip to content

Commit 4a89216

Browse files
Merge remote-tracking branch 'origin/next' into staging-next
2 parents 13b6d32 + cb00d08 commit 4a89216

5 files changed

Lines changed: 37 additions & 37 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2192
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8e03d0874fc41902f7e931896b4a36b5f67d282e407dd8c488971f7c21b77383.yml
33
openapi_spec_hash: 50ad0379843478562ee9630f95d94475
4-
config_hash: f5c07311bfa023d17aa668eba5d06a13
4+
config_hash: a9df5f26701f581fbf876dcc7094ab00

src/cloudflare/resources/iam/user_groups/members.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def create(
5353
user_group_id: str,
5454
*,
5555
account_id: str | None = None,
56-
body: Iterable[member_create_params.Body],
56+
members: Iterable[member_create_params.Member],
5757
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5858
# The extra values given here take precedence over values defined on the client or passed to this method.
5959
extra_headers: Headers | None = None,
@@ -89,7 +89,7 @@ def create(
8989
account_id=account_id,
9090
user_group_id=user_group_id,
9191
),
92-
body=maybe_transform(body, Iterable[member_create_params.Body]),
92+
body=maybe_transform(members, Iterable[member_create_params.Member]),
9393
options=make_request_options(
9494
extra_headers=extra_headers,
9595
extra_query=extra_query,
@@ -105,7 +105,7 @@ def update(
105105
user_group_id: str,
106106
*,
107107
account_id: str | None = None,
108-
body: Iterable[member_update_params.Body],
108+
members: Iterable[member_update_params.Member],
109109
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
110110
# The extra values given here take precedence over values defined on the client or passed to this method.
111111
extra_headers: Headers | None = None,
@@ -121,7 +121,7 @@ def update(
121121
122122
user_group_id: User Group identifier tag.
123123
124-
body: Set/Replace members to a user group.
124+
members: Set/Replace members to a user group.
125125
126126
extra_headers: Send extra headers
127127
@@ -144,7 +144,7 @@ def update(
144144
user_group_id=user_group_id,
145145
),
146146
page=SyncSinglePage[MemberUpdateResponse],
147-
body=maybe_transform(body, Iterable[member_update_params.Body]),
147+
body=maybe_transform(members, Iterable[member_update_params.Member]),
148148
options=make_request_options(
149149
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
150150
),
@@ -297,7 +297,7 @@ async def create(
297297
user_group_id: str,
298298
*,
299299
account_id: str | None = None,
300-
body: Iterable[member_create_params.Body],
300+
members: Iterable[member_create_params.Member],
301301
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
302302
# The extra values given here take precedence over values defined on the client or passed to this method.
303303
extra_headers: Headers | None = None,
@@ -333,7 +333,7 @@ async def create(
333333
account_id=account_id,
334334
user_group_id=user_group_id,
335335
),
336-
body=await async_maybe_transform(body, Iterable[member_create_params.Body]),
336+
body=await async_maybe_transform(members, Iterable[member_create_params.Member]),
337337
options=make_request_options(
338338
extra_headers=extra_headers,
339339
extra_query=extra_query,
@@ -349,7 +349,7 @@ def update(
349349
user_group_id: str,
350350
*,
351351
account_id: str | None = None,
352-
body: Iterable[member_update_params.Body],
352+
members: Iterable[member_update_params.Member],
353353
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
354354
# The extra values given here take precedence over values defined on the client or passed to this method.
355355
extra_headers: Headers | None = None,
@@ -365,7 +365,7 @@ def update(
365365
366366
user_group_id: User Group identifier tag.
367367
368-
body: Set/Replace members to a user group.
368+
members: Set/Replace members to a user group.
369369
370370
extra_headers: Send extra headers
371371
@@ -388,7 +388,7 @@ def update(
388388
user_group_id=user_group_id,
389389
),
390390
page=AsyncSinglePage[MemberUpdateResponse],
391-
body=maybe_transform(body, Iterable[member_update_params.Body]),
391+
body=maybe_transform(members, Iterable[member_update_params.Member]),
392392
options=make_request_options(
393393
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
394394
),

src/cloudflare/types/iam/user_groups/member_create_params.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
from typing import Iterable
66
from typing_extensions import Required, TypedDict
77

8-
__all__ = ["MemberCreateParams", "Body"]
8+
__all__ = ["MemberCreateParams", "Member"]
99

1010

1111
class MemberCreateParams(TypedDict, total=False):
1212
account_id: str
1313
"""Account identifier tag."""
1414

15-
body: Required[Iterable[Body]]
15+
members: Required[Iterable[Member]]
1616

1717

18-
class Body(TypedDict, total=False):
18+
class Member(TypedDict, total=False):
1919
id: Required[str]
2020
"""The identifier of an existing account Member."""

src/cloudflare/types/iam/user_groups/member_update_params.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
from typing import Iterable
66
from typing_extensions import Required, TypedDict
77

8-
__all__ = ["MemberUpdateParams", "Body"]
8+
__all__ = ["MemberUpdateParams", "Member"]
99

1010

1111
class MemberUpdateParams(TypedDict, total=False):
1212
account_id: str
1313
"""Account identifier tag."""
1414

15-
body: Required[Iterable[Body]]
15+
members: Required[Iterable[Member]]
1616
"""Set/Replace members to a user group."""
1717

1818

19-
class Body(TypedDict, total=False):
19+
class Member(TypedDict, total=False):
2020
id: Required[str]
2121
"""The identifier of an existing account Member."""

tests/api_resources/iam/user_groups/test_members.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None:
2828
member = client.iam.user_groups.members.create(
2929
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
3030
account_id="023e105f4ecef8ad9ca31a8372d0c353",
31-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
31+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
3232
)
3333
assert_matches_type(Optional[MemberCreateResponse], member, path=["response"])
3434

@@ -37,7 +37,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
3737
response = client.iam.user_groups.members.with_raw_response.create(
3838
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
3939
account_id="023e105f4ecef8ad9ca31a8372d0c353",
40-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
40+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
4141
)
4242

4343
assert response.is_closed is True
@@ -50,7 +50,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
5050
with client.iam.user_groups.members.with_streaming_response.create(
5151
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
5252
account_id="023e105f4ecef8ad9ca31a8372d0c353",
53-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
53+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
5454
) as response:
5555
assert not response.is_closed
5656
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -66,22 +66,22 @@ def test_path_params_create(self, client: Cloudflare) -> None:
6666
client.iam.user_groups.members.with_raw_response.create(
6767
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
6868
account_id="",
69-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
69+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
7070
)
7171

7272
with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_group_id` but received ''"):
7373
client.iam.user_groups.members.with_raw_response.create(
7474
user_group_id="",
7575
account_id="023e105f4ecef8ad9ca31a8372d0c353",
76-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
76+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
7777
)
7878

7979
@parametrize
8080
def test_method_update(self, client: Cloudflare) -> None:
8181
member = client.iam.user_groups.members.update(
8282
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
8383
account_id="023e105f4ecef8ad9ca31a8372d0c353",
84-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
84+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
8585
)
8686
assert_matches_type(SyncSinglePage[MemberUpdateResponse], member, path=["response"])
8787

@@ -90,7 +90,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
9090
response = client.iam.user_groups.members.with_raw_response.update(
9191
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
9292
account_id="023e105f4ecef8ad9ca31a8372d0c353",
93-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
93+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
9494
)
9595

9696
assert response.is_closed is True
@@ -103,7 +103,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
103103
with client.iam.user_groups.members.with_streaming_response.update(
104104
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
105105
account_id="023e105f4ecef8ad9ca31a8372d0c353",
106-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
106+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
107107
) as response:
108108
assert not response.is_closed
109109
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -119,14 +119,14 @@ def test_path_params_update(self, client: Cloudflare) -> None:
119119
client.iam.user_groups.members.with_raw_response.update(
120120
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
121121
account_id="",
122-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
122+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
123123
)
124124

125125
with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_group_id` but received ''"):
126126
client.iam.user_groups.members.with_raw_response.update(
127127
user_group_id="",
128128
account_id="023e105f4ecef8ad9ca31a8372d0c353",
129-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
129+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
130130
)
131131

132132
@parametrize
@@ -258,7 +258,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
258258
member = await async_client.iam.user_groups.members.create(
259259
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
260260
account_id="023e105f4ecef8ad9ca31a8372d0c353",
261-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
261+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
262262
)
263263
assert_matches_type(Optional[MemberCreateResponse], member, path=["response"])
264264

@@ -267,7 +267,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
267267
response = await async_client.iam.user_groups.members.with_raw_response.create(
268268
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
269269
account_id="023e105f4ecef8ad9ca31a8372d0c353",
270-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
270+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
271271
)
272272

273273
assert response.is_closed is True
@@ -280,7 +280,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
280280
async with async_client.iam.user_groups.members.with_streaming_response.create(
281281
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
282282
account_id="023e105f4ecef8ad9ca31a8372d0c353",
283-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
283+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
284284
) as response:
285285
assert not response.is_closed
286286
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -296,22 +296,22 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
296296
await async_client.iam.user_groups.members.with_raw_response.create(
297297
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
298298
account_id="",
299-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
299+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
300300
)
301301

302302
with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_group_id` but received ''"):
303303
await async_client.iam.user_groups.members.with_raw_response.create(
304304
user_group_id="",
305305
account_id="023e105f4ecef8ad9ca31a8372d0c353",
306-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
306+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
307307
)
308308

309309
@parametrize
310310
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
311311
member = await async_client.iam.user_groups.members.update(
312312
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
313313
account_id="023e105f4ecef8ad9ca31a8372d0c353",
314-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
314+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
315315
)
316316
assert_matches_type(AsyncSinglePage[MemberUpdateResponse], member, path=["response"])
317317

@@ -320,7 +320,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
320320
response = await async_client.iam.user_groups.members.with_raw_response.update(
321321
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
322322
account_id="023e105f4ecef8ad9ca31a8372d0c353",
323-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
323+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
324324
)
325325

326326
assert response.is_closed is True
@@ -333,7 +333,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
333333
async with async_client.iam.user_groups.members.with_streaming_response.update(
334334
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
335335
account_id="023e105f4ecef8ad9ca31a8372d0c353",
336-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
336+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
337337
) as response:
338338
assert not response.is_closed
339339
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -349,14 +349,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
349349
await async_client.iam.user_groups.members.with_raw_response.update(
350350
user_group_id="023e105f4ecef8ad9ca31a8372d0c353",
351351
account_id="",
352-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
352+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
353353
)
354354

355355
with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_group_id` but received ''"):
356356
await async_client.iam.user_groups.members.with_raw_response.update(
357357
user_group_id="",
358358
account_id="023e105f4ecef8ad9ca31a8372d0c353",
359-
body=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
359+
members=[{"id": "023e105f4ecef8ad9ca31a8372d0c353"}],
360360
)
361361

362362
@parametrize

0 commit comments

Comments
 (0)