Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Apr 24, 2024
1 parent bc80e00 commit db5b735
Show file tree
Hide file tree
Showing 664 changed files with 25,378 additions and 25,367 deletions.
126 changes: 63 additions & 63 deletions api.md

Large diffs are not rendered by default.

1,282 changes: 658 additions & 624 deletions src/cloudflare/_client.py

Large diffs are not rendered by default.

1,872 changes: 936 additions & 936 deletions src/cloudflare/resources/__init__.py

Large diffs are not rendered by default.

72 changes: 36 additions & 36 deletions src/cloudflare/resources/accounts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .roles import (
Roles,
AsyncRoles,
RolesWithRawResponse,
AsyncRolesWithRawResponse,
RolesWithStreamingResponse,
AsyncRolesWithStreamingResponse,
RolesResource,
AsyncRolesResource,
RolesResourceWithRawResponse,
AsyncRolesResourceWithRawResponse,
RolesResourceWithStreamingResponse,
AsyncRolesResourceWithStreamingResponse,
)
from .members import (
Members,
AsyncMembers,
MembersWithRawResponse,
AsyncMembersWithRawResponse,
MembersWithStreamingResponse,
AsyncMembersWithStreamingResponse,
MembersResource,
AsyncMembersResource,
MembersResourceWithRawResponse,
AsyncMembersResourceWithRawResponse,
MembersResourceWithStreamingResponse,
AsyncMembersResourceWithStreamingResponse,
)
from .accounts import (
Accounts,
AsyncAccounts,
AccountsWithRawResponse,
AsyncAccountsWithRawResponse,
AccountsWithStreamingResponse,
AsyncAccountsWithStreamingResponse,
AccountsResource,
AsyncAccountsResource,
AccountsResourceWithRawResponse,
AsyncAccountsResourceWithRawResponse,
AccountsResourceWithStreamingResponse,
AsyncAccountsResourceWithStreamingResponse,
)

__all__ = [
"Members",
"AsyncMembers",
"MembersWithRawResponse",
"AsyncMembersWithRawResponse",
"MembersWithStreamingResponse",
"AsyncMembersWithStreamingResponse",
"Roles",
"AsyncRoles",
"RolesWithRawResponse",
"AsyncRolesWithRawResponse",
"RolesWithStreamingResponse",
"AsyncRolesWithStreamingResponse",
"Accounts",
"AsyncAccounts",
"AccountsWithRawResponse",
"AsyncAccountsWithRawResponse",
"AccountsWithStreamingResponse",
"AsyncAccountsWithStreamingResponse",
"MembersResource",
"AsyncMembersResource",
"MembersResourceWithRawResponse",
"AsyncMembersResourceWithRawResponse",
"MembersResourceWithStreamingResponse",
"AsyncMembersResourceWithStreamingResponse",
"RolesResource",
"AsyncRolesResource",
"RolesResourceWithRawResponse",
"AsyncRolesResourceWithRawResponse",
"RolesResourceWithStreamingResponse",
"AsyncRolesResourceWithStreamingResponse",
"AccountsResource",
"AsyncAccountsResource",
"AccountsResourceWithRawResponse",
"AsyncAccountsResourceWithRawResponse",
"AccountsResourceWithStreamingResponse",
"AsyncAccountsResourceWithStreamingResponse",
]
110 changes: 55 additions & 55 deletions src/cloudflare/resources/accounts/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
import httpx

