Skip to content

Commit bbaf331

Browse files
committed
feat(organizations): update codegen output
1 parent e6f19df commit bbaf331

19 files changed

Lines changed: 867 additions & 86 deletions

src/cloudflare/resources/organizations/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
LogsResourceWithStreamingResponse,
99
AsyncLogsResourceWithStreamingResponse,
1010
)
11+
from .billing import (
12+
BillingResource,
13+
AsyncBillingResource,
14+
BillingResourceWithRawResponse,
15+
AsyncBillingResourceWithRawResponse,
16+
BillingResourceWithStreamingResponse,
17+
AsyncBillingResourceWithStreamingResponse,
18+
)
1119
from .organizations import (
1220
OrganizationsResource,
1321
AsyncOrganizationsResource,
@@ -38,6 +46,12 @@
3846
"AsyncLogsResourceWithRawResponse",
3947
"LogsResourceWithStreamingResponse",
4048
"AsyncLogsResourceWithStreamingResponse",
49+
"BillingResource",
50+
"AsyncBillingResource",
51+
"BillingResourceWithRawResponse",
52+
"AsyncBillingResourceWithRawResponse",
53+
"BillingResourceWithStreamingResponse",
54+
"AsyncBillingResourceWithStreamingResponse",
4155
"OrganizationsResource",
4256
"AsyncOrganizationsResource",
4357
"OrganizationsResourceWithRawResponse",

src/cloudflare/resources/organizations/api.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ from cloudflare.types.organizations import OrganizationProfile
2525
Methods:
2626

2727
- <code title="put /organizations/{organization_id}/profile">client.organizations.organization_profile.<a href="./src/cloudflare/resources/organizations/organization_profile.py">update</a>(organization_id, \*\*<a href="src/cloudflare/types/organizations/organization_profile_update_params.py">params</a>) -> None</code>
28-
- <code title="get /organizations/{organization_id}/profile">client.organizations.organization_profile.<a href="./src/cloudflare/resources/organizations/organization_profile.py">get</a>(organization_id) -> Result</code>
28+
- <code title="get /organizations/{organization_id}/profile">client.organizations.organization_profile.<a href="./src/cloudflare/resources/organizations/organization_profile.py">get</a>(organization_id) -> <a href="./src/cloudflare/types/organizations/organization_profile.py">OrganizationProfile</a></code>
2929

3030
## Logs
3131

@@ -40,3 +40,17 @@ from cloudflare.types.organizations.logs import AuditListResponse
4040
Methods:
4141

4242
- <code title="get /organizations/{organization_id}/logs/audit">client.organizations.logs.audit.<a href="./src/cloudflare/resources/organizations/logs/audit.py">list</a>(organization_id, \*\*<a href="src/cloudflare/types/organizations/logs/audit_list_params.py">params</a>) -> <a href="./src/cloudflare/types/organizations/logs/audit_list_response.py">SyncCursorPaginationAfter[AuditListResponse]</a></code>
43+
44+
## Billing
45+
46+
### Usage
47+
48+
Types:
49+
50+
```python
51+
from cloudflare.types.organizations.billing import UsageGetResponse
52+
```
53+
54+
Methods:
55+
56+
- <code title="get /organizations/{organization_id}/billable/usage">client.organizations.billing.usage.<a href="./src/cloudflare/resources/organizations/billing/usage.py">get</a>(organization_id, \*\*<a href="src/cloudflare/types/organizations/billing/usage_get_params.py">params</a>) -> <a href="./src/cloudflare/types/organizations/billing/usage_get_response.py">UsageGetResponse</a></code>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .usage import (
4+
UsageResource,
5+
AsyncUsageResource,
6+
UsageResourceWithRawResponse,
7+
AsyncUsageResourceWithRawResponse,
8+
UsageResourceWithStreamingResponse,
9+
AsyncUsageResourceWithStreamingResponse,
10+
)
11+
from .billing import (
12+
BillingResource,
13+
AsyncBillingResource,
14+
BillingResourceWithRawResponse,
15+
AsyncBillingResourceWithRawResponse,
16+
BillingResourceWithStreamingResponse,
17+
AsyncBillingResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"UsageResource",
22+
"AsyncUsageResource",
23+
"UsageResourceWithRawResponse",
24+
"AsyncUsageResourceWithRawResponse",
25+
"UsageResourceWithStreamingResponse",
26+
"AsyncUsageResourceWithStreamingResponse",
27+
"BillingResource",
28+
"AsyncBillingResource",
29+
"BillingResourceWithRawResponse",
30+
"AsyncBillingResourceWithRawResponse",
31+
"BillingResourceWithStreamingResponse",
32+
"AsyncBillingResourceWithStreamingResponse",
33+
]
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from .usage import (
6+
UsageResource,
7+
AsyncUsageResource,
8+
UsageResourceWithRawResponse,
9+
AsyncUsageResourceWithRawResponse,
10+
UsageResourceWithStreamingResponse,
11+
AsyncUsageResourceWithStreamingResponse,
12+
)
13+
from ...._compat import cached_property
14+
from ...._resource import SyncAPIResource, AsyncAPIResource
15+
16+
__all__ = ["BillingResource", "AsyncBillingResource"]
17+
18+
19+
class BillingResource(SyncAPIResource):
20+
@cached_property
21+
def usage(self) -> UsageResource:
22+
return UsageResource(self._client)
23+
24+
@cached_property
25+
def with_raw_response(self) -> BillingResourceWithRawResponse:
26+
"""
27+
This property can be used as a prefix for any HTTP method call to return
28+
the raw response object instead of the parsed content.
29+
30+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
31+
"""
32+
return BillingResourceWithRawResponse(self)
33+
34+
@cached_property
35+
def with_streaming_response(self) -> BillingResourceWithStreamingResponse:
36+
"""
37+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38+
39+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
40+
"""
41+
return BillingResourceWithStreamingResponse(self)
42+
43+
44+
class AsyncBillingResource(AsyncAPIResource):
45+
@cached_property
46+
def usage(self) -> AsyncUsageResource:
47+
return AsyncUsageResource(self._client)
48+
49+
@cached_property
50+
def with_raw_response(self) -> AsyncBillingResourceWithRawResponse:
51+
"""
52+
This property can be used as a prefix for any HTTP method call to return
53+
the raw response object instead of the parsed content.
54+
55+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
56+
"""
57+
return AsyncBillingResourceWithRawResponse(self)
58+
59+
@cached_property
60+
def with_streaming_response(self) -> AsyncBillingResourceWithStreamingResponse:
61+
"""
62+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
63+
64+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
65+
"""
66+
return AsyncBillingResourceWithStreamingResponse(self)
67+
68+
69+
class BillingResourceWithRawResponse:
70+
def __init__(self, billing: BillingResource) -> None:
71+
self._billing = billing
72+
73+
@cached_property
74+
def usage(self) -> UsageResourceWithRawResponse:
75+
return UsageResourceWithRawResponse(self._billing.usage)
76+
77+
78+
class AsyncBillingResourceWithRawResponse:
79+
def __init__(self, billing: AsyncBillingResource) -> None:
80+
self._billing = billing
81+
82+
@cached_property
83+
def usage(self) -> AsyncUsageResourceWithRawResponse:
84+
return AsyncUsageResourceWithRawResponse(self._billing.usage)
85+
86+
87+
class BillingResourceWithStreamingResponse:
88+
def __init__(self, billing: BillingResource) -> None:
89+
self._billing = billing
90+
91+
@cached_property
92+
def usage(self) -> UsageResourceWithStreamingResponse:
93+
return UsageResourceWithStreamingResponse(self._billing.usage)
94+
95+
96+
class AsyncBillingResourceWithStreamingResponse:
97+
def __init__(self, billing: AsyncBillingResource) -> None:
98+
self._billing = billing
99+
100+
@cached_property
101+
def usage(self) -> AsyncUsageResourceWithStreamingResponse:
102+
return AsyncUsageResourceWithStreamingResponse(self._billing.usage)

0 commit comments

Comments
 (0)