Skip to content

Commit e0335d9

Browse files
chore(api): update composite API spec
1 parent 3b0fe39 commit e0335d9

5 files changed

Lines changed: 32 additions & 4 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1822
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bb49326953c3734a75db76d0d00acdca4af4263307818278166ccf00997cb8a0.yml
3-
openapi_spec_hash: 527820ab5579c3f7f114402bc3e75bab
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b45a7c9b5011d74006b51009d3b7c3ae5ad3277f49ad983196498db1d5ea2f19.yml
3+
openapi_spec_hash: 84f0fca0313c9c7e5567689bb8e6866a
44
config_hash: 0ce5789fc4b59ae352e68d00847570c2

src/cloudflare/resources/accounts/accounts.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def update(
165165
id: str,
166166
name: str,
167167
type: Literal["standard", "enterprise"],
168+
managed_by: account_update_params.ManagedBy | Omit = omit,
168169
settings: account_update_params.Settings | Omit = omit,
169170
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
170171
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -183,6 +184,8 @@ def update(
183184
184185
name: Account name
185186
187+
managed_by: Parent container details
188+
186189
settings: Account settings
187190
188191
extra_headers: Send extra headers
@@ -202,6 +205,7 @@ def update(
202205
"id": id,
203206
"name": name,
204207
"type": type,
208+
"managed_by": managed_by,
205209
"settings": settings,
206210
},
207211
account_update_params.AccountUpdateParams,
@@ -451,6 +455,7 @@ async def update(
451455
id: str,
452456
name: str,
453457
type: Literal["standard", "enterprise"],
458+
managed_by: account_update_params.ManagedBy | Omit = omit,
454459
settings: account_update_params.Settings | Omit = omit,
455460
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
456461
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -469,6 +474,8 @@ async def update(
469474
470475
name: Account name
471476
477+
managed_by: Parent container details
478+
472479
settings: Account settings
473480
474481
extra_headers: Send extra headers
@@ -488,6 +495,7 @@ async def update(
488495
"id": id,
489496
"name": name,
490497
"type": type,
498+
"managed_by": managed_by,
491499
"settings": settings,
492500
},
493501
account_update_params.AccountUpdateParams,

src/cloudflare/types/accounts/account.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@
66

77
from ..._models import BaseModel
88

9-
__all__ = ["Account", "Settings"]
9+
__all__ = ["Account", "ManagedBy", "Settings"]
10+
11+
12+
class ManagedBy(BaseModel):
13+
parent_org_id: Optional[str] = None
14+
"""ID of the parent Organization, if one exists"""
15+
16+
parent_org_name: Optional[str] = None
17+
"""Name of the parent Organization, if one exists"""
1018

1119

1220
class Settings(BaseModel):
@@ -32,5 +40,8 @@ class Account(BaseModel):
3240
created_on: Optional[datetime] = None
3341
"""Timestamp for the creation of the account"""
3442

43+
managed_by: Optional[ManagedBy] = None
44+
"""Parent container details"""
45+
3546
settings: Optional[Settings] = None
3647
"""Account settings"""

src/cloudflare/types/accounts/account_update_params.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from typing_extensions import Literal, Required, TypedDict
66

7-
__all__ = ["AccountUpdateParams", "Settings"]
7+
__all__ = ["AccountUpdateParams", "ManagedBy", "Settings"]
88

99

1010
class AccountUpdateParams(TypedDict, total=False):
@@ -19,10 +19,17 @@ class AccountUpdateParams(TypedDict, total=False):
1919

2020
type: Required[Literal["standard", "enterprise"]]
2121

22+
managed_by: ManagedBy
23+
"""Parent container details"""
24+
2225
settings: Settings
2326
"""Account settings"""
2427

2528

29+
class ManagedBy(TypedDict, total=False):
30+
pass
31+
32+
2633
class Settings(TypedDict, total=False):
2734
abuse_contact_email: str
2835
"""Sets an abuse contact email to notify for abuse reports."""

tests/api_resources/test_accounts.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
7878
id="023e105f4ecef8ad9ca31a8372d0c353",
7979
name="Demo Account",
8080
type="standard",
81+
managed_by={},
8182
settings={
8283
"abuse_contact_email": "abuse_contact_email",
8384
"enforce_twofactor": True,
@@ -299,6 +300,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
299300
id="023e105f4ecef8ad9ca31a8372d0c353",
300301
name="Demo Account",
301302
type="standard",
303+
managed_by={},
302304
settings={
303305
"abuse_contact_email": "abuse_contact_email",
304306
"enforce_twofactor": True,

0 commit comments

Comments
 (0)