from .roles import (
Roles,
AsyncRoles,
RolesWithRawResponse,
AsyncRolesWithRawResponse,
RolesWithStreamingResponse,
AsyncRolesWithStreamingResponse,
RolesResource,
AsyncRolesResource,
RolesResourceWithRawResponse,
AsyncRolesResourceWithRawResponse,
RolesResourceWithStreamingResponse,
AsyncRolesResourceWithStreamingResponse,
)
from .members import (
Members,
AsyncMembers,
MembersWithRawResponse,
AsyncMembersWithRawResponse,
MembersWithStreamingResponse,
AsyncMembersWithStreamingResponse,
MembersResource,
AsyncMembersResource,
MembersResourceWithRawResponse,
AsyncMembersResourceWithRawResponse,
MembersResourceWithStreamingResponse,
AsyncMembersResourceWithStreamingResponse,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
Expand All @@ -46,25 +46,25 @@
from ...types.accounts.account_get_response import AccountGetResponse
from ...types.accounts.account_update_response import AccountUpdateResponse

__all__ = ["Accounts", "AsyncAccounts"]
__all__ = ["AccountsResource", "AsyncAccountsResource"]


class Accounts(SyncAPIResource):
class AccountsResource(SyncAPIResource):
@cached_property
def members(self) -> Members:
return Members(self._client)
def members(self) -> MembersResource:
return MembersResource(self._client)

@cached_property
def roles(self) -> Roles:
return Roles(self._client)
def roles(self) -> RolesResource:
return RolesResource(self._client)

@cached_property
def with_raw_response(self) -> AccountsWithRawResponse:
return AccountsWithRawResponse(self)
def with_raw_response(self) -> AccountsResourceWithRawResponse:
return AccountsResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AccountsWithStreamingResponse:
return AccountsWithStreamingResponse(self)
def with_streaming_response(self) -> AccountsResourceWithStreamingResponse:
return AccountsResourceWithStreamingResponse(self)

def update(
self,
Expand Down Expand Up @@ -215,22 +215,22 @@ def get(
)


class AsyncAccounts(AsyncAPIResource):
class AsyncAccountsResource(AsyncAPIResource):
@cached_property
def members(self) -> AsyncMembers:
return AsyncMembers(self._client)
def members(self) -> AsyncMembersResource:
return AsyncMembersResource(self._client)

@cached_property
def roles(self) -> AsyncRoles:
return AsyncRoles(self._client)
def roles(self) -> AsyncRolesResource:
return AsyncRolesResource(self._client)

@cached_property
def with_raw_response(self) -> AsyncAccountsWithRawResponse:
return AsyncAccountsWithRawResponse(self)
def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse:
return AsyncAccountsResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncAccountsWithStreamingResponse:
return AsyncAccountsWithStreamingResponse(self)
def with_streaming_response(self) -> AsyncAccountsResourceWithStreamingResponse:
return AsyncAccountsResourceWithStreamingResponse(self)

async def update(
self,
Expand Down Expand Up @@ -381,8 +381,8 @@ async def get(
)


class AccountsWithRawResponse:
def __init__(self, accounts: Accounts) -> None:
class AccountsResourceWithRawResponse:
def __init__(self, accounts: AccountsResource) -> None:
self._accounts = accounts

self.update = to_raw_response_wrapper(
Expand All @@ -396,16 +396,16 @@ def __init__(self, accounts: Accounts) -> None:
)

@cached_property
def members(self) -> MembersWithRawResponse:
return MembersWithRawResponse(self._accounts.members)
def members(self) -> MembersResourceWithRawResponse:
return MembersResourceWithRawResponse(self._accounts.members)

@cached_property
def roles(self) -> RolesWithRawResponse:
return RolesWithRawResponse(self._accounts.roles)
def roles(self) -> RolesResourceWithRawResponse:
return RolesResourceWithRawResponse(self._accounts.roles)


class AsyncAccountsWithRawResponse:
def __init__(self, accounts: AsyncAccounts) -> None:
class AsyncAccountsResourceWithRawResponse:
def __init__(self, accounts: AsyncAccountsResource) -> None:
self._accounts = accounts

self.update = async_to_raw_response_wrapper(
Expand All @@ -419,16 +419,16 @@ def __init__(self, accounts: AsyncAccounts) -> None:
)

@cached_property
def members(self) -> AsyncMembersWithRawResponse:
return AsyncMembersWithRawResponse(self._accounts.members)
def members(self) -> AsyncMembersResourceWithRawResponse:
return AsyncMembersResourceWithRawResponse(self._accounts.members)

@cached_property
def roles(self) -> AsyncRolesWithRawResponse:
return AsyncRolesWithRawResponse(self._accounts.roles)
def roles(self) -> AsyncRolesResourceWithRawResponse:
return AsyncRolesResourceWithRawResponse(self._accounts.roles)


class AccountsWithStreamingResponse:
def __init__(self, accounts: Accounts) -> None:
class AccountsResourceWithStreamingResponse:
def __init__(self, accounts: AccountsResource) -> None:
self._accounts = accounts

self.update = to_streamed_response_wrapper(
Expand All @@ -442,16 +442,16 @@ def __init__(self, accounts: Accounts) -> None:
)

@cached_property
def members(self) -> MembersWithStreamingResponse:
return MembersWithStreamingResponse(self._accounts.members)
def members(self) -> MembersResourceWithStreamingResponse:
return MembersResourceWithStreamingResponse(self._accounts.members)

@cached_property
def roles(self) -> RolesWithStreamingResponse:
return RolesWithStreamingResponse(self._accounts.roles)
def roles(self) -> RolesResourceWithStreamingResponse:
return RolesResourceWithStreamingResponse(self._accounts.roles)


class AsyncAccountsWithStreamingResponse:
def __init__(self, accounts: AsyncAccounts) -> None:
class AsyncAccountsResourceWithStreamingResponse:
def __init__(self, accounts: AsyncAccountsResource) -> None:
self._accounts = accounts

self.update = async_to_streamed_response_wrapper(
Expand All @@ -465,9 +465,9 @@ def __init__(self, accounts: AsyncAccounts) -> None:
)

@cached_property
def members(self) -> AsyncMembersWithStreamingResponse:
return AsyncMembersWithStreamingResponse(self._accounts.members)
def members(self) -> AsyncMembersResourceWithStreamingResponse:
return AsyncMembersResourceWithStreamingResponse(self._accounts.members)

@cached_property
def roles(self) -> AsyncRolesWithStreamingResponse:
return AsyncRolesWithStreamingResponse(self._accounts.roles)
def roles(self) -> AsyncRolesResourceWithStreamingResponse:
return AsyncRolesResourceWithStreamingResponse(self._accounts.roles)
38 changes: 19 additions & 19 deletions src/cloudflare/resources/accounts/members.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@
from ...types.accounts.user_with_invite_code import UserWithInviteCode
from ...types.accounts.member_delete_response import MemberDeleteResponse

__all__ = ["Members", "AsyncMembers"]
__all__ = ["MembersResource", "AsyncMembersResource"]


class Members(SyncAPIResource):
class MembersResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> MembersWithRawResponse:
return MembersWithRawResponse(self)
def with_raw_response(self) -> MembersResourceWithRawResponse:
return MembersResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> MembersWithStreamingResponse:
return MembersWithStreamingResponse(self)
def with_streaming_response(self) -> MembersResourceWithStreamingResponse:
return MembersResourceWithStreamingResponse(self)

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


class AsyncMembers(AsyncAPIResource):
class AsyncMembersResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncMembersWithRawResponse:
return AsyncMembersWithRawResponse(self)
def with_raw_response(self) -> AsyncMembersResourceWithRawResponse:
return AsyncMembersResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncMembersWithStreamingResponse:
return AsyncMembersWithStreamingResponse(self)
def with_streaming_response(self) -> AsyncMembersResourceWithStreamingResponse:
return AsyncMembersResourceWithStreamingResponse(self)

async def create(
self,
Expand Down Expand Up @@ -527,8 +527,8 @@ async def get(
)


class MembersWithRawResponse:
def __init__(self, members: Members) -> None:
class MembersResourceWithRawResponse:
def __init__(self, members: MembersResource) -> None:
self._members = members

self.create = to_raw_response_wrapper(
Expand All @@ -548,8 +548,8 @@ def __init__(self, members: Members) -> None:
)


class AsyncMembersWithRawResponse:
def __init__(self, members: AsyncMembers) -> None:
class AsyncMembersResourceWithRawResponse:
def __init__(self, members: AsyncMembersResource) -> None:
self._members = members

self.create = async_to_raw_response_wrapper(
Expand All @@ -569,8 +569,8 @@ def __init__(self, members: AsyncMembers) -> None:
)


class MembersWithStreamingResponse:
def __init__(self, members: Members) -> None:
class MembersResourceWithStreamingResponse:
def __init__(self, members: MembersResource) -> None:
self._members = members

self.create = to_streamed_response_wrapper(
Expand All @@ -590,8 +590,8 @@ def __init__(self, members: Members) -> None:
)


class AsyncMembersWithStreamingResponse:
def __init__(self, members: AsyncMembers) -> None:
class AsyncMembersResourceWithStreamingResponse:
def __init__(self, members: AsyncMembersResource) -> None:
self._members = members

self.create = async_to_streamed_response_wrapper(
Expand Down
Loading

0 comments on commit db5b735

Please sign in to comment.