From 2edf4bca49f261116a77e04d77da9157904367a5 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 11 Mar 2026 01:13:25 +0000
Subject: [PATCH 1/7] feat(api): api update
---
.stats.yml | 4 ++--
src/whop_sdk/resources/products.py | 20 ++++++++++++++++++++
src/whop_sdk/types/product_create_params.py | 6 ++++++
src/whop_sdk/types/product_update_params.py | 6 ++++++
tests/api_resources/test_products.py | 4 ++++
5 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index cbc6713..f926b8c 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 176
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-f49331e3fb23d1041f941c72c6ee9924dfa47634889ed5209244207c8ea0586e.yml
-openapi_spec_hash: 93d6cef1312ed0cbe6b2b6616c535ebf
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-b477216108f1b9e4bea7aac4f4da49b14bdba7d4e2660f2b2d643463390fa6e1.yml
+openapi_spec_hash: b2415f4dd2e2397ed4b2558773a1005a
config_hash: 71004ac2f2a6283ca55db1065c47e5f6
diff --git a/src/whop_sdk/resources/products.py b/src/whop_sdk/resources/products.py
index 0c34deb..b35eae6 100644
--- a/src/whop_sdk/resources/products.py
+++ b/src/whop_sdk/resources/products.py
@@ -76,6 +76,7 @@ def create(
product_tax_code_id: Optional[str] | Omit = omit,
redirect_purchase_url: Optional[str] | Omit = omit,
route: Optional[str] | Omit = omit,
+ send_welcome_message: Optional[bool] | Omit = omit,
visibility: Optional[Visibility] | 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.
@@ -134,6 +135,9 @@ def create(
route: The URL slug for the product's public link.
+ send_welcome_message: Whether to send an automated welcome message via support chat when a user joins
+ this product. Defaults to true.
+
visibility: Visibility of a resource
extra_headers: Send extra headers
@@ -165,6 +169,7 @@ def create(
"product_tax_code_id": product_tax_code_id,
"redirect_purchase_url": redirect_purchase_url,
"route": route,
+ "send_welcome_message": send_welcome_message,
"visibility": visibility,
},
product_create_params.ProductCreateParams,
@@ -230,6 +235,7 @@ def update(
product_tax_code_id: Optional[str] | Omit = omit,
redirect_purchase_url: Optional[str] | Omit = omit,
route: Optional[str] | Omit = omit,
+ send_welcome_message: Optional[bool] | Omit = omit,
store_page_config: Optional[product_update_params.StorePageConfig] | Omit = omit,
title: Optional[str] | Omit = omit,
visibility: Optional[Visibility] | Omit = omit,
@@ -282,6 +288,9 @@ def update(
route: The URL slug for the product's public link.
+ send_welcome_message: Whether to send an automated welcome message via support chat when a user joins
+ this product.
+
store_page_config: Layout and display configuration for this product on the company's store page.
title: The display name of the product. Maximum 40 characters.
@@ -316,6 +325,7 @@ def update(
"product_tax_code_id": product_tax_code_id,
"redirect_purchase_url": redirect_purchase_url,
"route": route,
+ "send_welcome_message": send_welcome_message,
"store_page_config": store_page_config,
"title": title,
"visibility": visibility,
@@ -496,6 +506,7 @@ async def create(
product_tax_code_id: Optional[str] | Omit = omit,
redirect_purchase_url: Optional[str] | Omit = omit,
route: Optional[str] | Omit = omit,
+ send_welcome_message: Optional[bool] | Omit = omit,
visibility: Optional[Visibility] | 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.
@@ -554,6 +565,9 @@ async def create(
route: The URL slug for the product's public link.
+ send_welcome_message: Whether to send an automated welcome message via support chat when a user joins
+ this product. Defaults to true.
+
visibility: Visibility of a resource
extra_headers: Send extra headers
@@ -585,6 +599,7 @@ async def create(
"product_tax_code_id": product_tax_code_id,
"redirect_purchase_url": redirect_purchase_url,
"route": route,
+ "send_welcome_message": send_welcome_message,
"visibility": visibility,
},
product_create_params.ProductCreateParams,
@@ -650,6 +665,7 @@ async def update(
product_tax_code_id: Optional[str] | Omit = omit,
redirect_purchase_url: Optional[str] | Omit = omit,
route: Optional[str] | Omit = omit,
+ send_welcome_message: Optional[bool] | Omit = omit,
store_page_config: Optional[product_update_params.StorePageConfig] | Omit = omit,
title: Optional[str] | Omit = omit,
visibility: Optional[Visibility] | Omit = omit,
@@ -702,6 +718,9 @@ async def update(
route: The URL slug for the product's public link.
+ send_welcome_message: Whether to send an automated welcome message via support chat when a user joins
+ this product.
+
store_page_config: Layout and display configuration for this product on the company's store page.
title: The display name of the product. Maximum 40 characters.
@@ -736,6 +755,7 @@ async def update(
"product_tax_code_id": product_tax_code_id,
"redirect_purchase_url": redirect_purchase_url,
"route": route,
+ "send_welcome_message": send_welcome_message,
"store_page_config": store_page_config,
"title": title,
"visibility": visibility,
diff --git a/src/whop_sdk/types/product_create_params.py b/src/whop_sdk/types/product_create_params.py
index 50d20c4..ea86cc0 100644
--- a/src/whop_sdk/types/product_create_params.py
+++ b/src/whop_sdk/types/product_create_params.py
@@ -81,6 +81,12 @@ class ProductCreateParams(TypedDict, total=False):
route: Optional[str]
"""The URL slug for the product's public link."""
+ send_welcome_message: Optional[bool]
+ """
+ Whether to send an automated welcome message via support chat when a user joins
+ this product. Defaults to true.
+ """
+
visibility: Optional[Visibility]
"""Visibility of a resource"""
diff --git a/src/whop_sdk/types/product_update_params.py b/src/whop_sdk/types/product_update_params.py
index 53038d5..d7e9dca 100644
--- a/src/whop_sdk/types/product_update_params.py
+++ b/src/whop_sdk/types/product_update_params.py
@@ -68,6 +68,12 @@ class ProductUpdateParams(TypedDict, total=False):
route: Optional[str]
"""The URL slug for the product's public link."""
+ send_welcome_message: Optional[bool]
+ """
+ Whether to send an automated welcome message via support chat when a user joins
+ this product.
+ """
+
store_page_config: Optional[StorePageConfig]
"""Layout and display configuration for this product on the company's store page."""
diff --git a/tests/api_resources/test_products.py b/tests/api_resources/test_products.py
index b2498e7..19403ed 100644
--- a/tests/api_resources/test_products.py
+++ b/tests/api_resources/test_products.py
@@ -70,6 +70,7 @@ def test_method_create_with_all_params(self, client: Whop) -> None:
product_tax_code_id="ptc_xxxxxxxxxxxxxx",
redirect_purchase_url="redirect_purchase_url",
route="route",
+ send_welcome_message=True,
visibility="visible",
)
assert_matches_type(Product, product, path=["response"])
@@ -171,6 +172,7 @@ def test_method_update_with_all_params(self, client: Whop) -> None:
product_tax_code_id="ptc_xxxxxxxxxxxxxx",
redirect_purchase_url="redirect_purchase_url",
route="route",
+ send_welcome_message=True,
store_page_config={
"custom_cta": "custom_cta",
"show_price": True,
@@ -362,6 +364,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncWhop) -> N
product_tax_code_id="ptc_xxxxxxxxxxxxxx",
redirect_purchase_url="redirect_purchase_url",
route="route",
+ send_welcome_message=True,
visibility="visible",
)
assert_matches_type(Product, product, path=["response"])
@@ -463,6 +466,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncWhop) -> N
product_tax_code_id="ptc_xxxxxxxxxxxxxx",
redirect_purchase_url="redirect_purchase_url",
route="route",
+ send_welcome_message=True,
store_page_config={
"custom_cta": "custom_cta",
"show_price": True,
From 74d75c50c470970c3b7fdc0611dd58c518fcdb18 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 11 Mar 2026 17:13:52 +0000
Subject: [PATCH 2/7] feat(api): api update
---
.stats.yml | 4 ++--
src/whop_sdk/types/shared/payment.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index f926b8c..39fd469 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 176
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-b477216108f1b9e4bea7aac4f4da49b14bdba7d4e2660f2b2d643463390fa6e1.yml
-openapi_spec_hash: b2415f4dd2e2397ed4b2558773a1005a
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-c4baa40d76eb5b4842beff69f7baff7522fc3d64b40fa2d4d172b0c2c4ee2f12.yml
+openapi_spec_hash: d70e313314720c22a3b35c67f4068f18
config_hash: 71004ac2f2a6283ca55db1065c47e5f6
diff --git a/src/whop_sdk/types/shared/payment.py b/src/whop_sdk/types/shared/payment.py
index 6993b54..5a9a43b 100644
--- a/src/whop_sdk/types/shared/payment.py
+++ b/src/whop_sdk/types/shared/payment.py
@@ -287,7 +287,7 @@ class PromoCode(BaseModel):
class Resolution(BaseModel):
"""
- A resolution is a dispute or support case between a buyer and seller, tracking the issue, status, and outcome.
+ A resolution center case is a dispute or support case between a user and a company, tracking the issue, status, and outcome.
"""
id: str
From db6d90cb90d173817cb3c8829dcd7d4ac091e53e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 11 Mar 2026 18:13:43 +0000
Subject: [PATCH 3/7] feat(api): api update
---
.stats.yml | 4 ++--
src/whop_sdk/resources/ai_chats.py | 8 ++++++++
src/whop_sdk/types/ai_chat_list_params.py | 3 +++
tests/api_resources/test_ai_chats.py | 2 ++
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 39fd469..65711ed 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 176
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-c4baa40d76eb5b4842beff69f7baff7522fc3d64b40fa2d4d172b0c2c4ee2f12.yml
-openapi_spec_hash: d70e313314720c22a3b35c67f4068f18
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-187882c4d823394e3577f9843c288f4187e4f9b38646105c40b88e4e83b27979.yml
+openapi_spec_hash: 16eb1c84681dc3ad39c987b7abf1e191
config_hash: 71004ac2f2a6283ca55db1065c47e5f6
diff --git a/src/whop_sdk/resources/ai_chats.py b/src/whop_sdk/resources/ai_chats.py
index cd1fe56..c78b48c 100644
--- a/src/whop_sdk/resources/ai_chats.py
+++ b/src/whop_sdk/resources/ai_chats.py
@@ -206,6 +206,7 @@ def list(
before: Optional[str] | Omit = omit,
first: Optional[int] | Omit = omit,
last: Optional[int] | Omit = omit,
+ only_active_crons: Optional[bool] | 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,
@@ -225,6 +226,8 @@ def list(
last: Returns the last _n_ elements from the list.
+ only_active_crons: When true, returns only chats with an active cron schedule
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -247,6 +250,7 @@ def list(
"before": before,
"first": first,
"last": last,
+ "only_active_crons": only_active_crons,
},
ai_chat_list_params.AIChatListParams,
),
@@ -471,6 +475,7 @@ def list(
before: Optional[str] | Omit = omit,
first: Optional[int] | Omit = omit,
last: Optional[int] | Omit = omit,
+ only_active_crons: Optional[bool] | 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,
@@ -490,6 +495,8 @@ def list(
last: Returns the last _n_ elements from the list.
+ only_active_crons: When true, returns only chats with an active cron schedule
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -512,6 +519,7 @@ def list(
"before": before,
"first": first,
"last": last,
+ "only_active_crons": only_active_crons,
},
ai_chat_list_params.AIChatListParams,
),
diff --git a/src/whop_sdk/types/ai_chat_list_params.py b/src/whop_sdk/types/ai_chat_list_params.py
index f32eaa9..81fa78a 100644
--- a/src/whop_sdk/types/ai_chat_list_params.py
+++ b/src/whop_sdk/types/ai_chat_list_params.py
@@ -20,3 +20,6 @@ class AIChatListParams(TypedDict, total=False):
last: Optional[int]
"""Returns the last _n_ elements from the list."""
+
+ only_active_crons: Optional[bool]
+ """When true, returns only chats with an active cron schedule"""
diff --git a/tests/api_resources/test_ai_chats.py b/tests/api_resources/test_ai_chats.py
index 3f155d2..b27a552 100644
--- a/tests/api_resources/test_ai_chats.py
+++ b/tests/api_resources/test_ai_chats.py
@@ -177,6 +177,7 @@ def test_method_list_with_all_params(self, client: Whop) -> None:
before="before",
first=42,
last=42,
+ only_active_crons=True,
)
assert_matches_type(SyncCursorPage[AIChatListResponse], ai_chat, path=["response"])
@@ -405,6 +406,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncWhop) -> Non
before="before",
first=42,
last=42,
+ only_active_crons=True,
)
assert_matches_type(AsyncCursorPage[AIChatListResponse], ai_chat, path=["response"])
From 5488b953d0a7e6c4c6d08d9a6f0b88a8852a76d2 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 11 Mar 2026 18:25:16 +0000
Subject: [PATCH 4/7] feat(api): manual updates
---
.stats.yml | 4 +-
api.md | 32 +-
src/whop_sdk/_client.py | 46 +++
src/whop_sdk/resources/__init__.py | 14 +
src/whop_sdk/resources/authorized_users.py | 19 +-
.../resources/resolution_center_cases.py | 356 ++++++++++++++++++
src/whop_sdk/types/__init__.py | 19 +-
..._create_response.py => authorized_user.py} | 4 +-
.../authorized_user_retrieve_response.py | 55 ---
...esolution_center_case_customer_response.py | 7 +
.../resolution_center_case_issue_type.py | 13 +
.../resolution_center_case_list_params.py | 42 +++
.../resolution_center_case_list_response.py | 99 +++++
...esolution_center_case_merchant_response.py | 7 +
...esolution_center_case_platform_response.py | 9 +
...esolution_center_case_retrieve_response.py | 190 ++++++++++
.../types/resolution_center_case_status.py | 16 +
src/whop_sdk/types/shared/payment.py | 32 +-
tests/api_resources/test_authorized_users.py | 31 +-
.../test_resolution_center_cases.py | 211 +++++++++++
20 files changed, 1089 insertions(+), 117 deletions(-)
create mode 100644 src/whop_sdk/resources/resolution_center_cases.py
rename src/whop_sdk/types/{authorized_user_create_response.py => authorized_user.py} (92%)
delete mode 100644 src/whop_sdk/types/authorized_user_retrieve_response.py
create mode 100644 src/whop_sdk/types/resolution_center_case_customer_response.py
create mode 100644 src/whop_sdk/types/resolution_center_case_issue_type.py
create mode 100644 src/whop_sdk/types/resolution_center_case_list_params.py
create mode 100644 src/whop_sdk/types/resolution_center_case_list_response.py
create mode 100644 src/whop_sdk/types/resolution_center_case_merchant_response.py
create mode 100644 src/whop_sdk/types/resolution_center_case_platform_response.py
create mode 100644 src/whop_sdk/types/resolution_center_case_retrieve_response.py
create mode 100644 src/whop_sdk/types/resolution_center_case_status.py
create mode 100644 tests/api_resources/test_resolution_center_cases.py
diff --git a/.stats.yml b/.stats.yml
index 65711ed..00310ca 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 176
+configured_endpoints: 178
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-187882c4d823394e3577f9843c288f4187e4f9b38646105c40b88e4e83b27979.yml
openapi_spec_hash: 16eb1c84681dc3ad39c987b7abf1e191
-config_hash: 71004ac2f2a6283ca55db1065c47e5f6
+config_hash: e9bda7cddca13f2b41d8f7521ad36cf5
diff --git a/api.md b/api.md
index cb3e009..2627576 100644
--- a/api.md
+++ b/api.md
@@ -279,18 +279,13 @@ Methods:
Types:
```python
-from whop_sdk.types import (
- AuthorizedUserCreateResponse,
- AuthorizedUserRetrieveResponse,
- AuthorizedUserListResponse,
- AuthorizedUserDeleteResponse,
-)
+from whop_sdk.types import AuthorizedUser, AuthorizedUserListResponse, AuthorizedUserDeleteResponse
```
Methods:
-- client.authorized_users.create(\*\*params) -> AuthorizedUserCreateResponse
-- client.authorized_users.retrieve(id) -> AuthorizedUserRetrieveResponse
+- client.authorized_users.create(\*\*params) -> AuthorizedUser
+- client.authorized_users.retrieve(id) -> AuthorizedUser
- client.authorized_users.list(\*\*params) -> SyncCursorPage[AuthorizedUserListResponse]
- client.authorized_users.delete(id, \*\*params) -> AuthorizedUserDeleteResponse
@@ -885,3 +880,24 @@ Methods:
- client.dispute_alerts.retrieve(id) -> DisputeAlertRetrieveResponse
- client.dispute_alerts.list(\*\*params) -> SyncCursorPage[DisputeAlertListResponse]
+
+# ResolutionCenterCases
+
+Types:
+
+```python
+from whop_sdk.types import (
+ ResolutionCenterCaseCustomerResponse,
+ ResolutionCenterCaseIssueType,
+ ResolutionCenterCaseMerchantResponse,
+ ResolutionCenterCasePlatformResponse,
+ ResolutionCenterCaseStatus,
+ ResolutionCenterCaseRetrieveResponse,
+ ResolutionCenterCaseListResponse,
+)
+```
+
+Methods:
+
+- client.resolution_center_cases.retrieve(id) -> ResolutionCenterCaseRetrieveResponse
+- client.resolution_center_cases.list(\*\*params) -> SyncCursorPage[ResolutionCenterCaseListResponse]
diff --git a/src/whop_sdk/_client.py b/src/whop_sdk/_client.py
index ae5d5c9..eaeaaa6 100644
--- a/src/whop_sdk/_client.py
+++ b/src/whop_sdk/_client.py
@@ -80,6 +80,7 @@
authorized_users,
support_channels,
checkout_configurations,
+ resolution_center_cases,
company_token_transactions,
course_lesson_interactions,
)
@@ -131,6 +132,7 @@
from .resources.authorized_users import AuthorizedUsersResource, AsyncAuthorizedUsersResource
from .resources.support_channels import SupportChannelsResource, AsyncSupportChannelsResource
from .resources.checkout_configurations import CheckoutConfigurationsResource, AsyncCheckoutConfigurationsResource
+ from .resources.resolution_center_cases import ResolutionCenterCasesResource, AsyncResolutionCenterCasesResource
from .resources.company_token_transactions import (
CompanyTokenTransactionsResource,
AsyncCompanyTokenTransactionsResource,
@@ -563,6 +565,13 @@ def dispute_alerts(self) -> DisputeAlertsResource:
return DisputeAlertsResource(self)
+ @cached_property
+ def resolution_center_cases(self) -> ResolutionCenterCasesResource:
+ """Resolution center cases"""
+ from .resources.resolution_center_cases import ResolutionCenterCasesResource
+
+ return ResolutionCenterCasesResource(self)
+
@cached_property
def with_raw_response(self) -> WhopWithRawResponse:
return WhopWithRawResponse(self)
@@ -1101,6 +1110,13 @@ def dispute_alerts(self) -> AsyncDisputeAlertsResource:
return AsyncDisputeAlertsResource(self)
+ @cached_property
+ def resolution_center_cases(self) -> AsyncResolutionCenterCasesResource:
+ """Resolution center cases"""
+ from .resources.resolution_center_cases import AsyncResolutionCenterCasesResource
+
+ return AsyncResolutionCenterCasesResource(self)
+
@cached_property
def with_raw_response(self) -> AsyncWhopWithRawResponse:
return AsyncWhopWithRawResponse(self)
@@ -1575,6 +1591,13 @@ def dispute_alerts(self) -> dispute_alerts.DisputeAlertsResourceWithRawResponse:
return DisputeAlertsResourceWithRawResponse(self._client.dispute_alerts)
+ @cached_property
+ def resolution_center_cases(self) -> resolution_center_cases.ResolutionCenterCasesResourceWithRawResponse:
+ """Resolution center cases"""
+ from .resources.resolution_center_cases import ResolutionCenterCasesResourceWithRawResponse
+
+ return ResolutionCenterCasesResourceWithRawResponse(self._client.resolution_center_cases)
+
class AsyncWhopWithRawResponse:
_client: AsyncWhop
@@ -1936,6 +1959,13 @@ def dispute_alerts(self) -> dispute_alerts.AsyncDisputeAlertsResourceWithRawResp
return AsyncDisputeAlertsResourceWithRawResponse(self._client.dispute_alerts)
+ @cached_property
+ def resolution_center_cases(self) -> resolution_center_cases.AsyncResolutionCenterCasesResourceWithRawResponse:
+ """Resolution center cases"""
+ from .resources.resolution_center_cases import AsyncResolutionCenterCasesResourceWithRawResponse
+
+ return AsyncResolutionCenterCasesResourceWithRawResponse(self._client.resolution_center_cases)
+
class WhopWithStreamedResponse:
_client: Whop
@@ -2297,6 +2327,13 @@ def dispute_alerts(self) -> dispute_alerts.DisputeAlertsResourceWithStreamingRes
return DisputeAlertsResourceWithStreamingResponse(self._client.dispute_alerts)
+ @cached_property
+ def resolution_center_cases(self) -> resolution_center_cases.ResolutionCenterCasesResourceWithStreamingResponse:
+ """Resolution center cases"""
+ from .resources.resolution_center_cases import ResolutionCenterCasesResourceWithStreamingResponse
+
+ return ResolutionCenterCasesResourceWithStreamingResponse(self._client.resolution_center_cases)
+
class AsyncWhopWithStreamedResponse:
_client: AsyncWhop
@@ -2660,6 +2697,15 @@ def dispute_alerts(self) -> dispute_alerts.AsyncDisputeAlertsResourceWithStreami
return AsyncDisputeAlertsResourceWithStreamingResponse(self._client.dispute_alerts)
+ @cached_property
+ def resolution_center_cases(
+ self,
+ ) -> resolution_center_cases.AsyncResolutionCenterCasesResourceWithStreamingResponse:
+ """Resolution center cases"""
+ from .resources.resolution_center_cases import AsyncResolutionCenterCasesResourceWithStreamingResponse
+
+ return AsyncResolutionCenterCasesResourceWithStreamingResponse(self._client.resolution_center_cases)
+
Client = Whop
diff --git a/src/whop_sdk/resources/__init__.py b/src/whop_sdk/resources/__init__.py
index 798ec01..42deaeb 100644
--- a/src/whop_sdk/resources/__init__.py
+++ b/src/whop_sdk/resources/__init__.py
@@ -384,6 +384,14 @@
CheckoutConfigurationsResourceWithStreamingResponse,
AsyncCheckoutConfigurationsResourceWithStreamingResponse,
)
+from .resolution_center_cases import (
+ ResolutionCenterCasesResource,
+ AsyncResolutionCenterCasesResource,
+ ResolutionCenterCasesResourceWithRawResponse,
+ AsyncResolutionCenterCasesResourceWithRawResponse,
+ ResolutionCenterCasesResourceWithStreamingResponse,
+ AsyncResolutionCenterCasesResourceWithStreamingResponse,
+)
from .company_token_transactions import (
CompanyTokenTransactionsResource,
AsyncCompanyTokenTransactionsResource,
@@ -702,4 +710,10 @@
"AsyncDisputeAlertsResourceWithRawResponse",
"DisputeAlertsResourceWithStreamingResponse",
"AsyncDisputeAlertsResourceWithStreamingResponse",
+ "ResolutionCenterCasesResource",
+ "AsyncResolutionCenterCasesResource",
+ "ResolutionCenterCasesResourceWithRawResponse",
+ "AsyncResolutionCenterCasesResourceWithRawResponse",
+ "ResolutionCenterCasesResourceWithStreamingResponse",
+ "AsyncResolutionCenterCasesResourceWithStreamingResponse",
]
diff --git a/src/whop_sdk/resources/authorized_users.py b/src/whop_sdk/resources/authorized_users.py
index b1f3fd1..8ccdca5 100644
--- a/src/whop_sdk/resources/authorized_users.py
+++ b/src/whop_sdk/resources/authorized_users.py
@@ -20,11 +20,10 @@
)
from ..pagination import SyncCursorPage, AsyncCursorPage
from .._base_client import AsyncPaginator, make_request_options
+from ..types.authorized_user import AuthorizedUser
from ..types.shared.authorized_user_roles import AuthorizedUserRoles
from ..types.authorized_user_list_response import AuthorizedUserListResponse
-from ..types.authorized_user_create_response import AuthorizedUserCreateResponse
from ..types.authorized_user_delete_response import AuthorizedUserDeleteResponse
-from ..types.authorized_user_retrieve_response import AuthorizedUserRetrieveResponse
__all__ = ["AuthorizedUsersResource", "AsyncAuthorizedUsersResource"]
@@ -64,7 +63,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AuthorizedUserCreateResponse:
+ ) -> AuthorizedUser:
"""
Add a new authorized user to a company.
@@ -106,7 +105,7 @@ def create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=AuthorizedUserCreateResponse,
+ cast_to=AuthorizedUser,
)
def retrieve(
@@ -119,7 +118,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AuthorizedUserRetrieveResponse:
+ ) -> AuthorizedUser:
"""
Retrieves the details of an existing authorized user.
@@ -144,7 +143,7 @@ def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=AuthorizedUserRetrieveResponse,
+ cast_to=AuthorizedUser,
)
def list(
@@ -312,7 +311,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AuthorizedUserCreateResponse:
+ ) -> AuthorizedUser:
"""
Add a new authorized user to a company.
@@ -354,7 +353,7 @@ async def create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=AuthorizedUserCreateResponse,
+ cast_to=AuthorizedUser,
)
async def retrieve(
@@ -367,7 +366,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AuthorizedUserRetrieveResponse:
+ ) -> AuthorizedUser:
"""
Retrieves the details of an existing authorized user.
@@ -392,7 +391,7 @@ async def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=AuthorizedUserRetrieveResponse,
+ cast_to=AuthorizedUser,
)
def list(
diff --git a/src/whop_sdk/resources/resolution_center_cases.py b/src/whop_sdk/resources/resolution_center_cases.py
new file mode 100644
index 0000000..3563f15
--- /dev/null
+++ b/src/whop_sdk/resources/resolution_center_cases.py
@@ -0,0 +1,356 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union, Optional
+from datetime import datetime
+
+import httpx
+
+from ..types import resolution_center_case_list_params
+from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from .._utils import maybe_transform
+from .._compat import cached_property
+from .._resource import SyncAPIResource, AsyncAPIResource
+from .._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ..pagination import SyncCursorPage, AsyncCursorPage
+from .._base_client import AsyncPaginator, make_request_options
+from ..types.shared.direction import Direction
+from ..types.resolution_center_case_status import ResolutionCenterCaseStatus
+from ..types.resolution_center_case_list_response import ResolutionCenterCaseListResponse
+from ..types.resolution_center_case_retrieve_response import ResolutionCenterCaseRetrieveResponse
+
+__all__ = ["ResolutionCenterCasesResource", "AsyncResolutionCenterCasesResource"]
+
+
+class ResolutionCenterCasesResource(SyncAPIResource):
+ """Resolution center cases"""
+
+ @cached_property
+ def with_raw_response(self) -> ResolutionCenterCasesResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/whopio/whopsdk-python#accessing-raw-response-data-eg-headers
+ """
+ return ResolutionCenterCasesResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> ResolutionCenterCasesResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/whopio/whopsdk-python#with_streaming_response
+ """
+ return ResolutionCenterCasesResourceWithStreamingResponse(self)
+
+ def retrieve(
+ self,
+ id: str,
+ *,
+ # 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,
+ ) -> ResolutionCenterCaseRetrieveResponse:
+ """
+ Retrieves the details of an existing resolution center case.
+
+ Required permissions:
+
+ - `payment:resolution_center_case:read`
+
+ Args:
+ 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
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return self._get(
+ f"/resolution_center_cases/{id}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=ResolutionCenterCaseRetrieveResponse,
+ )
+
+ def list(
+ self,
+ *,
+ 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,
+ statuses: Optional[List[ResolutionCenterCaseStatus]] | 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[ResolutionCenterCaseListResponse]:
+ """
+ Returns a paginated list of resolution center cases, with optional filtering by
+ company, status, and creation date.
+
+ Required permissions:
+
+ - `payment:resolution_center_case:read`
+
+ 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.
+
+ company_id: The unique identifier of the company to list resolution center cases for.
+
+ created_after: Only return cases created after this timestamp.
+
+ created_before: Only return cases created before this timestamp.
+
+ direction: The direction of the sort.
+
+ first: Returns the first _n_ elements from the list.
+
+ last: Returns the last _n_ elements from the list.
+
+ statuses: Filter by resolution center case status.
+
+ 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(
+ "/resolution_center_cases",
+ page=SyncCursorPage[ResolutionCenterCaseListResponse],
+ 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,
+ "company_id": company_id,
+ "created_after": created_after,
+ "created_before": created_before,
+ "direction": direction,
+ "first": first,
+ "last": last,
+ "statuses": statuses,
+ },
+ resolution_center_case_list_params.ResolutionCenterCaseListParams,
+ ),
+ ),
+ model=ResolutionCenterCaseListResponse,
+ )
+
+
+class AsyncResolutionCenterCasesResource(AsyncAPIResource):
+ """Resolution center cases"""
+
+ @cached_property
+ def with_raw_response(self) -> AsyncResolutionCenterCasesResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/whopio/whopsdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncResolutionCenterCasesResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncResolutionCenterCasesResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/whopio/whopsdk-python#with_streaming_response
+ """
+ return AsyncResolutionCenterCasesResourceWithStreamingResponse(self)
+
+ async def retrieve(
+ self,
+ id: str,
+ *,
+ # 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,
+ ) -> ResolutionCenterCaseRetrieveResponse:
+ """
+ Retrieves the details of an existing resolution center case.
+
+ Required permissions:
+
+ - `payment:resolution_center_case:read`
+
+ Args:
+ 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
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return await self._get(
+ f"/resolution_center_cases/{id}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=ResolutionCenterCaseRetrieveResponse,
+ )
+
+ def list(
+ self,
+ *,
+ 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,
+ statuses: Optional[List[ResolutionCenterCaseStatus]] | 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[ResolutionCenterCaseListResponse, AsyncCursorPage[ResolutionCenterCaseListResponse]]:
+ """
+ Returns a paginated list of resolution center cases, with optional filtering by
+ company, status, and creation date.
+
+ Required permissions:
+
+ - `payment:resolution_center_case:read`
+
+ 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.
+
+ company_id: The unique identifier of the company to list resolution center cases for.
+
+ created_after: Only return cases created after this timestamp.
+
+ created_before: Only return cases created before this timestamp.
+
+ direction: The direction of the sort.
+
+ first: Returns the first _n_ elements from the list.
+
+ last: Returns the last _n_ elements from the list.
+
+ statuses: Filter by resolution center case status.
+
+ 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(
+ "/resolution_center_cases",
+ page=AsyncCursorPage[ResolutionCenterCaseListResponse],
+ 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,
+ "company_id": company_id,
+ "created_after": created_after,
+ "created_before": created_before,
+ "direction": direction,
+ "first": first,
+ "last": last,
+ "statuses": statuses,
+ },
+ resolution_center_case_list_params.ResolutionCenterCaseListParams,
+ ),
+ ),
+ model=ResolutionCenterCaseListResponse,
+ )
+
+
+class ResolutionCenterCasesResourceWithRawResponse:
+ def __init__(self, resolution_center_cases: ResolutionCenterCasesResource) -> None:
+ self._resolution_center_cases = resolution_center_cases
+
+ self.retrieve = to_raw_response_wrapper(
+ resolution_center_cases.retrieve,
+ )
+ self.list = to_raw_response_wrapper(
+ resolution_center_cases.list,
+ )
+
+
+class AsyncResolutionCenterCasesResourceWithRawResponse:
+ def __init__(self, resolution_center_cases: AsyncResolutionCenterCasesResource) -> None:
+ self._resolution_center_cases = resolution_center_cases
+
+ self.retrieve = async_to_raw_response_wrapper(
+ resolution_center_cases.retrieve,
+ )
+ self.list = async_to_raw_response_wrapper(
+ resolution_center_cases.list,
+ )
+
+
+class ResolutionCenterCasesResourceWithStreamingResponse:
+ def __init__(self, resolution_center_cases: ResolutionCenterCasesResource) -> None:
+ self._resolution_center_cases = resolution_center_cases
+
+ self.retrieve = to_streamed_response_wrapper(
+ resolution_center_cases.retrieve,
+ )
+ self.list = to_streamed_response_wrapper(
+ resolution_center_cases.list,
+ )
+
+
+class AsyncResolutionCenterCasesResourceWithStreamingResponse:
+ def __init__(self, resolution_center_cases: AsyncResolutionCenterCasesResource) -> None:
+ self._resolution_center_cases = resolution_center_cases
+
+ self.retrieve = async_to_streamed_response_wrapper(
+ resolution_center_cases.retrieve,
+ )
+ self.list = async_to_streamed_response_wrapper(
+ resolution_center_cases.list,
+ )
diff --git a/src/whop_sdk/types/__init__.py b/src/whop_sdk/types/__init__.py
index c2af889..54d1942 100644
--- a/src/whop_sdk/types/__init__.py
+++ b/src/whop_sdk/types/__init__.py
@@ -89,6 +89,7 @@
from .course_chapter import CourseChapter as CourseChapter
from .promo_duration import PromoDuration as PromoDuration
from .app_list_params import AppListParams as AppListParams
+from .authorized_user import AuthorizedUser as AuthorizedUser
from .billing_reasons import BillingReasons as BillingReasons
from .fee_markup_type import FeeMarkupType as FeeMarkupType
from .dispute_statuses import DisputeStatuses as DisputeStatuses
@@ -289,6 +290,7 @@
from .invoice_created_webhook_event import InvoiceCreatedWebhookEvent as InvoiceCreatedWebhookEvent
from .payment_created_webhook_event import PaymentCreatedWebhookEvent as PaymentCreatedWebhookEvent
from .payment_pending_webhook_event import PaymentPendingWebhookEvent as PaymentPendingWebhookEvent
+from .resolution_center_case_status import ResolutionCenterCaseStatus as ResolutionCenterCaseStatus
from .support_channel_create_params import SupportChannelCreateParams as SupportChannelCreateParams
from .support_channel_list_response import SupportChannelListResponse as SupportChannelListResponse
from .company_token_transaction_type import CompanyTokenTransactionType as CompanyTokenTransactionType
@@ -297,7 +299,6 @@
from .invoice_past_due_webhook_event import InvoicePastDueWebhookEvent as InvoicePastDueWebhookEvent
from .payment_method_retrieve_params import PaymentMethodRetrieveParams as PaymentMethodRetrieveParams
from .verification_retrieve_response import VerificationRetrieveResponse as VerificationRetrieveResponse
-from .authorized_user_create_response import AuthorizedUserCreateResponse as AuthorizedUserCreateResponse
from .authorized_user_delete_response import AuthorizedUserDeleteResponse as AuthorizedUserDeleteResponse
from .dispute_alert_retrieve_response import DisputeAlertRetrieveResponse as DisputeAlertRetrieveResponse
from .membership_add_free_days_params import MembershipAddFreeDaysParams as MembershipAddFreeDaysParams
@@ -308,15 +309,17 @@
from .payment_method_retrieve_response import PaymentMethodRetrieveResponse as PaymentMethodRetrieveResponse
from .withdrawal_created_webhook_event import WithdrawalCreatedWebhookEvent as WithdrawalCreatedWebhookEvent
from .withdrawal_updated_webhook_event import WithdrawalUpdatedWebhookEvent as WithdrawalUpdatedWebhookEvent
-from .authorized_user_retrieve_response import AuthorizedUserRetrieveResponse as AuthorizedUserRetrieveResponse
+from .resolution_center_case_issue_type import ResolutionCenterCaseIssueType as ResolutionCenterCaseIssueType
from .checkout_configuration_list_params import CheckoutConfigurationListParams as CheckoutConfigurationListParams
from .membership_activated_webhook_event import MembershipActivatedWebhookEvent as MembershipActivatedWebhookEvent
+from .resolution_center_case_list_params import ResolutionCenterCaseListParams as ResolutionCenterCaseListParams
from .dispute_alert_created_webhook_event import DisputeAlertCreatedWebhookEvent as DisputeAlertCreatedWebhookEvent
from .payout_method_created_webhook_event import PayoutMethodCreatedWebhookEvent as PayoutMethodCreatedWebhookEvent
from .setup_intent_canceled_webhook_event import SetupIntentCanceledWebhookEvent as SetupIntentCanceledWebhookEvent
from .checkout_configuration_create_params import CheckoutConfigurationCreateParams as CheckoutConfigurationCreateParams
from .checkout_configuration_list_response import CheckoutConfigurationListResponse as CheckoutConfigurationListResponse
from .membership_deactivated_webhook_event import MembershipDeactivatedWebhookEvent as MembershipDeactivatedWebhookEvent
+from .resolution_center_case_list_response import ResolutionCenterCaseListResponse as ResolutionCenterCaseListResponse
from .setup_intent_succeeded_webhook_event import SetupIntentSucceededWebhookEvent as SetupIntentSucceededWebhookEvent
from .verification_succeeded_webhook_event import VerificationSucceededWebhookEvent as VerificationSucceededWebhookEvent
from .company_token_transaction_list_params import (
@@ -343,6 +346,18 @@
from .course_lesson_submit_assessment_response import (
CourseLessonSubmitAssessmentResponse as CourseLessonSubmitAssessmentResponse,
)
+from .resolution_center_case_customer_response import (
+ ResolutionCenterCaseCustomerResponse as ResolutionCenterCaseCustomerResponse,
+)
+from .resolution_center_case_merchant_response import (
+ ResolutionCenterCaseMerchantResponse as ResolutionCenterCaseMerchantResponse,
+)
+from .resolution_center_case_platform_response import (
+ ResolutionCenterCasePlatformResponse as ResolutionCenterCasePlatformResponse,
+)
+from .resolution_center_case_retrieve_response import (
+ ResolutionCenterCaseRetrieveResponse as ResolutionCenterCaseRetrieveResponse,
+)
from .setup_intent_requires_action_webhook_event import (
SetupIntentRequiresActionWebhookEvent as SetupIntentRequiresActionWebhookEvent,
)
diff --git a/src/whop_sdk/types/authorized_user_create_response.py b/src/whop_sdk/types/authorized_user.py
similarity index 92%
rename from src/whop_sdk/types/authorized_user_create_response.py
rename to src/whop_sdk/types/authorized_user.py
index 1bf69ab..b34b41a 100644
--- a/src/whop_sdk/types/authorized_user_create_response.py
+++ b/src/whop_sdk/types/authorized_user.py
@@ -5,7 +5,7 @@
from .._models import BaseModel
from .shared.authorized_user_roles import AuthorizedUserRoles
-__all__ = ["AuthorizedUserCreateResponse", "Company", "User"]
+__all__ = ["AuthorizedUser", "Company", "User"]
class Company(BaseModel):
@@ -37,7 +37,7 @@ class User(BaseModel):
"""The user's unique username shown on their public profile."""
-class AuthorizedUserCreateResponse(BaseModel):
+class AuthorizedUser(BaseModel):
"""
A user who has been granted administrative access to manage a company's dashboard and settings.
"""
diff --git a/src/whop_sdk/types/authorized_user_retrieve_response.py b/src/whop_sdk/types/authorized_user_retrieve_response.py
deleted file mode 100644
index bd6ab0b..0000000
--- a/src/whop_sdk/types/authorized_user_retrieve_response.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-
-from .._models import BaseModel
-from .shared.authorized_user_roles import AuthorizedUserRoles
-
-__all__ = ["AuthorizedUserRetrieveResponse", "Company", "User"]
-
-
-class Company(BaseModel):
- """The company this authorized user has access to."""
-
- id: str
- """The unique identifier for the company."""
-
- title: str
- """The display name of the company shown to customers."""
-
-
-class User(BaseModel):
- """The user account linked to this authorized user record."""
-
- id: str
- """The unique identifier for the user."""
-
- email: Optional[str] = None
- """The user's email address.
-
- Requires the member:email:read permission to access. Null if not authorized.
- """
-
- name: Optional[str] = None
- """The user's display name shown on their public profile."""
-
- username: str
- """The user's unique username shown on their public profile."""
-
-
-class AuthorizedUserRetrieveResponse(BaseModel):
- """
- A user who has been granted administrative access to manage a company's dashboard and settings.
- """
-
- id: str
- """The unique identifier for the authorized user."""
-
- company: Company
- """The company this authorized user has access to."""
-
- role: AuthorizedUserRoles
- """The permission role assigned to this authorized user within the company."""
-
- user: User
- """The user account linked to this authorized user record."""
diff --git a/src/whop_sdk/types/resolution_center_case_customer_response.py b/src/whop_sdk/types/resolution_center_case_customer_response.py
new file mode 100644
index 0000000..32dff81
--- /dev/null
+++ b/src/whop_sdk/types/resolution_center_case_customer_response.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["ResolutionCenterCaseCustomerResponse"]
+
+ResolutionCenterCaseCustomerResponse: TypeAlias = Literal["respond", "appeal", "withdraw"]
diff --git a/src/whop_sdk/types/resolution_center_case_issue_type.py b/src/whop_sdk/types/resolution_center_case_issue_type.py
new file mode 100644
index 0000000..fc24d14
--- /dev/null
+++ b/src/whop_sdk/types/resolution_center_case_issue_type.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["ResolutionCenterCaseIssueType"]
+
+ResolutionCenterCaseIssueType: TypeAlias = Literal[
+ "forgot_to_cancel",
+ "item_not_received",
+ "significantly_not_as_described",
+ "unauthorized_transaction",
+ "product_unacceptable",
+]
diff --git a/src/whop_sdk/types/resolution_center_case_list_params.py b/src/whop_sdk/types/resolution_center_case_list_params.py
new file mode 100644
index 0000000..9d511dd
--- /dev/null
+++ b/src/whop_sdk/types/resolution_center_case_list_params.py
@@ -0,0 +1,42 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union, Optional
+from datetime import datetime
+from typing_extensions import Annotated, TypedDict
+
+from .._utils import PropertyInfo
+from .shared.direction import Direction
+from .resolution_center_case_status import ResolutionCenterCaseStatus
+
+__all__ = ["ResolutionCenterCaseListParams"]
+
+
+class ResolutionCenterCaseListParams(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."""
+
+ company_id: Optional[str]
+ """The unique identifier of the company to list resolution center cases for."""
+
+ created_after: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
+ """Only return cases created after this timestamp."""
+
+ created_before: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
+ """Only return cases created before this timestamp."""
+
+ direction: Optional[Direction]
+ """The direction of the sort."""
+
+ first: Optional[int]
+ """Returns the first _n_ elements from the list."""
+
+ last: Optional[int]
+ """Returns the last _n_ elements from the list."""
+
+ statuses: Optional[List[ResolutionCenterCaseStatus]]
+ """Filter by resolution center case status."""
diff --git a/src/whop_sdk/types/resolution_center_case_list_response.py b/src/whop_sdk/types/resolution_center_case_list_response.py
new file mode 100644
index 0000000..02cbdbc
--- /dev/null
+++ b/src/whop_sdk/types/resolution_center_case_list_response.py
@@ -0,0 +1,99 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from datetime import datetime
+
+from .._models import BaseModel
+from .resolution_center_case_status import ResolutionCenterCaseStatus
+from .resolution_center_case_issue_type import ResolutionCenterCaseIssueType
+from .resolution_center_case_customer_response import ResolutionCenterCaseCustomerResponse
+from .resolution_center_case_merchant_response import ResolutionCenterCaseMerchantResponse
+
+__all__ = ["ResolutionCenterCaseListResponse", "Company", "Payment", "User"]
+
+
+class Company(BaseModel):
+ """The company involved in this resolution case.
+
+ Null if the company no longer exists.
+ """
+
+ id: str
+ """The unique identifier for the company."""
+
+ title: str
+ """The display name of the company shown to customers."""
+
+
+class Payment(BaseModel):
+ """The payment record that is the subject of this resolution case."""
+
+ id: str
+ """The unique identifier for the payment."""
+
+
+class User(BaseModel):
+ """The customer (buyer) who filed this resolution case."""
+
+ id: str
+ """The unique identifier for the user."""
+
+ name: Optional[str] = None
+ """The user's display name shown on their public profile."""
+
+ username: str
+ """The user's unique username shown on their public profile."""
+
+
+class ResolutionCenterCaseListResponse(BaseModel):
+ """
+ A resolution center case is a dispute or support case between a user and a company, tracking the issue, status, and outcome.
+ """
+
+ id: str
+ """The unique identifier for the resolution."""
+
+ company: Optional[Company] = None
+ """The company involved in this resolution case.
+
+ Null if the company no longer exists.
+ """
+
+ created_at: datetime
+ """The datetime the resolution was created."""
+
+ customer_appealed: bool
+ """Whether the customer has filed an appeal after the initial resolution decision."""
+
+ customer_response_actions: List[ResolutionCenterCaseCustomerResponse]
+ """The list of actions currently available to the customer."""
+
+ due_date: Optional[datetime] = None
+ """The deadline by which the next response is required.
+
+ Null if no deadline is currently active. As a Unix timestamp.
+ """
+
+ issue: ResolutionCenterCaseIssueType
+ """The category of the dispute."""
+
+ merchant_appealed: bool
+ """Whether the merchant has filed an appeal after the initial resolution decision."""
+
+ merchant_response_actions: List[ResolutionCenterCaseMerchantResponse]
+ """The list of actions currently available to the merchant."""
+
+ payment: Payment
+ """The payment record that is the subject of this resolution case."""
+
+ status: ResolutionCenterCaseStatus
+ """
+ The current status of the resolution case, indicating which party needs to
+ respond or if the case is closed.
+ """
+
+ updated_at: datetime
+ """The datetime the resolution was last updated."""
+
+ user: User
+ """The customer (buyer) who filed this resolution case."""
diff --git a/src/whop_sdk/types/resolution_center_case_merchant_response.py b/src/whop_sdk/types/resolution_center_case_merchant_response.py
new file mode 100644
index 0000000..d6d45d0
--- /dev/null
+++ b/src/whop_sdk/types/resolution_center_case_merchant_response.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["ResolutionCenterCaseMerchantResponse"]
+
+ResolutionCenterCaseMerchantResponse: TypeAlias = Literal["accept", "deny", "request_more_info", "appeal", "respond"]
diff --git a/src/whop_sdk/types/resolution_center_case_platform_response.py b/src/whop_sdk/types/resolution_center_case_platform_response.py
new file mode 100644
index 0000000..0dce38a
--- /dev/null
+++ b/src/whop_sdk/types/resolution_center_case_platform_response.py
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["ResolutionCenterCasePlatformResponse"]
+
+ResolutionCenterCasePlatformResponse: TypeAlias = Literal[
+ "request_buyer_info", "request_merchant_info", "merchant_wins", "platform_refund", "merchant_refund"
+]
diff --git a/src/whop_sdk/types/resolution_center_case_retrieve_response.py b/src/whop_sdk/types/resolution_center_case_retrieve_response.py
new file mode 100644
index 0000000..8fab35f
--- /dev/null
+++ b/src/whop_sdk/types/resolution_center_case_retrieve_response.py
@@ -0,0 +1,190 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from .._models import BaseModel
+from .shared.currency import Currency
+from .resolution_center_case_status import ResolutionCenterCaseStatus
+from .resolution_center_case_issue_type import ResolutionCenterCaseIssueType
+from .resolution_center_case_customer_response import ResolutionCenterCaseCustomerResponse
+from .resolution_center_case_merchant_response import ResolutionCenterCaseMerchantResponse
+from .resolution_center_case_platform_response import ResolutionCenterCasePlatformResponse
+
+__all__ = ["ResolutionCenterCaseRetrieveResponse", "Company", "Member", "Payment", "ResolutionEvent", "User"]
+
+
+class Company(BaseModel):
+ """The company involved in this resolution case.
+
+ Null if the company no longer exists.
+ """
+
+ id: str
+ """The unique identifier for the company."""
+
+ title: str
+ """The display name of the company shown to customers."""
+
+
+class Member(BaseModel):
+ """The membership record associated with the disputed payment.
+
+ Null if the membership no longer exists.
+ """
+
+ id: str
+ """The unique identifier for the extra public member."""
+
+
+class Payment(BaseModel):
+ """The payment record that is the subject of this resolution case."""
+
+ id: str
+ """The unique identifier for the payment."""
+
+ created_at: datetime
+ """The datetime the payment was created."""
+
+ currency: Optional[Currency] = None
+ """The available currencies on the platform"""
+
+ paid_at: Optional[datetime] = None
+ """The time at which this payment was successfully collected.
+
+ Null if the payment has not yet succeeded. As a Unix timestamp.
+ """
+
+ subtotal: Optional[float] = None
+ """The payment amount before taxes and discounts are applied.
+
+ In the currency specified by the currency field.
+ """
+
+ total: float
+ """
+ The total amount charged to the customer for this payment, including taxes and
+ after any discounts. In the currency specified by the currency field.
+ """
+
+
+class ResolutionEvent(BaseModel):
+ """
+ A resolution event is a message or action within a resolution case, such as a response, escalation, or status change.
+ """
+
+ id: str
+ """The unique identifier for the resolution event."""
+
+ action: Literal[
+ "created",
+ "responded",
+ "accepted",
+ "denied",
+ "appealed",
+ "withdrew",
+ "requested_more_info",
+ "escalated",
+ "dispute_opened",
+ "dispute_customer_won",
+ "dispute_merchant_won",
+ ]
+ """The type of action recorded in this event."""
+
+ created_at: datetime
+ """The datetime the resolution event was created."""
+
+ details: Optional[str] = None
+ """The message body or additional context provided with this resolution event.
+
+ Null if no details were included.
+ """
+
+ reporter_type: Literal["merchant", "customer", "platform", "system"]
+ """The party who performed this action."""
+
+
+class User(BaseModel):
+ """The customer (buyer) who filed this resolution case."""
+
+ id: str
+ """The unique identifier for the user."""
+
+ name: Optional[str] = None
+ """The user's display name shown on their public profile."""
+
+ username: str
+ """The user's unique username shown on their public profile."""
+
+
+class ResolutionCenterCaseRetrieveResponse(BaseModel):
+ """
+ A resolution center case is a dispute or support case between a user and a company, tracking the issue, status, and outcome.
+ """
+
+ id: str
+ """The unique identifier for the resolution."""
+
+ company: Optional[Company] = None
+ """The company involved in this resolution case.
+
+ Null if the company no longer exists.
+ """
+
+ created_at: datetime
+ """The datetime the resolution was created."""
+
+ customer_appealed: bool
+ """Whether the customer has filed an appeal after the initial resolution decision."""
+
+ customer_response_actions: List[ResolutionCenterCaseCustomerResponse]
+ """The list of actions currently available to the customer."""
+
+ due_date: Optional[datetime] = None
+ """The deadline by which the next response is required.
+
+ Null if no deadline is currently active. As a Unix timestamp.
+ """
+
+ issue: ResolutionCenterCaseIssueType
+ """The category of the dispute."""
+
+ member: Optional[Member] = None
+ """The membership record associated with the disputed payment.
+
+ Null if the membership no longer exists.
+ """
+
+ merchant_appealed: bool
+ """Whether the merchant has filed an appeal after the initial resolution decision."""
+
+ merchant_response_actions: List[ResolutionCenterCaseMerchantResponse]
+ """The list of actions currently available to the merchant."""
+
+ payment: Payment
+ """The payment record that is the subject of this resolution case."""
+
+ platform_response_actions: List[ResolutionCenterCasePlatformResponse]
+ """
+ The list of actions currently available to the Whop platform for moderating this
+ resolution.
+ """
+
+ resolution_events: List[ResolutionEvent]
+ """
+ The most recent 50 messages, actions, and status changes that have occurred
+ during this resolution case.
+ """
+
+ status: ResolutionCenterCaseStatus
+ """
+ The current status of the resolution case, indicating which party needs to
+ respond or if the case is closed.
+ """
+
+ updated_at: datetime
+ """The datetime the resolution was last updated."""
+
+ user: User
+ """The customer (buyer) who filed this resolution case."""
diff --git a/src/whop_sdk/types/resolution_center_case_status.py b/src/whop_sdk/types/resolution_center_case_status.py
new file mode 100644
index 0000000..7da17bf
--- /dev/null
+++ b/src/whop_sdk/types/resolution_center_case_status.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["ResolutionCenterCaseStatus"]
+
+ResolutionCenterCaseStatus: TypeAlias = Literal[
+ "merchant_response_needed",
+ "customer_response_needed",
+ "merchant_info_needed",
+ "customer_info_needed",
+ "under_platform_review",
+ "customer_won",
+ "merchant_won",
+ "customer_withdrew",
+]
diff --git a/src/whop_sdk/types/shared/payment.py b/src/whop_sdk/types/shared/payment.py
index 5a9a43b..97ce43f 100644
--- a/src/whop_sdk/types/shared/payment.py
+++ b/src/whop_sdk/types/shared/payment.py
@@ -15,6 +15,11 @@
from ..payment_method_types import PaymentMethodTypes
from ..receipt_tax_behavior import ReceiptTaxBehavior
from .friendly_receipt_status import FriendlyReceiptStatus
+from ..resolution_center_case_status import ResolutionCenterCaseStatus
+from ..resolution_center_case_issue_type import ResolutionCenterCaseIssueType
+from ..resolution_center_case_customer_response import ResolutionCenterCaseCustomerResponse
+from ..resolution_center_case_merchant_response import ResolutionCenterCaseMerchantResponse
+from ..resolution_center_case_platform_response import ResolutionCenterCasePlatformResponse
__all__ = [
"Payment",
@@ -296,7 +301,7 @@ class Resolution(BaseModel):
customer_appealed: bool
"""Whether the customer has filed an appeal after the initial resolution decision."""
- customer_response_actions: List[Literal["respond", "appeal", "withdraw"]]
+ customer_response_actions: List[ResolutionCenterCaseCustomerResponse]
"""The list of actions currently available to the customer."""
due_date: Optional[datetime] = None
@@ -305,39 +310,22 @@ class Resolution(BaseModel):
Null if no deadline is currently active. As a Unix timestamp.
"""
- issue: Literal[
- "forgot_to_cancel",
- "item_not_received",
- "significantly_not_as_described",
- "unauthorized_transaction",
- "product_unacceptable",
- ]
+ issue: ResolutionCenterCaseIssueType
"""The category of the dispute."""
merchant_appealed: bool
"""Whether the merchant has filed an appeal after the initial resolution decision."""
- merchant_response_actions: List[Literal["accept", "deny", "request_more_info", "appeal", "respond"]]
+ merchant_response_actions: List[ResolutionCenterCaseMerchantResponse]
"""The list of actions currently available to the merchant."""
- platform_response_actions: List[
- Literal["request_buyer_info", "request_merchant_info", "merchant_wins", "platform_refund", "merchant_refund"]
- ]
+ platform_response_actions: List[ResolutionCenterCasePlatformResponse]
"""
The list of actions currently available to the Whop platform for moderating this
resolution.
"""
- status: Literal[
- "merchant_response_needed",
- "customer_response_needed",
- "merchant_info_needed",
- "customer_info_needed",
- "under_platform_review",
- "customer_won",
- "merchant_won",
- "customer_withdrew",
- ]
+ status: ResolutionCenterCaseStatus
"""
The current status of the resolution case, indicating which party needs to
respond or if the case is closed.
diff --git a/tests/api_resources/test_authorized_users.py b/tests/api_resources/test_authorized_users.py
index 945730c..007f3d4 100644
--- a/tests/api_resources/test_authorized_users.py
+++ b/tests/api_resources/test_authorized_users.py
@@ -10,10 +10,9 @@
from whop_sdk import Whop, AsyncWhop
from tests.utils import assert_matches_type
from whop_sdk.types import (
+ AuthorizedUser,
AuthorizedUserListResponse,
- AuthorizedUserCreateResponse,
AuthorizedUserDeleteResponse,
- AuthorizedUserRetrieveResponse,
)
from whop_sdk._utils import parse_datetime
from whop_sdk.pagination import SyncCursorPage, AsyncCursorPage
@@ -32,7 +31,7 @@ def test_method_create(self, client: Whop) -> None:
role="owner",
user_id="user_xxxxxxxxxxxxx",
)
- assert_matches_type(AuthorizedUserCreateResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -43,7 +42,7 @@ def test_method_create_with_all_params(self, client: Whop) -> None:
user_id="user_xxxxxxxxxxxxx",
send_emails=True,
)
- assert_matches_type(AuthorizedUserCreateResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -57,7 +56,7 @@ def test_raw_response_create(self, client: Whop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
authorized_user = response.parse()
- assert_matches_type(AuthorizedUserCreateResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -71,7 +70,7 @@ def test_streaming_response_create(self, client: Whop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
authorized_user = response.parse()
- assert_matches_type(AuthorizedUserCreateResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -81,7 +80,7 @@ def test_method_retrieve(self, client: Whop) -> None:
authorized_user = client.authorized_users.retrieve(
"ausr_xxxxxxxxxxxxx",
)
- assert_matches_type(AuthorizedUserRetrieveResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -93,7 +92,7 @@ def test_raw_response_retrieve(self, client: Whop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
authorized_user = response.parse()
- assert_matches_type(AuthorizedUserRetrieveResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -105,7 +104,7 @@ def test_streaming_response_retrieve(self, client: Whop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
authorized_user = response.parse()
- assert_matches_type(AuthorizedUserRetrieveResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -226,7 +225,7 @@ async def test_method_create(self, async_client: AsyncWhop) -> None:
role="owner",
user_id="user_xxxxxxxxxxxxx",
)
- assert_matches_type(AuthorizedUserCreateResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -237,7 +236,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncWhop) -> N
user_id="user_xxxxxxxxxxxxx",
send_emails=True,
)
- assert_matches_type(AuthorizedUserCreateResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -251,7 +250,7 @@ async def test_raw_response_create(self, async_client: AsyncWhop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
authorized_user = await response.parse()
- assert_matches_type(AuthorizedUserCreateResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -265,7 +264,7 @@ async def test_streaming_response_create(self, async_client: AsyncWhop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
authorized_user = await response.parse()
- assert_matches_type(AuthorizedUserCreateResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -275,7 +274,7 @@ async def test_method_retrieve(self, async_client: AsyncWhop) -> None:
authorized_user = await async_client.authorized_users.retrieve(
"ausr_xxxxxxxxxxxxx",
)
- assert_matches_type(AuthorizedUserRetrieveResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -287,7 +286,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncWhop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
authorized_user = await response.parse()
- assert_matches_type(AuthorizedUserRetrieveResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -299,7 +298,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncWhop) -> Non
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
authorized_user = await response.parse()
- assert_matches_type(AuthorizedUserRetrieveResponse, authorized_user, path=["response"])
+ assert_matches_type(AuthorizedUser, authorized_user, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_resolution_center_cases.py b/tests/api_resources/test_resolution_center_cases.py
new file mode 100644
index 0000000..88bde78
--- /dev/null
+++ b/tests/api_resources/test_resolution_center_cases.py
@@ -0,0 +1,211 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from whop_sdk import Whop, AsyncWhop
+from tests.utils import assert_matches_type
+from whop_sdk.types import (
+ ResolutionCenterCaseListResponse,
+ ResolutionCenterCaseRetrieveResponse,
+)
+from whop_sdk._utils import parse_datetime
+from whop_sdk.pagination import SyncCursorPage, AsyncCursorPage
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestResolutionCenterCases:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_retrieve(self, client: Whop) -> None:
+ resolution_center_case = client.resolution_center_cases.retrieve(
+ "reso_xxxxxxxxxxxxx",
+ )
+ assert_matches_type(ResolutionCenterCaseRetrieveResponse, resolution_center_case, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_retrieve(self, client: Whop) -> None:
+ response = client.resolution_center_cases.with_raw_response.retrieve(
+ "reso_xxxxxxxxxxxxx",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ resolution_center_case = response.parse()
+ assert_matches_type(ResolutionCenterCaseRetrieveResponse, resolution_center_case, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_retrieve(self, client: Whop) -> None:
+ with client.resolution_center_cases.with_streaming_response.retrieve(
+ "reso_xxxxxxxxxxxxx",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ resolution_center_case = response.parse()
+ assert_matches_type(ResolutionCenterCaseRetrieveResponse, resolution_center_case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_path_params_retrieve(self, client: Whop) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ client.resolution_center_cases.with_raw_response.retrieve(
+ "",
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_list(self, client: Whop) -> None:
+ resolution_center_case = client.resolution_center_cases.list()
+ assert_matches_type(SyncCursorPage[ResolutionCenterCaseListResponse], resolution_center_case, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_list_with_all_params(self, client: Whop) -> None:
+ resolution_center_case = client.resolution_center_cases.list(
+ 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,
+ statuses=["merchant_response_needed"],
+ )
+ assert_matches_type(SyncCursorPage[ResolutionCenterCaseListResponse], resolution_center_case, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_list(self, client: Whop) -> None:
+ response = client.resolution_center_cases.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ resolution_center_case = response.parse()
+ assert_matches_type(SyncCursorPage[ResolutionCenterCaseListResponse], resolution_center_case, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_list(self, client: Whop) -> None:
+ with client.resolution_center_cases.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ resolution_center_case = response.parse()
+ assert_matches_type(
+ SyncCursorPage[ResolutionCenterCaseListResponse], resolution_center_case, path=["response"]
+ )
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncResolutionCenterCases:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_retrieve(self, async_client: AsyncWhop) -> None:
+ resolution_center_case = await async_client.resolution_center_cases.retrieve(
+ "reso_xxxxxxxxxxxxx",
+ )
+ assert_matches_type(ResolutionCenterCaseRetrieveResponse, resolution_center_case, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_retrieve(self, async_client: AsyncWhop) -> None:
+ response = await async_client.resolution_center_cases.with_raw_response.retrieve(
+ "reso_xxxxxxxxxxxxx",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ resolution_center_case = await response.parse()
+ assert_matches_type(ResolutionCenterCaseRetrieveResponse, resolution_center_case, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_retrieve(self, async_client: AsyncWhop) -> None:
+ async with async_client.resolution_center_cases.with_streaming_response.retrieve(
+ "reso_xxxxxxxxxxxxx",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ resolution_center_case = await response.parse()
+ assert_matches_type(ResolutionCenterCaseRetrieveResponse, resolution_center_case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_path_params_retrieve(self, async_client: AsyncWhop) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ await async_client.resolution_center_cases.with_raw_response.retrieve(
+ "",
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_list(self, async_client: AsyncWhop) -> None:
+ resolution_center_case = await async_client.resolution_center_cases.list()
+ assert_matches_type(
+ AsyncCursorPage[ResolutionCenterCaseListResponse], resolution_center_case, 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:
+ resolution_center_case = await async_client.resolution_center_cases.list(
+ 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,
+ statuses=["merchant_response_needed"],
+ )
+ assert_matches_type(
+ AsyncCursorPage[ResolutionCenterCaseListResponse], resolution_center_case, 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.resolution_center_cases.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ resolution_center_case = await response.parse()
+ assert_matches_type(
+ AsyncCursorPage[ResolutionCenterCaseListResponse], resolution_center_case, 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.resolution_center_cases.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ resolution_center_case = await response.parse()
+ assert_matches_type(
+ AsyncCursorPage[ResolutionCenterCaseListResponse], resolution_center_case, path=["response"]
+ )
+
+ assert cast(Any, response.is_closed) is True
From fa0be9f1a605b098278a59a92fb9cb297e19c5cc Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 12 Mar 2026 06:13:38 +0000
Subject: [PATCH 5/7] feat(api): api update
---
.stats.yml | 4 +-
api.md | 1 +
src/whop_sdk/types/__init__.py | 3 +
.../types/ledger_account_retrieve_response.py | 10 ++
...ut_account_status_updated_webhook_event.py | 132 ++++++++++++++++++
src/whop_sdk/types/unwrap_webhook_event.py | 2 +
src/whop_sdk/types/webhook_event.py | 1 +
7 files changed, 151 insertions(+), 2 deletions(-)
create mode 100644 src/whop_sdk/types/payout_account_status_updated_webhook_event.py
diff --git a/.stats.yml b/.stats.yml
index 00310ca..fcc4c90 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 178
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-187882c4d823394e3577f9843c288f4187e4f9b38646105c40b88e4e83b27979.yml
-openapi_spec_hash: 16eb1c84681dc3ad39c987b7abf1e191
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-51fb88de05d428f3ea78a4b7ba2d5c6e04ae039816961e810f99d9d5d29bc015.yml
+openapi_spec_hash: d59179d7d9a835795741673012f20d79
config_hash: e9bda7cddca13f2b41d8f7521ad36cf5
diff --git a/api.md b/api.md
index 2627576..cc524bb 100644
--- a/api.md
+++ b/api.md
@@ -161,6 +161,7 @@ from whop_sdk.types import (
CourseLessonInteractionCompletedWebhookEvent,
PayoutMethodCreatedWebhookEvent,
VerificationSucceededWebhookEvent,
+ PayoutAccountStatusUpdatedWebhookEvent,
PaymentCreatedWebhookEvent,
PaymentSucceededWebhookEvent,
PaymentFailedWebhookEvent,
diff --git a/src/whop_sdk/types/__init__.py b/src/whop_sdk/types/__init__.py
index 54d1942..066276f 100644
--- a/src/whop_sdk/types/__init__.py
+++ b/src/whop_sdk/types/__init__.py
@@ -361,6 +361,9 @@
from .setup_intent_requires_action_webhook_event import (
SetupIntentRequiresActionWebhookEvent as SetupIntentRequiresActionWebhookEvent,
)
+from .payout_account_status_updated_webhook_event import (
+ PayoutAccountStatusUpdatedWebhookEvent as PayoutAccountStatusUpdatedWebhookEvent,
+)
from .course_lesson_interaction_completed_webhook_event import (
CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent,
)
diff --git a/src/whop_sdk/types/ledger_account_retrieve_response.py b/src/whop_sdk/types/ledger_account_retrieve_response.py
index 423eda6..8da079c 100644
--- a/src/whop_sdk/types/ledger_account_retrieve_response.py
+++ b/src/whop_sdk/types/ledger_account_retrieve_response.py
@@ -165,6 +165,16 @@ class PayoutAccountDetails(BaseModel):
phone: Optional[str] = None
"""The business representative's phone"""
+ status: Optional[
+ Literal[
+ "connected", "disabled", "action_required", "pending_verification", "verification_failed", "not_started"
+ ]
+ ] = None
+ """
+ The granular calculated statuses reflecting payout account KYC and withdrawal
+ readiness.
+ """
+
class LedgerAccountRetrieveResponse(BaseModel):
"""
diff --git a/src/whop_sdk/types/payout_account_status_updated_webhook_event.py b/src/whop_sdk/types/payout_account_status_updated_webhook_event.py
new file mode 100644
index 0000000..1af8369
--- /dev/null
+++ b/src/whop_sdk/types/payout_account_status_updated_webhook_event.py
@@ -0,0 +1,132 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from .._models import BaseModel
+from .verification_status import VerificationStatus
+from .verification_error_code import VerificationErrorCode
+
+__all__ = [
+ "PayoutAccountStatusUpdatedWebhookEvent",
+ "Data",
+ "DataAddress",
+ "DataBusinessRepresentative",
+ "DataLatestVerification",
+]
+
+
+class DataAddress(BaseModel):
+ """The physical address associated with this payout account"""
+
+ city: Optional[str] = None
+ """The city of the address."""
+
+ country: Optional[str] = None
+ """The country of the address."""
+
+ line1: Optional[str] = None
+ """The line 1 of the address."""
+
+ line2: Optional[str] = None
+ """The line 2 of the address."""
+
+ postal_code: Optional[str] = None
+ """The postal code of the address."""
+
+ state: Optional[str] = None
+ """The state of the address."""
+
+
+class DataBusinessRepresentative(BaseModel):
+ """The business representative for this payout account"""
+
+ date_of_birth: Optional[str] = None
+ """
+ The date of birth of the business representative in ISO 8601 format
+ (YYYY-MM-DD).
+ """
+
+ first_name: Optional[str] = None
+ """The first name of the business representative."""
+
+ last_name: Optional[str] = None
+ """The last name of the business representative."""
+
+ middle_name: Optional[str] = None
+ """The middle name of the business representative."""
+
+
+class DataLatestVerification(BaseModel):
+ """The latest verification for the connected account."""
+
+ id: str
+ """The unique identifier for the verification."""
+
+ last_error_code: Optional[VerificationErrorCode] = None
+ """An error code for a verification attempt."""
+
+ last_error_reason: Optional[str] = None
+ """A human-readable explanation of the most recent verification error.
+
+ Null if no error has occurred.
+ """
+
+ status: VerificationStatus
+ """The current status of this verification session."""
+
+
+class Data(BaseModel):
+ """An object representing an account used for payouts."""
+
+ id: str
+ """The unique identifier for the payout account."""
+
+ address: Optional[DataAddress] = None
+ """The physical address associated with this payout account"""
+
+ business_name: Optional[str] = None
+ """The company's legal name"""
+
+ business_representative: Optional[DataBusinessRepresentative] = None
+ """The business representative for this payout account"""
+
+ email: Optional[str] = None
+ """The email address of the representative"""
+
+ latest_verification: Optional[DataLatestVerification] = None
+ """The latest verification for the connected account."""
+
+ phone: Optional[str] = None
+ """The business representative's phone"""
+
+ status: Optional[
+ Literal[
+ "connected", "disabled", "action_required", "pending_verification", "verification_failed", "not_started"
+ ]
+ ] = None
+ """
+ The granular calculated statuses reflecting payout account KYC and withdrawal
+ readiness.
+ """
+
+
+class PayoutAccountStatusUpdatedWebhookEvent(BaseModel):
+ id: str
+ """A unique ID for every single webhook request"""
+
+ api_version: Literal["v1"]
+ """The API version for this webhook"""
+
+ data: Data
+ """An object representing an account used for payouts."""
+
+ timestamp: datetime
+ """The timestamp in ISO 8601 format that the webhook was sent at on the server"""
+
+ type: Literal["payout_account.status_updated"]
+ """The webhook event type"""
+
+ company_id: Optional[str] = None
+ """The company ID that this webhook event is associated with"""
diff --git a/src/whop_sdk/types/unwrap_webhook_event.py b/src/whop_sdk/types/unwrap_webhook_event.py
index f2df30c..78041be 100644
--- a/src/whop_sdk/types/unwrap_webhook_event.py
+++ b/src/whop_sdk/types/unwrap_webhook_event.py
@@ -30,6 +30,7 @@
from .setup_intent_succeeded_webhook_event import SetupIntentSucceededWebhookEvent
from .verification_succeeded_webhook_event import VerificationSucceededWebhookEvent
from .setup_intent_requires_action_webhook_event import SetupIntentRequiresActionWebhookEvent
+from .payout_account_status_updated_webhook_event import PayoutAccountStatusUpdatedWebhookEvent
from .course_lesson_interaction_completed_webhook_event import CourseLessonInteractionCompletedWebhookEvent
from .membership_cancel_at_period_end_changed_webhook_event import MembershipCancelAtPeriodEndChangedWebhookEvent
@@ -55,6 +56,7 @@
CourseLessonInteractionCompletedWebhookEvent,
PayoutMethodCreatedWebhookEvent,
VerificationSucceededWebhookEvent,
+ PayoutAccountStatusUpdatedWebhookEvent,
PaymentCreatedWebhookEvent,
PaymentSucceededWebhookEvent,
PaymentFailedWebhookEvent,
diff --git a/src/whop_sdk/types/webhook_event.py b/src/whop_sdk/types/webhook_event.py
index aa7e050..e2a5415 100644
--- a/src/whop_sdk/types/webhook_event.py
+++ b/src/whop_sdk/types/webhook_event.py
@@ -23,6 +23,7 @@
"course_lesson_interaction.completed",
"payout_method.created",
"verification.succeeded",
+ "payout_account.status_updated",
"payment.created",
"payment.succeeded",
"payment.failed",
From 95a853935639b8d520d545b5e6e647ecc8c287b5 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 12 Mar 2026 15:54:01 +0000
Subject: [PATCH 6/7] feat(api): manual updates
---
.stats.yml | 4 +-
api.md | 20 +-
src/whop_sdk/_client.py | 44 +++++
src/whop_sdk/resources/__init__.py | 14 ++
src/whop_sdk/resources/payout_accounts.py | 175 ++++++++++++++++++
src/whop_sdk/resources/verifications.py | 150 ++++++++++++++-
src/whop_sdk/types/__init__.py | 4 +
.../types/ledger_account_retrieve_response.py | 7 +-
.../payout_account_calculated_statuses.py | 9 +
.../types/payout_account_retrieve_response.py | 101 ++++++++++
...ut_account_status_updated_webhook_event.py | 7 +-
.../types/verification_list_params.py | 25 +++
.../types/verification_list_response.py | 30 +++
tests/api_resources/test_payout_accounts.py | 108 +++++++++++
tests/api_resources/test_verifications.py | 95 +++++++++-
15 files changed, 777 insertions(+), 16 deletions(-)
create mode 100644 src/whop_sdk/resources/payout_accounts.py
create mode 100644 src/whop_sdk/types/payout_account_calculated_statuses.py
create mode 100644 src/whop_sdk/types/payout_account_retrieve_response.py
create mode 100644 src/whop_sdk/types/verification_list_params.py
create mode 100644 src/whop_sdk/types/verification_list_response.py
create mode 100644 tests/api_resources/test_payout_accounts.py
diff --git a/.stats.yml b/.stats.yml
index fcc4c90..c14a369 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 178
+configured_endpoints: 180
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-51fb88de05d428f3ea78a4b7ba2d5c6e04ae039816961e810f99d9d5d29bc015.yml
openapi_spec_hash: d59179d7d9a835795741673012f20d79
-config_hash: e9bda7cddca13f2b41d8f7521ad36cf5
+config_hash: a9229678a4146beeb5be82ed0ae3d4f1
diff --git a/api.md b/api.md
index cc524bb..2ba4df4 100644
--- a/api.md
+++ b/api.md
@@ -750,12 +750,18 @@ Methods:
Types:
```python
-from whop_sdk.types import VerificationErrorCode, VerificationStatus, VerificationRetrieveResponse
+from whop_sdk.types import (
+ VerificationErrorCode,
+ VerificationStatus,
+ VerificationRetrieveResponse,
+ VerificationListResponse,
+)
```
Methods:
- client.verifications.retrieve(id) -> VerificationRetrieveResponse
+- client.verifications.list(\*\*params) -> SyncCursorPage[VerificationListResponse]
# Leads
@@ -902,3 +908,15 @@ Methods:
- client.resolution_center_cases.retrieve(id) -> ResolutionCenterCaseRetrieveResponse
- client.resolution_center_cases.list(\*\*params) -> SyncCursorPage[ResolutionCenterCaseListResponse]
+
+# PayoutAccounts
+
+Types:
+
+```python
+from whop_sdk.types import PayoutAccountCalculatedStatuses, PayoutAccountRetrieveResponse
+```
+
+Methods:
+
+- client.payout_accounts.retrieve(id) -> PayoutAccountRetrieveResponse
diff --git a/src/whop_sdk/_client.py b/src/whop_sdk/_client.py
index b9c5cb2..0f28664 100644
--- a/src/whop_sdk/_client.py
+++ b/src/whop_sdk/_client.py
@@ -77,6 +77,7 @@
course_students,
ledger_accounts,
payment_methods,
+ payout_accounts,
authorized_users,
support_channels,
checkout_configurations,
@@ -129,6 +130,7 @@
from .resources.course_students import CourseStudentsResource, AsyncCourseStudentsResource
from .resources.ledger_accounts import LedgerAccountsResource, AsyncLedgerAccountsResource
from .resources.payment_methods import PaymentMethodsResource, AsyncPaymentMethodsResource
+ from .resources.payout_accounts import PayoutAccountsResource, AsyncPayoutAccountsResource
from .resources.authorized_users import AuthorizedUsersResource, AsyncAuthorizedUsersResource
from .resources.support_channels import SupportChannelsResource, AsyncSupportChannelsResource
from .resources.checkout_configurations import CheckoutConfigurationsResource, AsyncCheckoutConfigurationsResource
@@ -522,6 +524,13 @@ def resolution_center_cases(self) -> ResolutionCenterCasesResource:
return ResolutionCenterCasesResource(self)
+ @cached_property
+ def payout_accounts(self) -> PayoutAccountsResource:
+ """Payout accounts"""
+ from .resources.payout_accounts import PayoutAccountsResource
+
+ return PayoutAccountsResource(self)
+
@cached_property
def with_raw_response(self) -> WhopWithRawResponse:
return WhopWithRawResponse(self)
@@ -1017,6 +1026,13 @@ def resolution_center_cases(self) -> AsyncResolutionCenterCasesResource:
return AsyncResolutionCenterCasesResource(self)
+ @cached_property
+ def payout_accounts(self) -> AsyncPayoutAccountsResource:
+ """Payout accounts"""
+ from .resources.payout_accounts import AsyncPayoutAccountsResource
+
+ return AsyncPayoutAccountsResource(self)
+
@cached_property
def with_raw_response(self) -> AsyncWhopWithRawResponse:
return AsyncWhopWithRawResponse(self)
@@ -1448,6 +1464,13 @@ def resolution_center_cases(self) -> resolution_center_cases.ResolutionCenterCas
return ResolutionCenterCasesResourceWithRawResponse(self._client.resolution_center_cases)
+ @cached_property
+ def payout_accounts(self) -> payout_accounts.PayoutAccountsResourceWithRawResponse:
+ """Payout accounts"""
+ from .resources.payout_accounts import PayoutAccountsResourceWithRawResponse
+
+ return PayoutAccountsResourceWithRawResponse(self._client.payout_accounts)
+
class AsyncWhopWithRawResponse:
_client: AsyncWhop
@@ -1766,6 +1789,13 @@ def resolution_center_cases(self) -> resolution_center_cases.AsyncResolutionCent
return AsyncResolutionCenterCasesResourceWithRawResponse(self._client.resolution_center_cases)
+ @cached_property
+ def payout_accounts(self) -> payout_accounts.AsyncPayoutAccountsResourceWithRawResponse:
+ """Payout accounts"""
+ from .resources.payout_accounts import AsyncPayoutAccountsResourceWithRawResponse
+
+ return AsyncPayoutAccountsResourceWithRawResponse(self._client.payout_accounts)
+
class WhopWithStreamedResponse:
_client: Whop
@@ -2084,6 +2114,13 @@ def resolution_center_cases(self) -> resolution_center_cases.ResolutionCenterCas
return ResolutionCenterCasesResourceWithStreamingResponse(self._client.resolution_center_cases)
+ @cached_property
+ def payout_accounts(self) -> payout_accounts.PayoutAccountsResourceWithStreamingResponse:
+ """Payout accounts"""
+ from .resources.payout_accounts import PayoutAccountsResourceWithStreamingResponse
+
+ return PayoutAccountsResourceWithStreamingResponse(self._client.payout_accounts)
+
class AsyncWhopWithStreamedResponse:
_client: AsyncWhop
@@ -2406,6 +2443,13 @@ def resolution_center_cases(
return AsyncResolutionCenterCasesResourceWithStreamingResponse(self._client.resolution_center_cases)
+ @cached_property
+ def payout_accounts(self) -> payout_accounts.AsyncPayoutAccountsResourceWithStreamingResponse:
+ """Payout accounts"""
+ from .resources.payout_accounts import AsyncPayoutAccountsResourceWithStreamingResponse
+
+ return AsyncPayoutAccountsResourceWithStreamingResponse(self._client.payout_accounts)
+
Client = Whop
diff --git a/src/whop_sdk/resources/__init__.py b/src/whop_sdk/resources/__init__.py
index 42deaeb..9d6f232 100644
--- a/src/whop_sdk/resources/__init__.py
+++ b/src/whop_sdk/resources/__init__.py
@@ -360,6 +360,14 @@
PaymentMethodsResourceWithStreamingResponse,
AsyncPaymentMethodsResourceWithStreamingResponse,
)
+from .payout_accounts import (
+ PayoutAccountsResource,
+ AsyncPayoutAccountsResource,
+ PayoutAccountsResourceWithRawResponse,
+ AsyncPayoutAccountsResourceWithRawResponse,
+ PayoutAccountsResourceWithStreamingResponse,
+ AsyncPayoutAccountsResourceWithStreamingResponse,
+)
from .authorized_users import (
AuthorizedUsersResource,
AsyncAuthorizedUsersResource,
@@ -716,4 +724,10 @@
"AsyncResolutionCenterCasesResourceWithRawResponse",
"ResolutionCenterCasesResourceWithStreamingResponse",
"AsyncResolutionCenterCasesResourceWithStreamingResponse",
+ "PayoutAccountsResource",
+ "AsyncPayoutAccountsResource",
+ "PayoutAccountsResourceWithRawResponse",
+ "AsyncPayoutAccountsResourceWithRawResponse",
+ "PayoutAccountsResourceWithStreamingResponse",
+ "AsyncPayoutAccountsResourceWithStreamingResponse",
]
diff --git a/src/whop_sdk/resources/payout_accounts.py b/src/whop_sdk/resources/payout_accounts.py
new file mode 100644
index 0000000..c59b88b
--- /dev/null
+++ b/src/whop_sdk/resources/payout_accounts.py
@@ -0,0 +1,175 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from .._types import Body, Query, Headers, NotGiven, not_given
+from .._compat import cached_property
+from .._resource import SyncAPIResource, AsyncAPIResource
+from .._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from .._base_client import make_request_options
+from ..types.payout_account_retrieve_response import PayoutAccountRetrieveResponse
+
+__all__ = ["PayoutAccountsResource", "AsyncPayoutAccountsResource"]
+
+
+class PayoutAccountsResource(SyncAPIResource):
+ """Payout accounts"""
+
+ @cached_property
+ def with_raw_response(self) -> PayoutAccountsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/whopio/whopsdk-python#accessing-raw-response-data-eg-headers
+ """
+ return PayoutAccountsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> PayoutAccountsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/whopio/whopsdk-python#with_streaming_response
+ """
+ return PayoutAccountsResourceWithStreamingResponse(self)
+
+ def retrieve(
+ self,
+ id: str,
+ *,
+ # 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,
+ ) -> PayoutAccountRetrieveResponse:
+ """
+ Retrieves the details of an existing payout account.
+
+ Required permissions:
+
+ - `payout:account:read`
+
+ Args:
+ 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
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return self._get(
+ f"/payout_accounts/{id}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=PayoutAccountRetrieveResponse,
+ )
+
+
+class AsyncPayoutAccountsResource(AsyncAPIResource):
+ """Payout accounts"""
+
+ @cached_property
+ def with_raw_response(self) -> AsyncPayoutAccountsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/whopio/whopsdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncPayoutAccountsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncPayoutAccountsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/whopio/whopsdk-python#with_streaming_response
+ """
+ return AsyncPayoutAccountsResourceWithStreamingResponse(self)
+
+ async def retrieve(
+ self,
+ id: str,
+ *,
+ # 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,
+ ) -> PayoutAccountRetrieveResponse:
+ """
+ Retrieves the details of an existing payout account.
+
+ Required permissions:
+
+ - `payout:account:read`
+
+ Args:
+ 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
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return await self._get(
+ f"/payout_accounts/{id}",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=PayoutAccountRetrieveResponse,
+ )
+
+
+class PayoutAccountsResourceWithRawResponse:
+ def __init__(self, payout_accounts: PayoutAccountsResource) -> None:
+ self._payout_accounts = payout_accounts
+
+ self.retrieve = to_raw_response_wrapper(
+ payout_accounts.retrieve,
+ )
+
+
+class AsyncPayoutAccountsResourceWithRawResponse:
+ def __init__(self, payout_accounts: AsyncPayoutAccountsResource) -> None:
+ self._payout_accounts = payout_accounts
+
+ self.retrieve = async_to_raw_response_wrapper(
+ payout_accounts.retrieve,
+ )
+
+
+class PayoutAccountsResourceWithStreamingResponse:
+ def __init__(self, payout_accounts: PayoutAccountsResource) -> None:
+ self._payout_accounts = payout_accounts
+
+ self.retrieve = to_streamed_response_wrapper(
+ payout_accounts.retrieve,
+ )
+
+
+class AsyncPayoutAccountsResourceWithStreamingResponse:
+ def __init__(self, payout_accounts: AsyncPayoutAccountsResource) -> None:
+ self._payout_accounts = payout_accounts
+
+ self.retrieve = async_to_streamed_response_wrapper(
+ payout_accounts.retrieve,
+ )
diff --git a/src/whop_sdk/resources/verifications.py b/src/whop_sdk/resources/verifications.py
index 02f4b65..54364d2 100644
--- a/src/whop_sdk/resources/verifications.py
+++ b/src/whop_sdk/resources/verifications.py
@@ -2,9 +2,13 @@
from __future__ import annotations
+from typing import Optional
+
import httpx
-from .._types import Body, Query, Headers, NotGiven, not_given
+from ..types import verification_list_params
+from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from .._utils import maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
from .._response import (
@@ -13,7 +17,9 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from .._base_client import make_request_options
+from ..pagination import SyncCursorPage, AsyncCursorPage
+from .._base_client import AsyncPaginator, make_request_options
+from ..types.verification_list_response import VerificationListResponse
from ..types.verification_retrieve_response import VerificationRetrieveResponse
__all__ = ["VerificationsResource", "AsyncVerificationsResource"]
@@ -76,6 +82,70 @@ def retrieve(
cast_to=VerificationRetrieveResponse,
)
+ def list(
+ self,
+ *,
+ payout_account_id: str,
+ after: Optional[str] | Omit = omit,
+ before: Optional[str] | Omit = omit,
+ first: Optional[int] | Omit = omit,
+ last: Optional[int] | 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[VerificationListResponse]:
+ """
+ Returns a list of identity verifications for a payout account, ordered by most
+ recent first.
+
+ Required permissions:
+
+ - `payout:account:read`
+
+ Args:
+ payout_account_id: The unique identifier of the payout account to list verifications 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.
+
+ first: Returns the first _n_ elements from the list.
+
+ last: Returns the last _n_ elements from the list.
+
+ 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(
+ "/verifications",
+ page=SyncCursorPage[VerificationListResponse],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "payout_account_id": payout_account_id,
+ "after": after,
+ "before": before,
+ "first": first,
+ "last": last,
+ },
+ verification_list_params.VerificationListParams,
+ ),
+ ),
+ model=VerificationListResponse,
+ )
+
class AsyncVerificationsResource(AsyncAPIResource):
@cached_property
@@ -134,6 +204,70 @@ async def retrieve(
cast_to=VerificationRetrieveResponse,
)
+ def list(
+ self,
+ *,
+ payout_account_id: str,
+ after: Optional[str] | Omit = omit,
+ before: Optional[str] | Omit = omit,
+ first: Optional[int] | Omit = omit,
+ last: Optional[int] | 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[VerificationListResponse, AsyncCursorPage[VerificationListResponse]]:
+ """
+ Returns a list of identity verifications for a payout account, ordered by most
+ recent first.
+
+ Required permissions:
+
+ - `payout:account:read`
+
+ Args:
+ payout_account_id: The unique identifier of the payout account to list verifications 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.
+
+ first: Returns the first _n_ elements from the list.
+
+ last: Returns the last _n_ elements from the list.
+
+ 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(
+ "/verifications",
+ page=AsyncCursorPage[VerificationListResponse],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "payout_account_id": payout_account_id,
+ "after": after,
+ "before": before,
+ "first": first,
+ "last": last,
+ },
+ verification_list_params.VerificationListParams,
+ ),
+ ),
+ model=VerificationListResponse,
+ )
+
class VerificationsResourceWithRawResponse:
def __init__(self, verifications: VerificationsResource) -> None:
@@ -142,6 +276,9 @@ def __init__(self, verifications: VerificationsResource) -> None:
self.retrieve = to_raw_response_wrapper(
verifications.retrieve,
)
+ self.list = to_raw_response_wrapper(
+ verifications.list,
+ )
class AsyncVerificationsResourceWithRawResponse:
@@ -151,6 +288,9 @@ def __init__(self, verifications: AsyncVerificationsResource) -> None:
self.retrieve = async_to_raw_response_wrapper(
verifications.retrieve,
)
+ self.list = async_to_raw_response_wrapper(
+ verifications.list,
+ )
class VerificationsResourceWithStreamingResponse:
@@ -160,6 +300,9 @@ def __init__(self, verifications: VerificationsResource) -> None:
self.retrieve = to_streamed_response_wrapper(
verifications.retrieve,
)
+ self.list = to_streamed_response_wrapper(
+ verifications.list,
+ )
class AsyncVerificationsResourceWithStreamingResponse:
@@ -169,3 +312,6 @@ def __init__(self, verifications: AsyncVerificationsResource) -> None:
self.retrieve = async_to_streamed_response_wrapper(
verifications.retrieve,
)
+ self.list = async_to_streamed_response_wrapper(
+ verifications.list,
+ )
diff --git a/src/whop_sdk/types/__init__.py b/src/whop_sdk/types/__init__.py
index 066276f..6c2549b 100644
--- a/src/whop_sdk/types/__init__.py
+++ b/src/whop_sdk/types/__init__.py
@@ -228,6 +228,7 @@
from .refund_retrieve_response import RefundRetrieveResponse as RefundRetrieveResponse
from .review_retrieve_response import ReviewRetrieveResponse as ReviewRetrieveResponse
from .setup_intent_list_params import SetupIntentListParams as SetupIntentListParams
+from .verification_list_params import VerificationListParams as VerificationListParams
from .withdrawal_create_params import WithdrawalCreateParams as WithdrawalCreateParams
from .withdrawal_list_response import WithdrawalListResponse as WithdrawalListResponse
from .assessment_question_types import AssessmentQuestionTypes as AssessmentQuestionTypes
@@ -256,6 +257,7 @@
from .setup_intent_list_response import SetupIntentListResponse as SetupIntentListResponse
from .user_check_access_response import UserCheckAccessResponse as UserCheckAccessResponse
from .user_update_profile_params import UserUpdateProfileParams as UserUpdateProfileParams
+from .verification_list_response import VerificationListResponse as VerificationListResponse
from .authorized_user_list_params import AuthorizedUserListParams as AuthorizedUserListParams
from .course_lesson_create_params import CourseLessonCreateParams as CourseLessonCreateParams
from .course_lesson_list_response import CourseLessonListResponse as CourseLessonListResponse
@@ -307,11 +309,13 @@
from .course_student_retrieve_response import CourseStudentRetrieveResponse as CourseStudentRetrieveResponse
from .ledger_account_retrieve_response import LedgerAccountRetrieveResponse as LedgerAccountRetrieveResponse
from .payment_method_retrieve_response import PaymentMethodRetrieveResponse as PaymentMethodRetrieveResponse
+from .payout_account_retrieve_response import PayoutAccountRetrieveResponse as PayoutAccountRetrieveResponse
from .withdrawal_created_webhook_event import WithdrawalCreatedWebhookEvent as WithdrawalCreatedWebhookEvent
from .withdrawal_updated_webhook_event import WithdrawalUpdatedWebhookEvent as WithdrawalUpdatedWebhookEvent
from .resolution_center_case_issue_type import ResolutionCenterCaseIssueType as ResolutionCenterCaseIssueType
from .checkout_configuration_list_params import CheckoutConfigurationListParams as CheckoutConfigurationListParams
from .membership_activated_webhook_event import MembershipActivatedWebhookEvent as MembershipActivatedWebhookEvent
+from .payout_account_calculated_statuses import PayoutAccountCalculatedStatuses as PayoutAccountCalculatedStatuses
from .resolution_center_case_list_params import ResolutionCenterCaseListParams as ResolutionCenterCaseListParams
from .dispute_alert_created_webhook_event import DisputeAlertCreatedWebhookEvent as DisputeAlertCreatedWebhookEvent
from .payout_method_created_webhook_event import PayoutMethodCreatedWebhookEvent as PayoutMethodCreatedWebhookEvent
diff --git a/src/whop_sdk/types/ledger_account_retrieve_response.py b/src/whop_sdk/types/ledger_account_retrieve_response.py
index 8da079c..50434cc 100644
--- a/src/whop_sdk/types/ledger_account_retrieve_response.py
+++ b/src/whop_sdk/types/ledger_account_retrieve_response.py
@@ -8,6 +8,7 @@
from .shared.currency import Currency
from .verification_status import VerificationStatus
from .verification_error_code import VerificationErrorCode
+from .payout_account_calculated_statuses import PayoutAccountCalculatedStatuses
__all__ = [
"LedgerAccountRetrieveResponse",
@@ -165,11 +166,7 @@ class PayoutAccountDetails(BaseModel):
phone: Optional[str] = None
"""The business representative's phone"""
- status: Optional[
- Literal[
- "connected", "disabled", "action_required", "pending_verification", "verification_failed", "not_started"
- ]
- ] = None
+ status: Optional[PayoutAccountCalculatedStatuses] = None
"""
The granular calculated statuses reflecting payout account KYC and withdrawal
readiness.
diff --git a/src/whop_sdk/types/payout_account_calculated_statuses.py b/src/whop_sdk/types/payout_account_calculated_statuses.py
new file mode 100644
index 0000000..0efd5f1
--- /dev/null
+++ b/src/whop_sdk/types/payout_account_calculated_statuses.py
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["PayoutAccountCalculatedStatuses"]
+
+PayoutAccountCalculatedStatuses: TypeAlias = Literal[
+ "connected", "disabled", "action_required", "pending_verification", "verification_failed", "not_started"
+]
diff --git a/src/whop_sdk/types/payout_account_retrieve_response.py b/src/whop_sdk/types/payout_account_retrieve_response.py
new file mode 100644
index 0000000..e62f2df
--- /dev/null
+++ b/src/whop_sdk/types/payout_account_retrieve_response.py
@@ -0,0 +1,101 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .._models import BaseModel
+from .verification_status import VerificationStatus
+from .verification_error_code import VerificationErrorCode
+from .payout_account_calculated_statuses import PayoutAccountCalculatedStatuses
+
+__all__ = ["PayoutAccountRetrieveResponse", "Address", "BusinessRepresentative", "LatestVerification"]
+
+
+class Address(BaseModel):
+ """The physical address associated with this payout account"""
+
+ city: Optional[str] = None
+ """The city of the address."""
+
+ country: Optional[str] = None
+ """The country of the address."""
+
+ line1: Optional[str] = None
+ """The line 1 of the address."""
+
+ line2: Optional[str] = None
+ """The line 2 of the address."""
+
+ postal_code: Optional[str] = None
+ """The postal code of the address."""
+
+ state: Optional[str] = None
+ """The state of the address."""
+
+
+class BusinessRepresentative(BaseModel):
+ """The business representative for this payout account"""
+
+ date_of_birth: Optional[str] = None
+ """
+ The date of birth of the business representative in ISO 8601 format
+ (YYYY-MM-DD).
+ """
+
+ first_name: Optional[str] = None
+ """The first name of the business representative."""
+
+ last_name: Optional[str] = None
+ """The last name of the business representative."""
+
+ middle_name: Optional[str] = None
+ """The middle name of the business representative."""
+
+
+class LatestVerification(BaseModel):
+ """The latest verification for the connected account."""
+
+ id: str
+ """The unique identifier for the verification."""
+
+ last_error_code: Optional[VerificationErrorCode] = None
+ """An error code for a verification attempt."""
+
+ last_error_reason: Optional[str] = None
+ """A human-readable explanation of the most recent verification error.
+
+ Null if no error has occurred.
+ """
+
+ status: VerificationStatus
+ """The current status of this verification session."""
+
+
+class PayoutAccountRetrieveResponse(BaseModel):
+ """An object representing an account used for payouts."""
+
+ id: str
+ """The unique identifier for the payout account."""
+
+ address: Optional[Address] = None
+ """The physical address associated with this payout account"""
+
+ business_name: Optional[str] = None
+ """The company's legal name"""
+
+ business_representative: Optional[BusinessRepresentative] = None
+ """The business representative for this payout account"""
+
+ email: Optional[str] = None
+ """The email address of the representative"""
+
+ latest_verification: Optional[LatestVerification] = None
+ """The latest verification for the connected account."""
+
+ phone: Optional[str] = None
+ """The business representative's phone"""
+
+ status: Optional[PayoutAccountCalculatedStatuses] = None
+ """
+ The granular calculated statuses reflecting payout account KYC and withdrawal
+ readiness.
+ """
diff --git a/src/whop_sdk/types/payout_account_status_updated_webhook_event.py b/src/whop_sdk/types/payout_account_status_updated_webhook_event.py
index 1af8369..2c5cb05 100644
--- a/src/whop_sdk/types/payout_account_status_updated_webhook_event.py
+++ b/src/whop_sdk/types/payout_account_status_updated_webhook_event.py
@@ -7,6 +7,7 @@
from .._models import BaseModel
from .verification_status import VerificationStatus
from .verification_error_code import VerificationErrorCode
+from .payout_account_calculated_statuses import PayoutAccountCalculatedStatuses
__all__ = [
"PayoutAccountStatusUpdatedWebhookEvent",
@@ -101,11 +102,7 @@ class Data(BaseModel):
phone: Optional[str] = None
"""The business representative's phone"""
- status: Optional[
- Literal[
- "connected", "disabled", "action_required", "pending_verification", "verification_failed", "not_started"
- ]
- ] = None
+ status: Optional[PayoutAccountCalculatedStatuses] = None
"""
The granular calculated statuses reflecting payout account KYC and withdrawal
readiness.
diff --git a/src/whop_sdk/types/verification_list_params.py b/src/whop_sdk/types/verification_list_params.py
new file mode 100644
index 0000000..64ad931
--- /dev/null
+++ b/src/whop_sdk/types/verification_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 Required, TypedDict
+
+__all__ = ["VerificationListParams"]
+
+
+class VerificationListParams(TypedDict, total=False):
+ payout_account_id: Required[str]
+ """The unique identifier of the payout account to list verifications 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."""
+
+ first: Optional[int]
+ """Returns the first _n_ elements from the list."""
+
+ last: Optional[int]
+ """Returns the last _n_ elements from the list."""
diff --git a/src/whop_sdk/types/verification_list_response.py b/src/whop_sdk/types/verification_list_response.py
new file mode 100644
index 0000000..413c360
--- /dev/null
+++ b/src/whop_sdk/types/verification_list_response.py
@@ -0,0 +1,30 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .._models import BaseModel
+from .verification_status import VerificationStatus
+from .verification_error_code import VerificationErrorCode
+
+__all__ = ["VerificationListResponse"]
+
+
+class VerificationListResponse(BaseModel):
+ """
+ An identity verification session used to confirm a person or entity's identity for payout account eligibility.
+ """
+
+ id: str
+ """The unique identifier for the verification."""
+
+ last_error_code: Optional[VerificationErrorCode] = None
+ """An error code for a verification attempt."""
+
+ last_error_reason: Optional[str] = None
+ """A human-readable explanation of the most recent verification error.
+
+ Null if no error has occurred.
+ """
+
+ status: VerificationStatus
+ """The current status of this verification session."""
diff --git a/tests/api_resources/test_payout_accounts.py b/tests/api_resources/test_payout_accounts.py
new file mode 100644
index 0000000..62f50bb
--- /dev/null
+++ b/tests/api_resources/test_payout_accounts.py
@@ -0,0 +1,108 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from whop_sdk import Whop, AsyncWhop
+from tests.utils import assert_matches_type
+from whop_sdk.types import PayoutAccountRetrieveResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestPayoutAccounts:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_retrieve(self, client: Whop) -> None:
+ payout_account = client.payout_accounts.retrieve(
+ "poact_xxxxxxxxxxxx",
+ )
+ assert_matches_type(PayoutAccountRetrieveResponse, payout_account, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_retrieve(self, client: Whop) -> None:
+ response = client.payout_accounts.with_raw_response.retrieve(
+ "poact_xxxxxxxxxxxx",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ payout_account = response.parse()
+ assert_matches_type(PayoutAccountRetrieveResponse, payout_account, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_retrieve(self, client: Whop) -> None:
+ with client.payout_accounts.with_streaming_response.retrieve(
+ "poact_xxxxxxxxxxxx",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ payout_account = response.parse()
+ assert_matches_type(PayoutAccountRetrieveResponse, payout_account, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_path_params_retrieve(self, client: Whop) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ client.payout_accounts.with_raw_response.retrieve(
+ "",
+ )
+
+
+class TestAsyncPayoutAccounts:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_retrieve(self, async_client: AsyncWhop) -> None:
+ payout_account = await async_client.payout_accounts.retrieve(
+ "poact_xxxxxxxxxxxx",
+ )
+ assert_matches_type(PayoutAccountRetrieveResponse, payout_account, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_retrieve(self, async_client: AsyncWhop) -> None:
+ response = await async_client.payout_accounts.with_raw_response.retrieve(
+ "poact_xxxxxxxxxxxx",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ payout_account = await response.parse()
+ assert_matches_type(PayoutAccountRetrieveResponse, payout_account, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_retrieve(self, async_client: AsyncWhop) -> None:
+ async with async_client.payout_accounts.with_streaming_response.retrieve(
+ "poact_xxxxxxxxxxxx",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ payout_account = await response.parse()
+ assert_matches_type(PayoutAccountRetrieveResponse, payout_account, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_path_params_retrieve(self, async_client: AsyncWhop) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ await async_client.payout_accounts.with_raw_response.retrieve(
+ "",
+ )
diff --git a/tests/api_resources/test_verifications.py b/tests/api_resources/test_verifications.py
index fc53afc..e1499ae 100644
--- a/tests/api_resources/test_verifications.py
+++ b/tests/api_resources/test_verifications.py
@@ -9,7 +9,8 @@
from whop_sdk import Whop, AsyncWhop
from tests.utils import assert_matches_type
-from whop_sdk.types import VerificationRetrieveResponse
+from whop_sdk.types import VerificationListResponse, VerificationRetrieveResponse
+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,52 @@ 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:
+ verification = client.verifications.list(
+ payout_account_id="poact_xxxxxxxxxxxx",
+ )
+ assert_matches_type(SyncCursorPage[VerificationListResponse], verification, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_list_with_all_params(self, client: Whop) -> None:
+ verification = client.verifications.list(
+ payout_account_id="poact_xxxxxxxxxxxx",
+ after="after",
+ before="before",
+ first=42,
+ last=42,
+ )
+ assert_matches_type(SyncCursorPage[VerificationListResponse], verification, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_list(self, client: Whop) -> None:
+ response = client.verifications.with_raw_response.list(
+ payout_account_id="poact_xxxxxxxxxxxx",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ verification = response.parse()
+ assert_matches_type(SyncCursorPage[VerificationListResponse], verification, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_list(self, client: Whop) -> None:
+ with client.verifications.with_streaming_response.list(
+ payout_account_id="poact_xxxxxxxxxxxx",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ verification = response.parse()
+ assert_matches_type(SyncCursorPage[VerificationListResponse], verification, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
class TestAsyncVerifications:
parametrize = pytest.mark.parametrize(
@@ -106,3 +153,49 @@ async def test_path_params_retrieve(self, async_client: AsyncWhop) -> None:
await async_client.verifications.with_raw_response.retrieve(
"",
)
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_list(self, async_client: AsyncWhop) -> None:
+ verification = await async_client.verifications.list(
+ payout_account_id="poact_xxxxxxxxxxxx",
+ )
+ assert_matches_type(AsyncCursorPage[VerificationListResponse], verification, 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:
+ verification = await async_client.verifications.list(
+ payout_account_id="poact_xxxxxxxxxxxx",
+ after="after",
+ before="before",
+ first=42,
+ last=42,
+ )
+ assert_matches_type(AsyncCursorPage[VerificationListResponse], verification, 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.verifications.with_raw_response.list(
+ payout_account_id="poact_xxxxxxxxxxxx",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ verification = await response.parse()
+ assert_matches_type(AsyncCursorPage[VerificationListResponse], verification, 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.verifications.with_streaming_response.list(
+ payout_account_id="poact_xxxxxxxxxxxx",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ verification = await response.parse()
+ assert_matches_type(AsyncCursorPage[VerificationListResponse], verification, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
From 693ae0b50a075652eae75ee578ae38ab4b712f4d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 12 Mar 2026 15:56:53 +0000
Subject: [PATCH 7/7] release: 0.0.33
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 9 +++++++++
pyproject.toml | 2 +-
src/whop_sdk/_version.py | 2 +-
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 41dea33..18a5b4e 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.0.32"
+ ".": "0.0.33"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 679984c..a6f353d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## 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)
+
+### Features
+
+* **api:** api update ([fa0be9f](https://github.com/whopio/whopsdk-python/commit/fa0be9f1a605b098278a59a92fb9cb297e19c5cc))
+* **api:** manual updates ([95a8539](https://github.com/whopio/whopsdk-python/commit/95a853935639b8d520d545b5e6e647ecc8c287b5))
+
## 0.0.32 (2026-03-11)
Full Changelog: [v0.0.30...v0.0.32](https://github.com/whopio/whopsdk-python/compare/v0.0.30...v0.0.32)
diff --git a/pyproject.toml b/pyproject.toml
index 0834754..a996e81 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "whop-sdk"
-version = "0.0.32"
+version = "0.0.33"
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 aa95ad5..74e0ab8 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.32" # x-release-please-version
+__version__ = "0.0.33" # x-release-please-version