Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.0.33"
".": "0.0.34"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 180
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-51fb88de05d428f3ea78a4b7ba2d5c6e04ae039816961e810f99d9d5d29bc015.yml
openapi_spec_hash: d59179d7d9a835795741673012f20d79
config_hash: a9229678a4146beeb5be82ed0ae3d4f1
configured_endpoints: 181
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-b6e1387ac58f903f887eae989de30273824663a9a752e7834b82b1036950c3d2.yml
openapi_spec_hash: 0bea29a304f3d57c44cc186478bef054
config_hash: 7e9d4f2abf58b7918a0e103387d2a2e9
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.0.34 (2026-03-13)

Full Changelog: [v0.0.33...v0.0.34](https://github.com/whopio/whopsdk-python/compare/v0.0.33...v0.0.34)

### Features

* **api:** api update ([362bce6](https://github.com/whopio/whopsdk-python/commit/362bce63b2d75d47c778d14f4708310646de7c54))
* **api:** manual updates ([0459776](https://github.com/whopio/whopsdk-python/commit/04597765b9b129c17b75a7ae6a6b7d105c97a0e8))

## 0.0.33 (2026-03-12)

Full Changelog: [v0.0.32...v0.0.33](https://github.com/whopio/whopsdk-python/compare/v0.0.32...v0.0.33)
Expand Down
3 changes: 2 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,13 @@ Methods:
Types:

```python
from whop_sdk.types import User, UserCheckAccessResponse
from whop_sdk.types import User, UserListResponse, UserCheckAccessResponse
```

Methods:

- <code title="get /users/{id}">client.users.<a href="./src/whop_sdk/resources/users.py">retrieve</a>(id) -> <a href="./src/whop_sdk/types/user.py">User</a></code>
- <code title="get /users">client.users.<a href="./src/whop_sdk/resources/users.py">list</a>(\*\*<a href="src/whop_sdk/types/user_list_params.py">params</a>) -> <a href="./src/whop_sdk/types/user_list_response.py">SyncCursorPage[UserListResponse]</a></code>
- <code title="get /users/{id}/access/{resource_id}">client.users.<a href="./src/whop_sdk/resources/users.py">check_access</a>(resource_id, \*, id) -> <a href="./src/whop_sdk/types/user_check_access_response.py">UserCheckAccessResponse</a></code>
- <code title="patch /users/me">client.users.<a href="./src/whop_sdk/resources/users.py">update_profile</a>(\*\*<a href="src/whop_sdk/types/user_update_profile_params.py">params</a>) -> <a href="./src/whop_sdk/types/user.py">User</a></code>

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "whop-sdk"
version = "0.0.33"
version = "0.0.34"
description = "The official Python library for the Whop API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/whop_sdk/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "whop_sdk"
__version__ = "0.0.33" # x-release-please-version
__version__ = "0.0.34" # x-release-please-version
40 changes: 28 additions & 12 deletions src/whop_sdk/resources/refunds.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,16 @@ def retrieve(
def list(
self,
*,
payment_id: str,
after: Optional[str] | Omit = omit,
before: Optional[str] | Omit = omit,
company_id: Optional[str] | Omit = omit,
created_after: Union[str, datetime, None] | Omit = omit,
created_before: Union[str, datetime, None] | Omit = omit,
direction: Optional[Direction] | Omit = omit,
first: Optional[int] | Omit = omit,
last: Optional[int] | Omit = omit,
payment_id: Optional[str] | Omit = omit,
user_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -106,20 +108,20 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncCursorPage[RefundListResponse]:
"""
Returns a paginated list of refunds for a specific payment, with optional
filtering by creation date.
Returns a paginated list of refunds, with optional filtering by payment,
company, user, and creation date.

Required permissions:

- `payment:basic:read`

Args:
payment_id: The unique identifier of the payment to list refunds for.

after: Returns the elements in the list that come after the specified cursor.

before: Returns the elements in the list that come before the specified cursor.

company_id: Filter refunds to only those belonging to this company.

created_after: Only return refunds created after this timestamp.

created_before: Only return refunds created before this timestamp.
Expand All @@ -130,6 +132,10 @@ def list(

last: Returns the last _n_ elements from the list.

payment_id: Filter refunds to only those associated with this specific payment.

user_id: Filter refunds to only those associated with this specific user.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -148,14 +154,16 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"payment_id": payment_id,
"after": after,
"before": before,
"company_id": company_id,
"created_after": created_after,
"created_before": created_before,
"direction": direction,
"first": first,
"last": last,
"payment_id": payment_id,
"user_id": user_id,
},
refund_list_params.RefundListParams,
),
Expand Down Expand Up @@ -227,14 +235,16 @@ async def retrieve(
def list(
self,
*,
payment_id: str,
after: Optional[str] | Omit = omit,
before: Optional[str] | Omit = omit,
company_id: Optional[str] | Omit = omit,
created_after: Union[str, datetime, None] | Omit = omit,
created_before: Union[str, datetime, None] | Omit = omit,
direction: Optional[Direction] | Omit = omit,
first: Optional[int] | Omit = omit,
last: Optional[int] | Omit = omit,
payment_id: Optional[str] | Omit = omit,
user_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -243,20 +253,20 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[RefundListResponse, AsyncCursorPage[RefundListResponse]]:
"""
Returns a paginated list of refunds for a specific payment, with optional
filtering by creation date.
Returns a paginated list of refunds, with optional filtering by payment,
company, user, and creation date.

Required permissions:

- `payment:basic:read`

Args:
payment_id: The unique identifier of the payment to list refunds for.

after: Returns the elements in the list that come after the specified cursor.

before: Returns the elements in the list that come before the specified cursor.

company_id: Filter refunds to only those belonging to this company.

created_after: Only return refunds created after this timestamp.

created_before: Only return refunds created before this timestamp.
Expand All @@ -267,6 +277,10 @@ def list(

last: Returns the last _n_ elements from the list.

payment_id: Filter refunds to only those associated with this specific payment.

user_id: Filter refunds to only those associated with this specific user.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -285,14 +299,16 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"payment_id": payment_id,
"after": after,
"before": before,
"company_id": company_id,
"created_after": created_after,
"created_before": created_before,
"direction": direction,
"first": first,
"last": last,
"payment_id": payment_id,
"user_id": user_id,
},
refund_list_params.RefundListParams,
),
Expand Down
138 changes: 136 additions & 2 deletions src/whop_sdk/resources/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import httpx

from ..types import user_update_profile_params
from ..types import user_list_params, user_update_profile_params
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
Expand All @@ -17,8 +17,10 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
from ..pagination import SyncCursorPage, AsyncCursorPage
from ..types.user import User
from .._base_client import make_request_options
from .._base_client import AsyncPaginator, make_request_options
from ..types.user_list_response import UserListResponse
from ..types.user_check_access_response import UserCheckAccessResponse

__all__ = ["UsersResource", "AsyncUsersResource"]
Expand Down Expand Up @@ -77,6 +79,66 @@ def retrieve(
cast_to=User,
)

def list(
self,
*,
after: Optional[str] | Omit = omit,
before: Optional[str] | Omit = omit,
first: Optional[int] | Omit = omit,
last: Optional[int] | Omit = omit,
query: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncCursorPage[UserListResponse]:
"""
Search for users by name or username, ranked by social proximity to the
authenticated user.

Args:
after: Returns the elements in the list that come after the specified cursor.

before: Returns the elements in the list that come before the specified cursor.

first: Returns the first _n_ elements from the list.

last: Returns the last _n_ elements from the list.

query: Search term to filter by name or username.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
"/users",
page=SyncCursorPage[UserListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"after": after,
"before": before,
"first": first,
"last": last,
"query": query,
},
user_list_params.UserListParams,
),
),
model=UserListResponse,
)

def check_access(
self,
resource_id: str,
Expand Down Expand Up @@ -224,6 +286,66 @@ async def retrieve(
cast_to=User,
)

def list(
self,
*,
after: Optional[str] | Omit = omit,
before: Optional[str] | Omit = omit,
first: Optional[int] | Omit = omit,
last: Optional[int] | Omit = omit,
query: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[UserListResponse, AsyncCursorPage[UserListResponse]]:
"""
Search for users by name or username, ranked by social proximity to the
authenticated user.

Args:
after: Returns the elements in the list that come after the specified cursor.

before: Returns the elements in the list that come before the specified cursor.

first: Returns the first _n_ elements from the list.

last: Returns the last _n_ elements from the list.

query: Search term to filter by name or username.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
"/users",
page=AsyncCursorPage[UserListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"after": after,
"before": before,
"first": first,
"last": last,
"query": query,
},
user_list_params.UserListParams,
),
),
model=UserListResponse,
)

async def check_access(
self,
resource_id: str,
Expand Down Expand Up @@ -325,6 +447,9 @@ def __init__(self, users: UsersResource) -> None:
self.retrieve = to_raw_response_wrapper(
users.retrieve,
)
self.list = to_raw_response_wrapper(
users.list,
)
self.check_access = to_raw_response_wrapper(
users.check_access,
)
Expand All @@ -340,6 +465,9 @@ def __init__(self, users: AsyncUsersResource) -> None:
self.retrieve = async_to_raw_response_wrapper(
users.retrieve,
)
self.list = async_to_raw_response_wrapper(
users.list,
)
self.check_access = async_to_raw_response_wrapper(
users.check_access,
)
Expand All @@ -355,6 +483,9 @@ def __init__(self, users: UsersResource) -> None:
self.retrieve = to_streamed_response_wrapper(
users.retrieve,
)
self.list = to_streamed_response_wrapper(
users.list,
)
self.check_access = to_streamed_response_wrapper(
users.check_access,
)
Expand All @@ -370,6 +501,9 @@ def __init__(self, users: AsyncUsersResource) -> None:
self.retrieve = async_to_streamed_response_wrapper(
users.retrieve,
)
self.list = async_to_streamed_response_wrapper(
users.list,
)
self.check_access = async_to_streamed_response_wrapper(
users.check_access,
)
Expand Down
Loading