diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 18a5b4e..09a565d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.33" + ".": "0.0.34" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index c14a369..d46615a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index a6f353d..763b2f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/api.md b/api.md index 2ba4df4..bf78cc0 100644 --- a/api.md +++ b/api.md @@ -368,12 +368,13 @@ Methods: Types: ```python -from whop_sdk.types import User, UserCheckAccessResponse +from whop_sdk.types import User, UserListResponse, UserCheckAccessResponse ``` Methods: - client.users.retrieve(id) -> User +- client.users.list(\*\*params) -> SyncCursorPage[UserListResponse] - client.users.check_access(resource_id, \*, id) -> UserCheckAccessResponse - client.users.update_profile(\*\*params) -> User diff --git a/pyproject.toml b/pyproject.toml index a996e81..6d34f6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/src/whop_sdk/_version.py b/src/whop_sdk/_version.py index 74e0ab8..75c990c 100644 --- a/src/whop_sdk/_version.py +++ b/src/whop_sdk/_version.py @@ -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 diff --git a/src/whop_sdk/resources/refunds.py b/src/whop_sdk/resources/refunds.py index ed7ba09..ff24a70 100644 --- a/src/whop_sdk/resources/refunds.py +++ b/src/whop_sdk/resources/refunds.py @@ -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, @@ -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. @@ -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 @@ -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, ), @@ -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, @@ -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. @@ -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 @@ -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, ), diff --git a/src/whop_sdk/resources/users.py b/src/whop_sdk/resources/users.py index 914efd0..7091072 100644 --- a/src/whop_sdk/resources/users.py +++ b/src/whop_sdk/resources/users.py @@ -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 @@ -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"] @@ -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, @@ -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, @@ -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, ) @@ -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, ) @@ -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, ) @@ -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, ) diff --git a/src/whop_sdk/types/__init__.py b/src/whop_sdk/types/__init__.py index 6c2549b..0cadc48 100644 --- a/src/whop_sdk/types/__init__.py +++ b/src/whop_sdk/types/__init__.py @@ -96,6 +96,7 @@ from .lead_list_params import LeadListParams as LeadListParams from .payment_provider import PaymentProvider as PaymentProvider from .plan_list_params import PlanListParams as PlanListParams +from .user_list_params import UserListParams as UserListParams from .app_create_params import AppCreateParams as AppCreateParams from .app_list_response import AppListResponse as AppListResponse from .app_update_params import AppUpdateParams as AppUpdateParams @@ -116,6 +117,7 @@ from .plan_update_params import PlanUpdateParams as PlanUpdateParams from .refund_list_params import RefundListParams as RefundListParams from .review_list_params import ReviewListParams as ReviewListParams +from .user_list_response import UserListResponse as UserListResponse from .ai_chat_list_params import AIChatListParams as AIChatListParams from .company_list_params import CompanyListParams as CompanyListParams from .course_visibilities import CourseVisibilities as CourseVisibilities diff --git a/src/whop_sdk/types/refund_list_params.py b/src/whop_sdk/types/refund_list_params.py index 993c648..f998662 100644 --- a/src/whop_sdk/types/refund_list_params.py +++ b/src/whop_sdk/types/refund_list_params.py @@ -4,7 +4,7 @@ from typing import Union, Optional from datetime import datetime -from typing_extensions import Required, Annotated, TypedDict +from typing_extensions import Annotated, TypedDict from .._utils import PropertyInfo from .shared.direction import Direction @@ -13,15 +13,15 @@ class RefundListParams(TypedDict, total=False): - payment_id: Required[str] - """The unique identifier of the payment to list refunds for.""" - after: Optional[str] """Returns the elements in the list that come after the specified cursor.""" before: Optional[str] """Returns the elements in the list that come before the specified cursor.""" + company_id: Optional[str] + """Filter refunds to only those belonging to this company.""" + created_after: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] """Only return refunds created after this timestamp.""" @@ -36,3 +36,9 @@ class RefundListParams(TypedDict, total=False): last: Optional[int] """Returns the last _n_ elements from the list.""" + + payment_id: Optional[str] + """Filter refunds to only those associated with this specific payment.""" + + user_id: Optional[str] + """Filter refunds to only those associated with this specific user.""" diff --git a/src/whop_sdk/types/user_list_params.py b/src/whop_sdk/types/user_list_params.py new file mode 100644 index 0000000..bce47d6 --- /dev/null +++ b/src/whop_sdk/types/user_list_params.py @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["UserListParams"] + + +class UserListParams(TypedDict, total=False): + after: Optional[str] + """Returns the elements in the list that come after the specified cursor.""" + + before: Optional[str] + """Returns the elements in the list that come before the specified cursor.""" + + first: Optional[int] + """Returns the first _n_ elements from the list.""" + + last: Optional[int] + """Returns the last _n_ elements from the list.""" + + query: Optional[str] + """Search term to filter by name or username.""" diff --git a/src/whop_sdk/types/user_list_response.py b/src/whop_sdk/types/user_list_response.py new file mode 100644 index 0000000..1621e20 --- /dev/null +++ b/src/whop_sdk/types/user_list_response.py @@ -0,0 +1,49 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from .._models import BaseModel + +__all__ = ["UserListResponse", "ProfilePicture"] + + +class ProfilePicture(BaseModel): + """The user's profile picture attachment with URL, content type, and file metadata. + + Null if using a legacy profile picture. + """ + + url: Optional[str] = None + """A pre-optimized URL for rendering this attachment on the client. + + This should be used for displaying attachments in apps. + """ + + +class UserListResponse(BaseModel): + """A user account on Whop. + + Contains profile information, identity details, and social connections. + """ + + id: str + """The unique identifier for the user.""" + + bio: Optional[str] = None + """A short biography written by the user, displayed on their public profile.""" + + created_at: datetime + """The datetime the user was created.""" + + name: Optional[str] = None + """The user's display name shown on their public profile.""" + + profile_picture: Optional[ProfilePicture] = None + """The user's profile picture attachment with URL, content type, and file metadata. + + Null if using a legacy profile picture. + """ + + username: str + """The user's unique username shown on their public profile.""" diff --git a/tests/api_resources/test_refunds.py b/tests/api_resources/test_refunds.py index af97c6b..0f38a17 100644 --- a/tests/api_resources/test_refunds.py +++ b/tests/api_resources/test_refunds.py @@ -64,32 +64,30 @@ def test_path_params_retrieve(self, client: Whop) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list(self, client: Whop) -> None: - refund = client.refunds.list( - payment_id="pay_xxxxxxxxxxxxxx", - ) + refund = client.refunds.list() assert_matches_type(SyncCursorPage[RefundListResponse], refund, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Whop) -> None: refund = client.refunds.list( - payment_id="pay_xxxxxxxxxxxxxx", after="after", before="before", + company_id="biz_xxxxxxxxxxxxxx", created_after=parse_datetime("2023-12-01T05:00:00.401Z"), created_before=parse_datetime("2023-12-01T05:00:00.401Z"), direction="asc", first=42, last=42, + payment_id="pay_xxxxxxxxxxxxxx", + user_id="user_xxxxxxxxxxxxx", ) assert_matches_type(SyncCursorPage[RefundListResponse], refund, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_list(self, client: Whop) -> None: - response = client.refunds.with_raw_response.list( - payment_id="pay_xxxxxxxxxxxxxx", - ) + response = client.refunds.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -99,9 +97,7 @@ def test_raw_response_list(self, client: Whop) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_list(self, client: Whop) -> None: - with client.refunds.with_streaming_response.list( - payment_id="pay_xxxxxxxxxxxxxx", - ) as response: + with client.refunds.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -161,32 +157,30 @@ async def test_path_params_retrieve(self, async_client: AsyncWhop) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncWhop) -> None: - refund = await async_client.refunds.list( - payment_id="pay_xxxxxxxxxxxxxx", - ) + refund = await async_client.refunds.list() assert_matches_type(AsyncCursorPage[RefundListResponse], refund, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncWhop) -> None: refund = await async_client.refunds.list( - payment_id="pay_xxxxxxxxxxxxxx", after="after", before="before", + company_id="biz_xxxxxxxxxxxxxx", created_after=parse_datetime("2023-12-01T05:00:00.401Z"), created_before=parse_datetime("2023-12-01T05:00:00.401Z"), direction="asc", first=42, last=42, + payment_id="pay_xxxxxxxxxxxxxx", + user_id="user_xxxxxxxxxxxxx", ) assert_matches_type(AsyncCursorPage[RefundListResponse], refund, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncWhop) -> None: - response = await async_client.refunds.with_raw_response.list( - payment_id="pay_xxxxxxxxxxxxxx", - ) + response = await async_client.refunds.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -196,9 +190,7 @@ async def test_raw_response_list(self, async_client: AsyncWhop) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncWhop) -> None: - async with async_client.refunds.with_streaming_response.list( - payment_id="pay_xxxxxxxxxxxxxx", - ) as response: + async with async_client.refunds.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_users.py b/tests/api_resources/test_users.py index 10cda3c..00741b0 100644 --- a/tests/api_resources/test_users.py +++ b/tests/api_resources/test_users.py @@ -9,7 +9,8 @@ from whop_sdk import Whop, AsyncWhop from tests.utils import assert_matches_type -from whop_sdk.types import User, UserCheckAccessResponse +from whop_sdk.types import User, UserListResponse, UserCheckAccessResponse +from whop_sdk.pagination import SyncCursorPage, AsyncCursorPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,6 +60,46 @@ def test_path_params_retrieve(self, client: Whop) -> None: "", ) + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list(self, client: Whop) -> None: + user = client.users.list() + assert_matches_type(SyncCursorPage[UserListResponse], user, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list_with_all_params(self, client: Whop) -> None: + user = client.users.list( + after="after", + before="before", + first=42, + last=42, + query="query", + ) + assert_matches_type(SyncCursorPage[UserListResponse], user, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_list(self, client: Whop) -> None: + response = client.users.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + user = response.parse() + assert_matches_type(SyncCursorPage[UserListResponse], user, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_list(self, client: Whop) -> None: + with client.users.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + user = response.parse() + assert_matches_type(SyncCursorPage[UserListResponse], user, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_check_access(self, client: Whop) -> None: @@ -198,6 +239,46 @@ async def test_path_params_retrieve(self, async_client: AsyncWhop) -> None: "", ) + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list(self, async_client: AsyncWhop) -> None: + user = await async_client.users.list() + assert_matches_type(AsyncCursorPage[UserListResponse], user, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncWhop) -> None: + user = await async_client.users.list( + after="after", + before="before", + first=42, + last=42, + query="query", + ) + assert_matches_type(AsyncCursorPage[UserListResponse], user, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_list(self, async_client: AsyncWhop) -> None: + response = await async_client.users.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + user = await response.parse() + assert_matches_type(AsyncCursorPage[UserListResponse], user, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_list(self, async_client: AsyncWhop) -> None: + async with async_client.users.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + user = await response.parse() + assert_matches_type(AsyncCursorPage[UserListResponse], user, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_check_access(self, async_client: AsyncWhop) -> None: