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/6] 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/6] 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/6] 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/6] 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 ab0d66642a554e1e496ad91a8aced53b983d8009 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:26:27 +0000
Subject: [PATCH 5/6] release: 0.0.32
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 11 +++++++++++
pyproject.toml | 2 +-
src/whop_sdk/_version.py | 2 +-
4 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 3d2ac0b..41dea33 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.1.0"
+ ".": "0.0.32"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eb73b72..bbe8517 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,16 @@
# Changelog
+## 0.0.32 (2026-03-11)
+
+Full Changelog: [v0.1.0...v0.0.32](https://github.com/whopio/whopsdk-python/compare/v0.1.0...v0.0.32)
+
+### Features
+
+* **api:** api update ([db6d90c](https://github.com/whopio/whopsdk-python/commit/db6d90cb90d173817cb3c8829dcd7d4ac091e53e))
+* **api:** api update ([74d75c5](https://github.com/whopio/whopsdk-python/commit/74d75c50c470970c3b7fdc0611dd58c518fcdb18))
+* **api:** api update ([2edf4bc](https://github.com/whopio/whopsdk-python/commit/2edf4bca49f261116a77e04d77da9157904367a5))
+* **api:** manual updates ([5488b95](https://github.com/whopio/whopsdk-python/commit/5488b953d0a7e6c4c6d08d9a6f0b88a8852a76d2))
+
## 0.1.0 (2026-03-10)
Full Changelog: [v0.0.30...v0.1.0](https://github.com/whopio/whopsdk-python/compare/v0.0.30...v0.1.0)
diff --git a/pyproject.toml b/pyproject.toml
index 9279b72..0834754 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "whop-sdk"
-version = "0.1.0"
+version = "0.0.32"
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 162053b..aa95ad5 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.1.0" # x-release-please-version
+__version__ = "0.0.32" # x-release-please-version
From f04e1d94dedc741bd1dadb7be836510e6b98f730 Mon Sep 17 00:00:00 2001
From: Connor Stevens
Date: Wed, 11 Mar 2026 14:55:55 -0400
Subject: [PATCH 6/6] fix: restore missing type files lost during merge
conflict resolution
These files were added in the 0.1.0 commit but got lost during the
merge conflict resolution between main and the release-please branch.
Co-Authored-By: Claude Opus 4.6
---
.../types/authorized_user_create_params.py | 27 +++++++++++++++++++
.../types/authorized_user_delete_params.py | 16 +++++++++++
.../types/authorized_user_delete_response.py | 7 +++++
.../types/membership_add_free_days_params.py | 16 +++++++++++
src/whop_sdk/types/receipt_tax_behavior.py | 7 +++++
src/whop_sdk/types/social_link_websites.py | 9 +++++++
6 files changed, 82 insertions(+)
create mode 100644 src/whop_sdk/types/authorized_user_create_params.py
create mode 100644 src/whop_sdk/types/authorized_user_delete_params.py
create mode 100644 src/whop_sdk/types/authorized_user_delete_response.py
create mode 100644 src/whop_sdk/types/membership_add_free_days_params.py
create mode 100644 src/whop_sdk/types/receipt_tax_behavior.py
create mode 100644 src/whop_sdk/types/social_link_websites.py
diff --git a/src/whop_sdk/types/authorized_user_create_params.py b/src/whop_sdk/types/authorized_user_create_params.py
new file mode 100644
index 0000000..b2b538a
--- /dev/null
+++ b/src/whop_sdk/types/authorized_user_create_params.py
@@ -0,0 +1,27 @@
+# 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
+
+from .shared.authorized_user_roles import AuthorizedUserRoles
+
+__all__ = ["AuthorizedUserCreateParams"]
+
+
+class AuthorizedUserCreateParams(TypedDict, total=False):
+ company_id: Required[str]
+ """The ID of the company to add the authorized user to."""
+
+ role: Required[AuthorizedUserRoles]
+ """The role to assign to the authorized user within the company.
+
+ Supported roles: 'moderator', 'sales_manager'.
+ """
+
+ user_id: Required[str]
+ """The ID of the user to add as an authorized user."""
+
+ send_emails: Optional[bool]
+ """Whether to send notification emails to the user on creation."""
diff --git a/src/whop_sdk/types/authorized_user_delete_params.py b/src/whop_sdk/types/authorized_user_delete_params.py
new file mode 100644
index 0000000..ead84a1
--- /dev/null
+++ b/src/whop_sdk/types/authorized_user_delete_params.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import TypedDict
+
+__all__ = ["AuthorizedUserDeleteParams"]
+
+
+class AuthorizedUserDeleteParams(TypedDict, total=False):
+ company_id: Optional[str]
+ """The ID of the company the authorized user belongs to.
+
+ Optional if the authorized user ID is provided.
+ """
diff --git a/src/whop_sdk/types/authorized_user_delete_response.py b/src/whop_sdk/types/authorized_user_delete_response.py
new file mode 100644
index 0000000..b71b66f
--- /dev/null
+++ b/src/whop_sdk/types/authorized_user_delete_response.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import TypeAlias
+
+__all__ = ["AuthorizedUserDeleteResponse"]
+
+AuthorizedUserDeleteResponse: TypeAlias = bool
diff --git a/src/whop_sdk/types/membership_add_free_days_params.py b/src/whop_sdk/types/membership_add_free_days_params.py
new file mode 100644
index 0000000..568b654
--- /dev/null
+++ b/src/whop_sdk/types/membership_add_free_days_params.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["MembershipAddFreeDaysParams"]
+
+
+class MembershipAddFreeDaysParams(TypedDict, total=False):
+ free_days: Required[int]
+ """The number of free days to add (1-1095).
+
+ Extends the billing period, expiration date, or Stripe trial depending on plan
+ type.
+ """
diff --git a/src/whop_sdk/types/receipt_tax_behavior.py b/src/whop_sdk/types/receipt_tax_behavior.py
new file mode 100644
index 0000000..3d0ea68
--- /dev/null
+++ b/src/whop_sdk/types/receipt_tax_behavior.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__ = ["ReceiptTaxBehavior"]
+
+ReceiptTaxBehavior: TypeAlias = Literal["exclusive", "inclusive", "unspecified", "unable_to_collect"]
diff --git a/src/whop_sdk/types/social_link_websites.py b/src/whop_sdk/types/social_link_websites.py
new file mode 100644
index 0000000..7e96a15
--- /dev/null
+++ b/src/whop_sdk/types/social_link_websites.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__ = ["SocialLinkWebsites"]
+
+SocialLinkWebsites: TypeAlias = Literal[
+ "x", "instagram", "facebook", "tiktok", "youtube", "linkedin", "twitch", "website", "custom"
+]