diff --git a/.fern/metadata.json b/.fern/metadata.json index fd391d6f..6b65c674 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -15,7 +15,7 @@ "standardwebhooks": ">=1.0.1,<2" } }, - "originGitCommit": "22b3e2486cd3162724999db3ec87536875f54cce", + "originGitCommit": "773623581af8feff5f48dd06991be2cacc1828f5", "originGitCommitIsDirty": false, "invokedBy": "ci", "requestedVersion": "1.0.14", diff --git a/.fern/replay.lock b/.fern/replay.lock index 59172fd8..e6b85f10 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -30,5 +30,11 @@ generations: cli_version: unknown generator_versions: fernapi/fern-python-sdk: 5.28.0 -current_generation: a5e431eb26ecc31dcbed9ba32c3c1822596f9c53 + - commit_sha: 9d74c51002bfcacdc73c9106b5d6db8cabffd1bc + tree_hash: 2ac56ab26550e19c97829177a36606784a2b5bf8 + timestamp: 2026-08-26T03:55:53.583Z + cli_version: unknown + generator_versions: + fernapi/fern-python-sdk: 5.28.0 +current_generation: 9d74c51002bfcacdc73c9106b5d6db8cabffd1bc patches: [] diff --git a/reference.md b/reference.md index b859ad3c..d3d6ee9f 100644 --- a/reference.md +++ b/reference.md @@ -1839,7 +1839,7 @@ client.ad_campaigns.delete(
-Updates an ad campaign's editable fields (title, budget, schedule, bid strategy, special ad categories, and, before launch, budget optimization), and launches a draft campaign by setting status to active. Objective, budget type and desired cost per result are fixed at creation and cannot be changed. +Updates an ad campaign's editable fields (title, budget, schedule, bid strategy, special ad categories, and, before launch, budget type and budget optimization), and launches a draft campaign by setting status to active. Objective and desired cost per result are fixed at creation and cannot be changed.
@@ -1896,7 +1896,7 @@ client.ad_campaigns.update(
-**budget_amount:** `typing.Optional[float]` — The campaign budget, in the account's currency. Interpreted as daily or lifetime per the campaign's existing budget type. +**budget_amount:** `typing.Optional[float]` — The campaign budget, in the account's currency. Interpreted as daily or lifetime per the campaign's budget type, including a budget_type sent in the same request.
@@ -1912,6 +1912,14 @@ client.ad_campaigns.update(
+**budget_type:** `typing.Optional[UpdateAdCampaignsRequestBudgetType]` — Whether `budget_amount` is spent per day (`daily`) or over the campaign's full run (`lifetime`). Only changeable while the campaign is a draft; send budget_amount in the same request so the amount lands on the new type. + +
+
+ +
+
+ **ends_at:** `typing.Optional[str]` — When the campaign stops delivering, as an ISO 8601 timestamp. Only for campaigns that own the budget.
@@ -4125,7 +4133,7 @@ client.ads.create()
-**headlines:** `typing.Optional[typing.List[str]]` — The headline variants shown on the ad. +**existing_post_id:** `typing.Optional[str]` — Promote a post you already published instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source.
@@ -4133,7 +4141,7 @@ client.ads.create()
-**lead_form:** `typing.Optional[CreateAdsRequestLeadForm]` — Instant lead form for the ad. Only allowed when the ad group's conversion_location is an instant-form destination (instant_forms, instant_forms_and_messenger, website_and_instant_forms). Mutually exclusive with lead_form_id. +**headlines:** `typing.Optional[typing.List[str]]` — The headline variants shown on the ad.
@@ -4141,7 +4149,7 @@ client.ads.create()
-**lead_form_id:** `typing.Optional[str]` — Use an existing instant form instead of creating one — the form's platform ID, from a form already on the ad's Facebook page. Only allowed when the ad group's conversion_location is an instant-form destination. Mutually exclusive with lead_form. +**lead_form:** `typing.Optional[CreateAdsRequestLeadForm]` — Instant lead form for the ad. Only allowed when the ad group's conversion_location is an instant-form destination (instant_forms, instant_forms_and_messenger, website_and_instant_forms). Mutually exclusive with lead_form_id.
@@ -4149,7 +4157,7 @@ client.ads.create()
-**messaging_config:** `typing.Optional[CreateAdsRequestMessagingConfig]` — Click-to-message welcome copy: the greeting (message) and the ice-breaker prompt (keyword). +**lead_form_id:** `typing.Optional[str]` — Use an existing instant form instead of creating one — the form's platform ID, from a form already on the ad's Facebook page. Only allowed when the ad group's conversion_location is an instant-form destination. Mutually exclusive with lead_form.
@@ -4157,7 +4165,7 @@ client.ads.create()
-**multi_advertiser_ads:** `typing.Optional[bool]` — Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true. +**messaging_config:** `typing.Optional[CreateAdsRequestMessagingConfig]` — Click-to-message welcome copy: the greeting (message) and the ice-breaker prompt (keyword).
@@ -4165,7 +4173,7 @@ client.ads.create()
-**post_id:** `typing.Optional[str]` — Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. +**multi_advertiser_ads:** `typing.Optional[bool]` — Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true.
@@ -4173,7 +4181,7 @@ client.ads.create()
-**post_source:** `typing.Optional[CreateAdsRequestPostSource]` — Identifies the network that owns `post_id`. The source is inferred from the ID shape when omitted. +**post_source:** `typing.Optional[CreateAdsRequestPostSource]` — Identifies the network that owns `existing_post_id`. The source is inferred from the ID shape when omitted.
@@ -4496,7 +4504,7 @@ client.ads.update(
-**headlines:** `typing.Optional[typing.List[str]]` — The headline variants shown on the ad. +**existing_post_id:** `typing.Optional[str]` — Promote a post you already published instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source.
@@ -4504,7 +4512,7 @@ client.ads.update(
-**lead_form:** `typing.Optional[UpdateAdsRequestLeadForm]` — Instant lead form for the ad. Only allowed when the ad group's conversion_location is an instant-form destination (instant_forms, instant_forms_and_messenger, website_and_instant_forms). Mutually exclusive with lead_form_id. +**headlines:** `typing.Optional[typing.List[str]]` — The headline variants shown on the ad.
@@ -4512,7 +4520,7 @@ client.ads.update(
-**lead_form_id:** `typing.Optional[str]` — Use an existing instant form instead of creating one — the form's platform ID, from a form already on the ad's Facebook page. Only allowed when the ad group's conversion_location is an instant-form destination. Mutually exclusive with lead_form. Replaces a stored lead_form. +**lead_form:** `typing.Optional[UpdateAdsRequestLeadForm]` — Instant lead form for the ad. Only allowed when the ad group's conversion_location is an instant-form destination (instant_forms, instant_forms_and_messenger, website_and_instant_forms). Mutually exclusive with lead_form_id.
@@ -4520,7 +4528,7 @@ client.ads.update(
-**messaging_config:** `typing.Optional[UpdateAdsRequestMessagingConfig]` — Click-to-message welcome copy: the greeting (message) and the ice-breaker prompt (keyword). +**lead_form_id:** `typing.Optional[str]` — Use an existing instant form instead of creating one — the form's platform ID, from a form already on the ad's Facebook page. Only allowed when the ad group's conversion_location is an instant-form destination. Mutually exclusive with lead_form. Replaces a stored lead_form.
@@ -4528,7 +4536,7 @@ client.ads.update(
-**multi_advertiser_ads:** `typing.Optional[bool]` — Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true. +**messaging_config:** `typing.Optional[UpdateAdsRequestMessagingConfig]` — Click-to-message welcome copy: the greeting (message) and the ice-breaker prompt (keyword).
@@ -4536,7 +4544,7 @@ client.ads.update(
-**post_id:** `typing.Optional[str]` — Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. +**multi_advertiser_ads:** `typing.Optional[bool]` — Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true.
@@ -4544,7 +4552,7 @@ client.ads.update(
-**post_source:** `typing.Optional[UpdateAdsRequestPostSource]` — Identifies the network that owns `post_id`. The source is inferred from the ID shape when omitted. +**post_source:** `typing.Optional[UpdateAdsRequestPostSource]` — Identifies the network that owns `existing_post_id`. The source is inferred from the ID shape when omitted.
@@ -11421,8 +11429,8 @@ client.checkout_configurations.delete(
-## Checkout Sessions -
client.checkout_sessions.create(...) -> CheckoutSession +## Companies +
client.companies.list(...) -> ListCompaniesResponse
@@ -11434,7 +11442,10 @@ client.checkout_configurations.delete(
-Opens a checkout session. No credentials required. Pass exactly one of `items`, `checkout_configuration`, or `link`. The response includes `client_secret` once; later calls authenticate with it. +Returns a paginated list of companies. When parent_company_id is provided, lists connected accounts under that platform. When omitted, lists companies the current user has access to. + +Required permissions: + - `company:basic:read`
@@ -11451,13 +11462,19 @@ Opens a checkout session. No credentials required. Pass exactly one of `items`, ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment +import datetime client = Whop( token="", environment=WhopEnvironment.DEFAULT, ) -client.checkout_sessions.create() +client.companies.list( + first=42, + last=42, + created_before=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), + created_after=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), +) ``` @@ -11473,55 +11490,7 @@ client.checkout_sessions.create()
-**affiliate_code:** `typing.Optional[str]` — The affiliate this checkout is attributed to. Write-once — set it here or never. - -
-
- -
-
- -**attribution:** `typing.Optional[typing.Dict[str, typing.Any]]` — String-to-string acquisition context. Recognized keys: `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, `tracking_link_id`, `funnel_id`, `source`, `country`; anything else is dropped. - -
-
- -
-
- -**checkout_configuration:** `typing.Optional[str]` — A seller's checkout configuration (`ch_…`) to open this checkout from. Its plan, mode, affiliate code, metadata, redirect URL, 3DS level and payment method configuration seed the session; anything you also send explicitly wins. - -
-
- -
-
- -**items:** `typing.Optional[typing.List[CreateCheckoutSessionsRequestItemsItem]]` — What the buyer is purchasing. Exactly one entry today — more are refused until multi-item checkout ships; the array shape is the forward contract. Alongside a `checkout_configuration` or `link` it may only name that mount's own plan, where it sets quantity. - -
-
- -
-
- -**link:** `typing.Optional[str]` — Any checkout link the seller has shared, resolved for you: a plan ID, a checkout configuration ID, a vanity short link (send `page_route` with it), a membership transfer code, or a checkout link the seller handed out earlier. A link that is not a checkout link is refused with a coded message rather than a bare not-found. - -
-
- -
-
- -**metadata:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` — Free-form string-to-string map, at most 40 keys. Whop never interprets it. - -
-
- -
-
- -**mode:** `typing.Optional[CreateCheckoutSessionsRequestMode]` — Defaults to the checkout configuration's mode, then `payment`. `setup` sessions are not yet available and are refused. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -11529,7 +11498,7 @@ client.checkout_sessions.create()
-**origin:** `typing.Optional[str]` — Where this checkout is being opened from — the scheme and host of your page, with no path (`https://shop.example.com`). Ignored when the request carries a browser `Origin` header, which is used instead. Recorded against the session as acquisition context. +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -11537,7 +11506,7 @@ client.checkout_sessions.create()
-**page_route:** `typing.Optional[str]` — The product route a vanity `link` belongs to — the `pageRoute` in the seller's shared URL. +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list.
@@ -11545,7 +11514,7 @@ client.checkout_sessions.create()
-**password:** `typing.Optional[str]` — The password for a password-protected plan. Right, and the gate is cleared for the session's whole life; wrong or omitted, and the session still opens — it publishes a `custom_password` requirement, the answer arrives through update, and confirm refuses until it is right. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -11553,7 +11522,7 @@ client.checkout_sessions.create()
-**promo_code:** `typing.Optional[str]` — A promo code to apply to the quote. +**parent_company_id:** `typing.Optional[str]` — The unique identifier of the parent platform company. When provided, lists connected accounts under that platform. Omit to list the current user's own companies.
@@ -11561,7 +11530,7 @@ client.checkout_sessions.create()
-**return_url:** `typing.Optional[str]` — Where the buyer lands after an off-site payment step. Absolute https URL without credentials. +**direction:** `typing.Optional[Direction]`
@@ -11569,7 +11538,7 @@ client.checkout_sessions.create()
-**top_up_membership:** `typing.Optional[str]` — An existing membership (`mem_…`) this checkout pays against instead of creating a new one — the buyer pays the plan's price again onto something they already own. Ownership is checked at confirm, against the buyer who confirms: a membership they do not own is refused as not found. Cannot accompany a membership transfer link. +**created_before:** `typing.Optional[datetime.datetime]` — Only return companies created before this timestamp.
@@ -11577,7 +11546,7 @@ client.checkout_sessions.create()
-**tracking_link_ids_by_account:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` — First-party tracking-link candidates keyed by account ID. Ignored outside Whop's hosted checkout; an explicit `attribution.tracking_link_id` wins. +**created_after:** `typing.Optional[datetime.datetime]` — Only return companies created after this timestamp.
@@ -11597,8 +11566,7 @@ client.checkout_sessions.create()
-## Companies -
client.companies.list(...) -> ListCompaniesResponse +
client.companies.create(...) -> Company
@@ -11610,9 +11578,10 @@ client.checkout_sessions.create()
-Returns a paginated list of companies. When parent_company_id is provided, lists connected accounts under that platform. When omitted, lists companies the current user has access to. +Create a new company. Pass parent_company_id to create a connected account under a platform, or omit it to create a company for the current user. Required permissions: + - `company:create` - `company:basic:read`
@@ -11630,18 +11599,14 @@ Required permissions: ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -import datetime client = Whop( token="", environment=WhopEnvironment.DEFAULT, ) -client.companies.list( - first=42, - last=42, - created_before=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), - created_after=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), +client.companies.create( + title="title", ) ``` @@ -11658,7 +11623,7 @@ client.companies.list(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**title:** `str` — The display name of the company shown to customers.
@@ -11666,7 +11631,7 @@ client.companies.list(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**country:** `typing.Optional[Countries]` — The country the company is located in. Defaults to the parent company's country for connected accounts, or the owner's IP-derived country.
@@ -11674,7 +11639,7 @@ client.companies.list(
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**description:** `typing.Optional[str]` — A promotional pitch displayed to potential customers on the company's store page.
@@ -11682,7 +11647,7 @@ client.companies.list(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**email:** `typing.Optional[str]` — The email address of the user who will own the connected account. Required when parent_company_id is provided.
@@ -11690,7 +11655,7 @@ client.companies.list(
-**parent_company_id:** `typing.Optional[str]` — The unique identifier of the parent platform company. When provided, lists connected accounts under that platform. Omit to list the current user's own companies. +**logo:** `typing.Optional[CreateCompaniesRequestLogo]` — The company's logo image. Accepts PNG, JPEG, or GIF format.
@@ -11698,7 +11663,7 @@ client.companies.list(
-**direction:** `typing.Optional[Direction]` +**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — A key-value JSON object of custom metadata to store on the company.
@@ -11706,7 +11671,7 @@ client.companies.list(
-**created_before:** `typing.Optional[datetime.datetime]` — Only return companies created before this timestamp. +**parent_company_id:** `typing.Optional[str]` — The unique identifier of the parent platform company. When provided, creates a connected account under that platform. Omit to create a company for the current user.
@@ -11714,7 +11679,7 @@ client.companies.list(
-**created_after:** `typing.Optional[datetime.datetime]` — Only return companies created after this timestamp. +**send_customer_emails:** `typing.Optional[bool]` — Whether Whop sends transactional emails to customers on behalf of this company. Only applies when creating a connected account.
@@ -11734,7 +11699,7 @@ client.companies.list(
-
client.companies.create(...) -> Company +
client.companies.retrieve(...) -> Company
@@ -11746,10 +11711,9 @@ client.companies.list(
-Create a new company. Pass parent_company_id to create a connected account under a platform, or omit it to create a company for the current user. +Retrieves the details of an existing company. Required permissions: - - `company:create` - `company:basic:read`
@@ -11773,8 +11737,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.companies.create( - title="title", +client.companies.retrieve( + id="biz_xxxxxxxxxxxxxx", ) ``` @@ -11791,7 +11755,7 @@ client.companies.create(
-**title:** `str` — The display name of the company shown to customers. +**id:** `str` — The unique identifier or route slug of the company.
@@ -11799,7 +11763,100 @@ client.companies.create(
-**country:** `typing.Optional[Countries]` — The country the company is located in. Defaults to the parent company's country for connected accounts, or the owner's IP-derived country. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +
client.companies.update(...) -> Company +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a company's title, description, logo, and other settings. + +Required permissions: + - `company:update` + - `company:basic:read` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.DEFAULT, +) + +client.companies.update( + id="biz_xxxxxxxxxxxxxx", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The unique identifier of the company to update. + +
+
+ +
+
+ +**affiliate_application_required:** `typing.Optional[bool]` — Whether prospective affiliates must submit an application before they can promote this company. + +
+
+ +
+
+ +**affiliate_instructions:** `typing.Optional[str]` — Guidelines and instructions shown to affiliates explaining how to promote this company's products. + +
+
+ +
+
+ +**banner_image:** `typing.Optional[UpdateCompaniesRequestBannerImage]` — The company's banner image. Accepts PNG or JPEG format.
@@ -11815,7 +11872,7 @@ client.companies.create(
-**email:** `typing.Optional[str]` — The email address of the user who will own the connected account. Required when parent_company_id is provided. +**featured_affiliate_product_id:** `typing.Optional[str]` — The ID of the product to feature on this company's affiliate page. Pass null to clear.
@@ -11823,7 +11880,7 @@ client.companies.create(
-**logo:** `typing.Optional[CreateCompaniesRequestLogo]` — The company's logo image. Accepts PNG, JPEG, or GIF format. +**logo:** `typing.Optional[UpdateCompaniesRequestLogo]` — The company's logo image. Accepts PNG, JPEG, or GIF format.
@@ -11831,7 +11888,7 @@ client.companies.create(
-**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — A key-value JSON object of custom metadata to store on the company. +**route:** `typing.Optional[str]` — The unique URL slug for the company's store page. Must be lowercase and can include hyphens (e.g., 'my-company'). If not provided, the route will remain unchanged.
@@ -11839,7 +11896,7 @@ client.companies.create(
-**parent_company_id:** `typing.Optional[str]` — The unique identifier of the parent platform company. When provided, creates a connected account under that platform. Omit to create a company for the current user. +**send_customer_emails:** `typing.Optional[bool]` — Whether Whop sends transactional emails (receipts, renewals, cancelations) to customers on behalf of this company.
@@ -11847,7 +11904,23 @@ client.companies.create(
-**send_customer_emails:** `typing.Optional[bool]` — Whether Whop sends transactional emails to customers on behalf of this company. Only applies when creating a connected account. +**social_links:** `typing.Optional[typing.List[UpdateCompaniesRequestSocialLinksItem]]` — The social media links to display on the company's store page. Pass the full list of desired social links — any existing links not included will be removed. + +
+
+ +
+
+ +**target_audience:** `typing.Optional[str]` — The target audience for this company (e.g., 'beginner day traders aged 18-25 looking to learn options'). + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — The display name of the company shown to customers.
@@ -11867,7 +11940,7 @@ client.companies.create(
-
client.companies.retrieve(...) -> Company +
client.companies.create_api_key(...) -> CreateApiKeyCompaniesResponse
@@ -11879,10 +11952,7 @@ client.companies.create(
-Retrieves the details of an existing company. - -Required permissions: - - `company:basic:read` +Create an API key for a connected account (child company) owned by a parent company.
@@ -11905,8 +11975,9 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.companies.retrieve( - id="biz_xxxxxxxxxxxxxx", +client.companies.create_api_key( + parent_company_id="parent_company_id", + child_company_id="child_company_id", ) ``` @@ -11923,7 +11994,39 @@ client.companies.retrieve(
-**id:** `str` — The unique identifier or route slug of the company. +**parent_company_id:** `str` — The unique identifier of the parent platform company (e.g. 'biz_xxx'). + +
+
+ +
+
+ +**child_company_id:** `str` — The unique identifier of the connected account to create the API key for (e.g. 'biz_xxx'). + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — A human-readable name for the API key, such as 'Production API Key'. + +
+
+ +
+
+ +**permissions:** `typing.Optional[typing.List[CreateApiKeyCompaniesRequestPermissionsItem]]` — Granular permission statements defining which actions this API key can perform. Either permissions or role must be provided. + +
+
+ +
+
+ +**role:** `typing.Optional[PermissionSystemRoles]` — A system role to inherit permissions from (e.g. owner, admin, moderator). Either role or permissions must be provided.
@@ -11943,7 +12046,8 @@ client.companies.retrieve(
-
client.companies.update(...) -> Company +## CompanyTokenTransactions +
client.company_token_transactions.list(...) -> ListCompanyTokenTransactionsResponse
@@ -11955,10 +12059,11 @@ client.companies.retrieve(
-Update a company's title, description, logo, and other settings. +Returns a paginated list of token transactions for a user or company, depending on the authenticated actor, with optional filtering by user and transaction type. Required permissions: - - `company:update` + - `company_token_transaction:read` + - `member:basic:read` - `company:basic:read`
@@ -11982,8 +12087,11 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.companies.update( - id="biz_xxxxxxxxxxxxxx", +client.company_token_transactions.list( + first=42, + last=42, + company_id="biz_xxxxxxxxxxxxxx", + user_id="user_xxxxxxxxxxxxx", ) ``` @@ -12000,7 +12108,7 @@ client.companies.update(
-**id:** `str` — The unique identifier of the company to update. +**company_id:** `str` — The unique identifier of the company to list token transactions for.
@@ -12008,7 +12116,7 @@ client.companies.update(
-**affiliate_application_required:** `typing.Optional[bool]` — Whether prospective affiliates must submit an application before they can promote this company. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -12016,7 +12124,7 @@ client.companies.update(
-**affiliate_instructions:** `typing.Optional[str]` — Guidelines and instructions shown to affiliates explaining how to promote this company's products. +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -12024,7 +12132,7 @@ client.companies.update(
-**banner_image:** `typing.Optional[UpdateCompaniesRequestBannerImage]` — The company's banner image. Accepts PNG or JPEG format. +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list.
@@ -12032,7 +12140,7 @@ client.companies.update(
-**description:** `typing.Optional[str]` — A promotional pitch displayed to potential customers on the company's store page. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -12040,7 +12148,7 @@ client.companies.update(
-**featured_affiliate_product_id:** `typing.Optional[str]` — The ID of the product to feature on this company's affiliate page. Pass null to clear. +**user_id:** `typing.Optional[str]` — Filter transactions to only those involving this specific user.
@@ -12048,7 +12156,7 @@ client.companies.update(
-**logo:** `typing.Optional[UpdateCompaniesRequestLogo]` — The company's logo image. Accepts PNG, JPEG, or GIF format. +**transaction_type:** `typing.Optional[CompanyTokenTransactionTypes]`
@@ -12056,39 +12164,83 @@ client.companies.update(
-**route:** `typing.Optional[str]` — The unique URL slug for the company's store page. Must be lowercase and can include hyphens (e.g., 'my-company'). If not provided, the route will remain unchanged. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**send_customer_emails:** `typing.Optional[bool]` — Whether Whop sends transactional emails (receipts, renewals, cancelations) to customers on behalf of this company. -
+
+
client.company_token_transactions.create(...) -> CompanyTokenTransaction
-**social_links:** `typing.Optional[typing.List[UpdateCompaniesRequestSocialLinksItem]]` — The social media links to display on the company's store page. Pass the full list of desired social links — any existing links not included will be removed. - +#### 📝 Description + +
+
+ +
+
+ +Create a token transaction to add, subtract, or transfer tokens for a member within a company. + +Required permissions: + - `company_token_transaction:create` + - `member:basic:read` + - `company:basic:read` +
+
+#### 🔌 Usage +
-**target_audience:** `typing.Optional[str]` — The target audience for this company (e.g., 'beginner day traders aged 18-25 looking to learn options'). - +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment +from whop_sdk.company_token_transactions import CreateCompanyTokenTransactionsRequest_Transfer + +client = Whop( + token="", + environment=WhopEnvironment.DEFAULT, +) + +client.company_token_transactions.create( + request=CreateCompanyTokenTransactionsRequest_Transfer( + amount=6.9, + company_id="biz_xxxxxxxxxxxxxx", + destination_user_id="destination_user_id", + user_id="user_xxxxxxxxxxxxx", + ), +) + +```
+
+
+ +#### ⚙️ Parameters
-**title:** `typing.Optional[str]` — The display name of the company shown to customers. +
+
+ +**request:** `CreateCompanyTokenTransactionsRequest` — Parameters for CreateCompanyTokenTransaction
@@ -12108,7 +12260,7 @@ client.companies.update(
-
client.companies.create_api_key(...) -> CreateApiKeyCompaniesResponse +
client.company_token_transactions.retrieve(...) -> CompanyTokenTransaction
@@ -12120,7 +12272,12 @@ client.companies.update(
-Create an API key for a connected account (child company) owned by a parent company. +Retrieves the details of an existing company token transaction. + +Required permissions: + - `company_token_transaction:read` + - `member:basic:read` + - `company:basic:read`
@@ -12143,9 +12300,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.companies.create_api_key( - parent_company_id="parent_company_id", - child_company_id="child_company_id", +client.company_token_transactions.retrieve( + id="id", ) ``` @@ -12162,39 +12318,7 @@ client.companies.create_api_key(
-**parent_company_id:** `str` — The unique identifier of the parent platform company (e.g. 'biz_xxx'). - -
-
- -
-
- -**child_company_id:** `str` — The unique identifier of the connected account to create the API key for (e.g. 'biz_xxx'). - -
-
- -
-
- -**name:** `typing.Optional[str]` — A human-readable name for the API key, such as 'Production API Key'. - -
-
- -
-
- -**permissions:** `typing.Optional[typing.List[CreateApiKeyCompaniesRequestPermissionsItem]]` — Granular permission statements defining which actions this API key can perform. Either permissions or role must be provided. - -
-
- -
-
- -**role:** `typing.Optional[PermissionSystemRoles]` — A system role to inherit permissions from (e.g. owner, admin, moderator). Either role or permissions must be provided. +**id:** `str` — The unique identifier of the token transaction to retrieve.
@@ -12214,8 +12338,8 @@ client.companies.create_api_key(
-## CompanyTokenTransactions -
client.company_token_transactions.list(...) -> ListCompanyTokenTransactionsResponse +## CourseChapters +
client.course_chapters.list(...) -> ListCourseChaptersResponse
@@ -12227,12 +12351,10 @@ client.companies.create_api_key(
-Returns a paginated list of token transactions for a user or company, depending on the authenticated actor, with optional filtering by user and transaction type. +Returns a paginated list of chapters within a course, ordered by position. Required permissions: - - `company_token_transaction:read` - - `member:basic:read` - - `company:basic:read` + - `courses:read`
@@ -12255,11 +12377,10 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.company_token_transactions.list( +client.course_chapters.list( first=42, last=42, - company_id="biz_xxxxxxxxxxxxxx", - user_id="user_xxxxxxxxxxxxx", + course_id="cors_xxxxxxxxxxxxx", ) ``` @@ -12276,7 +12397,7 @@ client.company_token_transactions.list(
-**company_id:** `str` — The unique identifier of the company to list token transactions for. +**course_id:** `str` — The unique identifier of the course to list chapters for.
@@ -12316,22 +12437,6 @@ client.company_token_transactions.list(
-**user_id:** `typing.Optional[str]` — Filter transactions to only those involving this specific user. - -
-
- -
-
- -**transaction_type:** `typing.Optional[CompanyTokenTransactionTypes]` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -12344,7 +12449,7 @@ client.company_token_transactions.list(
-
client.company_token_transactions.create(...) -> CompanyTokenTransaction +
client.course_chapters.create(...) -> CourseChapter
@@ -12356,12 +12461,10 @@ client.company_token_transactions.list(
-Create a token transaction to add, subtract, or transfer tokens for a member within a company. +Create a new chapter within a course to organize lessons into sections. Required permissions: - - `company_token_transaction:create` - - `member:basic:read` - - `company:basic:read` + - `courses:update`
@@ -12378,20 +12481,14 @@ Required permissions: ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -from whop_sdk.company_token_transactions import CreateCompanyTokenTransactionsRequest_Transfer client = Whop( token="", environment=WhopEnvironment.DEFAULT, ) -client.company_token_transactions.create( - request=CreateCompanyTokenTransactionsRequest_Transfer( - amount=6.9, - company_id="biz_xxxxxxxxxxxxxx", - destination_user_id="destination_user_id", - user_id="user_xxxxxxxxxxxxx", - ), +client.course_chapters.create( + course_id="cors_xxxxxxxxxxxxx", ) ``` @@ -12408,7 +12505,15 @@ client.company_token_transactions.create(
-**request:** `CreateCompanyTokenTransactionsRequest` — Parameters for CreateCompanyTokenTransaction +**course_id:** `str` — The unique identifier of the course to create the chapter in (e.g., "course_XXXXX"). + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — The display title of the chapter (e.g., "Module 1: Introduction").
@@ -12428,7 +12533,7 @@ client.company_token_transactions.create(
-
client.company_token_transactions.retrieve(...) -> CompanyTokenTransaction +
client.course_chapters.retrieve(...) -> CourseChapter
@@ -12440,12 +12545,10 @@ client.company_token_transactions.create(
-Retrieves the details of an existing company token transaction. +Retrieves the details of an existing course chapter. Required permissions: - - `company_token_transaction:read` - - `member:basic:read` - - `company:basic:read` + - `courses:read`
@@ -12468,8 +12571,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.company_token_transactions.retrieve( - id="id", +client.course_chapters.retrieve( + id="chap_xxxxxxxxxxxxx", ) ``` @@ -12486,7 +12589,7 @@ client.company_token_transactions.retrieve(
-**id:** `str` — The unique identifier of the token transaction to retrieve. +**id:** `str` — The unique identifier of the chapter to retrieve.
@@ -12506,8 +12609,7 @@ client.company_token_transactions.retrieve(
-## CourseChapters -
client.course_chapters.list(...) -> ListCourseChaptersResponse +
client.course_chapters.delete(...) -> bool
@@ -12519,280 +12621,10 @@ client.company_token_transactions.retrieve(
-Returns a paginated list of chapters within a course, ordered by position. +Permanently delete a chapter and all of its lessons from a course. Required permissions: - - `courses:read` -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.DEFAULT, -) - -client.course_chapters.list( - first=42, - last=42, - course_id="cors_xxxxxxxxxxxxx", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**course_id:** `str` — The unique identifier of the course to list chapters for. - -
-
- -
-
- -**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. - -
-
- -
-
- -**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. - -
-
- -
-
- -**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. - -
-
- -
-
- -**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - - - -
- -
client.course_chapters.create(...) -> CourseChapter -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new chapter within a course to organize lessons into sections. - -Required permissions: - - `courses:update` -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.DEFAULT, -) - -client.course_chapters.create( - course_id="cors_xxxxxxxxxxxxx", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**course_id:** `str` — The unique identifier of the course to create the chapter in (e.g., "course_XXXXX"). - -
-
- -
-
- -**title:** `typing.Optional[str]` — The display title of the chapter (e.g., "Module 1: Introduction"). - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.course_chapters.retrieve(...) -> CourseChapter -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves the details of an existing course chapter. - -Required permissions: - - `courses:read` -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.DEFAULT, -) - -client.course_chapters.retrieve( - id="chap_xxxxxxxxxxxxx", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `str` — The unique identifier of the chapter to retrieve. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.course_chapters.delete(...) -> bool -
-
- -#### 📝 Description - -
-
- -
-
- -Permanently delete a chapter and all of its lessons from a course. - -Required permissions: - - `courses:update` + - `courses:update`
@@ -19223,6 +19055,129 @@ client.fee_markups.delete(
## Files +
client.files.list(...) -> ListFilesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the files with the given IDs, newest first — fetch a batch in one request instead of retrieving each file individually. Only files you created are returned; IDs that do not exist, or that another credential created, are omitted. A request for up to 100 IDs answers in a single page by default; a larger batch pages at up to 100 files per response — follow `page_info` with the same `file_ids` to walk the rest. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.DEFAULT, +) + +client.files.list( + file_ids=[ + "file_xxxxxxxxxxxxx" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**file_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — The files to return, each prefixed `file_`. Repeat the parameter to pass several, up to 250 per request. Batches of up to 100 answer in one page by default; larger batches page at up to 100 per response. + +
+
+ +
+
+ +**order:** `typing.Optional[ListFilesRequestOrder]` — The field to sort by. + +
+
+ +
+
+ +**direction:** `typing.Optional[ListFilesRequestDirection]` — The sort direction. + +
+
+ +
+
+ +**first:** `typing.Optional[int]` — The number of files to return. + +
+
+ +
+
+ +**after:** `typing.Optional[str]` — A cursor; returns files after this position. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — The number of files to return from the end of the range. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — A cursor; returns files before this position. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+
client.files.create(...) -> File
@@ -27493,8 +27448,7 @@ client.payouts.retrieve(
-## People -
client.people.list(...) -> ListPeopleResponse +
client.payouts.cancel(...) -> CancelPayoutsResponse
@@ -27506,7 +27460,7 @@ client.payouts.retrieve(
-Lists the people (visitors and customers) of an account: the identity-linked person profiles aggregated from every pixel, payment, and platform event — identities, purchases and LTV, geo/device profile, traffic sources, and first/last marketing touches. +Cancels a payout that is still in review and returns the funds, fees included, to the balance. A payout can be canceled while its status is `in_review`. A `requested` payout is still being prepared (its funds may be converting) and answers 409 until it reaches review; from `processing` on, the money is on its way and the answer is 409 with error type `not_cancelable`. Canceling a payout that is already canceled succeeds and returns it unchanged.
@@ -27529,13 +27483,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.people.list( - source=[ - "direct" - ], - event_name=[ - "payment.completed" - ], +client.payouts.cancel( + id="id", ) ``` @@ -27552,159 +27501,7 @@ client.people.list(
-**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`. Optional for account API keys; required for credentials that can access multiple accounts. - -
-
- -
-
- -**query:** `typing.Optional[str]` — Search people by name, email, phone, or whop user ID (case-insensitive substring match). - -
-
- -
-
- -**source:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only include people acquired from any of these sources — canonical paths (whop:::, ext::..., referrer:, direct, other), exact or with a trailing :* prefix. The same vocabulary the events / people metrics use. - -
-
- -
-
- -**attribution_model:** `typing.Optional[ListPeopleRequestAttributionModel]` — Attribution model the source filter matches against (defaults to last_touch). - -
-
- -
-
- -**event_name:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only include people who fired any of these events, e.g. payment.completed or page.checkout.view. - -
-
- -
-
- -**custom_event:** `typing.Optional[str]` — Only include people who fired this custom pixel event. - -
-
- -
-
- -**event_from:** `typing.Optional[datetime.datetime]` — With event_to plus an event or source filter, switches to exact-population mode: person ids are resolved and paginated on the events side within this window (the same query the people metric counts), then hydrated per page. - -
-
- -
-
- -**event_to:** `typing.Optional[datetime.datetime]` — The inclusive end of the event window for exact-population mode. - -
-
- -
-
- -**audience_id:** `typing.Optional[str]` — Only include people in this audience. An audience that keeps itself up to date resolves to the People filters that define it, so this always reflects who matches now; uploaded lists and point-in-time snapshots match their recorded members. - -
-
- -
-
- -**user_id:** `typing.Optional[str]` — Only include the person linked to this whop user ID. - -
-
- -
-
- -**email:** `typing.Optional[str]` — Only include the person linked to this email address. - -
-
- -
-
- -**phone:** `typing.Optional[str]` — Only include the person linked to this phone number. - -
-
- -
-
- -**country:** `typing.Optional[str]` — Only include people whose most recent visit came from this ISO 3166-1 alpha-2 country code. - -
-
- -
-
- -**has_purchased:** `typing.Optional[bool]` — true for customers only, false for people who have never purchased. - -
-
- -
-
- -**contactable:** `typing.Optional[bool]` — true for people who have an email address or phone number — the ones an ad platform can match. - -
-
- -
-
- -**first_seen_within_days:** `typing.Optional[int]` — Only include people first seen within this many days, as a rolling window. - -
-
- -
-
- -**last_seen_within_days:** `typing.Optional[int]` — Only include people last seen within this many days, as a rolling window. - -
-
- -
-
- -**first_seen_after:** `typing.Optional[datetime.datetime]` — Only include people first seen at or after this ISO 8601 timestamp. - -
-
- -
-
- -**first_seen_before:** `typing.Optional[datetime.datetime]` — Only include people first seen before this ISO 8601 timestamp. - -
-
- -
-
- -**last_seen_after:** `typing.Optional[datetime.datetime]` — Only include people last seen at or after this ISO 8601 timestamp. +**id:** `str` — Payout ID, prefixed `wdrl_`, or the `cofr_` payout request ID returned by `POST /payouts` — both cancel the same payout.
@@ -27712,39 +27509,7 @@ client.people.list(
-**last_seen_before:** `typing.Optional[datetime.datetime]` — Only include people last seen before this ISO 8601 timestamp. - -
-
- -
-
- -**first:** `typing.Optional[int]` — The number of people to return (default 100, max 100). - -
-
- -
-
- -**after:** `typing.Optional[str]` — A cursor for fetching people after a previous page. - -
-
- -
-
- -**before:** `typing.Optional[str]` — A cursor for fetching people before a later page. - -
-
- -
-
- -**order:** `typing.Optional[ListPeopleRequestOrder]` — Column to sort by. Defaults to last_seen_at. +**account_id:** `typing.Optional[str]` — Owning account ID, prefixed `biz_`. Provide exactly one of `account_id` or `user_id`.
@@ -27752,7 +27517,7 @@ client.people.list(
-**direction:** `typing.Optional[ListPeopleRequestDirection]` — Sort direction. Defaults to desc. +**user_id:** `typing.Optional[str]` — Owning user ID, prefixed `user_`. Provide exactly one of `account_id` or `user_id`.
@@ -27772,7 +27537,8 @@ client.people.list(
-
client.people.retrieve(...) -> RetrievePeopleResponse +## People +
client.people.list(...) -> ListPeopleResponse
@@ -27784,7 +27550,285 @@ client.people.list(
-Retrieves one person for an account. The identifier can be a person ID (prefixed `prsn_`), a user ID (prefixed `user_`), an email address, or a phone number — merged people resolve to the surviving profile. +Lists the people (visitors and customers) of an account: the identity-linked person profiles aggregated from every pixel, payment, and platform event — identities, purchases and LTV, geo/device profile, traffic sources, and first/last marketing touches. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.DEFAULT, +) + +client.people.list( + source=[ + "direct" + ], + event_name=[ + "payment.completed" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`. Optional for account API keys; required for credentials that can access multiple accounts. + +
+
+ +
+
+ +**query:** `typing.Optional[str]` — Search people by name, email, phone, or whop user ID (case-insensitive substring match). + +
+
+ +
+
+ +**source:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only include people acquired from any of these sources — canonical paths (whop:::, ext::..., referrer:, direct, other), exact or with a trailing :* prefix. The same vocabulary the events / people metrics use. + +
+
+ +
+
+ +**attribution_model:** `typing.Optional[ListPeopleRequestAttributionModel]` — Attribution model the source filter matches against (defaults to last_touch). + +
+
+ +
+
+ +**event_name:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only include people who fired any of these events, e.g. payment.completed or page.checkout.view. + +
+
+ +
+
+ +**custom_event:** `typing.Optional[str]` — Only include people who fired this custom pixel event. + +
+
+ +
+
+ +**event_from:** `typing.Optional[datetime.datetime]` — With event_to plus an event or source filter, switches to exact-population mode: person ids are resolved and paginated on the events side within this window (the same query the people metric counts), then hydrated per page. + +
+
+ +
+
+ +**event_to:** `typing.Optional[datetime.datetime]` — The inclusive end of the event window for exact-population mode. + +
+
+ +
+
+ +**audience_id:** `typing.Optional[str]` — Only include people in this audience. An audience that keeps itself up to date resolves to the People filters that define it, so this always reflects who matches now; uploaded lists and point-in-time snapshots match their recorded members. + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` — Only include the person linked to this whop user ID. + +
+
+ +
+
+ +**email:** `typing.Optional[str]` — Only include the person linked to this email address. + +
+
+ +
+
+ +**phone:** `typing.Optional[str]` — Only include the person linked to this phone number. + +
+
+ +
+
+ +**country:** `typing.Optional[str]` — Only include people whose most recent visit came from this ISO 3166-1 alpha-2 country code. + +
+
+ +
+
+ +**has_purchased:** `typing.Optional[bool]` — true for customers only, false for people who have never purchased. + +
+
+ +
+
+ +**contactable:** `typing.Optional[bool]` — true for people who have an email address or phone number — the ones an ad platform can match. + +
+
+ +
+
+ +**first_seen_within_days:** `typing.Optional[int]` — Only include people first seen within this many days, as a rolling window. + +
+
+ +
+
+ +**last_seen_within_days:** `typing.Optional[int]` — Only include people last seen within this many days, as a rolling window. + +
+
+ +
+
+ +**first_seen_after:** `typing.Optional[datetime.datetime]` — Only include people first seen at or after this ISO 8601 timestamp. + +
+
+ +
+
+ +**first_seen_before:** `typing.Optional[datetime.datetime]` — Only include people first seen before this ISO 8601 timestamp. + +
+
+ +
+
+ +**last_seen_after:** `typing.Optional[datetime.datetime]` — Only include people last seen at or after this ISO 8601 timestamp. + +
+
+ +
+
+ +**last_seen_before:** `typing.Optional[datetime.datetime]` — Only include people last seen before this ISO 8601 timestamp. + +
+
+ +
+
+ +**first:** `typing.Optional[int]` — The number of people to return (default 100, max 100). + +
+
+ +
+
+ +**after:** `typing.Optional[str]` — A cursor for fetching people after a previous page. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — A cursor for fetching people before a later page. + +
+
+ +
+
+ +**order:** `typing.Optional[ListPeopleRequestOrder]` — Column to sort by. Defaults to last_seen_at. + +
+
+ +
+
+ +**direction:** `typing.Optional[ListPeopleRequestDirection]` — Sort direction. Defaults to desc. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +
client.people.retrieve(...) -> RetrievePeopleResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves one person for an account. The identifier can be a person ID (prefixed `prsn_`), a user ID (prefixed `user_`), an email address, or a phone number — merged people resolve to the surviving profile.
@@ -35366,611 +35410,10 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.swaps.create( - account_id="biz_xxxxxxxxxxxxxx", - from_token="usd", - to_token="cad", -) - -``` -
-
- - - -#### ⚙️ Parameters - -
-
- -
-
- -**account_id:** `str` — Business or user account ID (biz_* / user_*). - -
-
- -
-
- -**from_token:** `str` — Source token contract address or ticker symbol, such as "USDT". - -
-
- -
-
- -**to_token:** `str` — Destination token contract address or ticker symbol, such as "XAUT". - -
-
- -
-
- -**amount:** `typing.Optional[str]` — Source token amount. Required for crypto swaps. For fiat pairs: the amount of from_token to convert at the mid-market rate; omit (along with to_amount) to repay the full negative to_token balance instead. - -
-
- -
-
- -**from_chain:** `typing.Optional[CreateSwapsRequestFromChain]` — Source chain name or chain ID. Defaults to the source token's chain when omitted. - -
-
- -
-
- -**slippage_bps:** `typing.Optional[int]` — Maximum slippage tolerance in basis points. - -
-
- -
-
- -**to_amount:** `typing.Optional[str]` — Fiat pairs only: sizes a partial repayment of the negative to_token balance, denominated in to_token. Must not exceed the debt. Mutually exclusive with amount. - -
-
- -
-
- -**to_chain:** `typing.Optional[CreateSwapsRequestToChain]` — Destination chain name or chain ID. Defaults to the destination token's chain when omitted. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - - - -
- -
client.swaps.create_quote(...) -> CreateQuoteSwapsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Previews the price of a swap. Fiat pairs quote the in-ledger mid-market conversion — the same rate creating the swap fills at. No funds move and nothing is saved. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.DEFAULT, -) - -client.swaps.create_quote( - amount="100", - from_token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - to_token="0x1b64b9025eebb9a6239575df9ea4b9ac46d4d193", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**amount:** `str` — Source token amount. - -
-
- -
-
- -**from_token:** `str` — Source token contract address or ticker symbol, such as "USDT". - -
-
- -
-
- -**to_token:** `str` — Destination token contract address or ticker symbol, such as "XAUT". - -
-
- -
-
- -**from_address:** `typing.Optional[str]` — Source wallet address used for the quote. - -
-
- -
-
- -**from_chain:** `typing.Optional[CreateQuoteSwapsRequestFromChain]` — Source chain name or chain ID. Defaults to the source token's chain when omitted. - -
-
- -
-
- -**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — Metadata to include with the quote response. - -
-
- -
-
- -**slippage_bps:** `typing.Optional[int]` — Maximum slippage tolerance in basis points. - -
-
- -
-
- -**to_address:** `typing.Optional[str]` — Destination wallet address used for the quote. - -
-
- -
-
- -**to_chain:** `typing.Optional[CreateQuoteSwapsRequestToChain]` — Destination chain name or chain ID. Defaults to the destination token's chain when omitted. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.swaps.retrieve(...) -> RetrieveSwapsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a single swap and its status. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.DEFAULT, -) - -client.swaps.retrieve( - id="id", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `str` — Swap ID returned from POST /swaps. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -## Team Members -
client.team_members.list(...) -> ListTeamMembersResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Lists an account's team members, including pending invites (`status: "pending"`, `ausri_` ids; `user` is `null` for invites sent to an email with no Whop account yet). For accepted members, `email` requires the `company:authorized_user:email:read` scope and is `null` otherwise. Listing `role=workforce` is also allowed with the `bounty:create` scope. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.DEFAULT, -) - -client.team_members.list( - account_id="account_id", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**account_id:** `str` — Account ID, prefixed `biz_`. - -
-
- -
-
- -**status:** `typing.Optional[ListTeamMembersRequestStatus]` — Only return members with this status: `joined` (accepted members) or `pending` (pending invites). Both are returned by default. - -
-
- -
-
- -**user_id:** `typing.Optional[str]` — Only return the membership for this user ID, prefixed `user_`. - -
-
- -
-
- -**role:** `typing.Optional[ListTeamMembersRequestRole]` — Only return members with this role. `custom` matches members on a dashboard-managed custom role. - -
-
- -
-
- -**created_before:** `typing.Optional[str]` — Only return members added before this ISO 8601 timestamp. - -
-
- -
-
- -**created_after:** `typing.Optional[str]` — Only return members added after this ISO 8601 timestamp. - -
-
- -
-
- -**order:** `typing.Optional[ListTeamMembersRequestOrder]` — Field used to sort members. - -
-
- -
-
- -**direction:** `typing.Optional[ListTeamMembersRequestDirection]` — Sort direction. Defaults to `desc`. - -
-
- -
-
- -**first:** `typing.Optional[int]` — Number of members to return. Defaults to 20; maximum 100. - -
-
- -
-
- -**after:** `typing.Optional[str]` — Cursor for the next page of members. - -
-
- -
-
- -**last:** `typing.Optional[int]` — Number of members to return from the end of the window. - -
-
- -
-
- -**before:** `typing.Optional[str]` — Cursor to paginate backwards from. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.team_members.create(...) -> TeamMember -
-
- -#### 📝 Description - -
-
- -
-
- -Adds a member to an account's team with a system role. Identify them by exactly one of `user_id` or `email`. If the person has not yet accepted — or the email does not belong to a Whop account yet — an invitation is sent instead and the response is `202` with `{ "object": "team_member_invite", "invitation_sent": true }`. If they already have a pending invite, the request fails with a `400`. Custom roles cannot be granted via the API. Granting the `workforce` role is also allowed with the `bounty:create` scope. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.DEFAULT, -) - -client.team_members.create( - account_id="biz_xxxxxxxxxxxxxx", - role="owner", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**account_id:** `str` — Account ID, prefixed `biz_`. - -
-
- -
-
- -**role:** `CreateTeamMembersRequestRole` — The system role to grant. - -
-
- -
-
- -**email:** `typing.Optional[str]` — Email address to invite. Mutually exclusive with `user_id`. If the email already belongs to a Whop account it is treated the same as passing that account's `user_id`; otherwise a pending invite is created for the email. - -
-
- -
-
- -**user_id:** `typing.Optional[str]` — The user to add to the team, prefixed `user_`. Mutually exclusive with `email`. - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -
client.team_members.retrieve(...) -> TeamMember -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a team member by ID. `email` requires the `company:authorized_user:email:read` scope and is `null` otherwise. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.DEFAULT, -) - -client.team_members.retrieve( - id="id", +client.swaps.create( + account_id="biz_xxxxxxxxxxxxxx", + from_token="usd", + to_token="cad", ) ``` @@ -35987,7 +35430,7 @@ client.team_members.retrieve(
-**id:** `str` — Team member ID — `ausr_` for accepted members, `ausri_` for pending invites. +**account_id:** `str` — Business or user account ID (biz_* / user_*).
@@ -35995,72 +35438,55 @@ client.team_members.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**from_token:** `str` — Source token contract address or ticker symbol, such as "USDT".
-
-
+
+
+**to_token:** `str` — Destination token contract address or ticker symbol, such as "XAUT". +
-
-
client.team_members.delete(...) -> DeleteTeamMembersResponse
-#### 📝 Description - -
-
+**amount:** `typing.Optional[str]` — Source token amount. Required for crypto swaps. For fiat pairs: the amount of from_token to convert at the mid-market rate; omit (along with to_amount) to repay the full negative to_token balance instead. + +
+
-Removes a team member from the account, or revokes a pending invite when given an `ausri_` ID. A user session may delete its own membership to leave the team without the delete scope. Removing a member on the `workforce` role is also allowed with the `bounty:create` scope. The account owner cannot be removed. -
-
+**from_chain:** `typing.Optional[CreateSwapsRequestFromChain]` — Source chain name or chain ID. Defaults to the source token's chain when omitted. +
-#### 🔌 Usage -
-
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.DEFAULT, -) - -client.team_members.delete( - id="id", -) - -``` -
-
+**slippage_bps:** `typing.Optional[int]` — Maximum slippage tolerance in basis points. +
-#### ⚙️ Parameters -
+**to_amount:** `typing.Optional[str]` — Fiat pairs only: sizes a partial repayment of the negative to_token balance, denominated in to_token. Must not exceed the debt. Mutually exclusive with amount. + +
+
+
-**id:** `str` — Team member ID — `ausr_` for accepted members, `ausri_` for pending invites. +**to_chain:** `typing.Optional[CreateSwapsRequestToChain]` — Destination chain name or chain ID. Defaults to the destination token's chain when omitted.
@@ -36080,7 +35506,7 @@ client.team_members.delete(
-
client.team_members.update(...) -> TeamMember +
client.swaps.create_quote(...) -> CreateQuoteSwapsResponse
@@ -36092,7 +35518,7 @@ client.team_members.delete(
-Changes a team member's system role. Requires a user session — account API keys cannot change member roles. The account owner's role cannot be changed, and you cannot change your own role. +Previews the price of a swap. Fiat pairs quote the in-ledger mid-market conversion — the same rate creating the swap fills at. No funds move and nothing is saved.
@@ -36115,9 +35541,10 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.team_members.update( - id="id", - role="owner", +client.swaps.create_quote( + amount="100", + from_token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + to_token="0x1b64b9025eebb9a6239575df9ea4b9ac46d4d193", ) ``` @@ -36134,7 +35561,7 @@ client.team_members.update(
-**id:** `str` — Team member ID — `ausr_` for accepted members, `ausri_` for pending invites. +**amount:** `str` — Source token amount.
@@ -36142,7 +35569,63 @@ client.team_members.update(
-**role:** `UpdateTeamMembersRequestRole` — The system role to grant. +**from_token:** `str` — Source token contract address or ticker symbol, such as "USDT". + +
+
+ +
+
+ +**to_token:** `str` — Destination token contract address or ticker symbol, such as "XAUT". + +
+
+ +
+
+ +**from_address:** `typing.Optional[str]` — Source wallet address used for the quote. + +
+
+ +
+
+ +**from_chain:** `typing.Optional[CreateQuoteSwapsRequestFromChain]` — Source chain name or chain ID. Defaults to the source token's chain when omitted. + +
+
+ +
+
+ +**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — Metadata to include with the quote response. + +
+
+ +
+
+ +**slippage_bps:** `typing.Optional[int]` — Maximum slippage tolerance in basis points. + +
+
+ +
+
+ +**to_address:** `typing.Optional[str]` — Destination wallet address used for the quote. + +
+
+ +
+
+ +**to_chain:** `typing.Optional[CreateQuoteSwapsRequestToChain]` — Destination chain name or chain ID. Defaults to the destination token's chain when omitted.
@@ -36162,8 +35645,7 @@ client.team_members.update(
-## Topups -
client.topups.create(...) -> Topup +
client.swaps.retrieve(...) -> RetrieveSwapsResponse
@@ -36175,10 +35657,7 @@ client.team_members.update(
-Add funds to a company's platform balance by charging a stored payment method. Top-ups have no fees or taxes and do not count as revenue. - -Required permissions: - - `payment:charge` +Retrieves a single swap and its status.
@@ -36201,11 +35680,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.topups.create( - amount=6.9, - company_id="biz_xxxxxxxxxxxxxx", - currency="usd", - payment_method_id="pmt_xxxxxxxxxxxxxx", +client.swaps.retrieve( + id="id", ) ``` @@ -36222,31 +35698,7 @@ client.topups.create(
-**amount:** `float` — The amount to add to the balance in the specified currency. For example, 50.00 for $50.00 USD. - -
-
- -
-
- -**company_id:** `str` — The unique identifier of the company to add funds to, starting with 'biz_'. - -
-
- -
-
- -**currency:** `Currencies` — The currency for the top-up amount, such as 'usd'. - -
-
- -
-
- -**payment_method_id:** `str` — The unique identifier of the stored payment method to charge for the top-up. +**id:** `str` — Swap ID returned from POST /swaps.
@@ -36266,8 +35718,8 @@ client.topups.create(
-## Transfers -
client.transfers.list(...) -> ListTransfersResponse +## Team Members +
client.team_members.list(...) -> ListTeamMembersResponse
@@ -36279,7 +35731,7 @@ client.topups.create(
-Lists an account's transfers. +Lists an account's team members, including pending invites (`status: "pending"`, `ausri_` ids; `user` is `null` for invites sent to an email with no Whop account yet). For accepted members, `email` requires the `company:authorized_user:email:read` scope and is `null` otherwise. Listing `role=workforce` is also allowed with the `bounty:create` scope.
@@ -36302,7 +35754,9 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.transfers.list() +client.team_members.list( + account_id="account_id", +) ``` @@ -36318,7 +35772,7 @@ client.transfers.list()
-**origin_id:** `typing.Optional[str]` — Filter to transfers sent from this account. Provide this or destination_id. +**account_id:** `str` — Account ID, prefixed `biz_`.
@@ -36326,7 +35780,7 @@ client.transfers.list()
-**destination_id:** `typing.Optional[str]` — Filter to transfers received by this account. Provide this or origin_id. +**status:** `typing.Optional[ListTeamMembersRequestStatus]` — Only return members with this status: `joined` (accepted members) or `pending` (pending invites). Both are returned by default.
@@ -36334,7 +35788,7 @@ client.transfers.list()
-**order:** `typing.Optional[ListTransfersRequestOrder]` — Sort column. Defaults to created_at. +**user_id:** `typing.Optional[str]` — Only return the membership for this user ID, prefixed `user_`.
@@ -36342,7 +35796,7 @@ client.transfers.list()
-**direction:** `typing.Optional[ListTransfersRequestDirection]` — Sort direction. Defaults to desc. +**role:** `typing.Optional[ListTeamMembersRequestRole]` — Only return members with this role. `custom` matches members on a dashboard-managed custom role.
@@ -36350,7 +35804,7 @@ client.transfers.list()
-**created_before:** `typing.Optional[str]` — Only transfers created strictly before this ISO 8601 timestamp. +**created_before:** `typing.Optional[str]` — Only return members added before this ISO 8601 timestamp.
@@ -36358,7 +35812,7 @@ client.transfers.list()
-**created_after:** `typing.Optional[str]` — Only transfers created strictly after this ISO 8601 timestamp. +**created_after:** `typing.Optional[str]` — Only return members added after this ISO 8601 timestamp.
@@ -36366,7 +35820,7 @@ client.transfers.list()
-**first:** `typing.Optional[int]` — Number of transfers to return from the start of the window. +**order:** `typing.Optional[ListTeamMembersRequestOrder]` — Field used to sort members.
@@ -36374,7 +35828,7 @@ client.transfers.list()
-**after:** `typing.Optional[str]` — Cursor to fetch the page after (from page_info.end_cursor). +**direction:** `typing.Optional[ListTeamMembersRequestDirection]` — Sort direction. Defaults to `desc`.
@@ -36382,7 +35836,7 @@ client.transfers.list()
-**last:** `typing.Optional[int]` — Number of transfers to return from the end of the window. +**first:** `typing.Optional[int]` — Number of members to return. Defaults to 20; maximum 100.
@@ -36390,7 +35844,23 @@ client.transfers.list()
-**before:** `typing.Optional[str]` — Cursor to fetch the page before (from page_info.start_cursor). +**after:** `typing.Optional[str]` — Cursor for the next page of members. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — Number of members to return from the end of the window. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — Cursor to paginate backwards from.
@@ -36410,7 +35880,7 @@ client.transfers.list()
-
client.transfers.create(...) -> CreateTransfersResponse +
client.team_members.create(...) -> TeamMember
@@ -36422,7 +35892,7 @@ client.transfers.list()
-Moves money between accounts, or into a claim link anyone with the URL can redeem. +Adds a member to an account's team with a system role. Identify them by exactly one of `user_id` or `email`. If the person has not yet accepted — or the email does not belong to a Whop account yet — an invitation is sent instead and the response is `202` with `{ "object": "team_member_invite", "invitation_sent": true }`. If they already have a pending invite, the request fails with a `400`. Custom roles cannot be granted via the API. Granting the `workforce` role is also allowed with the `bounty:create` scope.
@@ -36445,9 +35915,9 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.transfers.create( - amount=25, - origin_id="biz_xxxxxxxxxxxxxx", +client.team_members.create( + account_id="biz_xxxxxxxxxxxxxx", + role="owner", ) ``` @@ -36464,7 +35934,7 @@ client.transfers.create(
-**amount:** `float` — The amount to move, in the transfer currency. For example 25.00. +**account_id:** `str` — Account ID, prefixed `biz_`.
@@ -36472,7 +35942,7 @@ client.transfers.create(
-**origin_id:** `str` — The account sending the funds. A user ID (user_xxx), account ID (biz_xxx), or ledger account ID (ldgr_xxx). +**role:** `CreateTeamMembersRequestRole` — The system role to grant.
@@ -36480,7 +35950,7 @@ client.transfers.create(
-**currency:** `typing.Optional[str]` — Currency, such as `usd`. Required for ledger transfers. +**email:** `typing.Optional[str]` — Email address to invite. Mutually exclusive with `user_id`. If the email already belongs to a Whop account it is treated the same as passing that account's `user_id`; otherwise a pending invite is created for the email.
@@ -36488,7 +35958,7 @@ client.transfers.create(
-**destination_id:** `typing.Optional[str]` — The recipient. Required for ledger and wallet_send (a user_/biz_/ldgr_ ID, or — for sends — an email). Omit for claim_link. +**user_id:** `typing.Optional[str]` — The user to add to the team, prefixed `user_`. Mutually exclusive with `email`.
@@ -36496,47 +35966,72 @@ client.transfers.create(
-**expires_at:** `typing.Optional[datetime.datetime]` — claim_link only. Link expiry as an ISO 8601 timestamp. Defaults to 24 hours from creation. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**idempotence_key:** `typing.Optional[str]` — Ledger transfers and wallet sends. A unique key that makes retries safe. Retrying with the same key returns the original transfer, or attaches to the original wallet send, instead of moving money twice. -
+
+
client.team_members.retrieve(...) -> TeamMember
-**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — Ledger transfers only. Custom key-value pairs attached to the transfer. Max 50 keys, 100 chars per key, 500 chars per string value. - -
-
+#### 📝 Description
-**notes:** `typing.Optional[str]` — Ledger transfers only. A short note describing the transfer. - +
+
+ +Retrieves a team member by ID. `email` requires the `company:authorized_user:email:read` scope and is `null` otherwise. +
+
+#### 🔌 Usage +
-**redeemable_count:** `typing.Optional[int]` — claim_link only. How many different users can claim the link. Defaults to 1. - +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.DEFAULT, +) + +client.team_members.retrieve( + id="id", +) + +```
+
+
+ +#### ⚙️ Parameters
-**type:** `typing.Optional[CreateTransfersRequestType]` — The kind of money movement, which decides what comes back. Defaults to ledger. `ledger` moves credit between two Whop balances and returns a `transfer`; `wallet_send` sends USDT from the origin account's Ethereum wallet and returns a `send`; `claim_link` funds a shareable link anyone with the URL can redeem and returns a `claim_link`. A `ledger` transfer from a stablecoin-rails account settles on-chain when covered, and still returns a `transfer`. +
+
+ +**id:** `str` — Team member ID — `ausr_` for accepted members, `ausri_` for pending invites.
@@ -36556,7 +36051,7 @@ client.transfers.create(
-
client.transfers.list_recipients(...) -> ListRecipientsTransfersResponse +
client.team_members.delete(...) -> DeleteTeamMembersResponse
@@ -36568,7 +36063,7 @@ client.transfers.create(
-Lists the people and accounts you can send money to. +Removes a team member from the account, or revokes a pending invite when given an `ausri_` ID. A user session may delete its own membership to leave the team without the delete scope. Removing a member on the `workforce` role is also allowed with the `bounty:create` scope. The account owner cannot be removed.
@@ -36591,8 +36086,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.transfers.list_recipients( - origin_id="origin_id", +client.team_members.delete( + id="id", ) ``` @@ -36609,31 +36104,7 @@ client.transfers.list_recipients(
-**origin_id:** `str` — The account sending the money: a company account ID (`biz_`), or a user ID (`user_`) for that user's own personal balance. - -
-
- -
-
- -**query:** `typing.Optional[str]` — Search anyone on Whop by name or username, plus your own accounts by name or ID. Omit it to get the team around the balance, the people you follow, and your own accounts. The list is the same whether the balance belongs to a company or to you. Searching from a `biz_` origin additionally requires the member:basic:read scope. A credential scoped to a single company is the exception to the search itself: it only ever sees that company's own people. Complete email addresses return no matches. - -
-
- -
-
- -**first:** `typing.Optional[int]` — Number of recipients per page. Search queries preserve the dashboard's 20-result maximum. - -
-
- -
-
- -**after:** `typing.Optional[str]` — Cursor to fetch the page after (from page_info.end_cursor). +**id:** `str` — Team member ID — `ausr_` for accepted members, `ausri_` for pending invites.
@@ -36653,7 +36124,7 @@ client.transfers.list_recipients(
-
client.transfers.retrieve(...) -> RetrieveTransfersResponse +
client.team_members.update(...) -> TeamMember
@@ -36665,7 +36136,7 @@ client.transfers.list_recipients(
-Retrieves a single transfer. +Changes a team member's system role. Requires a user session — account API keys cannot change member roles. The account owner's role cannot be changed, and you cannot change your own role.
@@ -36688,8 +36159,9 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.transfers.retrieve( +client.team_members.update( id="id", + role="owner", ) ``` @@ -36706,7 +36178,15 @@ client.transfers.retrieve(
-**id:** `str` — The transfer ID. +**id:** `str` — Team member ID — `ausr_` for accepted members, `ausri_` for pending invites. + +
+
+ +
+
+ +**role:** `UpdateTeamMembersRequestRole` — The system role to grant.
@@ -36726,8 +36206,8 @@ client.transfers.retrieve(
-## Users -
client.users.list(...) -> ListUsersResponse +## Topups +
client.topups.create(...) -> Topup
@@ -36739,7 +36219,10 @@ client.transfers.retrieve(
-Search for users by name or username, ranked by social proximity to the authenticated user. Returns the user's most recently followed users when no query is given. +Add funds to a company's platform balance by charging a stored payment method. Top-ups have no fees or taxes and do not count as revenue. + +Required permissions: + - `payment:charge`
@@ -36762,7 +36245,12 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.users.list() +client.topups.create( + amount=6.9, + company_id="biz_xxxxxxxxxxxxxx", + currency="usd", + payment_method_id="pmt_xxxxxxxxxxxxxx", +) ``` @@ -36778,15 +36266,7 @@ client.users.list()
-**query:** `typing.Optional[str]` — A search term to filter users by name or username. - -
-
- -
-
- -**first:** `typing.Optional[int]` — The number of users to return (max 50). +**amount:** `float` — The amount to add to the balance in the specified currency. For example, 50.00 for $50.00 USD.
@@ -36794,7 +36274,7 @@ client.users.list()
-**after:** `typing.Optional[str]` — A cursor; returns users after this position. +**company_id:** `str` — The unique identifier of the company to add funds to, starting with 'biz_'.
@@ -36802,7 +36282,7 @@ client.users.list()
-**last:** `typing.Optional[int]` — The number of users to return from the end of the range. +**currency:** `Currencies` — The currency for the top-up amount, such as 'usd'.
@@ -36810,7 +36290,7 @@ client.users.list()
-**before:** `typing.Optional[str]` — A cursor; returns users before this position. +**payment_method_id:** `str` — The unique identifier of the stored payment method to charge for the top-up.
@@ -36830,7 +36310,8 @@ client.users.list()
-
client.users.me(...) -> User +## Transfers +
client.transfers.list(...) -> ListTransfersResponse
@@ -36842,7 +36323,7 @@ client.users.list()
-Retrieves the authenticated user — the self view of the user object. Same shape as `GET /users/{id}`, with the self-only fields populated: `email` (email-read scope), `staff` (Whop staff only, staff-read scope), `balance` and `earnings_usd` (balance-read scope), the opt-in `balance_history`, and every linked social account. +Lists an account's transfers.
@@ -36865,7 +36346,7 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.users.me() +client.transfers.list() ``` @@ -36881,7 +36362,7 @@ client.users.me()
-**account_id:** `typing.Optional[str]` — When set, returns your account-specific profile overrides for this account. +**origin_id:** `typing.Optional[str]` — Filter to transfers sent from this account. Provide this or destination_id.
@@ -36889,7 +36370,7 @@ client.users.me()
-**include_balance_history:** `typing.Optional[bool]` — Also compute your balance history (opt-in; runs a heavier query). Ignored for callers without balance-read scope. +**destination_id:** `typing.Optional[str]` — Filter to transfers received by this account. Provide this or origin_id.
@@ -36897,7 +36378,7 @@ client.users.me()
-**from:** `typing.Optional[str]` — Balance-history window start, ISO 8601 date or datetime. Defaults to 30 days ago. Only used with `include_balance_history`. +**order:** `typing.Optional[ListTransfersRequestOrder]` — Sort column. Defaults to created_at.
@@ -36905,7 +36386,7 @@ client.users.me()
-**to:** `typing.Optional[str]` — Balance-history window end, ISO 8601 date or datetime. Defaults to now. Only used with `include_balance_history`. +**direction:** `typing.Optional[ListTransfersRequestDirection]` — Sort direction. Defaults to desc.
@@ -36913,7 +36394,7 @@ client.users.me()
-**interval:** `typing.Optional[MeUsersRequestInterval]` — Balance-history point granularity. Defaults to `day`. Only used with `include_balance_history`. +**created_before:** `typing.Optional[str]` — Only transfers created strictly before this ISO 8601 timestamp.
@@ -36921,7 +36402,39 @@ client.users.me()
-**time_zone:** `typing.Optional[str]` — IANA time zone the balance-history points are bucketed in. Defaults to `UTC`. Only used with `include_balance_history`. +**created_after:** `typing.Optional[str]` — Only transfers created strictly after this ISO 8601 timestamp. + +
+
+ +
+
+ +**first:** `typing.Optional[int]` — Number of transfers to return from the start of the window. + +
+
+ +
+
+ +**after:** `typing.Optional[str]` — Cursor to fetch the page after (from page_info.end_cursor). + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — Number of transfers to return from the end of the window. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — Cursor to fetch the page before (from page_info.start_cursor).
@@ -36941,7 +36454,7 @@ client.users.me()
-
client.users.update_me(...) -> User +
client.transfers.create(...) -> CreateTransfersResponse
@@ -36953,7 +36466,7 @@ client.users.me()
-Updates the authenticated user's global profile, or their profile override for an account when account_id is given. Not available to API keys. +Moves money between accounts, or into a claim link anyone with the URL can redeem.
@@ -36976,7 +36489,10 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.users.update_me() +client.transfers.create( + amount=25, + origin_id="biz_xxxxxxxxxxxxxx", +) ``` @@ -36992,7 +36508,7 @@ client.users.update_me()
-**account_id:** `typing.Optional[str]` — When set, updates the authenticated user's profile override for this account instead of their global profile. +**amount:** `float` — The amount to move, in the transfer currency. For example 25.00.
@@ -37000,7 +36516,7 @@ client.users.update_me()
-**banner:** `typing.Optional[UpdateMeUsersRequestBanner]` +**origin_id:** `str` — The account sending the funds. A user ID (user_xxx), account ID (biz_xxx), or ledger account ID (ldgr_xxx).
@@ -37008,7 +36524,7 @@ client.users.update_me()
-**bio:** `typing.Optional[str]` +**currency:** `typing.Optional[str]` — Currency, such as `usd`. Required for ledger transfers.
@@ -37016,7 +36532,7 @@ client.users.update_me()
-**name:** `typing.Optional[str]` +**destination_id:** `typing.Optional[str]` — The recipient. Required for ledger and wallet_send (a user_/biz_/ldgr_ ID, or — for sends — an email). Omit for claim_link.
@@ -37024,7 +36540,7 @@ client.users.update_me()
-**profile_picture:** `typing.Optional[UpdateMeUsersRequestProfilePicture]` +**expires_at:** `typing.Optional[datetime.datetime]` — claim_link only. Link expiry as an ISO 8601 timestamp. Defaults to 24 hours from creation.
@@ -37032,7 +36548,39 @@ client.users.update_me()
-**username:** `typing.Optional[str]` +**idempotence_key:** `typing.Optional[str]` — Ledger transfers and wallet sends. A unique key that makes retries safe. Retrying with the same key returns the original transfer, or attaches to the original wallet send, instead of moving money twice. + +
+
+ +
+
+ +**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — Ledger transfers only. Custom key-value pairs attached to the transfer. Max 50 keys, 100 chars per key, 500 chars per string value. + +
+
+ +
+
+ +**notes:** `typing.Optional[str]` — Ledger transfers only. A short note describing the transfer. + +
+
+ +
+
+ +**redeemable_count:** `typing.Optional[int]` — claim_link only. How many different users can claim the link. Defaults to 1. + +
+
+ +
+
+ +**type:** `typing.Optional[CreateTransfersRequestType]` — The kind of money movement, which decides what comes back. Defaults to ledger. `ledger` moves credit between two Whop balances and returns a `transfer`; `wallet_send` sends USDT from the origin account's Ethereum wallet and returns a `send`; `claim_link` funds a shareable link anyone with the URL can redeem and returns a `claim_link`. A `ledger` transfer from a stablecoin-rails account settles on-chain when covered, and still returns a `transfer`.
@@ -37052,7 +36600,7 @@ client.users.update_me()
-
client.users.retrieve(...) -> User +
client.transfers.list_recipients(...) -> ListRecipientsTransfersResponse
@@ -37064,7 +36612,7 @@ client.users.update_me()
-Retrieves a user by `user_` tag or username, or the authenticated user with the reserved id `me`. Profiles include linked social accounts — reading your own profile returns every linked account, other profiles only what is public on Whop (the primary Discord and the X account). The self-only fields are populated only when the id is `me`: `email` (email-read scope), `staff` (Whop staff only, staff-read scope), `balance` and `earnings_usd` (balance-read scope), and the opt-in `balance_history`. They are always `null` when addressing a user by tag or username. +Lists the people and accounts you can send money to.
@@ -37087,8 +36635,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.users.retrieve( - id="id", +client.transfers.list_recipients( + origin_id="origin_id", ) ``` @@ -37105,7 +36653,7 @@ client.users.retrieve(
-**id:** `str` — User ID (prefixed `user_`), username, or `me` for the authenticated user. +**origin_id:** `str` — The account sending the money: a company account ID (`biz_`), or a user ID (`user_`) for that user's own personal balance.
@@ -37113,7 +36661,7 @@ client.users.retrieve(
-**account_id:** `typing.Optional[str]` — When set, returns the user's account-specific profile overrides for this account. +**query:** `typing.Optional[str]` — Search anyone on Whop by name or username, plus your own accounts by name or ID. Omit it to get the team around the balance, the people you follow, and your own accounts. The list is the same whether the balance belongs to a company or to you. Searching from a `biz_` origin additionally requires the member:basic:read scope. A credential scoped to a single company is the exception to the search itself: it only ever sees that company's own people. Complete email addresses return no matches.
@@ -37121,7 +36669,7 @@ client.users.retrieve(
-**include_balance_history:** `typing.Optional[bool]` — Also compute your balance history (opt-in; runs a heavier query). Only applies when the id is `me`; ignored for callers without balance-read scope. +**first:** `typing.Optional[int]` — Number of recipients per page. Search queries preserve the dashboard's 20-result maximum.
@@ -37129,7 +36677,7 @@ client.users.retrieve(
-**from:** `typing.Optional[str]` — Balance-history window start, ISO 8601 date or datetime. Defaults to 30 days ago. Only used with `include_balance_history`. +**after:** `typing.Optional[str]` — Cursor to fetch the page after (from page_info.end_cursor).
@@ -37137,23 +36685,72 @@ client.users.retrieve(
-**to:** `typing.Optional[str]` — Balance-history window end, ISO 8601 date or datetime. Defaults to now. Only used with `include_balance_history`. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + +
+ +
client.transfers.retrieve(...) -> RetrieveTransfersResponse
-**interval:** `typing.Optional[RetrieveUsersRequestInterval]` — Balance-history point granularity. Defaults to `day`. Only used with `include_balance_history`. - +#### 📝 Description + +
+
+ +
+
+ +Retrieves a single transfer. +
+
+#### 🔌 Usage +
-**time_zone:** `typing.Optional[str]` — IANA time zone the balance-history points are bucketed in. Defaults to `UTC`. Only used with `include_balance_history`. +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.DEFAULT, +) + +client.transfers.retrieve( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The transfer ID.
@@ -37173,7 +36770,8 @@ client.users.retrieve(
-
client.users.update(...) -> User +## Users +
client.users.list(...) -> ListUsersResponse
@@ -37185,7 +36783,7 @@ client.users.retrieve(
-Updates a user, addressed by `user_` tag, username, or the reserved id `me` for the authenticated user. A user token updates their own global profile; an API key updates the user's account-specific profile override (account_id required). +Search for users by name or username, ranked by social proximity to the authenticated user. Returns the user's most recently followed users when no query is given.
@@ -37208,9 +36806,7 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.users.update( - id="id", -) +client.users.list() ``` @@ -37226,23 +36822,7 @@ client.users.update(
-**id:** `str` — User ID (prefixed `user_`), username, or `me` for the authenticated user. - -
-
- -
-
- -**account_id:** `typing.Optional[str]` — The account whose profile override to update. Required for API key callers. - -
-
- -
-
- -**banner:** `typing.Optional[UpdateUsersRequestBanner]` +**query:** `typing.Optional[str]` — A search term to filter users by name or username.
@@ -37250,7 +36830,7 @@ client.users.update(
-**bio:** `typing.Optional[str]` +**first:** `typing.Optional[int]` — The number of users to return (max 50).
@@ -37258,7 +36838,7 @@ client.users.update(
-**name:** `typing.Optional[str]` +**after:** `typing.Optional[str]` — A cursor; returns users after this position.
@@ -37266,7 +36846,7 @@ client.users.update(
-**profile_picture:** `typing.Optional[UpdateUsersRequestProfilePicture]` +**last:** `typing.Optional[int]` — The number of users to return from the end of the range.
@@ -37274,7 +36854,7 @@ client.users.update(
-**username:** `typing.Optional[str]` +**before:** `typing.Optional[str]` — A cursor; returns users before this position.
@@ -37294,7 +36874,7 @@ client.users.update(
-
client.users.check_access(...) -> CheckAccessUsersResponse +
client.users.me(...) -> User
@@ -37306,7 +36886,7 @@ client.users.update(
-Checks whether a user has access to an account, product, or experience the caller can reach. +Retrieves the authenticated user — the self view of the user object. Same shape as `GET /users/{id}`, with the self-only fields populated: `email` (email-read scope), `staff` (Whop staff only, staff-read scope), `balance` and `earnings_usd` (balance-read scope), the opt-in `balance_history`, and every linked social account.
@@ -37329,10 +36909,7 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.users.check_access( - id="id", - resource_id="resource_id", -) +client.users.me() ``` @@ -37348,7 +36925,7 @@ client.users.check_access(
-**id:** `str` — The user_ tag or username to check access for. +**account_id:** `typing.Optional[str]` — When set, returns your account-specific profile overrides for this account.
@@ -37356,7 +36933,39 @@ client.users.check_access(
-**resource_id:** `str` — An account (biz_), product (prod_), or experience (exp_) ID. +**include_balance_history:** `typing.Optional[bool]` — Also compute your balance history (opt-in; runs a heavier query). Ignored for callers without balance-read scope. + +
+
+ +
+
+ +**from:** `typing.Optional[str]` — Balance-history window start, ISO 8601 date or datetime. Defaults to 30 days ago. Only used with `include_balance_history`. + +
+
+ +
+
+ +**to:** `typing.Optional[str]` — Balance-history window end, ISO 8601 date or datetime. Defaults to now. Only used with `include_balance_history`. + +
+
+ +
+
+ +**interval:** `typing.Optional[MeUsersRequestInterval]` — Balance-history point granularity. Defaults to `day`. Only used with `include_balance_history`. + +
+
+ +
+
+ +**time_zone:** `typing.Optional[str]` — IANA time zone the balance-history points are bucketed in. Defaults to `UTC`. Only used with `include_balance_history`.
@@ -37376,7 +36985,7 @@ client.users.check_access(
-
client.users.recommend_actions(...) -> RecommendActionsUsersResponse +
client.users.update_me(...) -> User
@@ -37388,7 +36997,7 @@ client.users.check_access(
-Lists the recommended actions computed for the user: personal suggestions (e.g. start a business or become an affiliate) pooled with the highest-impact actions across the accounts the user owns. Business actions are tagged with their `account_id`/`account_name`; personal actions leave those `null`. Self-only: `id` must be `me` or the authenticated user's own tag/username. +Updates the authenticated user's global profile, or their profile override for an account when account_id is given. Not available to API keys.
@@ -37411,9 +37020,7 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.users.recommend_actions( - id="id", -) +client.users.update_me() ``` @@ -37429,7 +37036,47 @@ client.users.recommend_actions(
-**id:** `str` — `me`, or the authenticated user's own `user_` tag or username. +**account_id:** `typing.Optional[str]` — When set, updates the authenticated user's profile override for this account instead of their global profile. + +
+
+ +
+
+ +**banner:** `typing.Optional[UpdateMeUsersRequestBanner]` + +
+
+ +
+
+ +**bio:** `typing.Optional[str]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**profile_picture:** `typing.Optional[UpdateMeUsersRequestProfilePicture]` + +
+
+ +
+
+ +**username:** `typing.Optional[str]`
@@ -37449,8 +37096,7 @@ client.users.recommend_actions(
-## Verifications -
client.verifications.list(...) -> ListVerificationsResponse +
client.users.retrieve(...) -> User
@@ -37462,7 +37108,7 @@ client.users.recommend_actions(
-Returns verifications for an account, including their status and any required actions. +Retrieves a user by `user_` tag or username, or the authenticated user with the reserved id `me`. Profiles include linked social accounts — reading your own profile returns every linked account, other profiles only what is public on Whop (the primary Discord and the X account). The self-only fields are populated only when the id is `me`: `email` (email-read scope), `staff` (Whop staff only, staff-read scope), `balance` and `earnings_usd` (balance-read scope), and the opt-in `balance_history`. They are always `null` when addressing a user by tag or username.
@@ -37485,8 +37131,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.verifications.list( - account_id="account_id", +client.users.retrieve( + id="id", ) ``` @@ -37503,7 +37149,7 @@ client.verifications.list(
-**account_id:** `str` — Account or user ID whose verifications you want to list. Use a `biz_` account ID, or the caller's `user_` ID for personal verifications. +**id:** `str` — User ID (prefixed `user_`), username, or `me` for the authenticated user.
@@ -37511,7 +37157,7 @@ client.verifications.list(
-**order:** `typing.Optional[ListVerificationsRequestOrder]` — Field used to sort returned verifications. +**account_id:** `typing.Optional[str]` — When set, returns the user's account-specific profile overrides for this account.
@@ -37519,7 +37165,39 @@ client.verifications.list(
-**direction:** `typing.Optional[ListVerificationsRequestDirection]` — Sort direction for returned verifications. +**include_balance_history:** `typing.Optional[bool]` — Also compute your balance history (opt-in; runs a heavier query). Only applies when the id is `me`; ignored for callers without balance-read scope. + +
+
+ +
+
+ +**from:** `typing.Optional[str]` — Balance-history window start, ISO 8601 date or datetime. Defaults to 30 days ago. Only used with `include_balance_history`. + +
+
+ +
+
+ +**to:** `typing.Optional[str]` — Balance-history window end, ISO 8601 date or datetime. Defaults to now. Only used with `include_balance_history`. + +
+
+ +
+
+ +**interval:** `typing.Optional[RetrieveUsersRequestInterval]` — Balance-history point granularity. Defaults to `day`. Only used with `include_balance_history`. + +
+
+ +
+
+ +**time_zone:** `typing.Optional[str]` — IANA time zone the balance-history points are bucketed in. Defaults to `UTC`. Only used with `include_balance_history`.
@@ -37539,7 +37217,7 @@ client.verifications.list(
-
client.verifications.create(...) -> CreateVerificationsResponse +
client.users.update(...) -> User
@@ -37551,7 +37229,7 @@ client.verifications.list(
-Starts a hosted verification session for an account or user, or returns the active session when one already exists. Any fields you include in the request body are used to prefill the session. Send `documents` (with `document_type`) to instead verify the person from identity documents included in this request — no hosted session involved. Send `share_token` to reuse a verification another Sumsub account has already completed for this person, instead of verifying them again. If the account already has an `approved` verification the request is rejected; unlink it first to start a new one. +Updates a user, addressed by `user_` tag, username, or the reserved id `me` for the authenticated user. A user token updates their own global profile; an API key updates the user's account-specific profile override (account_id required).
@@ -37568,16 +37246,14 @@ Starts a hosted verification session for an account or user, or returns the acti ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -from whop_sdk.verifications import CreateVerificationsRequestBody_Individual client = Whop( token="", environment=WhopEnvironment.DEFAULT, ) -client.verifications.create( - account_id="account_id", - request=CreateVerificationsRequestBody_Individual(), +client.users.update( + id="id", ) ``` @@ -37594,7 +37270,7 @@ client.verifications.create(
-**account_id:** `str` — Account or user ID whose identity you want to verify. Use a `biz_` account ID for account verifications, or the caller's `user_` ID for personal verification. +**id:** `str` — User ID (prefixed `user_`), username, or `me` for the authenticated user.
@@ -37602,7 +37278,7 @@ client.verifications.create(
-**request:** `CreateVerificationsRequestBody` +**account_id:** `typing.Optional[str]` — The account whose profile override to update. Required for API key callers.
@@ -37610,72 +37286,39 @@ client.verifications.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**banner:** `typing.Optional[UpdateUsersRequestBanner]`
- -
- - - - -
-
client.verifications.retrieve(...) -> RetrieveVerificationsResponse
-#### 📝 Description - -
-
+**bio:** `typing.Optional[str]` + +
+
-Returns verifications for an account, including their status and any required actions. -
-
+**name:** `typing.Optional[str]` +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.DEFAULT, -) - -client.verifications.retrieve( - id="id", -) - -``` -
-
+**profile_picture:** `typing.Optional[UpdateUsersRequestProfilePicture]` +
-#### ⚙️ Parameters - -
-
-
-**id:** `str` — Verification profile ID, prefixed `idpf_`. +**username:** `typing.Optional[str]`
@@ -37695,7 +37338,7 @@ client.verifications.retrieve(
-
client.verifications.update(...) -> UpdateVerificationsResponse +
client.users.check_access(...) -> CheckAccessUsersResponse
@@ -37707,7 +37350,7 @@ client.verifications.retrieve(
-Updates editable profile details or submits answers for items returned in `requested_information`. Once a verification is `approved` its profile details are locked and can no longer be edited. +Checks whether a user has access to an account, product, or experience the caller can reach.
@@ -37724,16 +37367,15 @@ Updates editable profile details or submits answers for items returned in `reque ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -from whop_sdk.verifications import UpdateVerificationsRequestBodyPersonalAddress client = Whop( token="", environment=WhopEnvironment.DEFAULT, ) -client.verifications.update( +client.users.check_access( id="id", - request=UpdateVerificationsRequestBodyPersonalAddress(), + resource_id="resource_id", ) ``` @@ -37750,7 +37392,7 @@ client.verifications.update(
-**id:** `str` — Verification profile ID, prefixed `idpf_`. +**id:** `str` — The user_ tag or username to check access for.
@@ -37758,7 +37400,7 @@ client.verifications.update(
-**request:** `UpdateVerificationsRequestBody` +**resource_id:** `str` — An account (biz_), product (prod_), or experience (exp_) ID.
@@ -37778,8 +37420,7 @@ client.verifications.update(
-## Webhooks -
client.webhooks.list(...) -> ListWebhooksResponse +
client.users.recommend_actions(...) -> RecommendActionsUsersResponse
@@ -37791,7 +37432,7 @@ client.verifications.update(
-Returns a paginated list of webhook endpoints configured for an account, ordered by most recently created. +Lists the recommended actions computed for the user: personal suggestions (e.g. start a business or become an affiliate) pooled with the highest-impact actions across the accounts the user owns. Business actions are tagged with their `account_id`/`account_name`; personal actions leave those `null`. Self-only: `id` must be `me` or the authenticated user's own tag/username.
@@ -37814,8 +37455,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.webhooks.list( - account_id="account_id", +client.users.recommend_actions( + id="id", ) ``` @@ -37832,7 +37473,7 @@ client.webhooks.list(
-**account_id:** `str` — The unique identifier of the account to list webhooks for. +**id:** `str` — `me`, or the authenticated user's own `user_` tag or username.
@@ -37840,39 +37481,73 @@ client.webhooks.list(
-**app_id:** `typing.Optional[str]` — Only return webhooks attached to this app. Omit to list the account's own webhooks. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**include_app_webhooks:** `typing.Optional[bool]` — Also return webhooks attached to the account's apps, not just the account's own. Cannot be combined with `app_id`. -
+
+## Verifications +
client.verifications.list(...) -> ListVerificationsResponse
-**has_failures:** `typing.Optional[bool]` — Only return webhooks whose endpoint is currently failing — every delivery since the current failure streak began has been rejected. Clears as soon as a delivery succeeds. - +#### 📝 Description + +
+
+ +
+
+ +Returns verifications for an account, including their status and any required actions. +
+
+#### 🔌 Usage +
-**first:** `typing.Optional[int]` — The number of webhooks to return (default 20, max 100). - +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.DEFAULT, +) + +client.verifications.list( + account_id="account_id", +) + +``` +
+
+#### ⚙️ Parameters +
-**after:** `typing.Optional[str]` — A cursor; returns webhooks after this position. +
+
+ +**account_id:** `str` — Account or user ID whose verifications you want to list. Use a `biz_` account ID, or the caller's `user_` ID for personal verifications.
@@ -37880,7 +37555,7 @@ client.webhooks.list(
-**last:** `typing.Optional[int]` — The number of webhooks to return from the end of the range. +**order:** `typing.Optional[ListVerificationsRequestOrder]` — Field used to sort returned verifications.
@@ -37888,7 +37563,7 @@ client.webhooks.list(
-**before:** `typing.Optional[str]` — A cursor; returns webhooks before this position. +**direction:** `typing.Optional[ListVerificationsRequestDirection]` — Sort direction for returned verifications.
@@ -37908,7 +37583,7 @@ client.webhooks.list(
-
client.webhooks.create(...) -> Webhook +
client.verifications.create(...) -> CreateVerificationsResponse
@@ -37920,7 +37595,7 @@ client.webhooks.list(
-Creates a webhook endpoint that receives event notifications via HTTP POST. +Starts a hosted verification session for an account or user, or returns the active session when one already exists. Any fields you include in the request body are used to prefill the session. Send `documents` (with `document_type`) to instead verify the person from identity documents included in this request — no hosted session involved. Send `share_token` to reuse a verification another Sumsub account has already completed for this person, instead of verifying them again. If the account already has an `approved` verification the request is rejected; unlink it first to start a new one.
@@ -37937,14 +37612,16 @@ Creates a webhook endpoint that receives event notifications via HTTP POST. ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment +from whop_sdk.verifications import CreateVerificationsRequestBody_Individual client = Whop( token="", environment=WhopEnvironment.DEFAULT, ) -client.webhooks.create( - url="https://example.com/hooks", +client.verifications.create( + account_id="account_id", + request=CreateVerificationsRequestBody_Individual(), ) ``` @@ -37961,39 +37638,7 @@ client.webhooks.create(
-**url:** `str` — The URL to send the webhook to. - -
-
- -
-
- -**api_version_date:** `typing.Optional[str]` — The dated API version (Api-Version-Date) to pin this webhook's payloads to. Omit to leave the webhook unpinned, tracking the current payload shape. - -
-
- -
-
- -**child_resource_events:** `typing.Optional[bool]` — Whether to send events for child resources. For example, if the webhook is created for an account, enabling this sends events only from its connected accounts. - -
-
- -
-
- -**enabled:** `typing.Optional[bool]` — Whether or not the webhook is enabled. Defaults to `true`. - -
-
- -
-
- -**events:** `typing.Optional[typing.List[CreateWebhooksRequestEventsItem]]` — The events to send the webhook for, in dot form (for example `payment.succeeded`). +**account_id:** `str` — Account or user ID whose identity you want to verify. Use a `biz_` account ID for account verifications, or the caller's `user_` ID for personal verification.
@@ -38001,7 +37646,7 @@ client.webhooks.create(
-**resource_id:** `typing.Optional[str]` — The account or app to create the webhook for. Defaults to the current account. +**request:** `CreateVerificationsRequestBody`
@@ -38021,7 +37666,7 @@ client.webhooks.create(
-
client.webhooks.retrieve(...) -> Webhook +
client.verifications.retrieve(...) -> RetrieveVerificationsResponse
@@ -38033,7 +37678,7 @@ client.webhooks.create(
-Retrieves the details of an existing webhook. +Returns verifications for an account, including their status and any required actions.
@@ -38056,7 +37701,7 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.webhooks.retrieve( +client.verifications.retrieve( id="id", ) @@ -38074,7 +37719,7 @@ client.webhooks.retrieve(
-**id:** `str` — Webhook ID, prefixed `hook_`. +**id:** `str` — Verification profile ID, prefixed `idpf_`.
@@ -38094,7 +37739,7 @@ client.webhooks.retrieve(
-
client.webhooks.delete(...) -> DeleteWebhooksResponse +
client.verifications.update(...) -> UpdateVerificationsResponse
@@ -38106,7 +37751,7 @@ client.webhooks.retrieve(
-Permanently deletes a webhook endpoint. Returns `true` on success, matching the legacy proxy response. +Updates editable profile details or submits answers for items returned in `requested_information`. Once a verification is `approved` its profile details are locked and can no longer be edited.
@@ -38123,14 +37768,16 @@ Permanently deletes a webhook endpoint. Returns `true` on success, matching the ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment +from whop_sdk.verifications import UpdateVerificationsRequestBodyPersonalAddress client = Whop( token="", environment=WhopEnvironment.DEFAULT, ) -client.webhooks.delete( +client.verifications.update( id="id", + request=UpdateVerificationsRequestBodyPersonalAddress(), ) ``` @@ -38147,7 +37794,15 @@ client.webhooks.delete(
-**id:** `str` — Webhook ID, prefixed `hook_`. +**id:** `str` — Verification profile ID, prefixed `idpf_`. + +
+
+ +
+
+ +**request:** `UpdateVerificationsRequestBody`
@@ -38167,7 +37822,8 @@ client.webhooks.delete(
-
client.webhooks.update(...) -> Webhook +## Webhooks +
client.webhooks.list(...) -> ListWebhooksResponse
@@ -38179,7 +37835,7 @@ client.webhooks.delete(
-Updates a webhook endpoint's URL, subscribed events, pinned payload version, or enabled state. +Returns a paginated list of webhook endpoints configured for an account, ordered by most recently created.
@@ -38202,8 +37858,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.webhooks.update( - id="id", +client.webhooks.list( + account_id="account_id", ) ``` @@ -38220,7 +37876,7 @@ client.webhooks.update(
-**id:** `str` — Webhook ID, prefixed `hook_`. +**account_id:** `str` — The unique identifier of the account to list webhooks for.
@@ -38228,7 +37884,7 @@ client.webhooks.update(
-**api_version_date:** `typing.Optional[str]` — The dated API version (Api-Version-Date) to pin this webhook's payloads to. Only valid for `v1` webhooks. Omit to leave the current pin unchanged, or pass `null` to unpin and track the current payload shape. +**app_id:** `typing.Optional[str]` — Only return webhooks attached to this app. Omit to list the account's own webhooks.
@@ -38236,7 +37892,7 @@ client.webhooks.update(
-**child_resource_events:** `typing.Optional[bool]` — Whether or not to send events for child resources. +**include_app_webhooks:** `typing.Optional[bool]` — Also return webhooks attached to the account's apps, not just the account's own. Cannot be combined with `app_id`.
@@ -38244,7 +37900,7 @@ client.webhooks.update(
-**enabled:** `typing.Optional[bool]` — Whether or not the webhook is enabled. +**has_failures:** `typing.Optional[bool]` — Only return webhooks whose endpoint is currently failing — every delivery since the current failure streak began has been rejected. Clears as soon as a delivery succeeds.
@@ -38252,7 +37908,7 @@ client.webhooks.update(
-**events:** `typing.Optional[typing.List[UpdateWebhooksRequestEventsItem]]` — The events to send the webhook for, in dot form (for example `payment.succeeded`). +**first:** `typing.Optional[int]` — The number of webhooks to return (default 20, max 100).
@@ -38260,7 +37916,23 @@ client.webhooks.update(
-**url:** `typing.Optional[str]` — The URL to send the webhook to. +**after:** `typing.Optional[str]` — A cursor; returns webhooks after this position. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — The number of webhooks to return from the end of the range. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — A cursor; returns webhooks before this position.
@@ -38280,7 +37952,7 @@ client.webhooks.update(
-
client.webhooks.list_deliveries(...) -> ListDeliveriesWebhooksResponse +
client.webhooks.create(...) -> Webhook
@@ -38292,7 +37964,7 @@ client.webhooks.update(
-Returns a paginated list of delivery attempts for a webhook, ordered by most recent first. Includes the request payload, response body, response code, and timing for each attempt. +Creates a webhook endpoint that receives event notifications via HTTP POST.
@@ -38315,8 +37987,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.webhooks.list_deliveries( - id="id", +client.webhooks.create( + url="https://example.com/hooks", ) ``` @@ -38333,7 +38005,7 @@ client.webhooks.list_deliveries(
-**id:** `str` — Webhook ID, prefixed `hook_`. +**url:** `str` — The URL to send the webhook to.
@@ -38341,7 +38013,7 @@ client.webhooks.list_deliveries(
-**first:** `typing.Optional[int]` — The number of deliveries to return (default 50, max 100). +**api_version_date:** `typing.Optional[str]` — The dated API version (Api-Version-Date) to pin this webhook's payloads to. Omit to leave the webhook unpinned, tracking the current payload shape.
@@ -38349,7 +38021,7 @@ client.webhooks.list_deliveries(
-**after:** `typing.Optional[str]` — A cursor; returns deliveries after this position. +**child_resource_events:** `typing.Optional[bool]` — Whether to send events for child resources. For example, if the webhook is created for an account, enabling this sends events only from its connected accounts.
@@ -38357,73 +38029,7 @@ client.webhooks.list_deliveries(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
- -
- - - - -
- -
client.webhooks.replay_delivery(...) -> ReplayDeliveryWebhooksResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Re-sends the exact payload of a past delivery to the webhook's current URL and returns the delivery result. By default the replay keeps the original `webhook-id`, so consumers that deduplicate on it can drop events they already processed. Pass `regenerate_id` to re-send under a freshly generated `webhook-id` instead, so a deduplicating consumer processes the replay as a new message. Only available for enabled webhooks on API version v1; deliveries are retained for 30 days. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.DEFAULT, -) - -client.webhooks.replay_delivery( - id="id", - delivery_id="delivery_id", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `str` — Webhook ID, prefixed `hook_`. +**enabled:** `typing.Optional[bool]` — Whether or not the webhook is enabled. Defaults to `true`.
@@ -38431,7 +38037,7 @@ client.webhooks.replay_delivery(
-**delivery_id:** `str` — Delivery ID, prefixed `whdel_`, from the List Deliveries endpoint. +**events:** `typing.Optional[typing.List[CreateWebhooksRequestEventsItem]]` — The events to send the webhook for, in dot form (for example `payment.succeeded`).
@@ -38439,7 +38045,7 @@ client.webhooks.replay_delivery(
-**regenerate_id:** `typing.Optional[bool]` — Re-send the delivery under a freshly generated `webhook-id` (in both the envelope and the signed headers) instead of the original one. Defaults to false. Use this when your endpoint deduplicates on `webhook-id` and you want it to process the replay as a new message. +**resource_id:** `typing.Optional[str]` — The account or app to create the webhook for. Defaults to the current account.
@@ -38459,7 +38065,7 @@ client.webhooks.replay_delivery(
-
client.webhooks.replay(...) -> ReplayWebhooksResponse +
client.webhooks.retrieve(...) -> Webhook
@@ -38471,7 +38077,7 @@ client.webhooks.replay_delivery(
-Re-sends the webhook's past deliveries within a time window, optionally limited to specific events or to messages whose most recent delivery attempt failed. Fire and forget: nothing about the replay is stored, and each re-send appears as a new entry in the webhook's delivery log. Each matching message is re-sent once, by default with its original `webhook-id`, so consumers that deduplicate are unaffected; pass `regenerate_ids` to re-send under freshly generated ids instead. Only available for enabled webhooks on API version v1; deliveries are retained for 30 days. +Retrieves the details of an existing webhook.
@@ -38494,9 +38100,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.webhooks.replay( +client.webhooks.retrieve( id="id", - sent_after="2026-01-01T12:00:00.000Z", ) ``` @@ -38521,46 +38126,6 @@ client.webhooks.replay(
-**sent_after:** `str` — Start of the delivery window to replay, as an ISO 8601 timestamp. Clamped to the 30-day delivery retention. - -
-
- -
-
- -**events:** `typing.Optional[typing.List[str]]` — Only replay these event types, in dot form (for example `payment.succeeded`). Omit to include every event. - -
-
- -
-
- -**failed_only:** `typing.Optional[bool]` — Only replay messages whose most recent delivery attempt in the window failed. Defaults to false. Best-effort: a message whose attempts span processing batches can still be re-sent — replays keep the original `webhook-id` by default, so consumers that deduplicate are unaffected. - -
-
- -
-
- -**regenerate_ids:** `typing.Optional[bool]` — Re-send each replayed message under a freshly generated `webhook-id` (in both the envelope and the signed headers) instead of its original one. Defaults to false. Use this when your endpoint deduplicates on `webhook-id` and you want it to process the replays as new messages. - -
-
- -
-
- -**sent_before:** `typing.Optional[str]` — End of the delivery window to replay, as an ISO 8601 timestamp. Defaults to now. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -38573,7 +38138,7 @@ client.webhooks.replay(
-
client.webhooks.test(...) -> TestWebhooksResponse +
client.webhooks.delete(...) -> DeleteWebhooksResponse
@@ -38585,7 +38150,7 @@ client.webhooks.replay(
-Sends a sample payload for the given event to the webhook's URL and returns the delivery result. +Permanently deletes a webhook endpoint. Returns `true` on success, matching the legacy proxy response.
@@ -38608,9 +38173,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.webhooks.test( +client.webhooks.delete( id="id", - event="payment.succeeded", ) ``` @@ -38635,14 +38199,6 @@ client.webhooks.test(
-**event:** `str` — The event to test the webhook for, in dot form (for example `payment.succeeded`). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -38655,7 +38211,7 @@ client.webhooks.test(
-
client.webhooks.deliveries_webhook(...) -> DeliveriesWebhookResponse +
client.webhooks.update(...) -> Webhook
@@ -38667,10 +38223,7 @@ client.webhooks.test(
-Returns a paginated list of delivery attempts for a webhook, ordered by most recent first. Includes the request payload, response body, response code, and timing for each attempt. - -Required permissions: - - `developer:manage_webhook` +Updates a webhook endpoint's URL, subscribed events, pinned payload version, or enabled state.
@@ -38693,10 +38246,8 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.webhooks.deliveries_webhook( - webhook_id="webhook_id", - first=42, - last=42, +client.webhooks.update( + id="id", ) ``` @@ -38713,7 +38264,7 @@ client.webhooks.deliveries_webhook(
-**webhook_id:** `str` — The unique identifier of the webhook to list deliveries for. +**id:** `str` — Webhook ID, prefixed `hook_`.
@@ -38721,7 +38272,7 @@ client.webhooks.deliveries_webhook(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**api_version_date:** `typing.Optional[str]` — The dated API version (Api-Version-Date) to pin this webhook's payloads to. Only valid for `v1` webhooks. Omit to leave the current pin unchanged, or pass `null` to unpin and track the current payload shape.
@@ -38729,7 +38280,7 @@ client.webhooks.deliveries_webhook(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**child_resource_events:** `typing.Optional[bool]` — Whether or not to send events for child resources.
@@ -38737,7 +38288,7 @@ client.webhooks.deliveries_webhook(
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**enabled:** `typing.Optional[bool]` — Whether or not the webhook is enabled.
@@ -38745,7 +38296,15 @@ client.webhooks.deliveries_webhook(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**events:** `typing.Optional[typing.List[UpdateWebhooksRequestEventsItem]]` — The events to send the webhook for, in dot form (for example `payment.succeeded`). + +
+
+ +
+
+ +**url:** `typing.Optional[str]` — The URL to send the webhook to.
@@ -38765,8 +38324,7 @@ client.webhooks.deliveries_webhook(
-## Withdrawals -
client.withdrawals.list(...) -> ListWithdrawalsResponse +
client.webhooks.list_deliveries(...) -> ListDeliveriesWebhooksResponse
@@ -38778,10 +38336,7 @@ client.webhooks.deliveries_webhook(
-Returns a paginated list of withdrawals for a company, with optional sorting and date filtering. - -Required permissions: - - `payout:withdrawal:read` +Returns a paginated list of delivery attempts for a webhook, ordered by most recent first. Includes the request payload, response body, response code, and timing for each attempt.
@@ -38798,19 +38353,14 @@ Required permissions: ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -import datetime client = Whop( token="", environment=WhopEnvironment.DEFAULT, ) -client.withdrawals.list( - first=42, - last=42, - company_id="biz_xxxxxxxxxxxxxx", - created_before=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), - created_after=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), +client.webhooks.list_deliveries( + id="id", ) ``` @@ -38827,7 +38377,7 @@ client.withdrawals.list(
-**company_id:** `str` — The unique identifier of the company to list withdrawals for. +**id:** `str` — Webhook ID, prefixed `hook_`.
@@ -38835,7 +38385,7 @@ client.withdrawals.list(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**first:** `typing.Optional[int]` — The number of deliveries to return (default 50, max 100).
@@ -38843,7 +38393,7 @@ client.withdrawals.list(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**after:** `typing.Optional[str]` — A cursor; returns deliveries after this position.
@@ -38851,23 +38401,73 @@ client.withdrawals.list(
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.webhooks.replay_delivery(...) -> ReplayDeliveryWebhooksResponse
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. - +#### 📝 Description + +
+
+ +
+
+ +Re-sends the exact payload of a past delivery to the webhook's current URL and returns the delivery result. By default the replay keeps the original `webhook-id`, so consumers that deduplicate on it can drop events they already processed. Pass `regenerate_id` to re-send under a freshly generated `webhook-id` instead, so a deduplicating consumer processes the replay as a new message. Only available for enabled webhooks on API version v1; deliveries are retained for 30 days.
+
+
+ +#### 🔌 Usage
-**direction:** `typing.Optional[Direction]` +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.DEFAULT, +) + +client.webhooks.replay_delivery( + id="id", + delivery_id="delivery_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — Webhook ID, prefixed `hook_`.
@@ -38875,7 +38475,7 @@ client.withdrawals.list(
-**created_before:** `typing.Optional[datetime.datetime]` — Only return withdrawals created before this timestamp. +**delivery_id:** `str` — Delivery ID, prefixed `whdel_`, from the List Deliveries endpoint.
@@ -38883,7 +38483,7 @@ client.withdrawals.list(
-**created_after:** `typing.Optional[datetime.datetime]` — Only return withdrawals created after this timestamp. +**regenerate_id:** `typing.Optional[bool]` — Re-send the delivery under a freshly generated `webhook-id` (in both the envelope and the signed headers) instead of the original one. Defaults to false. Use this when your endpoint deduplicates on `webhook-id` and you want it to process the replay as a new message.
@@ -38903,7 +38503,7 @@ client.withdrawals.list(
-
client.withdrawals.create(...) -> Withdrawal +
client.webhooks.replay(...) -> ReplayWebhooksResponse
@@ -38915,11 +38515,7 @@ client.withdrawals.list(
-Creates a withdrawal request for a ledger account - -Required permissions: - - `payout:withdraw_funds` - - `payout:destination:read` +Re-sends the webhook's past deliveries within a time window, optionally limited to specific events or to messages whose most recent delivery attempt failed. Fire and forget: nothing about the replay is stored, and each re-send appears as a new entry in the webhook's delivery log. Each matching message is re-sent once, by default with its original `webhook-id`, so consumers that deduplicate are unaffected; pass `regenerate_ids` to re-send under freshly generated ids instead. Only available for enabled webhooks on API version v1; deliveries are retained for 30 days.
@@ -38942,10 +38538,9 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.withdrawals.create( - amount=6.9, - company_id="biz_xxxxxxxxxxxxxx", - currency="usd", +client.webhooks.replay( + id="id", + sent_after="2026-01-01T12:00:00.000Z", ) ``` @@ -38962,31 +38557,7 @@ client.withdrawals.create(
-**amount:** `float` — The amount to withdraw in the specified currency - -
-
- -
-
- -**company_id:** `str` — The ID of the company to withdraw from. - -
-
- -
-
- -**currency:** `Currencies` — The currency that is being withdrawn. - -
-
- -
-
- -**acknowledge_bank_warning:** `typing.Optional[bool]` — Set to true to continue when the bank could not confirm the account holder's name, or false to be refused in that case so the creator can fix the account or link their bank first. Omitting the argument skips the warning gate — a client that cannot show the warning keeps its pre-gate behavior. +**id:** `str` — Webhook ID, prefixed `hook_`.
@@ -38994,7 +38565,7 @@ client.withdrawals.create(
-**idempotency_key:** `typing.Optional[str]` — A client-generated key that makes retries safe. Retrying with the same key returns the original withdrawal instead of creating a second one. +**sent_after:** `str` — Start of the delivery window to replay, as an ISO 8601 timestamp. Clamped to the 30-day delivery retention.
@@ -39002,7 +38573,7 @@ client.withdrawals.create(
-**payout_method_id:** `typing.Optional[str]` — The ID of the payout method to use for the withdrawal. +**events:** `typing.Optional[typing.List[str]]` — Only replay these event types, in dot form (for example `payment.succeeded`). Omit to include every event.
@@ -39010,7 +38581,7 @@ client.withdrawals.create(
-**platform_covers_fees:** `typing.Optional[bool]` — Whether the platform covers the payout fees. +**failed_only:** `typing.Optional[bool]` — Only replay messages whose most recent delivery attempt in the window failed. Defaults to false. Best-effort: a message whose attempts span processing batches can still be re-sent — replays keep the original `webhook-id` by default, so consumers that deduplicate are unaffected.
@@ -39018,7 +38589,7 @@ client.withdrawals.create(
-**speed:** `typing.Optional[WithdrawalSpeeds]` — The processing speed for the withdrawal. Either standard or instant. +**regenerate_ids:** `typing.Optional[bool]` — Re-send each replayed message under a freshly generated `webhook-id` (in both the envelope and the signed headers) instead of its original one. Defaults to false. Use this when your endpoint deduplicates on `webhook-id` and you want it to process the replays as new messages.
@@ -39026,7 +38597,7 @@ client.withdrawals.create(
-**statement_descriptor:** `typing.Optional[str]` — Custom statement descriptor for the withdrawal. Must be between 5 and 22 characters and contain only alphanumeric characters. +**sent_before:** `typing.Optional[str]` — End of the delivery window to replay, as an ISO 8601 timestamp. Defaults to now.
@@ -39046,7 +38617,7 @@ client.withdrawals.create(
-
client.withdrawals.retrieve(...) -> Withdrawal +
client.webhooks.test(...) -> TestWebhooksResponse
@@ -39058,11 +38629,7 @@ client.withdrawals.create(
-Retrieves the details of an existing withdrawal. - -Required permissions: - - `payout:withdrawal:read` - - `payout:destination:read` +Sends a sample payload for the given event to the webhook's URL and returns the delivery result.
@@ -39085,8 +38652,9 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.withdrawals.retrieve( - id="wdrl_xxxxxxxxxxxxx", +client.webhooks.test( + id="id", + event="payment.succeeded", ) ``` @@ -39103,7 +38671,15 @@ client.withdrawals.retrieve(
-**id:** `str` — The unique identifier of the withdrawal to retrieve. +**id:** `str` — Webhook ID, prefixed `hook_`. + +
+
+ +
+
+ +**event:** `str` — The event to test the webhook for, in dot form (for example `payment.succeeded`).
@@ -39123,7 +38699,7 @@ client.withdrawals.retrieve(
-
client.withdrawals.generate_pdf(...) -> GeneratePdfWithdrawalsResponse +
client.webhooks.deliveries_webhook(...) -> DeliveriesWebhookResponse
@@ -39135,10 +38711,10 @@ client.withdrawals.retrieve(
-Generates a withdrawal PDF invoice and returns a temporary download URL. +Returns a paginated list of delivery attempts for a webhook, ordered by most recent first. Includes the request payload, response body, response code, and timing for each attempt. Required permissions: - - `payout:withdrawal:read` + - `developer:manage_webhook`
@@ -39161,8 +38737,10 @@ client = Whop( environment=WhopEnvironment.DEFAULT, ) -client.withdrawals.generate_pdf( - id="wdrl_xxxxxxxxxxxxx", +client.webhooks.deliveries_webhook( + webhook_id="webhook_id", + first=42, + last=42, ) ``` @@ -39179,7 +38757,39 @@ client.withdrawals.generate_pdf(
-**id:** `str` — The unique identifier of the withdrawal to generate a PDF for. +**webhook_id:** `str` — The unique identifier of the webhook to list deliveries for. + +
+
+ +
+
+ +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. + +
+
+ +
+
+ +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -40794,7 +40404,7 @@ client.partners.businesses.earnings.list(
-Lists the bank accounts, wallets, and crypto addresses an account or user can withdraw to, newest first. +Lists the bank accounts, wallets, and crypto addresses an account or user can pay out to, newest first.
@@ -40857,7 +40467,7 @@ client.payouts.methods.list()
-**amount:** `typing.Optional[float]` — Optional withdrawal amount in whole currency units, for example `250.00`. When provided, each method includes a quote with the estimated fee, amount received, and delivery date for that amount. +**amount:** `typing.Optional[float]` — Optional payout amount in whole currency units, for example `250.00`. When provided, each method includes a quote with the estimated fee, amount received, and delivery date for that amount.
@@ -40937,7 +40547,7 @@ client.payouts.methods.list()
-Saves a new place an account or user can withdraw to. Sensitive details are vaulted in transit and never stored raw. +Saves a new place an account or user can pay out to. Sensitive details are vaulted in transit and never stored raw.
@@ -41277,7 +40887,7 @@ client.payouts.supported_methods.list()
-**amount:** `typing.Optional[float]` — Optional withdrawal amount in whole currency units, for example `250.00`. When provided, each destination includes per-currency fee and delivery quotes. +**amount:** `typing.Optional[float]` — Optional payout amount in whole currency units, for example `250.00`. When provided, each destination includes per-currency fee and delivery quotes.
diff --git a/src/whop_sdk/__init__.py b/src/whop_sdk/__init__.py index 7655a0ff..c357dab4 100644 --- a/src/whop_sdk/__init__.py +++ b/src/whop_sdk/__init__.py @@ -301,83 +301,7 @@ CheckoutConfigurationThreeDsLevel, CheckoutFonts, CheckoutModes, - CheckoutSession, - CheckoutSessionAuthenticateAction, - CheckoutSessionAwaitClaimAction, - CheckoutSessionAwaitClaimActionState, - CheckoutSessionBranding, - CheckoutSessionBrandingBorderStyle, - CheckoutSessionBrandingFontFamily, - CheckoutSessionBreakdown, - CheckoutSessionBreakdownAdjustment, - CheckoutSessionBreakdownAdjustmentApplied, - CheckoutSessionBreakdownAdjustmentKind, - CheckoutSessionBreakdownAdjustmentStatus, - CheckoutSessionBreakdownCurrency, - CheckoutSessionBreakdownDisplay, - CheckoutSessionBreakdownDisplayHeadline, - CheckoutSessionBreakdownDisplayHeadlineKind, - CheckoutSessionBreakdownDisplayRow, - CheckoutSessionBreakdownDisplayRowDetail, - CheckoutSessionBreakdownDisplayRowDetailApplied, - CheckoutSessionBreakdownDisplayRowKind, - CheckoutSessionBreakdownDisplayRowStatus, - CheckoutSessionBreakdownDisplaySections, - CheckoutSessionBreakdownLine, - CheckoutSessionBreakdownLineKind, - CheckoutSessionBreakdownUpcoming, - CheckoutSessionBreakdownUpcomingInstallments, - CheckoutSessionBreakdownUpcomingOneTime, - CheckoutSessionBreakdownUpcomingRecurring, - CheckoutSessionBreakdownUpcoming_Installments, - CheckoutSessionBreakdownUpcoming_OneTime, - CheckoutSessionBreakdownUpcoming_Recurring, - CheckoutSessionBuyerIdentity, - CheckoutSessionBuyerIdentityMethod, - CheckoutSessionCompleteAction, - CheckoutSessionCompleteActionKind, - CheckoutSessionConfirmError, - CheckoutSessionConfirmErrorCode, - CheckoutSessionCtaLabel, - CheckoutSessionCustomField, - CheckoutSessionCustomFieldFieldType, - CheckoutSessionCustomFieldResponse, - CheckoutSessionEntry, - CheckoutSessionEntryStatus, - CheckoutSessionItem, - CheckoutSessionMode, - CheckoutSessionNextAction, - CheckoutSessionNextAction_Authenticate, - CheckoutSessionNextAction_AwaitClaim, - CheckoutSessionNextAction_Complete, - CheckoutSessionNextAction_Redirect, - CheckoutSessionNextAction_UpgradeAuthentication, - CheckoutSessionNextAction_VerifyPhone, - CheckoutSessionNextAction_WaitForPayment, - CheckoutSessionPayment, CheckoutSessionPaymentMethodConfiguration, - CheckoutSessionPaymentStatus, - CheckoutSessionPromo, - CheckoutSessionPromoCurrency, - CheckoutSessionPromoDuration, - CheckoutSessionPromoPromoType, - CheckoutSessionQuote, - CheckoutSessionRedirectAction, - CheckoutSessionRequirement, - CheckoutSessionRequirementType, - CheckoutSessionSeller, - CheckoutSessionSellerTerms, - CheckoutSessionShippingAddress, - CheckoutSessionStatus, - CheckoutSessionTaxBehavior, - CheckoutSessionTaxId, - CheckoutSessionTaxIdType, - CheckoutSessionThreeDsLevel, - CheckoutSessionTransfer, - CheckoutSessionUpgradeAuthenticationAction, - CheckoutSessionUpgradeAuthenticationActionSignInIntent, - CheckoutSessionVerifyPhoneAction, - CheckoutSessionWaitForPaymentAction, CheckoutShapes, Company, CompanyFeaturedAffiliateProduct, @@ -619,6 +543,9 @@ LedgerActivityObject, LedgerActivityPayment, LedgerActivityPaymentObject, + LedgerActivityPaymentPlan, + LedgerActivityPaymentProduct, + LedgerActivityPaymentUser, LedgerActivityResource, LedgerActivityResourceAccountReference, LedgerActivityResourceAccountReferenceObject, @@ -838,18 +765,6 @@ PaymentMethodListItemIdealPaymentMethodIconsSquareDark, PaymentMethodListItemIdealPaymentMethodIconsSquareLight, PaymentMethodListItemIdealPaymentMethodIdeal, - PaymentMethodListItemPlatformBalancePaymentMethod, - PaymentMethodListItemPlatformBalancePaymentMethodIcons, - PaymentMethodListItemPlatformBalancePaymentMethodIconsCard, - PaymentMethodListItemPlatformBalancePaymentMethodIconsCardDark, - PaymentMethodListItemPlatformBalancePaymentMethodIconsCardLight, - PaymentMethodListItemPlatformBalancePaymentMethodIconsSquare, - PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareDark, - PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareLight, - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalance, - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccount, - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccountLogo, - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceBalancesItem, PaymentMethodListItemSepaDebitPaymentMethod, PaymentMethodListItemSepaDebitPaymentMethodIcons, PaymentMethodListItemSepaDebitPaymentMethodIconsCard, @@ -872,21 +787,8 @@ PaymentMethodListItem_CardPaymentMethod, PaymentMethodListItem_CashappPaymentMethod, PaymentMethodListItem_IdealPaymentMethod, - PaymentMethodListItem_PlatformBalancePaymentMethod, PaymentMethodListItem_SepaDebitPaymentMethod, PaymentMethodListItem_UsBankAccountPaymentMethod, - PaymentMethodPlatformBalancePaymentMethod, - PaymentMethodPlatformBalancePaymentMethodIcons, - PaymentMethodPlatformBalancePaymentMethodIconsCard, - PaymentMethodPlatformBalancePaymentMethodIconsCardDark, - PaymentMethodPlatformBalancePaymentMethodIconsCardLight, - PaymentMethodPlatformBalancePaymentMethodIconsSquare, - PaymentMethodPlatformBalancePaymentMethodIconsSquareDark, - PaymentMethodPlatformBalancePaymentMethodIconsSquareLight, - PaymentMethodPlatformBalancePaymentMethodPlatformBalance, - PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccount, - PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccountLogo, - PaymentMethodPlatformBalancePaymentMethodPlatformBalanceBalancesItem, PaymentMethodSepaDebitPaymentMethod, PaymentMethodSepaDebitPaymentMethodIcons, PaymentMethodSepaDebitPaymentMethodIconsCard, @@ -910,7 +812,6 @@ PaymentMethod_CardPaymentMethod, PaymentMethod_CashappPaymentMethod, PaymentMethod_IdealPaymentMethod, - PaymentMethod_PlatformBalancePaymentMethod, PaymentMethod_SepaDebitPaymentMethod, PaymentMethod_UsBankAccountPaymentMethod, PaymentNextAction, @@ -965,7 +866,6 @@ PayoutAccountCalculatedStatuses, PayoutAccountLatestVerification, PayoutDestinationCategory, - PayoutErrorCodes, PayoutMethod, PayoutMethodCompany, PayoutMethodDestination, @@ -1192,13 +1092,6 @@ WebhookTestableEventsItem, WhoCanPostTypes, WhoCanReactTypes, - Withdrawal, - WithdrawalFeeTypes, - WithdrawalLedgerAccount, - WithdrawalListItem, - WithdrawalPayoutToken, - WithdrawalSpeeds, - WithdrawalStatus, WorkforceBounty, WorkforceBountyListItem, ) @@ -1235,7 +1128,6 @@ cards, chat_channels, checkout_configurations, - checkout_sessions, companies, company_token_transactions, course_chapters, @@ -1296,7 +1188,6 @@ users, verifications, webhooks, - withdrawals, ) from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient from .accounts import ( @@ -1359,6 +1250,7 @@ RetrieveAdCampaignsRequestAttributionModel, UpdateAdCampaignsRequestBidType, UpdateAdCampaignsRequestBudgetOptimization, + UpdateAdCampaignsRequestBudgetType, UpdateAdCampaignsRequestSpecialAdCategoriesItem, UpdateAdCampaignsRequestStatus, ) @@ -1719,7 +1611,6 @@ RetrieveCheckoutConfigurationsResponsePlanVisibility, RetrieveCheckoutConfigurationsResponseThreeDsLevel, ) - from .checkout_sessions import CreateCheckoutSessionsRequestItemsItem, CreateCheckoutSessionsRequestMode from .client import AsyncWhop, Whop from .companies import ( CreateApiKeyCompaniesRequestPermissionsItem, @@ -1901,7 +1792,14 @@ PostExportFailedPayloadType, ) from .fee_markups import ListFeeMarkupsResponse - from .files import CompleteFilesRequestMultipartPartsItem, CreateFilesRequestVisibility + from .files import ( + CompleteFilesRequestMultipartPartsItem, + CreateFilesRequestVisibility, + ListFilesRequestDirection, + ListFilesRequestOrder, + ListFilesResponse, + ListFilesResponsePageInfo, + ) from .financial_activity import ( ListFinancialActivityRequestLineTypesItem, ListFinancialActivityResponse, @@ -2092,6 +1990,16 @@ ) from .payout_methods import ListPayoutMethodResponse from .payouts import ( + CancelPayoutsResponse, + CancelPayoutsResponseFailure, + CancelPayoutsResponseFeePaidBy, + CancelPayoutsResponseObject, + CancelPayoutsResponsePayoutMethod, + CancelPayoutsResponsePayoutMethodSupportedPayoutMethod, + CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType, + CancelPayoutsResponseSource, + CancelPayoutsResponseSpeed, + CancelPayoutsResponseStatus, CreatePayoutsRequestBody, CreatePayoutsRequestBodySpeed, CreatePayoutsResponse, @@ -2118,6 +2026,19 @@ ListPayoutsResponseDataItemSpeed, ListPayoutsResponseDataItemStatus, ListPayoutsResponsePageInfo, + PostPayoutCreatedPayload, + PostPayoutCreatedPayloadApiVersion, + PostPayoutCreatedPayloadData, + PostPayoutCreatedPayloadDataFailure, + PostPayoutCreatedPayloadDataFeePaidBy, + PostPayoutCreatedPayloadDataObject, + PostPayoutCreatedPayloadDataPayoutMethod, + PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod, + PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, + PostPayoutCreatedPayloadDataSource, + PostPayoutCreatedPayloadDataSpeed, + PostPayoutCreatedPayloadDataStatus, + PostPayoutCreatedPayloadType, PostPayoutMethodCreatedPayload, PostPayoutMethodCreatedPayloadApiVersion, PostPayoutMethodCreatedPayloadData, @@ -2133,45 +2054,32 @@ PostPayoutMethodCreatedPayloadDataSupportedPayoutMethodDeliveryType, PostPayoutMethodCreatedPayloadDataUnavailableReason, PostPayoutMethodCreatedPayloadType, - PostWithdrawalCreatedPayload, - PostWithdrawalCreatedPayloadApiVersion, - PostWithdrawalCreatedPayloadData, - PostWithdrawalCreatedPayloadDataFailure, - PostWithdrawalCreatedPayloadDataFeePaidBy, - PostWithdrawalCreatedPayloadDataObject, - PostWithdrawalCreatedPayloadDataPayoutMethod, - PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod, - PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, - PostWithdrawalCreatedPayloadDataSource, - PostWithdrawalCreatedPayloadDataSpeed, - PostWithdrawalCreatedPayloadDataStatus, - PostWithdrawalCreatedPayloadType, - PostWithdrawalReversedPayload, - PostWithdrawalReversedPayloadApiVersion, - PostWithdrawalReversedPayloadData, - PostWithdrawalReversedPayloadDataFailure, - PostWithdrawalReversedPayloadDataFeePaidBy, - PostWithdrawalReversedPayloadDataObject, - PostWithdrawalReversedPayloadDataPayoutMethod, - PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod, - PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, - PostWithdrawalReversedPayloadDataSource, - PostWithdrawalReversedPayloadDataSpeed, - PostWithdrawalReversedPayloadDataStatus, - PostWithdrawalReversedPayloadType, - PostWithdrawalUpdatedPayload, - PostWithdrawalUpdatedPayloadApiVersion, - PostWithdrawalUpdatedPayloadData, - PostWithdrawalUpdatedPayloadDataFailure, - PostWithdrawalUpdatedPayloadDataFeePaidBy, - PostWithdrawalUpdatedPayloadDataObject, - PostWithdrawalUpdatedPayloadDataPayoutMethod, - PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod, - PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, - PostWithdrawalUpdatedPayloadDataSource, - PostWithdrawalUpdatedPayloadDataSpeed, - PostWithdrawalUpdatedPayloadDataStatus, - PostWithdrawalUpdatedPayloadType, + PostPayoutReversedPayload, + PostPayoutReversedPayloadApiVersion, + PostPayoutReversedPayloadData, + PostPayoutReversedPayloadDataFailure, + PostPayoutReversedPayloadDataFeePaidBy, + PostPayoutReversedPayloadDataObject, + PostPayoutReversedPayloadDataPayoutMethod, + PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod, + PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, + PostPayoutReversedPayloadDataSource, + PostPayoutReversedPayloadDataSpeed, + PostPayoutReversedPayloadDataStatus, + PostPayoutReversedPayloadType, + PostPayoutUpdatedPayload, + PostPayoutUpdatedPayloadApiVersion, + PostPayoutUpdatedPayloadData, + PostPayoutUpdatedPayloadDataFailure, + PostPayoutUpdatedPayloadDataFeePaidBy, + PostPayoutUpdatedPayloadDataObject, + PostPayoutUpdatedPayloadDataPayoutMethod, + PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod, + PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, + PostPayoutUpdatedPayloadDataSource, + PostPayoutUpdatedPayloadDataSpeed, + PostPayoutUpdatedPayloadDataStatus, + PostPayoutUpdatedPayloadType, RetrievePayoutsResponse, RetrievePayoutsResponseFailure, RetrievePayoutsResponseFeePaidBy, @@ -2680,7 +2588,6 @@ TestWebhooksResponse, UpdateWebhooksRequestEventsItem, ) - from .withdrawals import GeneratePdfWithdrawalsResponse, ListWithdrawalsResponse _dynamic_imports: typing.Dict[str, str] = { "AcceptResolutionCenterCasesRequestAttachmentsItem": ".resolution_center_cases", "AccessLevel": ".types", @@ -2958,6 +2865,16 @@ "CalculateTaxPlansResponseStatus": ".plans", "CalculateTaxPlansResponseTaxBehavior": ".plans", "CancelOptions": ".types", + "CancelPayoutsResponse": ".payouts", + "CancelPayoutsResponseFailure": ".payouts", + "CancelPayoutsResponseFeePaidBy": ".payouts", + "CancelPayoutsResponseObject": ".payouts", + "CancelPayoutsResponsePayoutMethod": ".payouts", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethod": ".payouts", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType": ".payouts", + "CancelPayoutsResponseSource": ".payouts", + "CancelPayoutsResponseSpeed": ".payouts", + "CancelPayoutsResponseStatus": ".payouts", "CancelationStatus": ".types", "CaptureSpec": ".types", "CaptureSpecImu": ".types", @@ -2990,83 +2907,7 @@ "CheckoutConfigurationThreeDsLevel": ".types", "CheckoutFonts": ".types", "CheckoutModes": ".types", - "CheckoutSession": ".types", - "CheckoutSessionAuthenticateAction": ".types", - "CheckoutSessionAwaitClaimAction": ".types", - "CheckoutSessionAwaitClaimActionState": ".types", - "CheckoutSessionBranding": ".types", - "CheckoutSessionBrandingBorderStyle": ".types", - "CheckoutSessionBrandingFontFamily": ".types", - "CheckoutSessionBreakdown": ".types", - "CheckoutSessionBreakdownAdjustment": ".types", - "CheckoutSessionBreakdownAdjustmentApplied": ".types", - "CheckoutSessionBreakdownAdjustmentKind": ".types", - "CheckoutSessionBreakdownAdjustmentStatus": ".types", - "CheckoutSessionBreakdownCurrency": ".types", - "CheckoutSessionBreakdownDisplay": ".types", - "CheckoutSessionBreakdownDisplayHeadline": ".types", - "CheckoutSessionBreakdownDisplayHeadlineKind": ".types", - "CheckoutSessionBreakdownDisplayRow": ".types", - "CheckoutSessionBreakdownDisplayRowDetail": ".types", - "CheckoutSessionBreakdownDisplayRowDetailApplied": ".types", - "CheckoutSessionBreakdownDisplayRowKind": ".types", - "CheckoutSessionBreakdownDisplayRowStatus": ".types", - "CheckoutSessionBreakdownDisplaySections": ".types", - "CheckoutSessionBreakdownLine": ".types", - "CheckoutSessionBreakdownLineKind": ".types", - "CheckoutSessionBreakdownUpcoming": ".types", - "CheckoutSessionBreakdownUpcomingInstallments": ".types", - "CheckoutSessionBreakdownUpcomingOneTime": ".types", - "CheckoutSessionBreakdownUpcomingRecurring": ".types", - "CheckoutSessionBreakdownUpcoming_Installments": ".types", - "CheckoutSessionBreakdownUpcoming_OneTime": ".types", - "CheckoutSessionBreakdownUpcoming_Recurring": ".types", - "CheckoutSessionBuyerIdentity": ".types", - "CheckoutSessionBuyerIdentityMethod": ".types", - "CheckoutSessionCompleteAction": ".types", - "CheckoutSessionCompleteActionKind": ".types", - "CheckoutSessionConfirmError": ".types", - "CheckoutSessionConfirmErrorCode": ".types", - "CheckoutSessionCtaLabel": ".types", - "CheckoutSessionCustomField": ".types", - "CheckoutSessionCustomFieldFieldType": ".types", - "CheckoutSessionCustomFieldResponse": ".types", - "CheckoutSessionEntry": ".types", - "CheckoutSessionEntryStatus": ".types", - "CheckoutSessionItem": ".types", - "CheckoutSessionMode": ".types", - "CheckoutSessionNextAction": ".types", - "CheckoutSessionNextAction_Authenticate": ".types", - "CheckoutSessionNextAction_AwaitClaim": ".types", - "CheckoutSessionNextAction_Complete": ".types", - "CheckoutSessionNextAction_Redirect": ".types", - "CheckoutSessionNextAction_UpgradeAuthentication": ".types", - "CheckoutSessionNextAction_VerifyPhone": ".types", - "CheckoutSessionNextAction_WaitForPayment": ".types", - "CheckoutSessionPayment": ".types", "CheckoutSessionPaymentMethodConfiguration": ".types", - "CheckoutSessionPaymentStatus": ".types", - "CheckoutSessionPromo": ".types", - "CheckoutSessionPromoCurrency": ".types", - "CheckoutSessionPromoDuration": ".types", - "CheckoutSessionPromoPromoType": ".types", - "CheckoutSessionQuote": ".types", - "CheckoutSessionRedirectAction": ".types", - "CheckoutSessionRequirement": ".types", - "CheckoutSessionRequirementType": ".types", - "CheckoutSessionSeller": ".types", - "CheckoutSessionSellerTerms": ".types", - "CheckoutSessionShippingAddress": ".types", - "CheckoutSessionStatus": ".types", - "CheckoutSessionTaxBehavior": ".types", - "CheckoutSessionTaxId": ".types", - "CheckoutSessionTaxIdType": ".types", - "CheckoutSessionThreeDsLevel": ".types", - "CheckoutSessionTransfer": ".types", - "CheckoutSessionUpgradeAuthenticationAction": ".types", - "CheckoutSessionUpgradeAuthenticationActionSignInIntent": ".types", - "CheckoutSessionVerifyPhoneAction": ".types", - "CheckoutSessionWaitForPaymentAction": ".types", "CheckoutShapes": ".types", "Company": ".types", "CompanyFeaturedAffiliateProduct": ".types", @@ -3225,8 +3066,6 @@ "CreateCheckoutConfigurationsResponsePlanThreeDsLevel": ".checkout_configurations", "CreateCheckoutConfigurationsResponsePlanVisibility": ".checkout_configurations", "CreateCheckoutConfigurationsResponseThreeDsLevel": ".checkout_configurations", - "CreateCheckoutSessionsRequestItemsItem": ".checkout_sessions", - "CreateCheckoutSessionsRequestMode": ".checkout_sessions", "CreateCompaniesRequestLogo": ".companies", "CreateCompanyTokenTransactionsRequest": ".company_token_transactions", "CreateCompanyTokenTransactionsRequestAdd": ".company_token_transactions", @@ -3539,7 +3378,6 @@ "FutureUsageTypes": ".types", "GenerateMediaRequestResolution": ".media", "GenerateMediaRequestType": ".media", - "GeneratePdfWithdrawalsResponse": ".withdrawals", "GetFinancialReportRequestGroupBy": ".ledgers", "GetFinancialReportRequestReportType": ".ledgers", "GetFinancialReportResponse": ".ledgers", @@ -3628,6 +3466,9 @@ "LedgerActivityObject": ".types", "LedgerActivityPayment": ".types", "LedgerActivityPaymentObject": ".types", + "LedgerActivityPaymentPlan": ".types", + "LedgerActivityPaymentProduct": ".types", + "LedgerActivityPaymentUser": ".types", "LedgerActivityResource": ".types", "LedgerActivityResourceAccountReference": ".types", "LedgerActivityResourceAccountReferenceObject": ".types", @@ -3799,6 +3640,10 @@ "ListFeeMarkupsResponse": ".fee_markups", "ListFeesPaymentsResponse": ".payments", "ListFeesPaymentsResponseDataItem": ".payments", + "ListFilesRequestDirection": ".files", + "ListFilesRequestOrder": ".files", + "ListFilesResponse": ".files", + "ListFilesResponsePageInfo": ".files", "ListFinancialActivityRequestLineTypesItem": ".financial_activity", "ListFinancialActivityResponse": ".financial_activity", "ListFinancialActivityResponsePageInfo": ".financial_activity", @@ -3950,7 +3795,6 @@ "ListVerificationsResponseDataItemStatus": ".verifications", "ListWebhooksResponse": ".webhooks", "ListWebhooksResponsePageInfo": ".webhooks", - "ListWithdrawalsResponse": ".withdrawals", "LocationTargetingOption": ".types", "LocationTargetingOptionLocationType": ".types", "LogsAppsRequestLevel": ".apps", @@ -4152,18 +3996,6 @@ "PaymentMethodListItemIdealPaymentMethodIconsSquareDark": ".types", "PaymentMethodListItemIdealPaymentMethodIconsSquareLight": ".types", "PaymentMethodListItemIdealPaymentMethodIdeal": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethod": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethodIcons": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCard": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCardDark": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCardLight": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquare": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareDark": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareLight": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalance": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccount": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccountLogo": ".types", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceBalancesItem": ".types", "PaymentMethodListItemSepaDebitPaymentMethod": ".types", "PaymentMethodListItemSepaDebitPaymentMethodIcons": ".types", "PaymentMethodListItemSepaDebitPaymentMethodIconsCard": ".types", @@ -4186,21 +4018,8 @@ "PaymentMethodListItem_CardPaymentMethod": ".types", "PaymentMethodListItem_CashappPaymentMethod": ".types", "PaymentMethodListItem_IdealPaymentMethod": ".types", - "PaymentMethodListItem_PlatformBalancePaymentMethod": ".types", "PaymentMethodListItem_SepaDebitPaymentMethod": ".types", "PaymentMethodListItem_UsBankAccountPaymentMethod": ".types", - "PaymentMethodPlatformBalancePaymentMethod": ".types", - "PaymentMethodPlatformBalancePaymentMethodIcons": ".types", - "PaymentMethodPlatformBalancePaymentMethodIconsCard": ".types", - "PaymentMethodPlatformBalancePaymentMethodIconsCardDark": ".types", - "PaymentMethodPlatformBalancePaymentMethodIconsCardLight": ".types", - "PaymentMethodPlatformBalancePaymentMethodIconsSquare": ".types", - "PaymentMethodPlatformBalancePaymentMethodIconsSquareDark": ".types", - "PaymentMethodPlatformBalancePaymentMethodIconsSquareLight": ".types", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalance": ".types", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccount": ".types", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccountLogo": ".types", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceBalancesItem": ".types", "PaymentMethodSepaDebitPaymentMethod": ".types", "PaymentMethodSepaDebitPaymentMethodIcons": ".types", "PaymentMethodSepaDebitPaymentMethodIconsCard": ".types", @@ -4224,7 +4043,6 @@ "PaymentMethod_CardPaymentMethod": ".types", "PaymentMethod_CashappPaymentMethod": ".types", "PaymentMethod_IdealPaymentMethod": ".types", - "PaymentMethod_PlatformBalancePaymentMethod": ".types", "PaymentMethod_SepaDebitPaymentMethod": ".types", "PaymentMethod_UsBankAccountPaymentMethod": ".types", "PaymentNextAction": ".types", @@ -4280,7 +4098,6 @@ "PayoutAccountCalculatedStatuses": ".types", "PayoutAccountLatestVerification": ".types", "PayoutDestinationCategory": ".types", - "PayoutErrorCodes": ".types", "PayoutMethod": ".types", "PayoutMethodCompany": ".types", "PayoutMethodDestination": ".types", @@ -4498,6 +4315,19 @@ "PostPayoutAccountStatusUpdatedPayload": ".payout_accounts", "PostPayoutAccountStatusUpdatedPayloadApiVersion": ".payout_accounts", "PostPayoutAccountStatusUpdatedPayloadType": ".payout_accounts", + "PostPayoutCreatedPayload": ".payouts", + "PostPayoutCreatedPayloadApiVersion": ".payouts", + "PostPayoutCreatedPayloadData": ".payouts", + "PostPayoutCreatedPayloadDataFailure": ".payouts", + "PostPayoutCreatedPayloadDataFeePaidBy": ".payouts", + "PostPayoutCreatedPayloadDataObject": ".payouts", + "PostPayoutCreatedPayloadDataPayoutMethod": ".payouts", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod": ".payouts", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".payouts", + "PostPayoutCreatedPayloadDataSource": ".payouts", + "PostPayoutCreatedPayloadDataSpeed": ".payouts", + "PostPayoutCreatedPayloadDataStatus": ".payouts", + "PostPayoutCreatedPayloadType": ".payouts", "PostPayoutMethodCreatedPayload": ".payouts", "PostPayoutMethodCreatedPayloadApiVersion": ".payouts", "PostPayoutMethodCreatedPayloadData": ".payouts", @@ -4513,6 +4343,32 @@ "PostPayoutMethodCreatedPayloadDataSupportedPayoutMethodDeliveryType": ".payouts", "PostPayoutMethodCreatedPayloadDataUnavailableReason": ".payouts", "PostPayoutMethodCreatedPayloadType": ".payouts", + "PostPayoutReversedPayload": ".payouts", + "PostPayoutReversedPayloadApiVersion": ".payouts", + "PostPayoutReversedPayloadData": ".payouts", + "PostPayoutReversedPayloadDataFailure": ".payouts", + "PostPayoutReversedPayloadDataFeePaidBy": ".payouts", + "PostPayoutReversedPayloadDataObject": ".payouts", + "PostPayoutReversedPayloadDataPayoutMethod": ".payouts", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod": ".payouts", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".payouts", + "PostPayoutReversedPayloadDataSource": ".payouts", + "PostPayoutReversedPayloadDataSpeed": ".payouts", + "PostPayoutReversedPayloadDataStatus": ".payouts", + "PostPayoutReversedPayloadType": ".payouts", + "PostPayoutUpdatedPayload": ".payouts", + "PostPayoutUpdatedPayloadApiVersion": ".payouts", + "PostPayoutUpdatedPayloadData": ".payouts", + "PostPayoutUpdatedPayloadDataFailure": ".payouts", + "PostPayoutUpdatedPayloadDataFeePaidBy": ".payouts", + "PostPayoutUpdatedPayloadDataObject": ".payouts", + "PostPayoutUpdatedPayloadDataPayoutMethod": ".payouts", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod": ".payouts", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".payouts", + "PostPayoutUpdatedPayloadDataSource": ".payouts", + "PostPayoutUpdatedPayloadDataSpeed": ".payouts", + "PostPayoutUpdatedPayloadDataStatus": ".payouts", + "PostPayoutUpdatedPayloadType": ".payouts", "PostPlanCreatedPayload": ".plans", "PostPlanCreatedPayloadApiVersion": ".plans", "PostPlanCreatedPayloadType": ".plans", @@ -4624,45 +4480,6 @@ "PostVerificationSucceededPayload": ".verifications", "PostVerificationSucceededPayloadApiVersion": ".verifications", "PostVerificationSucceededPayloadType": ".verifications", - "PostWithdrawalCreatedPayload": ".payouts", - "PostWithdrawalCreatedPayloadApiVersion": ".payouts", - "PostWithdrawalCreatedPayloadData": ".payouts", - "PostWithdrawalCreatedPayloadDataFailure": ".payouts", - "PostWithdrawalCreatedPayloadDataFeePaidBy": ".payouts", - "PostWithdrawalCreatedPayloadDataObject": ".payouts", - "PostWithdrawalCreatedPayloadDataPayoutMethod": ".payouts", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod": ".payouts", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".payouts", - "PostWithdrawalCreatedPayloadDataSource": ".payouts", - "PostWithdrawalCreatedPayloadDataSpeed": ".payouts", - "PostWithdrawalCreatedPayloadDataStatus": ".payouts", - "PostWithdrawalCreatedPayloadType": ".payouts", - "PostWithdrawalReversedPayload": ".payouts", - "PostWithdrawalReversedPayloadApiVersion": ".payouts", - "PostWithdrawalReversedPayloadData": ".payouts", - "PostWithdrawalReversedPayloadDataFailure": ".payouts", - "PostWithdrawalReversedPayloadDataFeePaidBy": ".payouts", - "PostWithdrawalReversedPayloadDataObject": ".payouts", - "PostWithdrawalReversedPayloadDataPayoutMethod": ".payouts", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod": ".payouts", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".payouts", - "PostWithdrawalReversedPayloadDataSource": ".payouts", - "PostWithdrawalReversedPayloadDataSpeed": ".payouts", - "PostWithdrawalReversedPayloadDataStatus": ".payouts", - "PostWithdrawalReversedPayloadType": ".payouts", - "PostWithdrawalUpdatedPayload": ".payouts", - "PostWithdrawalUpdatedPayloadApiVersion": ".payouts", - "PostWithdrawalUpdatedPayloadData": ".payouts", - "PostWithdrawalUpdatedPayloadDataFailure": ".payouts", - "PostWithdrawalUpdatedPayloadDataFeePaidBy": ".payouts", - "PostWithdrawalUpdatedPayloadDataObject": ".payouts", - "PostWithdrawalUpdatedPayloadDataPayoutMethod": ".payouts", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod": ".payouts", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".payouts", - "PostWithdrawalUpdatedPayloadDataSource": ".payouts", - "PostWithdrawalUpdatedPayloadDataSpeed": ".payouts", - "PostWithdrawalUpdatedPayloadDataStatus": ".payouts", - "PostWithdrawalUpdatedPayloadType": ".payouts", "PostsSocialAccountsResponse": ".social_accounts", "PostsSocialAccountsResponsePageInfo": ".social_accounts", "Product": ".types", @@ -4991,6 +4808,7 @@ "UpdateAccountsRequestThreeDsLevel": ".accounts", "UpdateAdCampaignsRequestBidType": ".ad_campaigns", "UpdateAdCampaignsRequestBudgetOptimization": ".ad_campaigns", + "UpdateAdCampaignsRequestBudgetType": ".ad_campaigns", "UpdateAdCampaignsRequestSpecialAdCategoriesItem": ".ad_campaigns", "UpdateAdCampaignsRequestStatus": ".ad_campaigns", "UpdateAdGroupsRequestBidType": ".ad_groups", @@ -5157,13 +4975,6 @@ "WhoCanReactTypes": ".types", "Whop": ".client", "WhopEnvironment": ".environment", - "Withdrawal": ".types", - "WithdrawalFeeTypes": ".types", - "WithdrawalLedgerAccount": ".types", - "WithdrawalListItem": ".types", - "WithdrawalPayoutToken": ".types", - "WithdrawalSpeeds": ".types", - "WithdrawalStatus": ".types", "WorkforceBounty": ".types", "WorkforceBountyListItem": ".types", "__version__": ".version", @@ -5187,7 +4998,6 @@ "cards": ".cards", "chat_channels": ".chat_channels", "checkout_configurations": ".checkout_configurations", - "checkout_sessions": ".checkout_sessions", "companies": ".companies", "company_token_transactions": ".company_token_transactions", "course_chapters": ".course_chapters", @@ -5248,7 +5058,6 @@ "users": ".users", "verifications": ".verifications", "webhooks": ".webhooks", - "withdrawals": ".withdrawals", } @@ -5550,6 +5359,16 @@ def __dir__(): "CalculateTaxPlansResponseStatus", "CalculateTaxPlansResponseTaxBehavior", "CancelOptions", + "CancelPayoutsResponse", + "CancelPayoutsResponseFailure", + "CancelPayoutsResponseFeePaidBy", + "CancelPayoutsResponseObject", + "CancelPayoutsResponsePayoutMethod", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethod", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType", + "CancelPayoutsResponseSource", + "CancelPayoutsResponseSpeed", + "CancelPayoutsResponseStatus", "CancelationStatus", "CaptureSpec", "CaptureSpecImu", @@ -5582,83 +5401,7 @@ def __dir__(): "CheckoutConfigurationThreeDsLevel", "CheckoutFonts", "CheckoutModes", - "CheckoutSession", - "CheckoutSessionAuthenticateAction", - "CheckoutSessionAwaitClaimAction", - "CheckoutSessionAwaitClaimActionState", - "CheckoutSessionBranding", - "CheckoutSessionBrandingBorderStyle", - "CheckoutSessionBrandingFontFamily", - "CheckoutSessionBreakdown", - "CheckoutSessionBreakdownAdjustment", - "CheckoutSessionBreakdownAdjustmentApplied", - "CheckoutSessionBreakdownAdjustmentKind", - "CheckoutSessionBreakdownAdjustmentStatus", - "CheckoutSessionBreakdownCurrency", - "CheckoutSessionBreakdownDisplay", - "CheckoutSessionBreakdownDisplayHeadline", - "CheckoutSessionBreakdownDisplayHeadlineKind", - "CheckoutSessionBreakdownDisplayRow", - "CheckoutSessionBreakdownDisplayRowDetail", - "CheckoutSessionBreakdownDisplayRowDetailApplied", - "CheckoutSessionBreakdownDisplayRowKind", - "CheckoutSessionBreakdownDisplayRowStatus", - "CheckoutSessionBreakdownDisplaySections", - "CheckoutSessionBreakdownLine", - "CheckoutSessionBreakdownLineKind", - "CheckoutSessionBreakdownUpcoming", - "CheckoutSessionBreakdownUpcomingInstallments", - "CheckoutSessionBreakdownUpcomingOneTime", - "CheckoutSessionBreakdownUpcomingRecurring", - "CheckoutSessionBreakdownUpcoming_Installments", - "CheckoutSessionBreakdownUpcoming_OneTime", - "CheckoutSessionBreakdownUpcoming_Recurring", - "CheckoutSessionBuyerIdentity", - "CheckoutSessionBuyerIdentityMethod", - "CheckoutSessionCompleteAction", - "CheckoutSessionCompleteActionKind", - "CheckoutSessionConfirmError", - "CheckoutSessionConfirmErrorCode", - "CheckoutSessionCtaLabel", - "CheckoutSessionCustomField", - "CheckoutSessionCustomFieldFieldType", - "CheckoutSessionCustomFieldResponse", - "CheckoutSessionEntry", - "CheckoutSessionEntryStatus", - "CheckoutSessionItem", - "CheckoutSessionMode", - "CheckoutSessionNextAction", - "CheckoutSessionNextAction_Authenticate", - "CheckoutSessionNextAction_AwaitClaim", - "CheckoutSessionNextAction_Complete", - "CheckoutSessionNextAction_Redirect", - "CheckoutSessionNextAction_UpgradeAuthentication", - "CheckoutSessionNextAction_VerifyPhone", - "CheckoutSessionNextAction_WaitForPayment", - "CheckoutSessionPayment", "CheckoutSessionPaymentMethodConfiguration", - "CheckoutSessionPaymentStatus", - "CheckoutSessionPromo", - "CheckoutSessionPromoCurrency", - "CheckoutSessionPromoDuration", - "CheckoutSessionPromoPromoType", - "CheckoutSessionQuote", - "CheckoutSessionRedirectAction", - "CheckoutSessionRequirement", - "CheckoutSessionRequirementType", - "CheckoutSessionSeller", - "CheckoutSessionSellerTerms", - "CheckoutSessionShippingAddress", - "CheckoutSessionStatus", - "CheckoutSessionTaxBehavior", - "CheckoutSessionTaxId", - "CheckoutSessionTaxIdType", - "CheckoutSessionThreeDsLevel", - "CheckoutSessionTransfer", - "CheckoutSessionUpgradeAuthenticationAction", - "CheckoutSessionUpgradeAuthenticationActionSignInIntent", - "CheckoutSessionVerifyPhoneAction", - "CheckoutSessionWaitForPaymentAction", "CheckoutShapes", "Company", "CompanyFeaturedAffiliateProduct", @@ -5817,8 +5560,6 @@ def __dir__(): "CreateCheckoutConfigurationsResponsePlanThreeDsLevel", "CreateCheckoutConfigurationsResponsePlanVisibility", "CreateCheckoutConfigurationsResponseThreeDsLevel", - "CreateCheckoutSessionsRequestItemsItem", - "CreateCheckoutSessionsRequestMode", "CreateCompaniesRequestLogo", "CreateCompanyTokenTransactionsRequest", "CreateCompanyTokenTransactionsRequestAdd", @@ -6131,7 +5872,6 @@ def __dir__(): "FutureUsageTypes", "GenerateMediaRequestResolution", "GenerateMediaRequestType", - "GeneratePdfWithdrawalsResponse", "GetFinancialReportRequestGroupBy", "GetFinancialReportRequestReportType", "GetFinancialReportResponse", @@ -6220,6 +5960,9 @@ def __dir__(): "LedgerActivityObject", "LedgerActivityPayment", "LedgerActivityPaymentObject", + "LedgerActivityPaymentPlan", + "LedgerActivityPaymentProduct", + "LedgerActivityPaymentUser", "LedgerActivityResource", "LedgerActivityResourceAccountReference", "LedgerActivityResourceAccountReferenceObject", @@ -6391,6 +6134,10 @@ def __dir__(): "ListFeeMarkupsResponse", "ListFeesPaymentsResponse", "ListFeesPaymentsResponseDataItem", + "ListFilesRequestDirection", + "ListFilesRequestOrder", + "ListFilesResponse", + "ListFilesResponsePageInfo", "ListFinancialActivityRequestLineTypesItem", "ListFinancialActivityResponse", "ListFinancialActivityResponsePageInfo", @@ -6542,7 +6289,6 @@ def __dir__(): "ListVerificationsResponseDataItemStatus", "ListWebhooksResponse", "ListWebhooksResponsePageInfo", - "ListWithdrawalsResponse", "LocationTargetingOption", "LocationTargetingOptionLocationType", "LogsAppsRequestLevel", @@ -6744,18 +6490,6 @@ def __dir__(): "PaymentMethodListItemIdealPaymentMethodIconsSquareDark", "PaymentMethodListItemIdealPaymentMethodIconsSquareLight", "PaymentMethodListItemIdealPaymentMethodIdeal", - "PaymentMethodListItemPlatformBalancePaymentMethod", - "PaymentMethodListItemPlatformBalancePaymentMethodIcons", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCard", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCardDark", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCardLight", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquare", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareDark", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareLight", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalance", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccount", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccountLogo", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceBalancesItem", "PaymentMethodListItemSepaDebitPaymentMethod", "PaymentMethodListItemSepaDebitPaymentMethodIcons", "PaymentMethodListItemSepaDebitPaymentMethodIconsCard", @@ -6778,21 +6512,8 @@ def __dir__(): "PaymentMethodListItem_CardPaymentMethod", "PaymentMethodListItem_CashappPaymentMethod", "PaymentMethodListItem_IdealPaymentMethod", - "PaymentMethodListItem_PlatformBalancePaymentMethod", "PaymentMethodListItem_SepaDebitPaymentMethod", "PaymentMethodListItem_UsBankAccountPaymentMethod", - "PaymentMethodPlatformBalancePaymentMethod", - "PaymentMethodPlatformBalancePaymentMethodIcons", - "PaymentMethodPlatformBalancePaymentMethodIconsCard", - "PaymentMethodPlatformBalancePaymentMethodIconsCardDark", - "PaymentMethodPlatformBalancePaymentMethodIconsCardLight", - "PaymentMethodPlatformBalancePaymentMethodIconsSquare", - "PaymentMethodPlatformBalancePaymentMethodIconsSquareDark", - "PaymentMethodPlatformBalancePaymentMethodIconsSquareLight", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalance", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccount", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccountLogo", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceBalancesItem", "PaymentMethodSepaDebitPaymentMethod", "PaymentMethodSepaDebitPaymentMethodIcons", "PaymentMethodSepaDebitPaymentMethodIconsCard", @@ -6816,7 +6537,6 @@ def __dir__(): "PaymentMethod_CardPaymentMethod", "PaymentMethod_CashappPaymentMethod", "PaymentMethod_IdealPaymentMethod", - "PaymentMethod_PlatformBalancePaymentMethod", "PaymentMethod_SepaDebitPaymentMethod", "PaymentMethod_UsBankAccountPaymentMethod", "PaymentNextAction", @@ -6872,7 +6592,6 @@ def __dir__(): "PayoutAccountCalculatedStatuses", "PayoutAccountLatestVerification", "PayoutDestinationCategory", - "PayoutErrorCodes", "PayoutMethod", "PayoutMethodCompany", "PayoutMethodDestination", @@ -7090,6 +6809,19 @@ def __dir__(): "PostPayoutAccountStatusUpdatedPayload", "PostPayoutAccountStatusUpdatedPayloadApiVersion", "PostPayoutAccountStatusUpdatedPayloadType", + "PostPayoutCreatedPayload", + "PostPayoutCreatedPayloadApiVersion", + "PostPayoutCreatedPayloadData", + "PostPayoutCreatedPayloadDataFailure", + "PostPayoutCreatedPayloadDataFeePaidBy", + "PostPayoutCreatedPayloadDataObject", + "PostPayoutCreatedPayloadDataPayoutMethod", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", + "PostPayoutCreatedPayloadDataSource", + "PostPayoutCreatedPayloadDataSpeed", + "PostPayoutCreatedPayloadDataStatus", + "PostPayoutCreatedPayloadType", "PostPayoutMethodCreatedPayload", "PostPayoutMethodCreatedPayloadApiVersion", "PostPayoutMethodCreatedPayloadData", @@ -7105,6 +6837,32 @@ def __dir__(): "PostPayoutMethodCreatedPayloadDataSupportedPayoutMethodDeliveryType", "PostPayoutMethodCreatedPayloadDataUnavailableReason", "PostPayoutMethodCreatedPayloadType", + "PostPayoutReversedPayload", + "PostPayoutReversedPayloadApiVersion", + "PostPayoutReversedPayloadData", + "PostPayoutReversedPayloadDataFailure", + "PostPayoutReversedPayloadDataFeePaidBy", + "PostPayoutReversedPayloadDataObject", + "PostPayoutReversedPayloadDataPayoutMethod", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", + "PostPayoutReversedPayloadDataSource", + "PostPayoutReversedPayloadDataSpeed", + "PostPayoutReversedPayloadDataStatus", + "PostPayoutReversedPayloadType", + "PostPayoutUpdatedPayload", + "PostPayoutUpdatedPayloadApiVersion", + "PostPayoutUpdatedPayloadData", + "PostPayoutUpdatedPayloadDataFailure", + "PostPayoutUpdatedPayloadDataFeePaidBy", + "PostPayoutUpdatedPayloadDataObject", + "PostPayoutUpdatedPayloadDataPayoutMethod", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", + "PostPayoutUpdatedPayloadDataSource", + "PostPayoutUpdatedPayloadDataSpeed", + "PostPayoutUpdatedPayloadDataStatus", + "PostPayoutUpdatedPayloadType", "PostPlanCreatedPayload", "PostPlanCreatedPayloadApiVersion", "PostPlanCreatedPayloadType", @@ -7216,45 +6974,6 @@ def __dir__(): "PostVerificationSucceededPayload", "PostVerificationSucceededPayloadApiVersion", "PostVerificationSucceededPayloadType", - "PostWithdrawalCreatedPayload", - "PostWithdrawalCreatedPayloadApiVersion", - "PostWithdrawalCreatedPayloadData", - "PostWithdrawalCreatedPayloadDataFailure", - "PostWithdrawalCreatedPayloadDataFeePaidBy", - "PostWithdrawalCreatedPayloadDataObject", - "PostWithdrawalCreatedPayloadDataPayoutMethod", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", - "PostWithdrawalCreatedPayloadDataSource", - "PostWithdrawalCreatedPayloadDataSpeed", - "PostWithdrawalCreatedPayloadDataStatus", - "PostWithdrawalCreatedPayloadType", - "PostWithdrawalReversedPayload", - "PostWithdrawalReversedPayloadApiVersion", - "PostWithdrawalReversedPayloadData", - "PostWithdrawalReversedPayloadDataFailure", - "PostWithdrawalReversedPayloadDataFeePaidBy", - "PostWithdrawalReversedPayloadDataObject", - "PostWithdrawalReversedPayloadDataPayoutMethod", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", - "PostWithdrawalReversedPayloadDataSource", - "PostWithdrawalReversedPayloadDataSpeed", - "PostWithdrawalReversedPayloadDataStatus", - "PostWithdrawalReversedPayloadType", - "PostWithdrawalUpdatedPayload", - "PostWithdrawalUpdatedPayloadApiVersion", - "PostWithdrawalUpdatedPayloadData", - "PostWithdrawalUpdatedPayloadDataFailure", - "PostWithdrawalUpdatedPayloadDataFeePaidBy", - "PostWithdrawalUpdatedPayloadDataObject", - "PostWithdrawalUpdatedPayloadDataPayoutMethod", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", - "PostWithdrawalUpdatedPayloadDataSource", - "PostWithdrawalUpdatedPayloadDataSpeed", - "PostWithdrawalUpdatedPayloadDataStatus", - "PostWithdrawalUpdatedPayloadType", "PostsSocialAccountsResponse", "PostsSocialAccountsResponsePageInfo", "Product", @@ -7583,6 +7302,7 @@ def __dir__(): "UpdateAccountsRequestThreeDsLevel", "UpdateAdCampaignsRequestBidType", "UpdateAdCampaignsRequestBudgetOptimization", + "UpdateAdCampaignsRequestBudgetType", "UpdateAdCampaignsRequestSpecialAdCategoriesItem", "UpdateAdCampaignsRequestStatus", "UpdateAdGroupsRequestBidType", @@ -7749,13 +7469,6 @@ def __dir__(): "WhoCanReactTypes", "Whop", "WhopEnvironment", - "Withdrawal", - "WithdrawalFeeTypes", - "WithdrawalLedgerAccount", - "WithdrawalListItem", - "WithdrawalPayoutToken", - "WithdrawalSpeeds", - "WithdrawalStatus", "WorkforceBounty", "WorkforceBountyListItem", "__version__", @@ -7779,7 +7492,6 @@ def __dir__(): "cards", "chat_channels", "checkout_configurations", - "checkout_sessions", "companies", "company_token_transactions", "course_chapters", @@ -7840,5 +7552,4 @@ def __dir__(): "users", "verifications", "webhooks", - "withdrawals", ] diff --git a/src/whop_sdk/access_tokens/client.py b/src/whop_sdk/access_tokens/client.py index d2c99005..fdfc81ca 100644 --- a/src/whop_sdk/access_tokens/client.py +++ b/src/whop_sdk/access_tokens/client.py @@ -66,7 +66,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -138,7 +138,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/account_links/client.py b/src/whop_sdk/account_links/client.py index 865c56c1..2972e5b1 100644 --- a/src/whop_sdk/account_links/client.py +++ b/src/whop_sdk/account_links/client.py @@ -66,7 +66,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -143,7 +143,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/accounts/client.py b/src/whop_sdk/accounts/client.py index 8c5a20f3..415720f9 100644 --- a/src/whop_sdk/accounts/client.py +++ b/src/whop_sdk/accounts/client.py @@ -140,7 +140,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -211,7 +211,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -246,7 +246,7 @@ def me(self, *, request_options: typing.Optional[RequestOptions] = None) -> Acco from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -277,7 +277,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -469,7 +469,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -610,7 +610,7 @@ def form_company( ) client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -717,7 +717,7 @@ def transfer_ownership( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -843,7 +843,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -923,7 +923,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -966,7 +966,7 @@ async def me(self, *, request_options: typing.Optional[RequestOptions] = None) - from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1005,7 +1005,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1205,7 +1205,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1354,7 +1354,7 @@ async def form_company( ) client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1469,7 +1469,7 @@ async def transfer_ownership( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/accounts/preferences/client.py b/src/whop_sdk/accounts/preferences/client.py index 7e9c2bd8..57fc4d12 100644 --- a/src/whop_sdk/accounts/preferences/client.py +++ b/src/whop_sdk/accounts/preferences/client.py @@ -55,7 +55,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -117,7 +117,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -179,7 +179,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -249,7 +249,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/accounts/reserves/client.py b/src/whop_sdk/accounts/reserves/client.py index 7477bcde..ac758dea 100644 --- a/src/whop_sdk/accounts/reserves/client.py +++ b/src/whop_sdk/accounts/reserves/client.py @@ -45,7 +45,7 @@ def list(self, account_id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -98,7 +98,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ad_campaigns/__init__.py b/src/whop_sdk/ad_campaigns/__init__.py index d2d71dce..856c82a6 100644 --- a/src/whop_sdk/ad_campaigns/__init__.py +++ b/src/whop_sdk/ad_campaigns/__init__.py @@ -27,6 +27,7 @@ RetrieveAdCampaignsRequestAttributionModel, UpdateAdCampaignsRequestBidType, UpdateAdCampaignsRequestBudgetOptimization, + UpdateAdCampaignsRequestBudgetType, UpdateAdCampaignsRequestSpecialAdCategoriesItem, UpdateAdCampaignsRequestStatus, ) @@ -51,6 +52,7 @@ "RetrieveAdCampaignsRequestAttributionModel": ".types", "UpdateAdCampaignsRequestBidType": ".types", "UpdateAdCampaignsRequestBudgetOptimization": ".types", + "UpdateAdCampaignsRequestBudgetType": ".types", "UpdateAdCampaignsRequestSpecialAdCategoriesItem": ".types", "UpdateAdCampaignsRequestStatus": ".types", } @@ -98,6 +100,7 @@ def __dir__(): "RetrieveAdCampaignsRequestAttributionModel", "UpdateAdCampaignsRequestBidType", "UpdateAdCampaignsRequestBudgetOptimization", + "UpdateAdCampaignsRequestBudgetType", "UpdateAdCampaignsRequestSpecialAdCategoriesItem", "UpdateAdCampaignsRequestStatus", ] diff --git a/src/whop_sdk/ad_campaigns/client.py b/src/whop_sdk/ad_campaigns/client.py index 6006097f..d9e2f14a 100644 --- a/src/whop_sdk/ad_campaigns/client.py +++ b/src/whop_sdk/ad_campaigns/client.py @@ -25,6 +25,7 @@ from .types.retrieve_ad_campaigns_request_attribution_model import RetrieveAdCampaignsRequestAttributionModel from .types.update_ad_campaigns_request_bid_type import UpdateAdCampaignsRequestBidType from .types.update_ad_campaigns_request_budget_optimization import UpdateAdCampaignsRequestBudgetOptimization +from .types.update_ad_campaigns_request_budget_type import UpdateAdCampaignsRequestBudgetType from .types.update_ad_campaigns_request_special_ad_categories_item import ( UpdateAdCampaignsRequestSpecialAdCategoriesItem, ) @@ -132,7 +133,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -233,7 +234,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -303,7 +304,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -343,7 +344,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -361,6 +362,7 @@ def update( bid_type: typing.Optional[UpdateAdCampaignsRequestBidType] = OMIT, budget_amount: typing.Optional[float] = OMIT, budget_optimization: typing.Optional[UpdateAdCampaignsRequestBudgetOptimization] = OMIT, + budget_type: typing.Optional[UpdateAdCampaignsRequestBudgetType] = OMIT, ends_at: typing.Optional[str] = OMIT, special_ad_categories: typing.Optional[typing.Sequence[UpdateAdCampaignsRequestSpecialAdCategoriesItem]] = OMIT, starts_at: typing.Optional[str] = OMIT, @@ -369,7 +371,7 @@ def update( request_options: typing.Optional[RequestOptions] = None, ) -> AdCampaign: """ - Updates an ad campaign's editable fields (title, budget, schedule, bid strategy, special ad categories, and, before launch, budget optimization), and launches a draft campaign by setting status to active. Objective, budget type and desired cost per result are fixed at creation and cannot be changed. + Updates an ad campaign's editable fields (title, budget, schedule, bid strategy, special ad categories, and, before launch, budget type and budget optimization), and launches a draft campaign by setting status to active. Objective and desired cost per result are fixed at creation and cannot be changed. Parameters ---------- @@ -380,11 +382,14 @@ def update( How delivery bids in the ad auction: `minimum_cost` gets the most results for the budget, `average_target` holds an average cost per result, `maximum_target` never bids above a cap. Switching to `minimum_cost` clears the cap amounts stored on the campaign's ad groups. Only for campaigns that own the budget. budget_amount : typing.Optional[float] - The campaign budget, in the account's currency. Interpreted as daily or lifetime per the campaign's existing budget type. + The campaign budget, in the account's currency. Interpreted as daily or lifetime per the campaign's budget type, including a budget_type sent in the same request. budget_optimization : typing.Optional[UpdateAdCampaignsRequestBudgetOptimization] Which level owns the budget: the whole campaign (`ad_campaign`) or each ad group individually (`ad_group`). Only changeable before the campaign is live on the ad network; switching to `ad_campaign` requires budget_amount in the same request, and switching to `ad_group` clears the campaign budget. + budget_type : typing.Optional[UpdateAdCampaignsRequestBudgetType] + Whether `budget_amount` is spent per day (`daily`) or over the campaign's full run (`lifetime`). Only changeable while the campaign is a draft; send budget_amount in the same request so the amount lands on the new type. + ends_at : typing.Optional[str] When the campaign stops delivering, as an ISO 8601 timestamp. Only for campaigns that own the budget. @@ -413,7 +418,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -426,6 +431,7 @@ def update( bid_type=bid_type, budget_amount=budget_amount, budget_optimization=budget_optimization, + budget_type=budget_type, ends_at=ends_at, special_ad_categories=special_ad_categories, starts_at=starts_at, @@ -470,7 +476,7 @@ def duplicate( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -505,7 +511,7 @@ def pause(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -538,7 +544,7 @@ def retry_payment(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -571,7 +577,7 @@ def unpause(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -683,7 +689,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -793,7 +799,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -871,7 +877,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -921,7 +927,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -945,6 +951,7 @@ async def update( bid_type: typing.Optional[UpdateAdCampaignsRequestBidType] = OMIT, budget_amount: typing.Optional[float] = OMIT, budget_optimization: typing.Optional[UpdateAdCampaignsRequestBudgetOptimization] = OMIT, + budget_type: typing.Optional[UpdateAdCampaignsRequestBudgetType] = OMIT, ends_at: typing.Optional[str] = OMIT, special_ad_categories: typing.Optional[typing.Sequence[UpdateAdCampaignsRequestSpecialAdCategoriesItem]] = OMIT, starts_at: typing.Optional[str] = OMIT, @@ -953,7 +960,7 @@ async def update( request_options: typing.Optional[RequestOptions] = None, ) -> AdCampaign: """ - Updates an ad campaign's editable fields (title, budget, schedule, bid strategy, special ad categories, and, before launch, budget optimization), and launches a draft campaign by setting status to active. Objective, budget type and desired cost per result are fixed at creation and cannot be changed. + Updates an ad campaign's editable fields (title, budget, schedule, bid strategy, special ad categories, and, before launch, budget type and budget optimization), and launches a draft campaign by setting status to active. Objective and desired cost per result are fixed at creation and cannot be changed. Parameters ---------- @@ -964,11 +971,14 @@ async def update( How delivery bids in the ad auction: `minimum_cost` gets the most results for the budget, `average_target` holds an average cost per result, `maximum_target` never bids above a cap. Switching to `minimum_cost` clears the cap amounts stored on the campaign's ad groups. Only for campaigns that own the budget. budget_amount : typing.Optional[float] - The campaign budget, in the account's currency. Interpreted as daily or lifetime per the campaign's existing budget type. + The campaign budget, in the account's currency. Interpreted as daily or lifetime per the campaign's budget type, including a budget_type sent in the same request. budget_optimization : typing.Optional[UpdateAdCampaignsRequestBudgetOptimization] Which level owns the budget: the whole campaign (`ad_campaign`) or each ad group individually (`ad_group`). Only changeable before the campaign is live on the ad network; switching to `ad_campaign` requires budget_amount in the same request, and switching to `ad_group` clears the campaign budget. + budget_type : typing.Optional[UpdateAdCampaignsRequestBudgetType] + Whether `budget_amount` is spent per day (`daily`) or over the campaign's full run (`lifetime`). Only changeable while the campaign is a draft; send budget_amount in the same request so the amount lands on the new type. + ends_at : typing.Optional[str] When the campaign stops delivering, as an ISO 8601 timestamp. Only for campaigns that own the budget. @@ -999,7 +1009,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1018,6 +1028,7 @@ async def main() -> None: bid_type=bid_type, budget_amount=budget_amount, budget_optimization=budget_optimization, + budget_type=budget_type, ends_at=ends_at, special_ad_categories=special_ad_categories, starts_at=starts_at, @@ -1064,7 +1075,7 @@ async def duplicate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1107,7 +1118,7 @@ async def pause(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1148,7 +1159,7 @@ async def retry_payment(self, id: str, *, request_options: typing.Optional[Reque from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1189,7 +1200,7 @@ async def unpause(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ad_campaigns/raw_client.py b/src/whop_sdk/ad_campaigns/raw_client.py index 1e4a3460..ea8bd087 100644 --- a/src/whop_sdk/ad_campaigns/raw_client.py +++ b/src/whop_sdk/ad_campaigns/raw_client.py @@ -35,6 +35,7 @@ from .types.retrieve_ad_campaigns_request_attribution_model import RetrieveAdCampaignsRequestAttributionModel from .types.update_ad_campaigns_request_bid_type import UpdateAdCampaignsRequestBidType from .types.update_ad_campaigns_request_budget_optimization import UpdateAdCampaignsRequestBudgetOptimization +from .types.update_ad_campaigns_request_budget_type import UpdateAdCampaignsRequestBudgetType from .types.update_ad_campaigns_request_special_ad_categories_item import ( UpdateAdCampaignsRequestSpecialAdCategoriesItem, ) @@ -484,6 +485,7 @@ def update( bid_type: typing.Optional[UpdateAdCampaignsRequestBidType] = OMIT, budget_amount: typing.Optional[float] = OMIT, budget_optimization: typing.Optional[UpdateAdCampaignsRequestBudgetOptimization] = OMIT, + budget_type: typing.Optional[UpdateAdCampaignsRequestBudgetType] = OMIT, ends_at: typing.Optional[str] = OMIT, special_ad_categories: typing.Optional[typing.Sequence[UpdateAdCampaignsRequestSpecialAdCategoriesItem]] = OMIT, starts_at: typing.Optional[str] = OMIT, @@ -492,7 +494,7 @@ def update( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[AdCampaign]: """ - Updates an ad campaign's editable fields (title, budget, schedule, bid strategy, special ad categories, and, before launch, budget optimization), and launches a draft campaign by setting status to active. Objective, budget type and desired cost per result are fixed at creation and cannot be changed. + Updates an ad campaign's editable fields (title, budget, schedule, bid strategy, special ad categories, and, before launch, budget type and budget optimization), and launches a draft campaign by setting status to active. Objective and desired cost per result are fixed at creation and cannot be changed. Parameters ---------- @@ -503,11 +505,14 @@ def update( How delivery bids in the ad auction: `minimum_cost` gets the most results for the budget, `average_target` holds an average cost per result, `maximum_target` never bids above a cap. Switching to `minimum_cost` clears the cap amounts stored on the campaign's ad groups. Only for campaigns that own the budget. budget_amount : typing.Optional[float] - The campaign budget, in the account's currency. Interpreted as daily or lifetime per the campaign's existing budget type. + The campaign budget, in the account's currency. Interpreted as daily or lifetime per the campaign's budget type, including a budget_type sent in the same request. budget_optimization : typing.Optional[UpdateAdCampaignsRequestBudgetOptimization] Which level owns the budget: the whole campaign (`ad_campaign`) or each ad group individually (`ad_group`). Only changeable before the campaign is live on the ad network; switching to `ad_campaign` requires budget_amount in the same request, and switching to `ad_group` clears the campaign budget. + budget_type : typing.Optional[UpdateAdCampaignsRequestBudgetType] + Whether `budget_amount` is spent per day (`daily`) or over the campaign's full run (`lifetime`). Only changeable while the campaign is a draft; send budget_amount in the same request so the amount lands on the new type. + ends_at : typing.Optional[str] When the campaign stops delivering, as an ISO 8601 timestamp. Only for campaigns that own the budget. @@ -538,6 +543,7 @@ def update( "bid_type": bid_type, "budget_amount": budget_amount, "budget_optimization": budget_optimization, + "budget_type": budget_type, "ends_at": ends_at, "special_ad_categories": special_ad_categories, "starts_at": starts_at, @@ -1276,6 +1282,7 @@ async def update( bid_type: typing.Optional[UpdateAdCampaignsRequestBidType] = OMIT, budget_amount: typing.Optional[float] = OMIT, budget_optimization: typing.Optional[UpdateAdCampaignsRequestBudgetOptimization] = OMIT, + budget_type: typing.Optional[UpdateAdCampaignsRequestBudgetType] = OMIT, ends_at: typing.Optional[str] = OMIT, special_ad_categories: typing.Optional[typing.Sequence[UpdateAdCampaignsRequestSpecialAdCategoriesItem]] = OMIT, starts_at: typing.Optional[str] = OMIT, @@ -1284,7 +1291,7 @@ async def update( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[AdCampaign]: """ - Updates an ad campaign's editable fields (title, budget, schedule, bid strategy, special ad categories, and, before launch, budget optimization), and launches a draft campaign by setting status to active. Objective, budget type and desired cost per result are fixed at creation and cannot be changed. + Updates an ad campaign's editable fields (title, budget, schedule, bid strategy, special ad categories, and, before launch, budget type and budget optimization), and launches a draft campaign by setting status to active. Objective and desired cost per result are fixed at creation and cannot be changed. Parameters ---------- @@ -1295,11 +1302,14 @@ async def update( How delivery bids in the ad auction: `minimum_cost` gets the most results for the budget, `average_target` holds an average cost per result, `maximum_target` never bids above a cap. Switching to `minimum_cost` clears the cap amounts stored on the campaign's ad groups. Only for campaigns that own the budget. budget_amount : typing.Optional[float] - The campaign budget, in the account's currency. Interpreted as daily or lifetime per the campaign's existing budget type. + The campaign budget, in the account's currency. Interpreted as daily or lifetime per the campaign's budget type, including a budget_type sent in the same request. budget_optimization : typing.Optional[UpdateAdCampaignsRequestBudgetOptimization] Which level owns the budget: the whole campaign (`ad_campaign`) or each ad group individually (`ad_group`). Only changeable before the campaign is live on the ad network; switching to `ad_campaign` requires budget_amount in the same request, and switching to `ad_group` clears the campaign budget. + budget_type : typing.Optional[UpdateAdCampaignsRequestBudgetType] + Whether `budget_amount` is spent per day (`daily`) or over the campaign's full run (`lifetime`). Only changeable while the campaign is a draft; send budget_amount in the same request so the amount lands on the new type. + ends_at : typing.Optional[str] When the campaign stops delivering, as an ISO 8601 timestamp. Only for campaigns that own the budget. @@ -1330,6 +1340,7 @@ async def update( "bid_type": bid_type, "budget_amount": budget_amount, "budget_optimization": budget_optimization, + "budget_type": budget_type, "ends_at": ends_at, "special_ad_categories": special_ad_categories, "starts_at": starts_at, diff --git a/src/whop_sdk/ad_campaigns/types/__init__.py b/src/whop_sdk/ad_campaigns/types/__init__.py index fa5bf40b..b6899aff 100644 --- a/src/whop_sdk/ad_campaigns/types/__init__.py +++ b/src/whop_sdk/ad_campaigns/types/__init__.py @@ -26,6 +26,7 @@ from .retrieve_ad_campaigns_request_attribution_model import RetrieveAdCampaignsRequestAttributionModel from .update_ad_campaigns_request_bid_type import UpdateAdCampaignsRequestBidType from .update_ad_campaigns_request_budget_optimization import UpdateAdCampaignsRequestBudgetOptimization + from .update_ad_campaigns_request_budget_type import UpdateAdCampaignsRequestBudgetType from .update_ad_campaigns_request_special_ad_categories_item import UpdateAdCampaignsRequestSpecialAdCategoriesItem from .update_ad_campaigns_request_status import UpdateAdCampaignsRequestStatus _dynamic_imports: typing.Dict[str, str] = { @@ -49,6 +50,7 @@ "RetrieveAdCampaignsRequestAttributionModel": ".retrieve_ad_campaigns_request_attribution_model", "UpdateAdCampaignsRequestBidType": ".update_ad_campaigns_request_bid_type", "UpdateAdCampaignsRequestBudgetOptimization": ".update_ad_campaigns_request_budget_optimization", + "UpdateAdCampaignsRequestBudgetType": ".update_ad_campaigns_request_budget_type", "UpdateAdCampaignsRequestSpecialAdCategoriesItem": ".update_ad_campaigns_request_special_ad_categories_item", "UpdateAdCampaignsRequestStatus": ".update_ad_campaigns_request_status", } @@ -96,6 +98,7 @@ def __dir__(): "RetrieveAdCampaignsRequestAttributionModel", "UpdateAdCampaignsRequestBidType", "UpdateAdCampaignsRequestBudgetOptimization", + "UpdateAdCampaignsRequestBudgetType", "UpdateAdCampaignsRequestSpecialAdCategoriesItem", "UpdateAdCampaignsRequestStatus", ] diff --git a/src/whop_sdk/ad_campaigns/types/update_ad_campaigns_request_budget_type.py b/src/whop_sdk/ad_campaigns/types/update_ad_campaigns_request_budget_type.py new file mode 100644 index 00000000..0b65ad3c --- /dev/null +++ b/src/whop_sdk/ad_campaigns/types/update_ad_campaigns_request_budget_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateAdCampaignsRequestBudgetType = typing.Union[typing.Literal["daily", "lifetime"], typing.Any] diff --git a/src/whop_sdk/ad_groups/client.py b/src/whop_sdk/ad_groups/client.py index 96335943..12a2b4e7 100644 --- a/src/whop_sdk/ad_groups/client.py +++ b/src/whop_sdk/ad_groups/client.py @@ -159,7 +159,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -316,7 +316,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -407,7 +407,7 @@ def estimate_reach( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -498,7 +498,7 @@ def search_targeting_options( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -562,7 +562,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -602,7 +602,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -732,7 +732,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -806,7 +806,7 @@ def duplicate( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -845,7 +845,7 @@ def pause(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -878,7 +878,7 @@ def unpause(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -998,7 +998,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1164,7 +1164,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1263,7 +1263,7 @@ async def estimate_reach( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1362,7 +1362,7 @@ async def search_targeting_options( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1434,7 +1434,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1484,7 +1484,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1622,7 +1622,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1704,7 +1704,7 @@ async def duplicate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1751,7 +1751,7 @@ async def pause(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1792,7 +1792,7 @@ async def unpause(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ad_reports/client.py b/src/whop_sdk/ad_reports/client.py index a2250782..0b4d3194 100644 --- a/src/whop_sdk/ad_reports/client.py +++ b/src/whop_sdk/ad_reports/client.py @@ -88,7 +88,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -195,7 +195,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ads/client.py b/src/whop_sdk/ads/client.py index ab3d18bb..76d02f89 100644 --- a/src/whop_sdk/ads/client.py +++ b/src/whop_sdk/ads/client.py @@ -146,7 +146,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -191,12 +191,12 @@ def create( call_to_action: typing.Optional[CreateAdsRequestCallToAction] = OMIT, creatives: typing.Optional[typing.Sequence[CreateAdsRequestCreativesItem]] = OMIT, descriptions: typing.Optional[typing.Sequence[str]] = OMIT, + existing_post_id: typing.Optional[str] = OMIT, headlines: typing.Optional[typing.Sequence[str]] = OMIT, lead_form: typing.Optional[CreateAdsRequestLeadForm] = OMIT, lead_form_id: typing.Optional[str] = OMIT, messaging_config: typing.Optional[CreateAdsRequestMessagingConfig] = OMIT, multi_advertiser_ads: typing.Optional[bool] = OMIT, - post_id: typing.Optional[str] = OMIT, post_source: typing.Optional[CreateAdsRequestPostSource] = OMIT, primary_texts: typing.Optional[typing.Sequence[str]] = OMIT, social_accounts: typing.Optional[typing.Sequence[CreateAdsRequestSocialAccountsItem]] = OMIT, @@ -225,6 +225,9 @@ def create( descriptions : typing.Optional[typing.Sequence[str]] The description variants shown on the ad. + existing_post_id : typing.Optional[str] + Promote a post you already published instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. + headlines : typing.Optional[typing.Sequence[str]] The headline variants shown on the ad. @@ -240,11 +243,8 @@ def create( multi_advertiser_ads : typing.Optional[bool] Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true. - post_id : typing.Optional[str] - Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. - post_source : typing.Optional[CreateAdsRequestPostSource] - Identifies the network that owns `post_id`. The source is inferred from the ID shape when omitted. + Identifies the network that owns `existing_post_id`. The source is inferred from the ID shape when omitted. primary_texts : typing.Optional[typing.Sequence[str]] The primary text variants shown in the ad body. @@ -274,7 +274,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -286,12 +286,12 @@ def create( call_to_action=call_to_action, creatives=creatives, descriptions=descriptions, + existing_post_id=existing_post_id, headlines=headlines, lead_form=lead_form, lead_form_id=lead_form_id, messaging_config=messaging_config, multi_advertiser_ads=multi_advertiser_ads, - post_id=post_id, post_source=post_source, primary_texts=primary_texts, social_accounts=social_accounts, @@ -345,7 +345,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -385,7 +385,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -403,12 +403,12 @@ def update( call_to_action: typing.Optional[UpdateAdsRequestCallToAction] = OMIT, creatives: typing.Optional[typing.Sequence[UpdateAdsRequestCreativesItem]] = OMIT, descriptions: typing.Optional[typing.Sequence[str]] = OMIT, + existing_post_id: typing.Optional[str] = OMIT, headlines: typing.Optional[typing.Sequence[str]] = OMIT, lead_form: typing.Optional[UpdateAdsRequestLeadForm] = OMIT, lead_form_id: typing.Optional[str] = OMIT, messaging_config: typing.Optional[UpdateAdsRequestMessagingConfig] = OMIT, multi_advertiser_ads: typing.Optional[bool] = OMIT, - post_id: typing.Optional[str] = OMIT, post_source: typing.Optional[UpdateAdsRequestPostSource] = OMIT, primary_texts: typing.Optional[typing.Sequence[str]] = OMIT, social_accounts: typing.Optional[typing.Sequence[UpdateAdsRequestSocialAccountsItem]] = OMIT, @@ -434,6 +434,9 @@ def update( descriptions : typing.Optional[typing.Sequence[str]] The description variants shown on the ad. + existing_post_id : typing.Optional[str] + Promote a post you already published instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. + headlines : typing.Optional[typing.Sequence[str]] The headline variants shown on the ad. @@ -449,11 +452,8 @@ def update( multi_advertiser_ads : typing.Optional[bool] Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true. - post_id : typing.Optional[str] - Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. - post_source : typing.Optional[UpdateAdsRequestPostSource] - Identifies the network that owns `post_id`. The source is inferred from the ID shape when omitted. + Identifies the network that owns `existing_post_id`. The source is inferred from the ID shape when omitted. primary_texts : typing.Optional[typing.Sequence[str]] The primary text variants shown in the ad body. @@ -483,7 +483,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -496,12 +496,12 @@ def update( call_to_action=call_to_action, creatives=creatives, descriptions=descriptions, + existing_post_id=existing_post_id, headlines=headlines, lead_form=lead_form, lead_form_id=lead_form_id, messaging_config=messaging_config, multi_advertiser_ads=multi_advertiser_ads, - post_id=post_id, post_source=post_source, primary_texts=primary_texts, social_accounts=social_accounts, @@ -551,7 +551,7 @@ def duplicate( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -590,7 +590,7 @@ def pause(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -623,7 +623,7 @@ def unpause(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -751,7 +751,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -803,12 +803,12 @@ async def create( call_to_action: typing.Optional[CreateAdsRequestCallToAction] = OMIT, creatives: typing.Optional[typing.Sequence[CreateAdsRequestCreativesItem]] = OMIT, descriptions: typing.Optional[typing.Sequence[str]] = OMIT, + existing_post_id: typing.Optional[str] = OMIT, headlines: typing.Optional[typing.Sequence[str]] = OMIT, lead_form: typing.Optional[CreateAdsRequestLeadForm] = OMIT, lead_form_id: typing.Optional[str] = OMIT, messaging_config: typing.Optional[CreateAdsRequestMessagingConfig] = OMIT, multi_advertiser_ads: typing.Optional[bool] = OMIT, - post_id: typing.Optional[str] = OMIT, post_source: typing.Optional[CreateAdsRequestPostSource] = OMIT, primary_texts: typing.Optional[typing.Sequence[str]] = OMIT, social_accounts: typing.Optional[typing.Sequence[CreateAdsRequestSocialAccountsItem]] = OMIT, @@ -837,6 +837,9 @@ async def create( descriptions : typing.Optional[typing.Sequence[str]] The description variants shown on the ad. + existing_post_id : typing.Optional[str] + Promote a post you already published instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. + headlines : typing.Optional[typing.Sequence[str]] The headline variants shown on the ad. @@ -852,11 +855,8 @@ async def create( multi_advertiser_ads : typing.Optional[bool] Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true. - post_id : typing.Optional[str] - Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. - post_source : typing.Optional[CreateAdsRequestPostSource] - Identifies the network that owns `post_id`. The source is inferred from the ID shape when omitted. + Identifies the network that owns `existing_post_id`. The source is inferred from the ID shape when omitted. primary_texts : typing.Optional[typing.Sequence[str]] The primary text variants shown in the ad body. @@ -888,7 +888,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -906,12 +906,12 @@ async def main() -> None: call_to_action=call_to_action, creatives=creatives, descriptions=descriptions, + existing_post_id=existing_post_id, headlines=headlines, lead_form=lead_form, lead_form_id=lead_form_id, messaging_config=messaging_config, multi_advertiser_ads=multi_advertiser_ads, - post_id=post_id, post_source=post_source, primary_texts=primary_texts, social_accounts=social_accounts, @@ -967,7 +967,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1015,7 +1015,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1039,12 +1039,12 @@ async def update( call_to_action: typing.Optional[UpdateAdsRequestCallToAction] = OMIT, creatives: typing.Optional[typing.Sequence[UpdateAdsRequestCreativesItem]] = OMIT, descriptions: typing.Optional[typing.Sequence[str]] = OMIT, + existing_post_id: typing.Optional[str] = OMIT, headlines: typing.Optional[typing.Sequence[str]] = OMIT, lead_form: typing.Optional[UpdateAdsRequestLeadForm] = OMIT, lead_form_id: typing.Optional[str] = OMIT, messaging_config: typing.Optional[UpdateAdsRequestMessagingConfig] = OMIT, multi_advertiser_ads: typing.Optional[bool] = OMIT, - post_id: typing.Optional[str] = OMIT, post_source: typing.Optional[UpdateAdsRequestPostSource] = OMIT, primary_texts: typing.Optional[typing.Sequence[str]] = OMIT, social_accounts: typing.Optional[typing.Sequence[UpdateAdsRequestSocialAccountsItem]] = OMIT, @@ -1070,6 +1070,9 @@ async def update( descriptions : typing.Optional[typing.Sequence[str]] The description variants shown on the ad. + existing_post_id : typing.Optional[str] + Promote a post you already published instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. + headlines : typing.Optional[typing.Sequence[str]] The headline variants shown on the ad. @@ -1085,11 +1088,8 @@ async def update( multi_advertiser_ads : typing.Optional[bool] Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true. - post_id : typing.Optional[str] - Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. - post_source : typing.Optional[UpdateAdsRequestPostSource] - Identifies the network that owns `post_id`. The source is inferred from the ID shape when omitted. + Identifies the network that owns `existing_post_id`. The source is inferred from the ID shape when omitted. primary_texts : typing.Optional[typing.Sequence[str]] The primary text variants shown in the ad body. @@ -1121,7 +1121,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1140,12 +1140,12 @@ async def main() -> None: call_to_action=call_to_action, creatives=creatives, descriptions=descriptions, + existing_post_id=existing_post_id, headlines=headlines, lead_form=lead_form, lead_form_id=lead_form_id, messaging_config=messaging_config, multi_advertiser_ads=multi_advertiser_ads, - post_id=post_id, post_source=post_source, primary_texts=primary_texts, social_accounts=social_accounts, @@ -1197,7 +1197,7 @@ async def duplicate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1244,7 +1244,7 @@ async def pause(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1285,7 +1285,7 @@ async def unpause(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ads/raw_client.py b/src/whop_sdk/ads/raw_client.py index 6489b9c1..b0fae2d2 100644 --- a/src/whop_sdk/ads/raw_client.py +++ b/src/whop_sdk/ads/raw_client.py @@ -245,12 +245,12 @@ def create( call_to_action: typing.Optional[CreateAdsRequestCallToAction] = OMIT, creatives: typing.Optional[typing.Sequence[CreateAdsRequestCreativesItem]] = OMIT, descriptions: typing.Optional[typing.Sequence[str]] = OMIT, + existing_post_id: typing.Optional[str] = OMIT, headlines: typing.Optional[typing.Sequence[str]] = OMIT, lead_form: typing.Optional[CreateAdsRequestLeadForm] = OMIT, lead_form_id: typing.Optional[str] = OMIT, messaging_config: typing.Optional[CreateAdsRequestMessagingConfig] = OMIT, multi_advertiser_ads: typing.Optional[bool] = OMIT, - post_id: typing.Optional[str] = OMIT, post_source: typing.Optional[CreateAdsRequestPostSource] = OMIT, primary_texts: typing.Optional[typing.Sequence[str]] = OMIT, social_accounts: typing.Optional[typing.Sequence[CreateAdsRequestSocialAccountsItem]] = OMIT, @@ -279,6 +279,9 @@ def create( descriptions : typing.Optional[typing.Sequence[str]] The description variants shown on the ad. + existing_post_id : typing.Optional[str] + Promote a post you already published instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. + headlines : typing.Optional[typing.Sequence[str]] The headline variants shown on the ad. @@ -294,11 +297,8 @@ def create( multi_advertiser_ads : typing.Optional[bool] Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true. - post_id : typing.Optional[str] - Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. - post_source : typing.Optional[CreateAdsRequestPostSource] - Identifies the network that owns `post_id`. The source is inferred from the ID shape when omitted. + Identifies the network that owns `existing_post_id`. The source is inferred from the ID shape when omitted. primary_texts : typing.Optional[typing.Sequence[str]] The primary text variants shown in the ad body. @@ -334,6 +334,7 @@ def create( object_=creatives, annotation=typing.Sequence[CreateAdsRequestCreativesItem], direction="write" ), "descriptions": descriptions, + "existing_post_id": existing_post_id, "headlines": headlines, "lead_form": convert_and_respect_annotation_metadata( object_=lead_form, annotation=CreateAdsRequestLeadForm, direction="write" @@ -343,7 +344,6 @@ def create( object_=messaging_config, annotation=CreateAdsRequestMessagingConfig, direction="write" ), "multi_advertiser_ads": multi_advertiser_ads, - "post_id": post_id, "post_source": post_source, "primary_texts": primary_texts, "social_accounts": convert_and_respect_annotation_metadata( @@ -553,12 +553,12 @@ def update( call_to_action: typing.Optional[UpdateAdsRequestCallToAction] = OMIT, creatives: typing.Optional[typing.Sequence[UpdateAdsRequestCreativesItem]] = OMIT, descriptions: typing.Optional[typing.Sequence[str]] = OMIT, + existing_post_id: typing.Optional[str] = OMIT, headlines: typing.Optional[typing.Sequence[str]] = OMIT, lead_form: typing.Optional[UpdateAdsRequestLeadForm] = OMIT, lead_form_id: typing.Optional[str] = OMIT, messaging_config: typing.Optional[UpdateAdsRequestMessagingConfig] = OMIT, multi_advertiser_ads: typing.Optional[bool] = OMIT, - post_id: typing.Optional[str] = OMIT, post_source: typing.Optional[UpdateAdsRequestPostSource] = OMIT, primary_texts: typing.Optional[typing.Sequence[str]] = OMIT, social_accounts: typing.Optional[typing.Sequence[UpdateAdsRequestSocialAccountsItem]] = OMIT, @@ -584,6 +584,9 @@ def update( descriptions : typing.Optional[typing.Sequence[str]] The description variants shown on the ad. + existing_post_id : typing.Optional[str] + Promote a post you already published instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. + headlines : typing.Optional[typing.Sequence[str]] The headline variants shown on the ad. @@ -599,11 +602,8 @@ def update( multi_advertiser_ads : typing.Optional[bool] Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true. - post_id : typing.Optional[str] - Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. - post_source : typing.Optional[UpdateAdsRequestPostSource] - Identifies the network that owns `post_id`. The source is inferred from the ID shape when omitted. + Identifies the network that owns `existing_post_id`. The source is inferred from the ID shape when omitted. primary_texts : typing.Optional[typing.Sequence[str]] The primary text variants shown in the ad body. @@ -637,6 +637,7 @@ def update( object_=creatives, annotation=typing.Sequence[UpdateAdsRequestCreativesItem], direction="write" ), "descriptions": descriptions, + "existing_post_id": existing_post_id, "headlines": headlines, "lead_form": convert_and_respect_annotation_metadata( object_=lead_form, annotation=UpdateAdsRequestLeadForm, direction="write" @@ -646,7 +647,6 @@ def update( object_=messaging_config, annotation=UpdateAdsRequestMessagingConfig, direction="write" ), "multi_advertiser_ads": multi_advertiser_ads, - "post_id": post_id, "post_source": post_source, "primary_texts": primary_texts, "social_accounts": convert_and_respect_annotation_metadata( @@ -1092,12 +1092,12 @@ async def create( call_to_action: typing.Optional[CreateAdsRequestCallToAction] = OMIT, creatives: typing.Optional[typing.Sequence[CreateAdsRequestCreativesItem]] = OMIT, descriptions: typing.Optional[typing.Sequence[str]] = OMIT, + existing_post_id: typing.Optional[str] = OMIT, headlines: typing.Optional[typing.Sequence[str]] = OMIT, lead_form: typing.Optional[CreateAdsRequestLeadForm] = OMIT, lead_form_id: typing.Optional[str] = OMIT, messaging_config: typing.Optional[CreateAdsRequestMessagingConfig] = OMIT, multi_advertiser_ads: typing.Optional[bool] = OMIT, - post_id: typing.Optional[str] = OMIT, post_source: typing.Optional[CreateAdsRequestPostSource] = OMIT, primary_texts: typing.Optional[typing.Sequence[str]] = OMIT, social_accounts: typing.Optional[typing.Sequence[CreateAdsRequestSocialAccountsItem]] = OMIT, @@ -1126,6 +1126,9 @@ async def create( descriptions : typing.Optional[typing.Sequence[str]] The description variants shown on the ad. + existing_post_id : typing.Optional[str] + Promote a post you already published instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. + headlines : typing.Optional[typing.Sequence[str]] The headline variants shown on the ad. @@ -1141,11 +1144,8 @@ async def create( multi_advertiser_ads : typing.Optional[bool] Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true. - post_id : typing.Optional[str] - Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. - post_source : typing.Optional[CreateAdsRequestPostSource] - Identifies the network that owns `post_id`. The source is inferred from the ID shape when omitted. + Identifies the network that owns `existing_post_id`. The source is inferred from the ID shape when omitted. primary_texts : typing.Optional[typing.Sequence[str]] The primary text variants shown in the ad body. @@ -1181,6 +1181,7 @@ async def create( object_=creatives, annotation=typing.Sequence[CreateAdsRequestCreativesItem], direction="write" ), "descriptions": descriptions, + "existing_post_id": existing_post_id, "headlines": headlines, "lead_form": convert_and_respect_annotation_metadata( object_=lead_form, annotation=CreateAdsRequestLeadForm, direction="write" @@ -1190,7 +1191,6 @@ async def create( object_=messaging_config, annotation=CreateAdsRequestMessagingConfig, direction="write" ), "multi_advertiser_ads": multi_advertiser_ads, - "post_id": post_id, "post_source": post_source, "primary_texts": primary_texts, "social_accounts": convert_and_respect_annotation_metadata( @@ -1400,12 +1400,12 @@ async def update( call_to_action: typing.Optional[UpdateAdsRequestCallToAction] = OMIT, creatives: typing.Optional[typing.Sequence[UpdateAdsRequestCreativesItem]] = OMIT, descriptions: typing.Optional[typing.Sequence[str]] = OMIT, + existing_post_id: typing.Optional[str] = OMIT, headlines: typing.Optional[typing.Sequence[str]] = OMIT, lead_form: typing.Optional[UpdateAdsRequestLeadForm] = OMIT, lead_form_id: typing.Optional[str] = OMIT, messaging_config: typing.Optional[UpdateAdsRequestMessagingConfig] = OMIT, multi_advertiser_ads: typing.Optional[bool] = OMIT, - post_id: typing.Optional[str] = OMIT, post_source: typing.Optional[UpdateAdsRequestPostSource] = OMIT, primary_texts: typing.Optional[typing.Sequence[str]] = OMIT, social_accounts: typing.Optional[typing.Sequence[UpdateAdsRequestSocialAccountsItem]] = OMIT, @@ -1431,6 +1431,9 @@ async def update( descriptions : typing.Optional[typing.Sequence[str]] The description variants shown on the ad. + existing_post_id : typing.Optional[str] + Promote a post you already published instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. + headlines : typing.Optional[typing.Sequence[str]] The headline variants shown on the ad. @@ -1446,11 +1449,8 @@ async def update( multi_advertiser_ads : typing.Optional[bool] Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true. - post_id : typing.Optional[str] - Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source. - post_source : typing.Optional[UpdateAdsRequestPostSource] - Identifies the network that owns `post_id`. The source is inferred from the ID shape when omitted. + Identifies the network that owns `existing_post_id`. The source is inferred from the ID shape when omitted. primary_texts : typing.Optional[typing.Sequence[str]] The primary text variants shown in the ad body. @@ -1484,6 +1484,7 @@ async def update( object_=creatives, annotation=typing.Sequence[UpdateAdsRequestCreativesItem], direction="write" ), "descriptions": descriptions, + "existing_post_id": existing_post_id, "headlines": headlines, "lead_form": convert_and_respect_annotation_metadata( object_=lead_form, annotation=UpdateAdsRequestLeadForm, direction="write" @@ -1493,7 +1494,6 @@ async def update( object_=messaging_config, annotation=UpdateAdsRequestMessagingConfig, direction="write" ), "multi_advertiser_ads": multi_advertiser_ads, - "post_id": post_id, "post_source": post_source, "primary_texts": primary_texts, "social_accounts": convert_and_respect_annotation_metadata( diff --git a/src/whop_sdk/affiliates/client.py b/src/whop_sdk/affiliates/client.py index 54f6094c..05139b07 100644 --- a/src/whop_sdk/affiliates/client.py +++ b/src/whop_sdk/affiliates/client.py @@ -97,7 +97,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -155,7 +155,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -194,7 +194,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -230,7 +230,7 @@ def archive(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -266,7 +266,7 @@ def unarchive(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -364,7 +364,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -431,7 +431,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -478,7 +478,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -522,7 +522,7 @@ async def archive(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -566,7 +566,7 @@ async def unarchive(self, id: str, *, request_options: typing.Optional[RequestOp from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/affiliates/overrides/client.py b/src/whop_sdk/affiliates/overrides/client.py index 2f7c2995..da00e067 100644 --- a/src/whop_sdk/affiliates/overrides/client.py +++ b/src/whop_sdk/affiliates/overrides/client.py @@ -85,7 +85,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -140,7 +140,7 @@ def create( from whop_sdk.affiliates.overrides import CreateOverridesRequestBody_Standard client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -186,7 +186,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -226,7 +226,7 @@ def delete(self, id: str, override_id: str, *, request_options: typing.Optional[ from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -288,7 +288,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -375,7 +375,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -439,7 +439,7 @@ async def create( from whop_sdk.affiliates.overrides import CreateOverridesRequestBody_Standard client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -493,7 +493,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -543,7 +543,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -613,7 +613,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ai_chats/client.py b/src/whop_sdk/ai_chats/client.py index cbd15353..19feb498 100644 --- a/src/whop_sdk/ai_chats/client.py +++ b/src/whop_sdk/ai_chats/client.py @@ -75,7 +75,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -148,7 +148,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -189,7 +189,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -225,7 +225,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -278,7 +278,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -356,7 +356,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -438,7 +438,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -487,7 +487,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -531,7 +531,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -592,7 +592,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/api_keys/client.py b/src/whop_sdk/api_keys/client.py index 24677b79..66842931 100644 --- a/src/whop_sdk/api_keys/client.py +++ b/src/whop_sdk/api_keys/client.py @@ -103,7 +103,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -183,7 +183,7 @@ def create( from whop_sdk.api_keys import CreateApiKeysRequestPermissions client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -227,7 +227,7 @@ def list_permissions( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -258,7 +258,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -291,7 +291,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -349,7 +349,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -390,7 +390,7 @@ def rotate(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -482,7 +482,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -571,7 +571,7 @@ async def create( from whop_sdk.api_keys import CreateApiKeysRequestPermissions client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -623,7 +623,7 @@ async def list_permissions( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -662,7 +662,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -705,7 +705,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -771,7 +771,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -820,7 +820,7 @@ async def rotate(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.py b/src/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.py index 45f46725..2211a434 100644 --- a/src/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.py +++ b/src/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.py @@ -30,6 +30,8 @@ "2026-08-14", "2026-08-21", "2026-08-21-1", + "2026-08-25", + "2026-08-25-1", ], typing.Any, ] diff --git a/src/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.py b/src/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.py index d89f33b3..049ab738 100644 --- a/src/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.py +++ b/src/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.py @@ -30,6 +30,8 @@ "2026-08-14", "2026-08-21", "2026-08-21-1", + "2026-08-25", + "2026-08-25-1", ], typing.Any, ] diff --git a/src/whop_sdk/app_builds/client.py b/src/whop_sdk/app_builds/client.py index d55edd74..898419e4 100644 --- a/src/whop_sdk/app_builds/client.py +++ b/src/whop_sdk/app_builds/client.py @@ -97,7 +97,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -177,7 +177,7 @@ def create( from whop_sdk.app_builds import CreateAppBuildsRequestAttachment client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -221,7 +221,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -254,7 +254,7 @@ def promote(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -342,7 +342,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -431,7 +431,7 @@ async def create( from whop_sdk.app_builds import CreateAppBuildsRequestAttachment client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -483,7 +483,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -524,7 +524,7 @@ async def promote(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/apps/client.py b/src/whop_sdk/apps/client.py index 1770ee3c..5204bf20 100644 --- a/src/whop_sdk/apps/client.py +++ b/src/whop_sdk/apps/client.py @@ -122,7 +122,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -200,7 +200,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -255,7 +255,7 @@ def update_permissions_app( from whop_sdk.apps import UpdatePermissionsAppRequestRequestedPermissionsItem client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -297,7 +297,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -330,7 +330,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -448,7 +448,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -509,7 +509,7 @@ def deploy( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -579,7 +579,7 @@ def logs( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -637,7 +637,7 @@ def update_permissions( from whop_sdk.apps import UpdatePermissionsAppsRequestRequestedPermissionsItem client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -746,7 +746,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -833,7 +833,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -896,7 +896,7 @@ async def update_permissions_app( from whop_sdk.apps import UpdatePermissionsAppRequestRequestedPermissionsItem client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -946,7 +946,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -987,7 +987,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1113,7 +1113,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1182,7 +1182,7 @@ async def deploy( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1260,7 +1260,7 @@ async def logs( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1327,7 +1327,7 @@ async def update_permissions( from whop_sdk.apps import UpdatePermissionsAppsRequestRequestedPermissionsItem client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/audiences/client.py b/src/whop_sdk/audiences/client.py index e96f83c1..7ed380b9 100644 --- a/src/whop_sdk/audiences/client.py +++ b/src/whop_sdk/audiences/client.py @@ -81,7 +81,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -167,7 +167,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -212,7 +212,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -258,7 +258,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -294,7 +294,7 @@ def add_people(self, id: str, *, file_id: str, request_options: typing.Optional[ from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -371,7 +371,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -466,7 +466,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -521,7 +521,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -575,7 +575,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -621,7 +621,7 @@ async def add_people( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/authorized_users/client.py b/src/whop_sdk/authorized_users/client.py index 546f86a5..f8e25d2a 100644 --- a/src/whop_sdk/authorized_users/client.py +++ b/src/whop_sdk/authorized_users/client.py @@ -97,7 +97,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -179,7 +179,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -225,7 +225,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -270,7 +270,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -363,7 +363,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -454,7 +454,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -508,7 +508,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -561,7 +561,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/bounties/client.py b/src/whop_sdk/bounties/client.py index 9500b365..807afdb2 100644 --- a/src/whop_sdk/bounties/client.py +++ b/src/whop_sdk/bounties/client.py @@ -127,7 +127,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -232,7 +232,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -282,7 +282,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -360,7 +360,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -406,7 +406,7 @@ def cancel(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -528,7 +528,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -642,7 +642,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -700,7 +700,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -786,7 +786,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -840,7 +840,7 @@ async def cancel(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/bounties/submissions/client.py b/src/whop_sdk/bounties/submissions/client.py index 8288468a..15bd57d6 100644 --- a/src/whop_sdk/bounties/submissions/client.py +++ b/src/whop_sdk/bounties/submissions/client.py @@ -91,7 +91,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -145,7 +145,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -238,7 +238,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -301,7 +301,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/bounty_submissions/client.py b/src/whop_sdk/bounty_submissions/client.py index 96ec5b6e..feab7d5d 100644 --- a/src/whop_sdk/bounty_submissions/client.py +++ b/src/whop_sdk/bounty_submissions/client.py @@ -102,7 +102,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -167,7 +167,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -215,7 +215,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -250,7 +250,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -292,7 +292,7 @@ def submit( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -388,7 +388,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -462,7 +462,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -518,7 +518,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -561,7 +561,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -611,7 +611,7 @@ async def submit( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/card_transactions/client.py b/src/whop_sdk/card_transactions/client.py index f1fb17d1..184954c7 100644 --- a/src/whop_sdk/card_transactions/client.py +++ b/src/whop_sdk/card_transactions/client.py @@ -103,7 +103,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -166,7 +166,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -270,7 +270,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -342,7 +342,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/cards/client.py b/src/whop_sdk/cards/client.py index c07af159..04bb0a28 100644 --- a/src/whop_sdk/cards/client.py +++ b/src/whop_sdk/cards/client.py @@ -63,7 +63,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -123,7 +123,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -176,7 +176,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -260,7 +260,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -334,7 +334,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -402,7 +402,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -463,7 +463,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -555,7 +555,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/chat_channels/client.py b/src/whop_sdk/chat_channels/client.py index c2a0187d..37403e06 100644 --- a/src/whop_sdk/chat_channels/client.py +++ b/src/whop_sdk/chat_channels/client.py @@ -81,7 +81,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -132,7 +132,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -197,7 +197,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -285,7 +285,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -345,7 +345,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -418,7 +418,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/checkout_configurations/client.py b/src/whop_sdk/checkout_configurations/client.py index 90476b0a..98b2dd8c 100644 --- a/src/whop_sdk/checkout_configurations/client.py +++ b/src/whop_sdk/checkout_configurations/client.py @@ -94,7 +94,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -184,7 +184,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -232,7 +232,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -267,7 +267,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -351,7 +351,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -450,7 +450,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -506,7 +506,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -549,7 +549,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/checkout_sessions/__init__.py b/src/whop_sdk/checkout_sessions/__init__.py deleted file mode 100644 index 1870573e..00000000 --- a/src/whop_sdk/checkout_sessions/__init__.py +++ /dev/null @@ -1,37 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - -import typing -from importlib import import_module - -if typing.TYPE_CHECKING: - from .types import CreateCheckoutSessionsRequestItemsItem, CreateCheckoutSessionsRequestMode -_dynamic_imports: typing.Dict[str, str] = { - "CreateCheckoutSessionsRequestItemsItem": ".types", - "CreateCheckoutSessionsRequestMode": ".types", -} - - -def __getattr__(attr_name: str) -> typing.Any: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") - try: - module = import_module(module_name, __package__) - if module_name == f".{attr_name}": - return module - else: - return getattr(module, attr_name) - except ImportError as e: - raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e - except AttributeError as e: - raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e - - -def __dir__(): - lazy_attrs = list(_dynamic_imports.keys()) - return sorted(lazy_attrs) - - -__all__ = ["CreateCheckoutSessionsRequestItemsItem", "CreateCheckoutSessionsRequestMode"] diff --git a/src/whop_sdk/checkout_sessions/client.py b/src/whop_sdk/checkout_sessions/client.py deleted file mode 100644 index 8789f5ae..00000000 --- a/src/whop_sdk/checkout_sessions/client.py +++ /dev/null @@ -1,261 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.request_options import RequestOptions -from ..types.checkout_session import CheckoutSession -from .raw_client import AsyncRawCheckoutSessionsClient, RawCheckoutSessionsClient -from .types.create_checkout_sessions_request_items_item import CreateCheckoutSessionsRequestItemsItem -from .types.create_checkout_sessions_request_mode import CreateCheckoutSessionsRequestMode - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class CheckoutSessionsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawCheckoutSessionsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawCheckoutSessionsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawCheckoutSessionsClient - """ - return self._raw_client - - def create( - self, - *, - affiliate_code: typing.Optional[str] = OMIT, - attribution: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, - checkout_configuration: typing.Optional[str] = OMIT, - items: typing.Optional[typing.Sequence[CreateCheckoutSessionsRequestItemsItem]] = OMIT, - link: typing.Optional[str] = OMIT, - metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - mode: typing.Optional[CreateCheckoutSessionsRequestMode] = OMIT, - origin: typing.Optional[str] = OMIT, - page_route: typing.Optional[str] = OMIT, - password: typing.Optional[str] = OMIT, - promo_code: typing.Optional[str] = OMIT, - return_url: typing.Optional[str] = OMIT, - top_up_membership: typing.Optional[str] = OMIT, - tracking_link_ids_by_account: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> CheckoutSession: - """ - Opens a checkout session. No credentials required. Pass exactly one of `items`, `checkout_configuration`, or `link`. The response includes `client_secret` once; later calls authenticate with it. - - Parameters - ---------- - affiliate_code : typing.Optional[str] - The affiliate this checkout is attributed to. Write-once — set it here or never. - - attribution : typing.Optional[typing.Dict[str, typing.Any]] - String-to-string acquisition context. Recognized keys: `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, `tracking_link_id`, `funnel_id`, `source`, `country`; anything else is dropped. - - checkout_configuration : typing.Optional[str] - A seller's checkout configuration (`ch_…`) to open this checkout from. Its plan, mode, affiliate code, metadata, redirect URL, 3DS level and payment method configuration seed the session; anything you also send explicitly wins. - - items : typing.Optional[typing.Sequence[CreateCheckoutSessionsRequestItemsItem]] - What the buyer is purchasing. Exactly one entry today — more are refused until multi-item checkout ships; the array shape is the forward contract. Alongside a `checkout_configuration` or `link` it may only name that mount's own plan, where it sets quantity. - - link : typing.Optional[str] - Any checkout link the seller has shared, resolved for you: a plan ID, a checkout configuration ID, a vanity short link (send `page_route` with it), a membership transfer code, or a checkout link the seller handed out earlier. A link that is not a checkout link is refused with a coded message rather than a bare not-found. - - metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]] - Free-form string-to-string map, at most 40 keys. Whop never interprets it. - - mode : typing.Optional[CreateCheckoutSessionsRequestMode] - Defaults to the checkout configuration's mode, then `payment`. `setup` sessions are not yet available and are refused. - - origin : typing.Optional[str] - Where this checkout is being opened from — the scheme and host of your page, with no path (`https://shop.example.com`). Ignored when the request carries a browser `Origin` header, which is used instead. Recorded against the session as acquisition context. - - page_route : typing.Optional[str] - The product route a vanity `link` belongs to — the `pageRoute` in the seller's shared URL. - - password : typing.Optional[str] - The password for a password-protected plan. Right, and the gate is cleared for the session's whole life; wrong or omitted, and the session still opens — it publishes a `custom_password` requirement, the answer arrives through update, and confirm refuses until it is right. - - promo_code : typing.Optional[str] - A promo code to apply to the quote. - - return_url : typing.Optional[str] - Where the buyer lands after an off-site payment step. Absolute https URL without credentials. - - top_up_membership : typing.Optional[str] - An existing membership (`mem_…`) this checkout pays against instead of creating a new one — the buyer pays the plan's price again onto something they already own. Ownership is checked at confirm, against the buyer who confirms: a membership they do not own is refused as not found. Cannot accompany a membership transfer link. - - tracking_link_ids_by_account : typing.Optional[typing.Dict[str, typing.Optional[str]]] - First-party tracking-link candidates keyed by account ID. Ignored outside Whop's hosted checkout; an explicit `attribution.tracking_link_id` wins. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - CheckoutSession - a free plan, which needs no payment method - - Examples - -------- - from whop_sdk import Whop - - client = Whop( - "2026-08-21-1", - idempotency_key="YOUR_IDEMPOTENCY_KEY", - token="YOUR_TOKEN", - ) - client.checkout_sessions.create() - """ - _response = self._raw_client.create( - affiliate_code=affiliate_code, - attribution=attribution, - checkout_configuration=checkout_configuration, - items=items, - link=link, - metadata=metadata, - mode=mode, - origin=origin, - page_route=page_route, - password=password, - promo_code=promo_code, - return_url=return_url, - top_up_membership=top_up_membership, - tracking_link_ids_by_account=tracking_link_ids_by_account, - request_options=request_options, - ) - return _response.data - - -class AsyncCheckoutSessionsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawCheckoutSessionsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawCheckoutSessionsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawCheckoutSessionsClient - """ - return self._raw_client - - async def create( - self, - *, - affiliate_code: typing.Optional[str] = OMIT, - attribution: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, - checkout_configuration: typing.Optional[str] = OMIT, - items: typing.Optional[typing.Sequence[CreateCheckoutSessionsRequestItemsItem]] = OMIT, - link: typing.Optional[str] = OMIT, - metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - mode: typing.Optional[CreateCheckoutSessionsRequestMode] = OMIT, - origin: typing.Optional[str] = OMIT, - page_route: typing.Optional[str] = OMIT, - password: typing.Optional[str] = OMIT, - promo_code: typing.Optional[str] = OMIT, - return_url: typing.Optional[str] = OMIT, - top_up_membership: typing.Optional[str] = OMIT, - tracking_link_ids_by_account: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> CheckoutSession: - """ - Opens a checkout session. No credentials required. Pass exactly one of `items`, `checkout_configuration`, or `link`. The response includes `client_secret` once; later calls authenticate with it. - - Parameters - ---------- - affiliate_code : typing.Optional[str] - The affiliate this checkout is attributed to. Write-once — set it here or never. - - attribution : typing.Optional[typing.Dict[str, typing.Any]] - String-to-string acquisition context. Recognized keys: `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, `tracking_link_id`, `funnel_id`, `source`, `country`; anything else is dropped. - - checkout_configuration : typing.Optional[str] - A seller's checkout configuration (`ch_…`) to open this checkout from. Its plan, mode, affiliate code, metadata, redirect URL, 3DS level and payment method configuration seed the session; anything you also send explicitly wins. - - items : typing.Optional[typing.Sequence[CreateCheckoutSessionsRequestItemsItem]] - What the buyer is purchasing. Exactly one entry today — more are refused until multi-item checkout ships; the array shape is the forward contract. Alongside a `checkout_configuration` or `link` it may only name that mount's own plan, where it sets quantity. - - link : typing.Optional[str] - Any checkout link the seller has shared, resolved for you: a plan ID, a checkout configuration ID, a vanity short link (send `page_route` with it), a membership transfer code, or a checkout link the seller handed out earlier. A link that is not a checkout link is refused with a coded message rather than a bare not-found. - - metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]] - Free-form string-to-string map, at most 40 keys. Whop never interprets it. - - mode : typing.Optional[CreateCheckoutSessionsRequestMode] - Defaults to the checkout configuration's mode, then `payment`. `setup` sessions are not yet available and are refused. - - origin : typing.Optional[str] - Where this checkout is being opened from — the scheme and host of your page, with no path (`https://shop.example.com`). Ignored when the request carries a browser `Origin` header, which is used instead. Recorded against the session as acquisition context. - - page_route : typing.Optional[str] - The product route a vanity `link` belongs to — the `pageRoute` in the seller's shared URL. - - password : typing.Optional[str] - The password for a password-protected plan. Right, and the gate is cleared for the session's whole life; wrong or omitted, and the session still opens — it publishes a `custom_password` requirement, the answer arrives through update, and confirm refuses until it is right. - - promo_code : typing.Optional[str] - A promo code to apply to the quote. - - return_url : typing.Optional[str] - Where the buyer lands after an off-site payment step. Absolute https URL without credentials. - - top_up_membership : typing.Optional[str] - An existing membership (`mem_…`) this checkout pays against instead of creating a new one — the buyer pays the plan's price again onto something they already own. Ownership is checked at confirm, against the buyer who confirms: a membership they do not own is refused as not found. Cannot accompany a membership transfer link. - - tracking_link_ids_by_account : typing.Optional[typing.Dict[str, typing.Optional[str]]] - First-party tracking-link candidates keyed by account ID. Ignored outside Whop's hosted checkout; an explicit `attribution.tracking_link_id` wins. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - CheckoutSession - a free plan, which needs no payment method - - Examples - -------- - import asyncio - - from whop_sdk import AsyncWhop - - client = AsyncWhop( - "2026-08-21-1", - idempotency_key="YOUR_IDEMPOTENCY_KEY", - token="YOUR_TOKEN", - ) - - - async def main() -> None: - await client.checkout_sessions.create() - - - asyncio.run(main()) - """ - _response = await self._raw_client.create( - affiliate_code=affiliate_code, - attribution=attribution, - checkout_configuration=checkout_configuration, - items=items, - link=link, - metadata=metadata, - mode=mode, - origin=origin, - page_route=page_route, - password=password, - promo_code=promo_code, - return_url=return_url, - top_up_membership=top_up_membership, - tracking_link_ids_by_account=tracking_link_ids_by_account, - request_options=request_options, - ) - return _response.data diff --git a/src/whop_sdk/checkout_sessions/raw_client.py b/src/whop_sdk/checkout_sessions/raw_client.py deleted file mode 100644 index 38a3b067..00000000 --- a/src/whop_sdk/checkout_sessions/raw_client.py +++ /dev/null @@ -1,339 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.parse_error import ParsingError -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..core.serialization import convert_and_respect_annotation_metadata -from ..errors.bad_request_error import BadRequestError -from ..errors.conflict_error import ConflictError -from ..errors.not_found_error import NotFoundError -from ..types.checkout_session import CheckoutSession -from ..types.v1error_response import V1ErrorResponse -from .types.create_checkout_sessions_request_items_item import CreateCheckoutSessionsRequestItemsItem -from .types.create_checkout_sessions_request_mode import CreateCheckoutSessionsRequestMode -from pydantic import ValidationError - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawCheckoutSessionsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def create( - self, - *, - affiliate_code: typing.Optional[str] = OMIT, - attribution: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, - checkout_configuration: typing.Optional[str] = OMIT, - items: typing.Optional[typing.Sequence[CreateCheckoutSessionsRequestItemsItem]] = OMIT, - link: typing.Optional[str] = OMIT, - metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - mode: typing.Optional[CreateCheckoutSessionsRequestMode] = OMIT, - origin: typing.Optional[str] = OMIT, - page_route: typing.Optional[str] = OMIT, - password: typing.Optional[str] = OMIT, - promo_code: typing.Optional[str] = OMIT, - return_url: typing.Optional[str] = OMIT, - top_up_membership: typing.Optional[str] = OMIT, - tracking_link_ids_by_account: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[CheckoutSession]: - """ - Opens a checkout session. No credentials required. Pass exactly one of `items`, `checkout_configuration`, or `link`. The response includes `client_secret` once; later calls authenticate with it. - - Parameters - ---------- - affiliate_code : typing.Optional[str] - The affiliate this checkout is attributed to. Write-once — set it here or never. - - attribution : typing.Optional[typing.Dict[str, typing.Any]] - String-to-string acquisition context. Recognized keys: `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, `tracking_link_id`, `funnel_id`, `source`, `country`; anything else is dropped. - - checkout_configuration : typing.Optional[str] - A seller's checkout configuration (`ch_…`) to open this checkout from. Its plan, mode, affiliate code, metadata, redirect URL, 3DS level and payment method configuration seed the session; anything you also send explicitly wins. - - items : typing.Optional[typing.Sequence[CreateCheckoutSessionsRequestItemsItem]] - What the buyer is purchasing. Exactly one entry today — more are refused until multi-item checkout ships; the array shape is the forward contract. Alongside a `checkout_configuration` or `link` it may only name that mount's own plan, where it sets quantity. - - link : typing.Optional[str] - Any checkout link the seller has shared, resolved for you: a plan ID, a checkout configuration ID, a vanity short link (send `page_route` with it), a membership transfer code, or a checkout link the seller handed out earlier. A link that is not a checkout link is refused with a coded message rather than a bare not-found. - - metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]] - Free-form string-to-string map, at most 40 keys. Whop never interprets it. - - mode : typing.Optional[CreateCheckoutSessionsRequestMode] - Defaults to the checkout configuration's mode, then `payment`. `setup` sessions are not yet available and are refused. - - origin : typing.Optional[str] - Where this checkout is being opened from — the scheme and host of your page, with no path (`https://shop.example.com`). Ignored when the request carries a browser `Origin` header, which is used instead. Recorded against the session as acquisition context. - - page_route : typing.Optional[str] - The product route a vanity `link` belongs to — the `pageRoute` in the seller's shared URL. - - password : typing.Optional[str] - The password for a password-protected plan. Right, and the gate is cleared for the session's whole life; wrong or omitted, and the session still opens — it publishes a `custom_password` requirement, the answer arrives through update, and confirm refuses until it is right. - - promo_code : typing.Optional[str] - A promo code to apply to the quote. - - return_url : typing.Optional[str] - Where the buyer lands after an off-site payment step. Absolute https URL without credentials. - - top_up_membership : typing.Optional[str] - An existing membership (`mem_…`) this checkout pays against instead of creating a new one — the buyer pays the plan's price again onto something they already own. Ownership is checked at confirm, against the buyer who confirms: a membership they do not own is refused as not found. Cannot accompany a membership transfer link. - - tracking_link_ids_by_account : typing.Optional[typing.Dict[str, typing.Optional[str]]] - First-party tracking-link candidates keyed by account ID. Ignored outside Whop's hosted checkout; an explicit `attribution.tracking_link_id` wins. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[CheckoutSession] - a free plan, which needs no payment method - """ - _response = self._client_wrapper.httpx_client.request( - "checkout_sessions", - method="POST", - json={ - "affiliate_code": affiliate_code, - "attribution": attribution, - "checkout_configuration": checkout_configuration, - "items": convert_and_respect_annotation_metadata( - object_=items, annotation=typing.Sequence[CreateCheckoutSessionsRequestItemsItem], direction="write" - ), - "link": link, - "metadata": metadata, - "mode": mode, - "origin": origin, - "page_route": page_route, - "password": password, - "promo_code": promo_code, - "return_url": return_url, - "top_up_membership": top_up_membership, - "tracking_link_ids_by_account": tracking_link_ids_by_account, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CheckoutSession, - parse_obj_as( - type_=CheckoutSession, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 409: - raise ConflictError( - headers=dict(_response.headers), - body=typing.cast( - V1ErrorResponse, - parse_obj_as( - type_=V1ErrorResponse, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - except ValidationError as e: - raise ParsingError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - -class AsyncRawCheckoutSessionsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def create( - self, - *, - affiliate_code: typing.Optional[str] = OMIT, - attribution: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, - checkout_configuration: typing.Optional[str] = OMIT, - items: typing.Optional[typing.Sequence[CreateCheckoutSessionsRequestItemsItem]] = OMIT, - link: typing.Optional[str] = OMIT, - metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - mode: typing.Optional[CreateCheckoutSessionsRequestMode] = OMIT, - origin: typing.Optional[str] = OMIT, - page_route: typing.Optional[str] = OMIT, - password: typing.Optional[str] = OMIT, - promo_code: typing.Optional[str] = OMIT, - return_url: typing.Optional[str] = OMIT, - top_up_membership: typing.Optional[str] = OMIT, - tracking_link_ids_by_account: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[CheckoutSession]: - """ - Opens a checkout session. No credentials required. Pass exactly one of `items`, `checkout_configuration`, or `link`. The response includes `client_secret` once; later calls authenticate with it. - - Parameters - ---------- - affiliate_code : typing.Optional[str] - The affiliate this checkout is attributed to. Write-once — set it here or never. - - attribution : typing.Optional[typing.Dict[str, typing.Any]] - String-to-string acquisition context. Recognized keys: `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, `tracking_link_id`, `funnel_id`, `source`, `country`; anything else is dropped. - - checkout_configuration : typing.Optional[str] - A seller's checkout configuration (`ch_…`) to open this checkout from. Its plan, mode, affiliate code, metadata, redirect URL, 3DS level and payment method configuration seed the session; anything you also send explicitly wins. - - items : typing.Optional[typing.Sequence[CreateCheckoutSessionsRequestItemsItem]] - What the buyer is purchasing. Exactly one entry today — more are refused until multi-item checkout ships; the array shape is the forward contract. Alongside a `checkout_configuration` or `link` it may only name that mount's own plan, where it sets quantity. - - link : typing.Optional[str] - Any checkout link the seller has shared, resolved for you: a plan ID, a checkout configuration ID, a vanity short link (send `page_route` with it), a membership transfer code, or a checkout link the seller handed out earlier. A link that is not a checkout link is refused with a coded message rather than a bare not-found. - - metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]] - Free-form string-to-string map, at most 40 keys. Whop never interprets it. - - mode : typing.Optional[CreateCheckoutSessionsRequestMode] - Defaults to the checkout configuration's mode, then `payment`. `setup` sessions are not yet available and are refused. - - origin : typing.Optional[str] - Where this checkout is being opened from — the scheme and host of your page, with no path (`https://shop.example.com`). Ignored when the request carries a browser `Origin` header, which is used instead. Recorded against the session as acquisition context. - - page_route : typing.Optional[str] - The product route a vanity `link` belongs to — the `pageRoute` in the seller's shared URL. - - password : typing.Optional[str] - The password for a password-protected plan. Right, and the gate is cleared for the session's whole life; wrong or omitted, and the session still opens — it publishes a `custom_password` requirement, the answer arrives through update, and confirm refuses until it is right. - - promo_code : typing.Optional[str] - A promo code to apply to the quote. - - return_url : typing.Optional[str] - Where the buyer lands after an off-site payment step. Absolute https URL without credentials. - - top_up_membership : typing.Optional[str] - An existing membership (`mem_…`) this checkout pays against instead of creating a new one — the buyer pays the plan's price again onto something they already own. Ownership is checked at confirm, against the buyer who confirms: a membership they do not own is refused as not found. Cannot accompany a membership transfer link. - - tracking_link_ids_by_account : typing.Optional[typing.Dict[str, typing.Optional[str]]] - First-party tracking-link candidates keyed by account ID. Ignored outside Whop's hosted checkout; an explicit `attribution.tracking_link_id` wins. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[CheckoutSession] - a free plan, which needs no payment method - """ - _response = await self._client_wrapper.httpx_client.request( - "checkout_sessions", - method="POST", - json={ - "affiliate_code": affiliate_code, - "attribution": attribution, - "checkout_configuration": checkout_configuration, - "items": convert_and_respect_annotation_metadata( - object_=items, annotation=typing.Sequence[CreateCheckoutSessionsRequestItemsItem], direction="write" - ), - "link": link, - "metadata": metadata, - "mode": mode, - "origin": origin, - "page_route": page_route, - "password": password, - "promo_code": promo_code, - "return_url": return_url, - "top_up_membership": top_up_membership, - "tracking_link_ids_by_account": tracking_link_ids_by_account, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CheckoutSession, - parse_obj_as( - type_=CheckoutSession, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 409: - raise ConflictError( - headers=dict(_response.headers), - body=typing.cast( - V1ErrorResponse, - parse_obj_as( - type_=V1ErrorResponse, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - except ValidationError as e: - raise ParsingError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/whop_sdk/checkout_sessions/types/__init__.py b/src/whop_sdk/checkout_sessions/types/__init__.py deleted file mode 100644 index 16578c24..00000000 --- a/src/whop_sdk/checkout_sessions/types/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - -import typing -from importlib import import_module - -if typing.TYPE_CHECKING: - from .create_checkout_sessions_request_items_item import CreateCheckoutSessionsRequestItemsItem - from .create_checkout_sessions_request_mode import CreateCheckoutSessionsRequestMode -_dynamic_imports: typing.Dict[str, str] = { - "CreateCheckoutSessionsRequestItemsItem": ".create_checkout_sessions_request_items_item", - "CreateCheckoutSessionsRequestMode": ".create_checkout_sessions_request_mode", -} - - -def __getattr__(attr_name: str) -> typing.Any: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") - try: - module = import_module(module_name, __package__) - if module_name == f".{attr_name}": - return module - else: - return getattr(module, attr_name) - except ImportError as e: - raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e - except AttributeError as e: - raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e - - -def __dir__(): - lazy_attrs = list(_dynamic_imports.keys()) - return sorted(lazy_attrs) - - -__all__ = ["CreateCheckoutSessionsRequestItemsItem", "CreateCheckoutSessionsRequestMode"] diff --git a/src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_mode.py b/src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_mode.py deleted file mode 100644 index e621eb86..00000000 --- a/src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_mode.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CreateCheckoutSessionsRequestMode = typing.Union[typing.Literal["payment", "setup"], typing.Any] diff --git a/src/whop_sdk/client.py b/src/whop_sdk/client.py index d7ea4461..1b892a1e 100644 --- a/src/whop_sdk/client.py +++ b/src/whop_sdk/client.py @@ -30,7 +30,6 @@ from .cards.client import AsyncCardsClient, CardsClient from .chat_channels.client import AsyncChatChannelsClient, ChatChannelsClient from .checkout_configurations.client import AsyncCheckoutConfigurationsClient, CheckoutConfigurationsClient - from .checkout_sessions.client import AsyncCheckoutSessionsClient, CheckoutSessionsClient from .companies.client import AsyncCompaniesClient, CompaniesClient from .company_token_transactions.client import AsyncCompanyTokenTransactionsClient, CompanyTokenTransactionsClient from .course_chapters.client import AsyncCourseChaptersClient, CourseChaptersClient @@ -91,7 +90,6 @@ from .users.client import AsyncUsersClient, UsersClient from .verifications.client import AsyncVerificationsClient, VerificationsClient from .webhooks.client import AsyncWebhooksClient, WebhooksClient - from .withdrawals.client import AsyncWithdrawalsClient, WithdrawalsClient class Whop: @@ -144,7 +142,7 @@ class Whop: from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -155,7 +153,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: WhopEnvironment = WhopEnvironment.DEFAULT, - api_version_date: typing.Optional[str] = "2026-08-21-1", + api_version_date: typing.Optional[str] = "2026-08-25-1", idempotency_key: typing.Optional[str] = None, token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, headers: typing.Optional[typing.Dict[str, str]] = None, @@ -206,7 +204,6 @@ def __init__( self._cards: typing.Optional[CardsClient] = None self._chat_channels: typing.Optional[ChatChannelsClient] = None self._checkout_configurations: typing.Optional[CheckoutConfigurationsClient] = None - self._checkout_sessions: typing.Optional[CheckoutSessionsClient] = None self._companies: typing.Optional[CompaniesClient] = None self._company_token_transactions: typing.Optional[CompanyTokenTransactionsClient] = None self._course_chapters: typing.Optional[CourseChaptersClient] = None @@ -267,7 +264,6 @@ def __init__( self._users: typing.Optional[UsersClient] = None self._verifications: typing.Optional[VerificationsClient] = None self._webhooks: typing.Optional[WebhooksClient] = None - self._withdrawals: typing.Optional[WithdrawalsClient] = None @property def access_tokens(self): @@ -429,14 +425,6 @@ def checkout_configurations(self): self._checkout_configurations = CheckoutConfigurationsClient(client_wrapper=self._client_wrapper) return self._checkout_configurations - @property - def checkout_sessions(self): - if self._checkout_sessions is None: - from .checkout_sessions.client import CheckoutSessionsClient # noqa: E402 - - self._checkout_sessions = CheckoutSessionsClient(client_wrapper=self._client_wrapper) - return self._checkout_sessions - @property def companies(self): if self._companies is None: @@ -917,14 +905,6 @@ def webhooks(self): self._webhooks = WebhooksClient(client_wrapper=self._client_wrapper) return self._webhooks - @property - def withdrawals(self): - if self._withdrawals is None: - from .withdrawals.client import WithdrawalsClient # noqa: E402 - - self._withdrawals = WithdrawalsClient(client_wrapper=self._client_wrapper) - return self._withdrawals - def _make_default_async_client( timeout: typing.Optional[float], @@ -997,7 +977,7 @@ class AsyncWhop: from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1008,7 +988,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: WhopEnvironment = WhopEnvironment.DEFAULT, - api_version_date: typing.Optional[str] = "2026-08-21-1", + api_version_date: typing.Optional[str] = "2026-08-25-1", idempotency_key: typing.Optional[str] = None, token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, headers: typing.Optional[typing.Dict[str, str]] = None, @@ -1059,7 +1039,6 @@ def __init__( self._cards: typing.Optional[AsyncCardsClient] = None self._chat_channels: typing.Optional[AsyncChatChannelsClient] = None self._checkout_configurations: typing.Optional[AsyncCheckoutConfigurationsClient] = None - self._checkout_sessions: typing.Optional[AsyncCheckoutSessionsClient] = None self._companies: typing.Optional[AsyncCompaniesClient] = None self._company_token_transactions: typing.Optional[AsyncCompanyTokenTransactionsClient] = None self._course_chapters: typing.Optional[AsyncCourseChaptersClient] = None @@ -1120,7 +1099,6 @@ def __init__( self._users: typing.Optional[AsyncUsersClient] = None self._verifications: typing.Optional[AsyncVerificationsClient] = None self._webhooks: typing.Optional[AsyncWebhooksClient] = None - self._withdrawals: typing.Optional[AsyncWithdrawalsClient] = None @property def access_tokens(self): @@ -1282,14 +1260,6 @@ def checkout_configurations(self): self._checkout_configurations = AsyncCheckoutConfigurationsClient(client_wrapper=self._client_wrapper) return self._checkout_configurations - @property - def checkout_sessions(self): - if self._checkout_sessions is None: - from .checkout_sessions.client import AsyncCheckoutSessionsClient # noqa: E402 - - self._checkout_sessions = AsyncCheckoutSessionsClient(client_wrapper=self._client_wrapper) - return self._checkout_sessions - @property def companies(self): if self._companies is None: @@ -1770,14 +1740,6 @@ def webhooks(self): self._webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper) return self._webhooks - @property - def withdrawals(self): - if self._withdrawals is None: - from .withdrawals.client import AsyncWithdrawalsClient # noqa: E402 - - self._withdrawals = AsyncWithdrawalsClient(client_wrapper=self._client_wrapper) - return self._withdrawals - def _get_base_url(*, base_url: typing.Optional[str] = None, environment: WhopEnvironment) -> str: if base_url is not None: diff --git a/src/whop_sdk/companies/client.py b/src/whop_sdk/companies/client.py index a173f648..6c745814 100644 --- a/src/whop_sdk/companies/client.py +++ b/src/whop_sdk/companies/client.py @@ -98,7 +98,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -189,7 +189,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -235,7 +235,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -321,7 +321,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -389,7 +389,7 @@ def create_api_key( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -484,7 +484,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -584,7 +584,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -638,7 +638,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -732,7 +732,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -808,7 +808,7 @@ async def create_api_key( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/company_token_transactions/client.py b/src/whop_sdk/company_token_transactions/client.py index c72c9329..f12f2391 100644 --- a/src/whop_sdk/company_token_transactions/client.py +++ b/src/whop_sdk/company_token_transactions/client.py @@ -86,7 +86,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -144,7 +144,7 @@ def create( ) client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -187,7 +187,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -271,7 +271,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -338,7 +338,7 @@ async def create( ) client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -391,7 +391,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/course_chapters/client.py b/src/whop_sdk/course_chapters/client.py index 67eae1f8..a766999b 100644 --- a/src/whop_sdk/course_chapters/client.py +++ b/src/whop_sdk/course_chapters/client.py @@ -75,7 +75,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -128,7 +128,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -164,7 +164,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -200,7 +200,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -239,7 +239,7 @@ def update(self, id: str, *, title: str, request_options: typing.Optional[Reques from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -315,7 +315,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -377,7 +377,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -421,7 +421,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -465,7 +465,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -514,7 +514,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/course_lesson_interactions/client.py b/src/whop_sdk/course_lesson_interactions/client.py index 56a14e8d..b65401c4 100644 --- a/src/whop_sdk/course_lesson_interactions/client.py +++ b/src/whop_sdk/course_lesson_interactions/client.py @@ -85,7 +85,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -140,7 +140,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -228,7 +228,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -294,7 +294,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/course_lessons/client.py b/src/whop_sdk/course_lessons/client.py index 815e1a57..262b191a 100644 --- a/src/whop_sdk/course_lessons/client.py +++ b/src/whop_sdk/course_lessons/client.py @@ -94,7 +94,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -178,7 +178,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -225,7 +225,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -261,7 +261,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -362,7 +362,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -412,7 +412,7 @@ def mark_as_completed(self, lesson_id: str, *, request_options: typing.Optional[ from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -445,7 +445,7 @@ def start(self, lesson_id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -490,7 +490,7 @@ def submit_assessment( ) client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -574,7 +574,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -667,7 +667,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -722,7 +722,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -766,7 +766,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -875,7 +875,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -935,7 +935,7 @@ async def mark_as_completed( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -976,7 +976,7 @@ async def start(self, lesson_id: str, *, request_options: typing.Optional[Reques from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1029,7 +1029,7 @@ async def submit_assessment( ) client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/course_students/client.py b/src/whop_sdk/course_students/client.py index 0edd32b2..8b468148 100644 --- a/src/whop_sdk/course_students/client.py +++ b/src/whop_sdk/course_students/client.py @@ -77,7 +77,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -128,7 +128,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -208,7 +208,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -268,7 +268,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/courses/client.py b/src/whop_sdk/courses/client.py index e35ecbe9..7e758830 100644 --- a/src/whop_sdk/courses/client.py +++ b/src/whop_sdk/courses/client.py @@ -84,7 +84,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -168,7 +168,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -215,7 +215,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -251,7 +251,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -332,7 +332,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -424,7 +424,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -517,7 +517,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -572,7 +572,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -616,7 +616,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -705,7 +705,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/deposits/client.py b/src/whop_sdk/deposits/client.py index 65166447..5cb54dff 100644 --- a/src/whop_sdk/deposits/client.py +++ b/src/whop_sdk/deposits/client.py @@ -67,7 +67,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -137,7 +137,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/dispute_alerts/client.py b/src/whop_sdk/dispute_alerts/client.py index 87f18484..91f12504 100644 --- a/src/whop_sdk/dispute_alerts/client.py +++ b/src/whop_sdk/dispute_alerts/client.py @@ -95,7 +95,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -143,7 +143,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -239,7 +239,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -296,7 +296,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/disputes/client.py b/src/whop_sdk/disputes/client.py index bc1112ed..0b8e704d 100644 --- a/src/whop_sdk/disputes/client.py +++ b/src/whop_sdk/disputes/client.py @@ -117,7 +117,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -194,7 +194,7 @@ def summary( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -233,7 +233,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -275,7 +275,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -308,7 +308,7 @@ def submit(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -351,7 +351,7 @@ def submit_evidence_dispute(self, id: str, *, request_options: typing.Optional[R from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -459,7 +459,7 @@ def update_evidence_dispute( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -519,7 +519,7 @@ def upload_evidence( from whop_sdk.disputes import UploadEvidenceDisputesRequestDocumentsItem client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -622,7 +622,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -708,7 +708,7 @@ async def summary( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -755,7 +755,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -805,7 +805,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -846,7 +846,7 @@ async def submit(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -899,7 +899,7 @@ async def submit_evidence_dispute( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1015,7 +1015,7 @@ async def update_evidence_dispute( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1083,7 +1083,7 @@ async def upload_evidence( from whop_sdk.disputes import UploadEvidenceDisputesRequestDocumentsItem client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/dm_channels/client.py b/src/whop_sdk/dm_channels/client.py index 45e00d4e..2b7d0817 100644 --- a/src/whop_sdk/dm_channels/client.py +++ b/src/whop_sdk/dm_channels/client.py @@ -75,7 +75,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -136,7 +136,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -179,7 +179,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -216,7 +216,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -262,7 +262,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -337,7 +337,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -407,7 +407,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -458,7 +458,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -503,7 +503,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -557,7 +557,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/dm_members/client.py b/src/whop_sdk/dm_members/client.py index 58a378ad..f5a01501 100644 --- a/src/whop_sdk/dm_members/client.py +++ b/src/whop_sdk/dm_members/client.py @@ -78,7 +78,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -128,7 +128,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -166,7 +166,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -203,7 +203,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -253,7 +253,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -331,7 +331,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -390,7 +390,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -438,7 +438,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -483,7 +483,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -541,7 +541,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/entries/client.py b/src/whop_sdk/entries/client.py index 4b0fdf75..f5775b90 100644 --- a/src/whop_sdk/entries/client.py +++ b/src/whop_sdk/entries/client.py @@ -106,7 +106,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -169,7 +169,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -205,7 +205,7 @@ def approve(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -243,7 +243,7 @@ def deny(self, id: str, *, request_options: typing.Optional[RequestOptions] = No from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -346,7 +346,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -418,7 +418,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -464,7 +464,7 @@ async def approve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -510,7 +510,7 @@ async def deny(self, id: str, *, request_options: typing.Optional[RequestOptions from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/events/client.py b/src/whop_sdk/events/client.py index cae81c3c..86491531 100644 --- a/src/whop_sdk/events/client.py +++ b/src/whop_sdk/events/client.py @@ -138,7 +138,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -269,7 +269,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -340,7 +340,7 @@ def pulse( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -386,7 +386,7 @@ def validate_pixel( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -512,7 +512,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -652,7 +652,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -731,7 +731,7 @@ async def pulse( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -786,7 +786,7 @@ async def validate_pixel( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/experiences/client.py b/src/whop_sdk/experiences/client.py index 4997b52d..08359842 100644 --- a/src/whop_sdk/experiences/client.py +++ b/src/whop_sdk/experiences/client.py @@ -94,7 +94,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -182,7 +182,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -225,7 +225,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -259,7 +259,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -326,7 +326,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -377,7 +377,7 @@ def attach( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -419,7 +419,7 @@ def detach( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -464,7 +464,7 @@ def duplicate( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -553,7 +553,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -650,7 +650,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -701,7 +701,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -743,7 +743,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -818,7 +818,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -877,7 +877,7 @@ async def attach( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -927,7 +927,7 @@ async def detach( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -980,7 +980,7 @@ async def duplicate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/exports/client.py b/src/whop_sdk/exports/client.py index 6ef2fc25..673208b4 100644 --- a/src/whop_sdk/exports/client.py +++ b/src/whop_sdk/exports/client.py @@ -83,7 +83,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -144,7 +144,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -184,7 +184,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -264,7 +264,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -333,7 +333,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -381,7 +381,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/fee_markups/client.py b/src/whop_sdk/fee_markups/client.py index 94a4a796..3d0271f1 100644 --- a/src/whop_sdk/fee_markups/client.py +++ b/src/whop_sdk/fee_markups/client.py @@ -76,7 +76,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -145,7 +145,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -190,7 +190,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -265,7 +265,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -343,7 +343,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -396,7 +396,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/files/__init__.py b/src/whop_sdk/files/__init__.py index 96e511f1..68178c1d 100644 --- a/src/whop_sdk/files/__init__.py +++ b/src/whop_sdk/files/__init__.py @@ -6,10 +6,21 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import CompleteFilesRequestMultipartPartsItem, CreateFilesRequestVisibility + from .types import ( + CompleteFilesRequestMultipartPartsItem, + CreateFilesRequestVisibility, + ListFilesRequestDirection, + ListFilesRequestOrder, + ListFilesResponse, + ListFilesResponsePageInfo, + ) _dynamic_imports: typing.Dict[str, str] = { "CompleteFilesRequestMultipartPartsItem": ".types", "CreateFilesRequestVisibility": ".types", + "ListFilesRequestDirection": ".types", + "ListFilesRequestOrder": ".types", + "ListFilesResponse": ".types", + "ListFilesResponsePageInfo": ".types", } @@ -34,4 +45,11 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["CompleteFilesRequestMultipartPartsItem", "CreateFilesRequestVisibility"] +__all__ = [ + "CompleteFilesRequestMultipartPartsItem", + "CreateFilesRequestVisibility", + "ListFilesRequestDirection", + "ListFilesRequestOrder", + "ListFilesResponse", + "ListFilesResponsePageInfo", +] diff --git a/src/whop_sdk/files/client.py b/src/whop_sdk/files/client.py index 81196281..0ccf6cd6 100644 --- a/src/whop_sdk/files/client.py +++ b/src/whop_sdk/files/client.py @@ -3,11 +3,15 @@ import typing from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.pagination import AsyncPager, SyncPager from ..core.request_options import RequestOptions from ..types.file import File from .raw_client import AsyncRawFilesClient, RawFilesClient from .types.complete_files_request_multipart_parts_item import CompleteFilesRequestMultipartPartsItem from .types.create_files_request_visibility import CreateFilesRequestVisibility +from .types.list_files_request_direction import ListFilesRequestDirection +from .types.list_files_request_order import ListFilesRequestOrder +from .types.list_files_response import ListFilesResponse # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -28,6 +32,81 @@ def with_raw_response(self) -> RawFilesClient: """ return self._raw_client + def list( + self, + *, + file_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + order: typing.Optional[ListFilesRequestOrder] = None, + direction: typing.Optional[ListFilesRequestDirection] = None, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> SyncPager[File, ListFilesResponse]: + """ + Returns the files with the given IDs, newest first — fetch a batch in one request instead of retrieving each file individually. Only files you created are returned; IDs that do not exist, or that another credential created, are omitted. A request for up to 100 IDs answers in a single page by default; a larger batch pages at up to 100 files per response — follow `page_info` with the same `file_ids` to walk the rest. + + Parameters + ---------- + file_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] + The files to return, each prefixed `file_`. Repeat the parameter to pass several, up to 250 per request. Batches of up to 100 answer in one page by default; larger batches page at up to 100 per response. + + order : typing.Optional[ListFilesRequestOrder] + The field to sort by. + + direction : typing.Optional[ListFilesRequestDirection] + The sort direction. + + first : typing.Optional[int] + The number of files to return. + + after : typing.Optional[str] + A cursor; returns files after this position. + + last : typing.Optional[int] + The number of files to return from the end of the range. + + before : typing.Optional[str] + A cursor; returns files before this position. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + SyncPager[File, ListFilesResponse] + files listed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-08-25-1", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + response = client.files.list( + file_ids=["file_xxxxxxxxxxxxx"], + ) + for item in response: + yield item + # alternatively, you can paginate page-by-page + for page in response.iter_pages(): + yield page + """ + return self._raw_client.list( + file_ids=file_ids, + order=order, + direction=direction, + first=first, + after=after, + last=last, + before=before, + request_options=request_options, + ) + def create( self, *, @@ -67,7 +146,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -106,7 +185,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -153,7 +232,7 @@ def complete( from whop_sdk.files import CompleteFilesRequestMultipartPartsItem client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -192,6 +271,90 @@ def with_raw_response(self) -> AsyncRawFilesClient: """ return self._raw_client + async def list( + self, + *, + file_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + order: typing.Optional[ListFilesRequestOrder] = None, + direction: typing.Optional[ListFilesRequestDirection] = None, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncPager[File, ListFilesResponse]: + """ + Returns the files with the given IDs, newest first — fetch a batch in one request instead of retrieving each file individually. Only files you created are returned; IDs that do not exist, or that another credential created, are omitted. A request for up to 100 IDs answers in a single page by default; a larger batch pages at up to 100 files per response — follow `page_info` with the same `file_ids` to walk the rest. + + Parameters + ---------- + file_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] + The files to return, each prefixed `file_`. Repeat the parameter to pass several, up to 250 per request. Batches of up to 100 answer in one page by default; larger batches page at up to 100 per response. + + order : typing.Optional[ListFilesRequestOrder] + The field to sort by. + + direction : typing.Optional[ListFilesRequestDirection] + The sort direction. + + first : typing.Optional[int] + The number of files to return. + + after : typing.Optional[str] + A cursor; returns files after this position. + + last : typing.Optional[int] + The number of files to return from the end of the range. + + before : typing.Optional[str] + A cursor; returns files before this position. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPager[File, ListFilesResponse] + files listed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-08-25-1", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + response = await client.files.list( + file_ids=["file_xxxxxxxxxxxxx"], + ) + async for item in response: + yield item + + # alternatively, you can paginate page-by-page + async for page in response.iter_pages(): + yield page + + + asyncio.run(main()) + """ + return await self._raw_client.list( + file_ids=file_ids, + order=order, + direction=direction, + first=first, + after=after, + last=last, + before=before, + request_options=request_options, + ) + async def create( self, *, @@ -233,7 +396,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -280,7 +443,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -335,7 +498,7 @@ async def complete( from whop_sdk.files import CompleteFilesRequestMultipartPartsItem client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/files/raw_client.py b/src/whop_sdk/files/raw_client.py index 4b3d2b6d..83142513 100644 --- a/src/whop_sdk/files/raw_client.py +++ b/src/whop_sdk/files/raw_client.py @@ -7,6 +7,7 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.http_response import AsyncHttpResponse, HttpResponse from ..core.jsonable_encoder import encode_path_param +from ..core.pagination import AsyncPager, SyncPager from ..core.parse_error import ParsingError from ..core.pydantic_utilities import parse_obj_as from ..core.request_options import RequestOptions @@ -19,6 +20,9 @@ from ..types.v1error_response import V1ErrorResponse from .types.complete_files_request_multipart_parts_item import CompleteFilesRequestMultipartPartsItem from .types.create_files_request_visibility import CreateFilesRequestVisibility +from .types.list_files_request_direction import ListFilesRequestDirection +from .types.list_files_request_order import ListFilesRequestOrder +from .types.list_files_response import ListFilesResponse from pydantic import ValidationError # this is used as the default value for optional parameters @@ -29,6 +33,123 @@ class RawFilesClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper + def list( + self, + *, + file_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + order: typing.Optional[ListFilesRequestOrder] = None, + direction: typing.Optional[ListFilesRequestDirection] = None, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> SyncPager[File, ListFilesResponse]: + """ + Returns the files with the given IDs, newest first — fetch a batch in one request instead of retrieving each file individually. Only files you created are returned; IDs that do not exist, or that another credential created, are omitted. A request for up to 100 IDs answers in a single page by default; a larger batch pages at up to 100 files per response — follow `page_info` with the same `file_ids` to walk the rest. + + Parameters + ---------- + file_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] + The files to return, each prefixed `file_`. Repeat the parameter to pass several, up to 250 per request. Batches of up to 100 answer in one page by default; larger batches page at up to 100 per response. + + order : typing.Optional[ListFilesRequestOrder] + The field to sort by. + + direction : typing.Optional[ListFilesRequestDirection] + The sort direction. + + first : typing.Optional[int] + The number of files to return. + + after : typing.Optional[str] + A cursor; returns files after this position. + + last : typing.Optional[int] + The number of files to return from the end of the range. + + before : typing.Optional[str] + A cursor; returns files before this position. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + SyncPager[File, ListFilesResponse] + files listed + """ + _response = self._client_wrapper.httpx_client.request( + "files", + method="GET", + params={ + "file_ids": file_ids, + "order": order, + "direction": direction, + "first": first, + "after": after, + "last": last, + "before": before, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _parsed_response = typing.cast( + ListFilesResponse, + parse_obj_as( + type_=ListFilesResponse, # type: ignore + object_=_response.json(), + ), + ) + _items = _parsed_response.data + _has_next = False + _get_next = None + if _parsed_response.page_info is not None: + _parsed_next = _parsed_response.page_info.end_cursor + _has_next = _parsed_next is not None and _parsed_next != "" + _get_next = lambda: self.list( + file_ids=file_ids, + order=order, + direction=direction, + first=first, + after=_parsed_next, + last=last, + before=before, + request_options=request_options, + ) + return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def create( self, *, @@ -308,6 +429,126 @@ class AsyncRawFilesClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper + async def list( + self, + *, + file_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + order: typing.Optional[ListFilesRequestOrder] = None, + direction: typing.Optional[ListFilesRequestDirection] = None, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncPager[File, ListFilesResponse]: + """ + Returns the files with the given IDs, newest first — fetch a batch in one request instead of retrieving each file individually. Only files you created are returned; IDs that do not exist, or that another credential created, are omitted. A request for up to 100 IDs answers in a single page by default; a larger batch pages at up to 100 files per response — follow `page_info` with the same `file_ids` to walk the rest. + + Parameters + ---------- + file_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] + The files to return, each prefixed `file_`. Repeat the parameter to pass several, up to 250 per request. Batches of up to 100 answer in one page by default; larger batches page at up to 100 per response. + + order : typing.Optional[ListFilesRequestOrder] + The field to sort by. + + direction : typing.Optional[ListFilesRequestDirection] + The sort direction. + + first : typing.Optional[int] + The number of files to return. + + after : typing.Optional[str] + A cursor; returns files after this position. + + last : typing.Optional[int] + The number of files to return from the end of the range. + + before : typing.Optional[str] + A cursor; returns files before this position. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPager[File, ListFilesResponse] + files listed + """ + _response = await self._client_wrapper.httpx_client.request( + "files", + method="GET", + params={ + "file_ids": file_ids, + "order": order, + "direction": direction, + "first": first, + "after": after, + "last": last, + "before": before, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _parsed_response = typing.cast( + ListFilesResponse, + parse_obj_as( + type_=ListFilesResponse, # type: ignore + object_=_response.json(), + ), + ) + _items = _parsed_response.data + _has_next = False + _get_next = None + if _parsed_response.page_info is not None: + _parsed_next = _parsed_response.page_info.end_cursor + _has_next = _parsed_next is not None and _parsed_next != "" + + async def _get_next(): + return await self.list( + file_ids=file_ids, + order=order, + direction=direction, + first=first, + after=_parsed_next, + last=last, + before=before, + request_options=request_options, + ) + + return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def create( self, *, diff --git a/src/whop_sdk/files/types/__init__.py b/src/whop_sdk/files/types/__init__.py index 60f1ea59..1d64f3c4 100644 --- a/src/whop_sdk/files/types/__init__.py +++ b/src/whop_sdk/files/types/__init__.py @@ -8,9 +8,17 @@ if typing.TYPE_CHECKING: from .complete_files_request_multipart_parts_item import CompleteFilesRequestMultipartPartsItem from .create_files_request_visibility import CreateFilesRequestVisibility + from .list_files_request_direction import ListFilesRequestDirection + from .list_files_request_order import ListFilesRequestOrder + from .list_files_response import ListFilesResponse + from .list_files_response_page_info import ListFilesResponsePageInfo _dynamic_imports: typing.Dict[str, str] = { "CompleteFilesRequestMultipartPartsItem": ".complete_files_request_multipart_parts_item", "CreateFilesRequestVisibility": ".create_files_request_visibility", + "ListFilesRequestDirection": ".list_files_request_direction", + "ListFilesRequestOrder": ".list_files_request_order", + "ListFilesResponse": ".list_files_response", + "ListFilesResponsePageInfo": ".list_files_response_page_info", } @@ -35,4 +43,11 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["CompleteFilesRequestMultipartPartsItem", "CreateFilesRequestVisibility"] +__all__ = [ + "CompleteFilesRequestMultipartPartsItem", + "CreateFilesRequestVisibility", + "ListFilesRequestDirection", + "ListFilesRequestOrder", + "ListFilesResponse", + "ListFilesResponsePageInfo", +] diff --git a/src/whop_sdk/files/types/list_files_request_direction.py b/src/whop_sdk/files/types/list_files_request_direction.py new file mode 100644 index 00000000..df8cb6aa --- /dev/null +++ b/src/whop_sdk/files/types/list_files_request_direction.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListFilesRequestDirection = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/whop_sdk/files/types/list_files_request_order.py b/src/whop_sdk/files/types/list_files_request_order.py new file mode 100644 index 00000000..1c01415d --- /dev/null +++ b/src/whop_sdk/files/types/list_files_request_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListFilesRequestOrder = typing.Union[typing.Literal["created_at"], typing.Any] diff --git a/src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_items_item.py b/src/whop_sdk/files/types/list_files_response.py similarity index 60% rename from src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_items_item.py rename to src/whop_sdk/files/types/list_files_response.py index fd5e930e..a312b972 100644 --- a/src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_items_item.py +++ b/src/whop_sdk/files/types/list_files_response.py @@ -4,18 +4,13 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ...types.file import File +from .list_files_response_page_info import ListFilesResponsePageInfo -class CreateCheckoutSessionsRequestItemsItem(UniversalBaseModel): - plan: str = pydantic.Field() - """ - The plan being purchased (`plan_…`). The plan is the price. - """ - - quantity: typing.Optional[int] = pydantic.Field(default=None) - """ - How many of the plan. Defaults to 1. - """ +class ListFilesResponse(UniversalBaseModel): + data: typing.List[File] + page_info: ListFilesResponsePageInfo if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/whop_sdk/withdrawals/types/generate_pdf_withdrawals_response.py b/src/whop_sdk/files/types/list_files_response_page_info.py similarity index 53% rename from src/whop_sdk/withdrawals/types/generate_pdf_withdrawals_response.py rename to src/whop_sdk/files/types/list_files_response_page_info.py index 72404b95..220ac596 100644 --- a/src/whop_sdk/withdrawals/types/generate_pdf_withdrawals_response.py +++ b/src/whop_sdk/files/types/list_files_response_page_info.py @@ -1,26 +1,16 @@ # This file was auto-generated by Fern from our API Definition. -import datetime as dt import typing import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class GeneratePdfWithdrawalsResponse(UniversalBaseModel): - """ - A temporary link to a generated withdrawal PDF invoice. - """ - - expires_at: dt.datetime = pydantic.Field() - """ - The timestamp after which the withdrawal PDF URL is no longer valid. - """ - - url: str = pydantic.Field() - """ - The temporary URL for downloading the withdrawal PDF invoice. - """ +class ListFilesResponsePageInfo(UniversalBaseModel): + end_cursor: typing.Optional[str] = None + has_next_page: bool + has_previous_page: bool + start_cursor: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/whop_sdk/financial_activity/client.py b/src/whop_sdk/financial_activity/client.py index 376a71f4..6425a116 100644 --- a/src/whop_sdk/financial_activity/client.py +++ b/src/whop_sdk/financial_activity/client.py @@ -100,7 +100,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -216,7 +216,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/forum_posts/client.py b/src/whop_sdk/forum_posts/client.py index 14077465..937ca8b4 100644 --- a/src/whop_sdk/forum_posts/client.py +++ b/src/whop_sdk/forum_posts/client.py @@ -92,7 +92,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -197,7 +197,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -248,7 +248,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -306,7 +306,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -401,7 +401,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -515,7 +515,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -574,7 +574,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -640,7 +640,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/forums/client.py b/src/whop_sdk/forums/client.py index 165900f9..8d5001de 100644 --- a/src/whop_sdk/forums/client.py +++ b/src/whop_sdk/forums/client.py @@ -83,7 +83,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -134,7 +134,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -195,7 +195,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -282,7 +282,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -342,7 +342,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -411,7 +411,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/identity_profiles/client.py b/src/whop_sdk/identity_profiles/client.py index cf589661..9e757207 100644 --- a/src/whop_sdk/identity_profiles/client.py +++ b/src/whop_sdk/identity_profiles/client.py @@ -84,7 +84,7 @@ def list_identity_profile( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -137,7 +137,7 @@ def retrieve_identity_profile( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -175,7 +175,7 @@ def unlink_identity_profile( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -235,7 +235,7 @@ def list_verifications_identity_profile( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -324,7 +324,7 @@ async def list_identity_profile( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -386,7 +386,7 @@ async def retrieve_identity_profile( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -432,7 +432,7 @@ async def unlink_identity_profile( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -500,7 +500,7 @@ async def list_verifications_identity_profile( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/invoices/client.py b/src/whop_sdk/invoices/client.py index 21b1b9c6..3b065cc8 100644 --- a/src/whop_sdk/invoices/client.py +++ b/src/whop_sdk/invoices/client.py @@ -114,7 +114,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -185,7 +185,7 @@ def create( ) client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -231,7 +231,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -267,7 +267,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -367,7 +367,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -420,7 +420,7 @@ def mark_paid(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -456,7 +456,7 @@ def mark_uncollectible(self, id: str, *, request_options: typing.Optional[Reques from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -492,7 +492,7 @@ def resend(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -528,7 +528,7 @@ def void(self, id: str, *, request_options: typing.Optional[RequestOptions] = No from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -632,7 +632,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -712,7 +712,7 @@ async def create( ) client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -766,7 +766,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -810,7 +810,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -918,7 +918,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -979,7 +979,7 @@ async def mark_paid(self, id: str, *, request_options: typing.Optional[RequestOp from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1023,7 +1023,7 @@ async def mark_uncollectible(self, id: str, *, request_options: typing.Optional[ from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1067,7 +1067,7 @@ async def resend(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1111,7 +1111,7 @@ async def void(self, id: str, *, request_options: typing.Optional[RequestOptions from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/leads/client.py b/src/whop_sdk/leads/client.py index 45e8de74..be0c2212 100644 --- a/src/whop_sdk/leads/client.py +++ b/src/whop_sdk/leads/client.py @@ -93,7 +93,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -175,7 +175,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -221,7 +221,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -273,7 +273,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -364,7 +364,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -455,7 +455,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -509,7 +509,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -569,7 +569,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ledger_accounts/client.py b/src/whop_sdk/ledger_accounts/client.py index 84bde225..bd886e70 100644 --- a/src/whop_sdk/ledger_accounts/client.py +++ b/src/whop_sdk/ledger_accounts/client.py @@ -49,7 +49,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -104,7 +104,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ledgers/client.py b/src/whop_sdk/ledgers/client.py index b0e003bd..83f113ae 100644 --- a/src/whop_sdk/ledgers/client.py +++ b/src/whop_sdk/ledgers/client.py @@ -88,7 +88,7 @@ def get_financial_report( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -193,7 +193,7 @@ async def get_financial_report( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/media/client.py b/src/whop_sdk/media/client.py index 47b99532..a9fbeba4 100644 --- a/src/whop_sdk/media/client.py +++ b/src/whop_sdk/media/client.py @@ -75,7 +75,7 @@ def generate( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -117,7 +117,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -193,7 +193,7 @@ async def generate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -243,7 +243,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/members/client.py b/src/whop_sdk/members/client.py index 7211eecb..84ac05e3 100644 --- a/src/whop_sdk/members/client.py +++ b/src/whop_sdk/members/client.py @@ -107,7 +107,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -156,7 +156,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -266,7 +266,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -324,7 +324,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/members/logs/client.py b/src/whop_sdk/members/logs/client.py index 9bbeec03..6bcf453a 100644 --- a/src/whop_sdk/members/logs/client.py +++ b/src/whop_sdk/members/logs/client.py @@ -68,7 +68,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -146,7 +146,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/memberships/client.py b/src/whop_sdk/memberships/client.py index 85a31015..204cad4b 100644 --- a/src/whop_sdk/memberships/client.py +++ b/src/whop_sdk/memberships/client.py @@ -109,7 +109,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -161,7 +161,7 @@ def invite( from whop_sdk.memberships import InviteMembershipsRequestBodyUserId client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -197,7 +197,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -243,7 +243,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -288,7 +288,7 @@ def add_free_days_membership( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -335,7 +335,7 @@ def cancel( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -373,7 +373,7 @@ def extend(self, id: str, *, days: int, request_options: typing.Optional[Request from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -412,7 +412,7 @@ def pause( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -445,7 +445,7 @@ def resume(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -485,7 +485,7 @@ def resync_access_membership( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -520,7 +520,7 @@ def transfer( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -558,7 +558,7 @@ def uncancel_membership(self, id: str, *, request_options: typing.Optional[Reque from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -662,7 +662,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -723,7 +723,7 @@ async def invite( from whop_sdk.memberships import InviteMembershipsRequestBodyUserId client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -767,7 +767,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -821,7 +821,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -874,7 +874,7 @@ async def add_free_days_membership( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -931,7 +931,7 @@ async def cancel( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -979,7 +979,7 @@ async def extend( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1026,7 +1026,7 @@ async def pause( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1067,7 +1067,7 @@ async def resume(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1115,7 +1115,7 @@ async def resync_access_membership( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1158,7 +1158,7 @@ async def transfer( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1206,7 +1206,7 @@ async def uncancel_membership( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/messages/client.py b/src/whop_sdk/messages/client.py index c47919d6..3127f638 100644 --- a/src/whop_sdk/messages/client.py +++ b/src/whop_sdk/messages/client.py @@ -84,7 +84,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -162,7 +162,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -210,7 +210,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -249,7 +249,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -305,7 +305,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -387,7 +387,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -474,7 +474,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -530,7 +530,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -577,7 +577,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -641,7 +641,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/notifications/client.py b/src/whop_sdk/notifications/client.py index 5863623e..f46b1630 100644 --- a/src/whop_sdk/notifications/client.py +++ b/src/whop_sdk/notifications/client.py @@ -84,7 +84,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -160,7 +160,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -213,7 +213,7 @@ def badges( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -257,7 +257,7 @@ def mark_read( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -288,7 +288,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -374,7 +374,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -459,7 +459,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -520,7 +520,7 @@ async def badges( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -572,7 +572,7 @@ async def mark_read( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -613,7 +613,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/notifications/topics/client.py b/src/whop_sdk/notifications/topics/client.py index 9faa7420..aad9edbb 100644 --- a/src/whop_sdk/notifications/topics/client.py +++ b/src/whop_sdk/notifications/topics/client.py @@ -61,7 +61,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -127,7 +127,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/partners/businesses/client.py b/src/whop_sdk/partners/businesses/client.py index 912b0090..f2321cff 100644 --- a/src/whop_sdk/partners/businesses/client.py +++ b/src/whop_sdk/partners/businesses/client.py @@ -112,7 +112,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -164,7 +164,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -278,7 +278,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -339,7 +339,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/partners/businesses/earnings/client.py b/src/whop_sdk/partners/businesses/earnings/client.py index e0ac628a..a74742f5 100644 --- a/src/whop_sdk/partners/businesses/earnings/client.py +++ b/src/whop_sdk/partners/businesses/earnings/client.py @@ -94,7 +94,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -205,7 +205,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/partners/client.py b/src/whop_sdk/partners/client.py index f5e0ee0e..73a5d5a5 100644 --- a/src/whop_sdk/partners/client.py +++ b/src/whop_sdk/partners/client.py @@ -54,7 +54,7 @@ def create(self, *, request_options: typing.Optional[RequestOptions] = None) -> from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -90,7 +90,7 @@ def leaderboard( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -146,7 +146,7 @@ def referred_users( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -214,7 +214,7 @@ async def create(self, *, request_options: typing.Optional[RequestOptions] = Non from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -258,7 +258,7 @@ async def leaderboard( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -322,7 +322,7 @@ async def referred_users( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payment_method_domains/client.py b/src/whop_sdk/payment_method_domains/client.py index 82a00361..103e6bbf 100644 --- a/src/whop_sdk/payment_method_domains/client.py +++ b/src/whop_sdk/payment_method_domains/client.py @@ -105,7 +105,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -163,7 +163,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -196,7 +196,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -231,7 +231,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -264,7 +264,7 @@ def verify(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -364,7 +364,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -431,7 +431,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -476,7 +476,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -519,7 +519,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -560,7 +560,7 @@ async def verify(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payment_methods/client.py b/src/whop_sdk/payment_methods/client.py index 255e0e0e..02507360 100644 --- a/src/whop_sdk/payment_methods/client.py +++ b/src/whop_sdk/payment_methods/client.py @@ -124,7 +124,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -204,7 +204,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -257,7 +257,7 @@ def delete_payment_method( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -381,7 +381,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -470,7 +470,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -531,7 +531,7 @@ async def delete_payment_method( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payments/client.py b/src/whop_sdk/payments/client.py index 8a54eb9a..0bf6e600 100644 --- a/src/whop_sdk/payments/client.py +++ b/src/whop_sdk/payments/client.py @@ -157,7 +157,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -250,7 +250,7 @@ def create( ) client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -301,7 +301,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -358,7 +358,7 @@ def list_fees( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -420,7 +420,7 @@ def refund( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -465,7 +465,7 @@ def retry(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -510,7 +510,7 @@ def void(self, id: str, *, request_options: typing.Optional[RequestOptions] = No from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -548,7 +548,7 @@ def update_return_url( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -586,7 +586,7 @@ def retrieve_status( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -729,7 +729,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -831,7 +831,7 @@ async def create( ) client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -892,7 +892,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -957,7 +957,7 @@ async def list_fees( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1028,7 +1028,7 @@ async def refund( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1081,7 +1081,7 @@ async def retry(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1134,7 +1134,7 @@ async def void(self, id: str, *, request_options: typing.Optional[RequestOptions from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1180,7 +1180,7 @@ async def update_return_url( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1226,7 +1226,7 @@ async def retrieve_status( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payout_accounts/client.py b/src/whop_sdk/payout_accounts/client.py index e7365b1e..41727fa8 100644 --- a/src/whop_sdk/payout_accounts/client.py +++ b/src/whop_sdk/payout_accounts/client.py @@ -48,7 +48,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -102,7 +102,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payout_methods/client.py b/src/whop_sdk/payout_methods/client.py index 073602ca..24d93171 100644 --- a/src/whop_sdk/payout_methods/client.py +++ b/src/whop_sdk/payout_methods/client.py @@ -72,7 +72,7 @@ def list_payout_method( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -118,7 +118,7 @@ def retrieve_payout_method( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -193,7 +193,7 @@ async def list_payout_method( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -248,7 +248,7 @@ async def retrieve_payout_method( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payouts/__init__.py b/src/whop_sdk/payouts/__init__.py index a2b91643..17158414 100644 --- a/src/whop_sdk/payouts/__init__.py +++ b/src/whop_sdk/payouts/__init__.py @@ -7,6 +7,16 @@ if typing.TYPE_CHECKING: from .types import ( + CancelPayoutsResponse, + CancelPayoutsResponseFailure, + CancelPayoutsResponseFeePaidBy, + CancelPayoutsResponseObject, + CancelPayoutsResponsePayoutMethod, + CancelPayoutsResponsePayoutMethodSupportedPayoutMethod, + CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType, + CancelPayoutsResponseSource, + CancelPayoutsResponseSpeed, + CancelPayoutsResponseStatus, CreatePayoutsRequestBody, CreatePayoutsRequestBodySpeed, CreatePayoutsResponse, @@ -33,6 +43,19 @@ ListPayoutsResponseDataItemSpeed, ListPayoutsResponseDataItemStatus, ListPayoutsResponsePageInfo, + PostPayoutCreatedPayload, + PostPayoutCreatedPayloadApiVersion, + PostPayoutCreatedPayloadData, + PostPayoutCreatedPayloadDataFailure, + PostPayoutCreatedPayloadDataFeePaidBy, + PostPayoutCreatedPayloadDataObject, + PostPayoutCreatedPayloadDataPayoutMethod, + PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod, + PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, + PostPayoutCreatedPayloadDataSource, + PostPayoutCreatedPayloadDataSpeed, + PostPayoutCreatedPayloadDataStatus, + PostPayoutCreatedPayloadType, PostPayoutMethodCreatedPayload, PostPayoutMethodCreatedPayloadApiVersion, PostPayoutMethodCreatedPayloadData, @@ -48,45 +71,32 @@ PostPayoutMethodCreatedPayloadDataSupportedPayoutMethodDeliveryType, PostPayoutMethodCreatedPayloadDataUnavailableReason, PostPayoutMethodCreatedPayloadType, - PostWithdrawalCreatedPayload, - PostWithdrawalCreatedPayloadApiVersion, - PostWithdrawalCreatedPayloadData, - PostWithdrawalCreatedPayloadDataFailure, - PostWithdrawalCreatedPayloadDataFeePaidBy, - PostWithdrawalCreatedPayloadDataObject, - PostWithdrawalCreatedPayloadDataPayoutMethod, - PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod, - PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, - PostWithdrawalCreatedPayloadDataSource, - PostWithdrawalCreatedPayloadDataSpeed, - PostWithdrawalCreatedPayloadDataStatus, - PostWithdrawalCreatedPayloadType, - PostWithdrawalReversedPayload, - PostWithdrawalReversedPayloadApiVersion, - PostWithdrawalReversedPayloadData, - PostWithdrawalReversedPayloadDataFailure, - PostWithdrawalReversedPayloadDataFeePaidBy, - PostWithdrawalReversedPayloadDataObject, - PostWithdrawalReversedPayloadDataPayoutMethod, - PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod, - PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, - PostWithdrawalReversedPayloadDataSource, - PostWithdrawalReversedPayloadDataSpeed, - PostWithdrawalReversedPayloadDataStatus, - PostWithdrawalReversedPayloadType, - PostWithdrawalUpdatedPayload, - PostWithdrawalUpdatedPayloadApiVersion, - PostWithdrawalUpdatedPayloadData, - PostWithdrawalUpdatedPayloadDataFailure, - PostWithdrawalUpdatedPayloadDataFeePaidBy, - PostWithdrawalUpdatedPayloadDataObject, - PostWithdrawalUpdatedPayloadDataPayoutMethod, - PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod, - PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, - PostWithdrawalUpdatedPayloadDataSource, - PostWithdrawalUpdatedPayloadDataSpeed, - PostWithdrawalUpdatedPayloadDataStatus, - PostWithdrawalUpdatedPayloadType, + PostPayoutReversedPayload, + PostPayoutReversedPayloadApiVersion, + PostPayoutReversedPayloadData, + PostPayoutReversedPayloadDataFailure, + PostPayoutReversedPayloadDataFeePaidBy, + PostPayoutReversedPayloadDataObject, + PostPayoutReversedPayloadDataPayoutMethod, + PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod, + PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, + PostPayoutReversedPayloadDataSource, + PostPayoutReversedPayloadDataSpeed, + PostPayoutReversedPayloadDataStatus, + PostPayoutReversedPayloadType, + PostPayoutUpdatedPayload, + PostPayoutUpdatedPayloadApiVersion, + PostPayoutUpdatedPayloadData, + PostPayoutUpdatedPayloadDataFailure, + PostPayoutUpdatedPayloadDataFeePaidBy, + PostPayoutUpdatedPayloadDataObject, + PostPayoutUpdatedPayloadDataPayoutMethod, + PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod, + PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, + PostPayoutUpdatedPayloadDataSource, + PostPayoutUpdatedPayloadDataSpeed, + PostPayoutUpdatedPayloadDataStatus, + PostPayoutUpdatedPayloadType, RetrievePayoutsResponse, RetrievePayoutsResponseFailure, RetrievePayoutsResponseFeePaidBy, @@ -149,6 +159,16 @@ ListSupportedMethodsResponsePageInfo, ) _dynamic_imports: typing.Dict[str, str] = { + "CancelPayoutsResponse": ".types", + "CancelPayoutsResponseFailure": ".types", + "CancelPayoutsResponseFeePaidBy": ".types", + "CancelPayoutsResponseObject": ".types", + "CancelPayoutsResponsePayoutMethod": ".types", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethod": ".types", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType": ".types", + "CancelPayoutsResponseSource": ".types", + "CancelPayoutsResponseSpeed": ".types", + "CancelPayoutsResponseStatus": ".types", "CreateMethodsResponse": ".methods", "CreateMethodsResponseBankVerificationState": ".methods", "CreateMethodsResponseObject": ".methods", @@ -213,6 +233,19 @@ "ListSupportedMethodsResponseDataItemRequiredFieldsItem": ".supported_methods", "ListSupportedMethodsResponseDataItemRequiredFieldsItemObject": ".supported_methods", "ListSupportedMethodsResponsePageInfo": ".supported_methods", + "PostPayoutCreatedPayload": ".types", + "PostPayoutCreatedPayloadApiVersion": ".types", + "PostPayoutCreatedPayloadData": ".types", + "PostPayoutCreatedPayloadDataFailure": ".types", + "PostPayoutCreatedPayloadDataFeePaidBy": ".types", + "PostPayoutCreatedPayloadDataObject": ".types", + "PostPayoutCreatedPayloadDataPayoutMethod": ".types", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod": ".types", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".types", + "PostPayoutCreatedPayloadDataSource": ".types", + "PostPayoutCreatedPayloadDataSpeed": ".types", + "PostPayoutCreatedPayloadDataStatus": ".types", + "PostPayoutCreatedPayloadType": ".types", "PostPayoutMethodCreatedPayload": ".types", "PostPayoutMethodCreatedPayloadApiVersion": ".types", "PostPayoutMethodCreatedPayloadData": ".types", @@ -228,45 +261,32 @@ "PostPayoutMethodCreatedPayloadDataSupportedPayoutMethodDeliveryType": ".types", "PostPayoutMethodCreatedPayloadDataUnavailableReason": ".types", "PostPayoutMethodCreatedPayloadType": ".types", - "PostWithdrawalCreatedPayload": ".types", - "PostWithdrawalCreatedPayloadApiVersion": ".types", - "PostWithdrawalCreatedPayloadData": ".types", - "PostWithdrawalCreatedPayloadDataFailure": ".types", - "PostWithdrawalCreatedPayloadDataFeePaidBy": ".types", - "PostWithdrawalCreatedPayloadDataObject": ".types", - "PostWithdrawalCreatedPayloadDataPayoutMethod": ".types", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod": ".types", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".types", - "PostWithdrawalCreatedPayloadDataSource": ".types", - "PostWithdrawalCreatedPayloadDataSpeed": ".types", - "PostWithdrawalCreatedPayloadDataStatus": ".types", - "PostWithdrawalCreatedPayloadType": ".types", - "PostWithdrawalReversedPayload": ".types", - "PostWithdrawalReversedPayloadApiVersion": ".types", - "PostWithdrawalReversedPayloadData": ".types", - "PostWithdrawalReversedPayloadDataFailure": ".types", - "PostWithdrawalReversedPayloadDataFeePaidBy": ".types", - "PostWithdrawalReversedPayloadDataObject": ".types", - "PostWithdrawalReversedPayloadDataPayoutMethod": ".types", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod": ".types", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".types", - "PostWithdrawalReversedPayloadDataSource": ".types", - "PostWithdrawalReversedPayloadDataSpeed": ".types", - "PostWithdrawalReversedPayloadDataStatus": ".types", - "PostWithdrawalReversedPayloadType": ".types", - "PostWithdrawalUpdatedPayload": ".types", - "PostWithdrawalUpdatedPayloadApiVersion": ".types", - "PostWithdrawalUpdatedPayloadData": ".types", - "PostWithdrawalUpdatedPayloadDataFailure": ".types", - "PostWithdrawalUpdatedPayloadDataFeePaidBy": ".types", - "PostWithdrawalUpdatedPayloadDataObject": ".types", - "PostWithdrawalUpdatedPayloadDataPayoutMethod": ".types", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod": ".types", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".types", - "PostWithdrawalUpdatedPayloadDataSource": ".types", - "PostWithdrawalUpdatedPayloadDataSpeed": ".types", - "PostWithdrawalUpdatedPayloadDataStatus": ".types", - "PostWithdrawalUpdatedPayloadType": ".types", + "PostPayoutReversedPayload": ".types", + "PostPayoutReversedPayloadApiVersion": ".types", + "PostPayoutReversedPayloadData": ".types", + "PostPayoutReversedPayloadDataFailure": ".types", + "PostPayoutReversedPayloadDataFeePaidBy": ".types", + "PostPayoutReversedPayloadDataObject": ".types", + "PostPayoutReversedPayloadDataPayoutMethod": ".types", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod": ".types", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".types", + "PostPayoutReversedPayloadDataSource": ".types", + "PostPayoutReversedPayloadDataSpeed": ".types", + "PostPayoutReversedPayloadDataStatus": ".types", + "PostPayoutReversedPayloadType": ".types", + "PostPayoutUpdatedPayload": ".types", + "PostPayoutUpdatedPayloadApiVersion": ".types", + "PostPayoutUpdatedPayloadData": ".types", + "PostPayoutUpdatedPayloadDataFailure": ".types", + "PostPayoutUpdatedPayloadDataFeePaidBy": ".types", + "PostPayoutUpdatedPayloadDataObject": ".types", + "PostPayoutUpdatedPayloadDataPayoutMethod": ".types", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod": ".types", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".types", + "PostPayoutUpdatedPayloadDataSource": ".types", + "PostPayoutUpdatedPayloadDataSpeed": ".types", + "PostPayoutUpdatedPayloadDataStatus": ".types", + "PostPayoutUpdatedPayloadType": ".types", "RetrievePayoutsResponse": ".types", "RetrievePayoutsResponseFailure": ".types", "RetrievePayoutsResponseFeePaidBy": ".types", @@ -311,6 +331,16 @@ def __dir__(): __all__ = [ + "CancelPayoutsResponse", + "CancelPayoutsResponseFailure", + "CancelPayoutsResponseFeePaidBy", + "CancelPayoutsResponseObject", + "CancelPayoutsResponsePayoutMethod", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethod", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType", + "CancelPayoutsResponseSource", + "CancelPayoutsResponseSpeed", + "CancelPayoutsResponseStatus", "CreateMethodsResponse", "CreateMethodsResponseBankVerificationState", "CreateMethodsResponseObject", @@ -375,6 +405,19 @@ def __dir__(): "ListSupportedMethodsResponseDataItemRequiredFieldsItem", "ListSupportedMethodsResponseDataItemRequiredFieldsItemObject", "ListSupportedMethodsResponsePageInfo", + "PostPayoutCreatedPayload", + "PostPayoutCreatedPayloadApiVersion", + "PostPayoutCreatedPayloadData", + "PostPayoutCreatedPayloadDataFailure", + "PostPayoutCreatedPayloadDataFeePaidBy", + "PostPayoutCreatedPayloadDataObject", + "PostPayoutCreatedPayloadDataPayoutMethod", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", + "PostPayoutCreatedPayloadDataSource", + "PostPayoutCreatedPayloadDataSpeed", + "PostPayoutCreatedPayloadDataStatus", + "PostPayoutCreatedPayloadType", "PostPayoutMethodCreatedPayload", "PostPayoutMethodCreatedPayloadApiVersion", "PostPayoutMethodCreatedPayloadData", @@ -390,45 +433,32 @@ def __dir__(): "PostPayoutMethodCreatedPayloadDataSupportedPayoutMethodDeliveryType", "PostPayoutMethodCreatedPayloadDataUnavailableReason", "PostPayoutMethodCreatedPayloadType", - "PostWithdrawalCreatedPayload", - "PostWithdrawalCreatedPayloadApiVersion", - "PostWithdrawalCreatedPayloadData", - "PostWithdrawalCreatedPayloadDataFailure", - "PostWithdrawalCreatedPayloadDataFeePaidBy", - "PostWithdrawalCreatedPayloadDataObject", - "PostWithdrawalCreatedPayloadDataPayoutMethod", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", - "PostWithdrawalCreatedPayloadDataSource", - "PostWithdrawalCreatedPayloadDataSpeed", - "PostWithdrawalCreatedPayloadDataStatus", - "PostWithdrawalCreatedPayloadType", - "PostWithdrawalReversedPayload", - "PostWithdrawalReversedPayloadApiVersion", - "PostWithdrawalReversedPayloadData", - "PostWithdrawalReversedPayloadDataFailure", - "PostWithdrawalReversedPayloadDataFeePaidBy", - "PostWithdrawalReversedPayloadDataObject", - "PostWithdrawalReversedPayloadDataPayoutMethod", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", - "PostWithdrawalReversedPayloadDataSource", - "PostWithdrawalReversedPayloadDataSpeed", - "PostWithdrawalReversedPayloadDataStatus", - "PostWithdrawalReversedPayloadType", - "PostWithdrawalUpdatedPayload", - "PostWithdrawalUpdatedPayloadApiVersion", - "PostWithdrawalUpdatedPayloadData", - "PostWithdrawalUpdatedPayloadDataFailure", - "PostWithdrawalUpdatedPayloadDataFeePaidBy", - "PostWithdrawalUpdatedPayloadDataObject", - "PostWithdrawalUpdatedPayloadDataPayoutMethod", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", - "PostWithdrawalUpdatedPayloadDataSource", - "PostWithdrawalUpdatedPayloadDataSpeed", - "PostWithdrawalUpdatedPayloadDataStatus", - "PostWithdrawalUpdatedPayloadType", + "PostPayoutReversedPayload", + "PostPayoutReversedPayloadApiVersion", + "PostPayoutReversedPayloadData", + "PostPayoutReversedPayloadDataFailure", + "PostPayoutReversedPayloadDataFeePaidBy", + "PostPayoutReversedPayloadDataObject", + "PostPayoutReversedPayloadDataPayoutMethod", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", + "PostPayoutReversedPayloadDataSource", + "PostPayoutReversedPayloadDataSpeed", + "PostPayoutReversedPayloadDataStatus", + "PostPayoutReversedPayloadType", + "PostPayoutUpdatedPayload", + "PostPayoutUpdatedPayloadApiVersion", + "PostPayoutUpdatedPayloadData", + "PostPayoutUpdatedPayloadDataFailure", + "PostPayoutUpdatedPayloadDataFeePaidBy", + "PostPayoutUpdatedPayloadDataObject", + "PostPayoutUpdatedPayloadDataPayoutMethod", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", + "PostPayoutUpdatedPayloadDataSource", + "PostPayoutUpdatedPayloadDataSpeed", + "PostPayoutUpdatedPayloadDataStatus", + "PostPayoutUpdatedPayloadType", "RetrievePayoutsResponse", "RetrievePayoutsResponseFailure", "RetrievePayoutsResponseFeePaidBy", diff --git a/src/whop_sdk/payouts/client.py b/src/whop_sdk/payouts/client.py index fb183af9..501ea9fb 100644 --- a/src/whop_sdk/payouts/client.py +++ b/src/whop_sdk/payouts/client.py @@ -9,6 +9,7 @@ from ..core.pagination import AsyncPager, SyncPager from ..core.request_options import RequestOptions from .raw_client import AsyncRawPayoutsClient, RawPayoutsClient +from .types.cancel_payouts_response import CancelPayoutsResponse from .types.create_payouts_request_body import CreatePayoutsRequestBody from .types.create_payouts_response import CreatePayoutsResponse from .types.list_payouts_request_source import ListPayoutsRequestSource @@ -106,14 +107,14 @@ def list( Returns ------- SyncPager[ListPayoutsResponseDataItem, ListPayoutsResponse] - payouts filtered by source, payout method, and created window + payouts listed Examples -------- from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -163,7 +164,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -202,14 +203,14 @@ def retrieve( Returns ------- RetrievePayoutsResponse - payout found for a user + payout found Examples -------- from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -222,6 +223,52 @@ def retrieve( ) return _response.data + def cancel( + self, + id: str, + *, + account_id: typing.Optional[str] = None, + user_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> CancelPayoutsResponse: + """ + Cancels a payout that is still in review and returns the funds, fees included, to the balance. A payout can be canceled while its status is `in_review`. A `requested` payout is still being prepared (its funds may be converting) and answers 409 until it reaches review; from `processing` on, the money is on its way and the answer is 409 with error type `not_cancelable`. Canceling a payout that is already canceled succeeds and returns it unchanged. + + Parameters + ---------- + id : str + Payout ID, prefixed `wdrl_`, or the `cofr_` payout request ID returned by `POST /payouts` — both cancel the same payout. + + account_id : typing.Optional[str] + Owning account ID, prefixed `biz_`. Provide exactly one of `account_id` or `user_id`. + + user_id : typing.Optional[str] + Owning user ID, prefixed `user_`. Provide exactly one of `account_id` or `user_id`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CancelPayoutsResponse + payout canceled and funds returned + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-08-25-1", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.payouts.cancel( + id="id", + ) + """ + _response = self._raw_client.cancel(id, account_id=account_id, user_id=user_id, request_options=request_options) + return _response.data + @property def methods(self): if self._methods is None: @@ -321,7 +368,7 @@ async def list( Returns ------- AsyncPager[ListPayoutsResponseDataItem, ListPayoutsResponse] - payouts filtered by source, payout method, and created window + payouts listed Examples -------- @@ -330,7 +377,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -389,7 +436,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -434,7 +481,7 @@ async def retrieve( Returns ------- RetrievePayoutsResponse - payout found for a user + payout found Examples -------- @@ -443,7 +490,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -462,6 +509,62 @@ async def main() -> None: ) return _response.data + async def cancel( + self, + id: str, + *, + account_id: typing.Optional[str] = None, + user_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> CancelPayoutsResponse: + """ + Cancels a payout that is still in review and returns the funds, fees included, to the balance. A payout can be canceled while its status is `in_review`. A `requested` payout is still being prepared (its funds may be converting) and answers 409 until it reaches review; from `processing` on, the money is on its way and the answer is 409 with error type `not_cancelable`. Canceling a payout that is already canceled succeeds and returns it unchanged. + + Parameters + ---------- + id : str + Payout ID, prefixed `wdrl_`, or the `cofr_` payout request ID returned by `POST /payouts` — both cancel the same payout. + + account_id : typing.Optional[str] + Owning account ID, prefixed `biz_`. Provide exactly one of `account_id` or `user_id`. + + user_id : typing.Optional[str] + Owning user ID, prefixed `user_`. Provide exactly one of `account_id` or `user_id`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CancelPayoutsResponse + payout canceled and funds returned + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-08-25-1", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.payouts.cancel( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.cancel( + id, account_id=account_id, user_id=user_id, request_options=request_options + ) + return _response.data + @property def methods(self): if self._methods is None: diff --git a/src/whop_sdk/payouts/methods/client.py b/src/whop_sdk/payouts/methods/client.py index a382495f..ca20a94f 100644 --- a/src/whop_sdk/payouts/methods/client.py +++ b/src/whop_sdk/payouts/methods/client.py @@ -48,7 +48,7 @@ def list( request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ListMethodsResponseDataItem, ListMethodsResponse]: """ - Lists the bank accounts, wallets, and crypto addresses an account or user can withdraw to, newest first. + Lists the bank accounts, wallets, and crypto addresses an account or user can pay out to, newest first. Parameters ---------- @@ -62,7 +62,7 @@ def list( Optional status filter. `created` means saved but unused, `active` means a payout through it succeeded, `broken` means the last payout failed and the method needs fixing. amount : typing.Optional[float] - Optional withdrawal amount in whole currency units, for example `250.00`. When provided, each method includes a quote with the estimated fee, amount received, and delivery date for that amount. + Optional payout amount in whole currency units, for example `250.00`. When provided, each method includes a quote with the estimated fee, amount received, and delivery date for that amount. currency : typing.Optional[str] Currency code of the amount, for example `usd`. Only meaningful with amount or include_limits. @@ -88,14 +88,14 @@ def list( Returns ------- SyncPager[ListMethodsResponseDataItem, ListMethodsResponse] - internal stablecoin destinations omitted + payout methods listed Examples -------- from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -133,7 +133,7 @@ def create( request_options: typing.Optional[RequestOptions] = None, ) -> CreateMethodsResponse: """ - Saves a new place an account or user can withdraw to. Sensitive details are vaulted in transit and never stored raw. + Saves a new place an account or user can pay out to. Sensitive details are vaulted in transit and never stored raw. Parameters ---------- @@ -164,14 +164,14 @@ def create( Returns ------- CreateMethodsResponse - a pre-tokenized Basis Theory value passes through unvaulted + payout method created Examples -------- from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -213,7 +213,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -251,7 +251,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -295,7 +295,7 @@ async def list( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ListMethodsResponseDataItem, ListMethodsResponse]: """ - Lists the bank accounts, wallets, and crypto addresses an account or user can withdraw to, newest first. + Lists the bank accounts, wallets, and crypto addresses an account or user can pay out to, newest first. Parameters ---------- @@ -309,7 +309,7 @@ async def list( Optional status filter. `created` means saved but unused, `active` means a payout through it succeeded, `broken` means the last payout failed and the method needs fixing. amount : typing.Optional[float] - Optional withdrawal amount in whole currency units, for example `250.00`. When provided, each method includes a quote with the estimated fee, amount received, and delivery date for that amount. + Optional payout amount in whole currency units, for example `250.00`. When provided, each method includes a quote with the estimated fee, amount received, and delivery date for that amount. currency : typing.Optional[str] Currency code of the amount, for example `usd`. Only meaningful with amount or include_limits. @@ -335,7 +335,7 @@ async def list( Returns ------- AsyncPager[ListMethodsResponseDataItem, ListMethodsResponse] - internal stablecoin destinations omitted + payout methods listed Examples -------- @@ -344,7 +344,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -389,7 +389,7 @@ async def create( request_options: typing.Optional[RequestOptions] = None, ) -> CreateMethodsResponse: """ - Saves a new place an account or user can withdraw to. Sensitive details are vaulted in transit and never stored raw. + Saves a new place an account or user can pay out to. Sensitive details are vaulted in transit and never stored raw. Parameters ---------- @@ -420,7 +420,7 @@ async def create( Returns ------- CreateMethodsResponse - a pre-tokenized Basis Theory value passes through unvaulted + payout method created Examples -------- @@ -429,7 +429,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -481,7 +481,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -527,7 +527,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payouts/methods/raw_client.py b/src/whop_sdk/payouts/methods/raw_client.py index fed0ef45..c2c1040f 100644 --- a/src/whop_sdk/payouts/methods/raw_client.py +++ b/src/whop_sdk/payouts/methods/raw_client.py @@ -49,7 +49,7 @@ def list( request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ListMethodsResponseDataItem, ListMethodsResponse]: """ - Lists the bank accounts, wallets, and crypto addresses an account or user can withdraw to, newest first. + Lists the bank accounts, wallets, and crypto addresses an account or user can pay out to, newest first. Parameters ---------- @@ -63,7 +63,7 @@ def list( Optional status filter. `created` means saved but unused, `active` means a payout through it succeeded, `broken` means the last payout failed and the method needs fixing. amount : typing.Optional[float] - Optional withdrawal amount in whole currency units, for example `250.00`. When provided, each method includes a quote with the estimated fee, amount received, and delivery date for that amount. + Optional payout amount in whole currency units, for example `250.00`. When provided, each method includes a quote with the estimated fee, amount received, and delivery date for that amount. currency : typing.Optional[str] Currency code of the amount, for example `usd`. Only meaningful with amount or include_limits. @@ -89,7 +89,7 @@ def list( Returns ------- SyncPager[ListMethodsResponseDataItem, ListMethodsResponse] - internal stablecoin destinations omitted + payout methods listed """ _response = self._client_wrapper.httpx_client.request( "payouts/methods", @@ -203,7 +203,7 @@ def create( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreateMethodsResponse]: """ - Saves a new place an account or user can withdraw to. Sensitive details are vaulted in transit and never stored raw. + Saves a new place an account or user can pay out to. Sensitive details are vaulted in transit and never stored raw. Parameters ---------- @@ -234,7 +234,7 @@ def create( Returns ------- HttpResponse[CreateMethodsResponse] - a pre-tokenized Basis Theory value passes through unvaulted + payout method created """ _response = self._client_wrapper.httpx_client.request( "payouts/methods", @@ -522,7 +522,7 @@ async def list( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ListMethodsResponseDataItem, ListMethodsResponse]: """ - Lists the bank accounts, wallets, and crypto addresses an account or user can withdraw to, newest first. + Lists the bank accounts, wallets, and crypto addresses an account or user can pay out to, newest first. Parameters ---------- @@ -536,7 +536,7 @@ async def list( Optional status filter. `created` means saved but unused, `active` means a payout through it succeeded, `broken` means the last payout failed and the method needs fixing. amount : typing.Optional[float] - Optional withdrawal amount in whole currency units, for example `250.00`. When provided, each method includes a quote with the estimated fee, amount received, and delivery date for that amount. + Optional payout amount in whole currency units, for example `250.00`. When provided, each method includes a quote with the estimated fee, amount received, and delivery date for that amount. currency : typing.Optional[str] Currency code of the amount, for example `usd`. Only meaningful with amount or include_limits. @@ -562,7 +562,7 @@ async def list( Returns ------- AsyncPager[ListMethodsResponseDataItem, ListMethodsResponse] - internal stablecoin destinations omitted + payout methods listed """ _response = await self._client_wrapper.httpx_client.request( "payouts/methods", @@ -679,7 +679,7 @@ async def create( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreateMethodsResponse]: """ - Saves a new place an account or user can withdraw to. Sensitive details are vaulted in transit and never stored raw. + Saves a new place an account or user can pay out to. Sensitive details are vaulted in transit and never stored raw. Parameters ---------- @@ -710,7 +710,7 @@ async def create( Returns ------- AsyncHttpResponse[CreateMethodsResponse] - a pre-tokenized Basis Theory value passes through unvaulted + payout method created """ _response = await self._client_wrapper.httpx_client.request( "payouts/methods", diff --git a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item.py b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item.py index d804ce1f..a1d86c8d 100644 --- a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item.py +++ b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item.py @@ -96,7 +96,7 @@ class ListMethodsResponseDataItem(UniversalBaseModel): quote: typing.Optional[ListMethodsResponseDataItemQuote] = pydantic.Field(default=None) """ - Fee and delivery estimate for withdrawing the requested amount through this method. Null unless an amount was provided, or when the estimate is unavailable. + Fee and delivery estimate for paying out the requested amount through this method. Null unless an amount was provided, or when the estimate is unavailable. """ status: ListMethodsResponseDataItemStatus = pydantic.Field() diff --git a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_fee_structure.py b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_fee_structure.py index 5364b1c9..1abd7d8e 100644 --- a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_fee_structure.py +++ b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_fee_structure.py @@ -23,7 +23,7 @@ class ListMethodsResponseDataItemFeeStructure(UniversalBaseModel): percentage: float = pydantic.Field() """ - Percentage of the withdrawal amount charged as a fee. + Percentage of the payout amount charged as a fee. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote.py b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote.py index abd02f18..3a861993 100644 --- a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote.py +++ b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote.py @@ -10,12 +10,12 @@ class ListMethodsResponseDataItemQuote(UniversalBaseModel): """ - Fee and delivery estimate for withdrawing the requested amount through this method. Null unless an amount was provided, or when the estimate is unavailable. + Fee and delivery estimate for paying out the requested amount through this method. Null unless an amount was provided, or when the estimate is unavailable. """ amount: float = pydantic.Field() """ - The withdrawal amount the quote is for. + The payout amount the quote is for. """ currency: str = pydantic.Field() @@ -25,7 +25,7 @@ class ListMethodsResponseDataItemQuote(UniversalBaseModel): exchange_rate: float = pydantic.Field() """ - Exchange rate from the withdrawal currency to the destination currency. + Exchange rate from the payout currency to the destination currency. """ instant: typing.Optional[ListMethodsResponseDataItemQuoteInstant] = pydantic.Field(default=None) @@ -35,12 +35,12 @@ class ListMethodsResponseDataItemQuote(UniversalBaseModel): max_limit: typing.Optional[float] = pydantic.Field(default=None) """ - Maximum withdrawal amount for this method, in the withdrawal currency. + Maximum payout amount for this method, in the payout currency. """ min_limit: float = pydantic.Field() """ - Minimum withdrawal amount for this method, in the withdrawal currency. + Minimum payout amount for this method, in the payout currency. """ standard: typing.Optional[ListMethodsResponseDataItemQuoteStandard] = pydantic.Field(default=None) diff --git a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote_instant.py b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote_instant.py index 8f173c0f..27a128f6 100644 --- a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote_instant.py +++ b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote_instant.py @@ -13,12 +13,12 @@ class ListMethodsResponseDataItemQuoteInstant(UniversalBaseModel): fee: float = pydantic.Field() """ - Total fee charged, in the withdrawal currency. + Total fee charged, in the payout currency. """ total_received: float = pydantic.Field() """ - Amount delivered after fees, in the withdrawal currency. + Amount delivered after fees, in the payout currency. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote_standard.py b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote_standard.py index 1260c19b..55ecac47 100644 --- a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote_standard.py +++ b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_quote_standard.py @@ -13,12 +13,12 @@ class ListMethodsResponseDataItemQuoteStandard(UniversalBaseModel): fee: float = pydantic.Field() """ - Total fee charged, in the withdrawal currency. + Total fee charged, in the payout currency. """ total_received: float = pydantic.Field() """ - Amount delivered after fees, in the withdrawal currency. + Amount delivered after fees, in the payout currency. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/payouts/raw_client.py b/src/whop_sdk/payouts/raw_client.py index 00785a6a..a28dd904 100644 --- a/src/whop_sdk/payouts/raw_client.py +++ b/src/whop_sdk/payouts/raw_client.py @@ -20,6 +20,7 @@ from ..errors.not_found_error import NotFoundError from ..errors.unauthorized_error import UnauthorizedError from ..types.v1error_response import V1ErrorResponse +from .types.cancel_payouts_response import CancelPayoutsResponse from .types.create_payouts_request_body import CreatePayoutsRequestBody from .types.create_payouts_response import CreatePayoutsResponse from .types.list_payouts_request_source import ListPayoutsRequestSource @@ -101,7 +102,7 @@ def list( Returns ------- SyncPager[ListPayoutsResponseDataItem, ListPayoutsResponse] - payouts filtered by source, payout method, and created window + payouts listed """ _response = self._client_wrapper.httpx_client.request( "payouts", @@ -335,7 +336,7 @@ def retrieve( Returns ------- HttpResponse[RetrievePayoutsResponse] - payout found for a user + payout found """ _response = self._client_wrapper.httpx_client.request( f"payouts/{encode_path_param(id)}", @@ -409,6 +410,108 @@ def retrieve( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def cancel( + self, + id: str, + *, + account_id: typing.Optional[str] = None, + user_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CancelPayoutsResponse]: + """ + Cancels a payout that is still in review and returns the funds, fees included, to the balance. A payout can be canceled while its status is `in_review`. A `requested` payout is still being prepared (its funds may be converting) and answers 409 until it reaches review; from `processing` on, the money is on its way and the answer is 409 with error type `not_cancelable`. Canceling a payout that is already canceled succeeds and returns it unchanged. + + Parameters + ---------- + id : str + Payout ID, prefixed `wdrl_`, or the `cofr_` payout request ID returned by `POST /payouts` — both cancel the same payout. + + account_id : typing.Optional[str] + Owning account ID, prefixed `biz_`. Provide exactly one of `account_id` or `user_id`. + + user_id : typing.Optional[str] + Owning user ID, prefixed `user_`. Provide exactly one of `account_id` or `user_id`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CancelPayoutsResponse] + payout canceled and funds returned + """ + _response = self._client_wrapper.httpx_client.request( + f"payouts/{encode_path_param(id)}/cancel", + method="POST", + params={ + "account_id": account_id, + "user_id": user_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CancelPayoutsResponse, + parse_obj_as( + type_=CancelPayoutsResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + V1ErrorResponse, + parse_obj_as( + type_=V1ErrorResponse, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + class AsyncRawPayoutsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -478,7 +581,7 @@ async def list( Returns ------- AsyncPager[ListPayoutsResponseDataItem, ListPayoutsResponse] - payouts filtered by source, payout method, and created window + payouts listed """ _response = await self._client_wrapper.httpx_client.request( "payouts", @@ -715,7 +818,7 @@ async def retrieve( Returns ------- AsyncHttpResponse[RetrievePayoutsResponse] - payout found for a user + payout found """ _response = await self._client_wrapper.httpx_client.request( f"payouts/{encode_path_param(id)}", @@ -788,3 +891,105 @@ async def retrieve( status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def cancel( + self, + id: str, + *, + account_id: typing.Optional[str] = None, + user_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CancelPayoutsResponse]: + """ + Cancels a payout that is still in review and returns the funds, fees included, to the balance. A payout can be canceled while its status is `in_review`. A `requested` payout is still being prepared (its funds may be converting) and answers 409 until it reaches review; from `processing` on, the money is on its way and the answer is 409 with error type `not_cancelable`. Canceling a payout that is already canceled succeeds and returns it unchanged. + + Parameters + ---------- + id : str + Payout ID, prefixed `wdrl_`, or the `cofr_` payout request ID returned by `POST /payouts` — both cancel the same payout. + + account_id : typing.Optional[str] + Owning account ID, prefixed `biz_`. Provide exactly one of `account_id` or `user_id`. + + user_id : typing.Optional[str] + Owning user ID, prefixed `user_`. Provide exactly one of `account_id` or `user_id`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CancelPayoutsResponse] + payout canceled and funds returned + """ + _response = await self._client_wrapper.httpx_client.request( + f"payouts/{encode_path_param(id)}/cancel", + method="POST", + params={ + "account_id": account_id, + "user_id": user_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CancelPayoutsResponse, + parse_obj_as( + type_=CancelPayoutsResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + V1ErrorResponse, + parse_obj_as( + type_=V1ErrorResponse, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/whop_sdk/payouts/supported_methods/client.py b/src/whop_sdk/payouts/supported_methods/client.py index 02924490..e027f80b 100644 --- a/src/whop_sdk/payouts/supported_methods/client.py +++ b/src/whop_sdk/payouts/supported_methods/client.py @@ -56,7 +56,7 @@ def list( ISO 3166-1 alpha-2 country code for the bank account or wallet, such as `US`. Defaults to the country of supported_payout_method_id when one is given, otherwise the payout account's country. amount : typing.Optional[float] - Optional withdrawal amount in whole currency units, for example `250.00`. When provided, each destination includes per-currency fee and delivery quotes. + Optional payout amount in whole currency units, for example `250.00`. When provided, each destination includes per-currency fee and delivery quotes. currency : typing.Optional[str] Currency code of the amount, for example `usd`. Only meaningful with amount. @@ -85,14 +85,14 @@ def list( Returns ------- SyncPager[ListSupportedMethodsResponseDataItem, ListSupportedMethodsResponse] - catalog failures degrade to no destinations + supported payout methods listed Examples -------- from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -165,7 +165,7 @@ async def list( ISO 3166-1 alpha-2 country code for the bank account or wallet, such as `US`. Defaults to the country of supported_payout_method_id when one is given, otherwise the payout account's country. amount : typing.Optional[float] - Optional withdrawal amount in whole currency units, for example `250.00`. When provided, each destination includes per-currency fee and delivery quotes. + Optional payout amount in whole currency units, for example `250.00`. When provided, each destination includes per-currency fee and delivery quotes. currency : typing.Optional[str] Currency code of the amount, for example `usd`. Only meaningful with amount. @@ -194,7 +194,7 @@ async def list( Returns ------- AsyncPager[ListSupportedMethodsResponseDataItem, ListSupportedMethodsResponse] - catalog failures degrade to no destinations + supported payout methods listed Examples -------- @@ -203,7 +203,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payouts/supported_methods/raw_client.py b/src/whop_sdk/payouts/supported_methods/raw_client.py index 65265c0f..8f03dc29 100644 --- a/src/whop_sdk/payouts/supported_methods/raw_client.py +++ b/src/whop_sdk/payouts/supported_methods/raw_client.py @@ -53,7 +53,7 @@ def list( ISO 3166-1 alpha-2 country code for the bank account or wallet, such as `US`. Defaults to the country of supported_payout_method_id when one is given, otherwise the payout account's country. amount : typing.Optional[float] - Optional withdrawal amount in whole currency units, for example `250.00`. When provided, each destination includes per-currency fee and delivery quotes. + Optional payout amount in whole currency units, for example `250.00`. When provided, each destination includes per-currency fee and delivery quotes. currency : typing.Optional[str] Currency code of the amount, for example `usd`. Only meaningful with amount. @@ -82,7 +82,7 @@ def list( Returns ------- SyncPager[ListSupportedMethodsResponseDataItem, ListSupportedMethodsResponse] - catalog failures degrade to no destinations + supported payout methods listed """ _response = self._client_wrapper.httpx_client.request( "payouts/supported_methods", @@ -221,7 +221,7 @@ async def list( ISO 3166-1 alpha-2 country code for the bank account or wallet, such as `US`. Defaults to the country of supported_payout_method_id when one is given, otherwise the payout account's country. amount : typing.Optional[float] - Optional withdrawal amount in whole currency units, for example `250.00`. When provided, each destination includes per-currency fee and delivery quotes. + Optional payout amount in whole currency units, for example `250.00`. When provided, each destination includes per-currency fee and delivery quotes. currency : typing.Optional[str] Currency code of the amount, for example `usd`. Only meaningful with amount. @@ -250,7 +250,7 @@ async def list( Returns ------- AsyncPager[ListSupportedMethodsResponseDataItem, ListSupportedMethodsResponse] - catalog failures degrade to no destinations + supported payout methods listed """ _response = await self._client_wrapper.httpx_client.request( "payouts/supported_methods", diff --git a/src/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_quotes_item.py b/src/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_quotes_item.py index af45b156..3de7ad6c 100644 --- a/src/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_quotes_item.py +++ b/src/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_quotes_item.py @@ -15,7 +15,7 @@ class ListSupportedMethodsResponseDataItemQuotesItem(UniversalBaseModel): amount: float = pydantic.Field() """ - The withdrawal amount the quote is for. + The payout amount the quote is for. """ currency: str = pydantic.Field() @@ -30,7 +30,7 @@ class ListSupportedMethodsResponseDataItemQuotesItem(UniversalBaseModel): exchange_rate: float = pydantic.Field() """ - Exchange rate from the withdrawal currency to the destination currency. + Exchange rate from the payout currency to the destination currency. """ instant: typing.Optional[ListSupportedMethodsResponseDataItemQuotesItemInstant] = pydantic.Field(default=None) @@ -40,12 +40,12 @@ class ListSupportedMethodsResponseDataItemQuotesItem(UniversalBaseModel): max_limit: typing.Optional[float] = pydantic.Field(default=None) """ - Maximum withdrawal amount, in the withdrawal currency. + Maximum payout amount, in the payout currency. """ min_limit: float = pydantic.Field() """ - Minimum withdrawal amount, in the withdrawal currency. + Minimum payout amount, in the payout currency. """ standard: typing.Optional[ListSupportedMethodsResponseDataItemQuotesItemStandard] = pydantic.Field(default=None) diff --git a/src/whop_sdk/payouts/types/__init__.py b/src/whop_sdk/payouts/types/__init__.py index 102b706e..51ec75f1 100644 --- a/src/whop_sdk/payouts/types/__init__.py +++ b/src/whop_sdk/payouts/types/__init__.py @@ -6,6 +6,20 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .cancel_payouts_response import CancelPayoutsResponse + from .cancel_payouts_response_failure import CancelPayoutsResponseFailure + from .cancel_payouts_response_fee_paid_by import CancelPayoutsResponseFeePaidBy + from .cancel_payouts_response_object import CancelPayoutsResponseObject + from .cancel_payouts_response_payout_method import CancelPayoutsResponsePayoutMethod + from .cancel_payouts_response_payout_method_supported_payout_method import ( + CancelPayoutsResponsePayoutMethodSupportedPayoutMethod, + ) + from .cancel_payouts_response_payout_method_supported_payout_method_delivery_type import ( + CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType, + ) + from .cancel_payouts_response_source import CancelPayoutsResponseSource + from .cancel_payouts_response_speed import CancelPayoutsResponseSpeed + from .cancel_payouts_response_status import CancelPayoutsResponseStatus from .create_payouts_request_body import CreatePayoutsRequestBody from .create_payouts_request_body_speed import CreatePayoutsRequestBodySpeed from .create_payouts_response import CreatePayoutsResponse @@ -40,6 +54,23 @@ from .list_payouts_response_data_item_speed import ListPayoutsResponseDataItemSpeed from .list_payouts_response_data_item_status import ListPayoutsResponseDataItemStatus from .list_payouts_response_page_info import ListPayoutsResponsePageInfo + from .post_payout_created_payload import PostPayoutCreatedPayload + from .post_payout_created_payload_api_version import PostPayoutCreatedPayloadApiVersion + from .post_payout_created_payload_data import PostPayoutCreatedPayloadData + from .post_payout_created_payload_data_failure import PostPayoutCreatedPayloadDataFailure + from .post_payout_created_payload_data_fee_paid_by import PostPayoutCreatedPayloadDataFeePaidBy + from .post_payout_created_payload_data_object import PostPayoutCreatedPayloadDataObject + from .post_payout_created_payload_data_payout_method import PostPayoutCreatedPayloadDataPayoutMethod + from .post_payout_created_payload_data_payout_method_supported_payout_method import ( + PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod, + ) + from .post_payout_created_payload_data_payout_method_supported_payout_method_delivery_type import ( + PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, + ) + from .post_payout_created_payload_data_source import PostPayoutCreatedPayloadDataSource + from .post_payout_created_payload_data_speed import PostPayoutCreatedPayloadDataSpeed + from .post_payout_created_payload_data_status import PostPayoutCreatedPayloadDataStatus + from .post_payout_created_payload_type import PostPayoutCreatedPayloadType from .post_payout_method_created_payload import PostPayoutMethodCreatedPayload from .post_payout_method_created_payload_api_version import PostPayoutMethodCreatedPayloadApiVersion from .post_payout_method_created_payload_data import PostPayoutMethodCreatedPayloadData @@ -65,57 +96,40 @@ PostPayoutMethodCreatedPayloadDataUnavailableReason, ) from .post_payout_method_created_payload_type import PostPayoutMethodCreatedPayloadType - from .post_withdrawal_created_payload import PostWithdrawalCreatedPayload - from .post_withdrawal_created_payload_api_version import PostWithdrawalCreatedPayloadApiVersion - from .post_withdrawal_created_payload_data import PostWithdrawalCreatedPayloadData - from .post_withdrawal_created_payload_data_failure import PostWithdrawalCreatedPayloadDataFailure - from .post_withdrawal_created_payload_data_fee_paid_by import PostWithdrawalCreatedPayloadDataFeePaidBy - from .post_withdrawal_created_payload_data_object import PostWithdrawalCreatedPayloadDataObject - from .post_withdrawal_created_payload_data_payout_method import PostWithdrawalCreatedPayloadDataPayoutMethod - from .post_withdrawal_created_payload_data_payout_method_supported_payout_method import ( - PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod, - ) - from .post_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type import ( - PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, - ) - from .post_withdrawal_created_payload_data_source import PostWithdrawalCreatedPayloadDataSource - from .post_withdrawal_created_payload_data_speed import PostWithdrawalCreatedPayloadDataSpeed - from .post_withdrawal_created_payload_data_status import PostWithdrawalCreatedPayloadDataStatus - from .post_withdrawal_created_payload_type import PostWithdrawalCreatedPayloadType - from .post_withdrawal_reversed_payload import PostWithdrawalReversedPayload - from .post_withdrawal_reversed_payload_api_version import PostWithdrawalReversedPayloadApiVersion - from .post_withdrawal_reversed_payload_data import PostWithdrawalReversedPayloadData - from .post_withdrawal_reversed_payload_data_failure import PostWithdrawalReversedPayloadDataFailure - from .post_withdrawal_reversed_payload_data_fee_paid_by import PostWithdrawalReversedPayloadDataFeePaidBy - from .post_withdrawal_reversed_payload_data_object import PostWithdrawalReversedPayloadDataObject - from .post_withdrawal_reversed_payload_data_payout_method import PostWithdrawalReversedPayloadDataPayoutMethod - from .post_withdrawal_reversed_payload_data_payout_method_supported_payout_method import ( - PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod, + from .post_payout_reversed_payload import PostPayoutReversedPayload + from .post_payout_reversed_payload_api_version import PostPayoutReversedPayloadApiVersion + from .post_payout_reversed_payload_data import PostPayoutReversedPayloadData + from .post_payout_reversed_payload_data_failure import PostPayoutReversedPayloadDataFailure + from .post_payout_reversed_payload_data_fee_paid_by import PostPayoutReversedPayloadDataFeePaidBy + from .post_payout_reversed_payload_data_object import PostPayoutReversedPayloadDataObject + from .post_payout_reversed_payload_data_payout_method import PostPayoutReversedPayloadDataPayoutMethod + from .post_payout_reversed_payload_data_payout_method_supported_payout_method import ( + PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod, ) - from .post_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type import ( - PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, + from .post_payout_reversed_payload_data_payout_method_supported_payout_method_delivery_type import ( + PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, ) - from .post_withdrawal_reversed_payload_data_source import PostWithdrawalReversedPayloadDataSource - from .post_withdrawal_reversed_payload_data_speed import PostWithdrawalReversedPayloadDataSpeed - from .post_withdrawal_reversed_payload_data_status import PostWithdrawalReversedPayloadDataStatus - from .post_withdrawal_reversed_payload_type import PostWithdrawalReversedPayloadType - from .post_withdrawal_updated_payload import PostWithdrawalUpdatedPayload - from .post_withdrawal_updated_payload_api_version import PostWithdrawalUpdatedPayloadApiVersion - from .post_withdrawal_updated_payload_data import PostWithdrawalUpdatedPayloadData - from .post_withdrawal_updated_payload_data_failure import PostWithdrawalUpdatedPayloadDataFailure - from .post_withdrawal_updated_payload_data_fee_paid_by import PostWithdrawalUpdatedPayloadDataFeePaidBy - from .post_withdrawal_updated_payload_data_object import PostWithdrawalUpdatedPayloadDataObject - from .post_withdrawal_updated_payload_data_payout_method import PostWithdrawalUpdatedPayloadDataPayoutMethod - from .post_withdrawal_updated_payload_data_payout_method_supported_payout_method import ( - PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod, + from .post_payout_reversed_payload_data_source import PostPayoutReversedPayloadDataSource + from .post_payout_reversed_payload_data_speed import PostPayoutReversedPayloadDataSpeed + from .post_payout_reversed_payload_data_status import PostPayoutReversedPayloadDataStatus + from .post_payout_reversed_payload_type import PostPayoutReversedPayloadType + from .post_payout_updated_payload import PostPayoutUpdatedPayload + from .post_payout_updated_payload_api_version import PostPayoutUpdatedPayloadApiVersion + from .post_payout_updated_payload_data import PostPayoutUpdatedPayloadData + from .post_payout_updated_payload_data_failure import PostPayoutUpdatedPayloadDataFailure + from .post_payout_updated_payload_data_fee_paid_by import PostPayoutUpdatedPayloadDataFeePaidBy + from .post_payout_updated_payload_data_object import PostPayoutUpdatedPayloadDataObject + from .post_payout_updated_payload_data_payout_method import PostPayoutUpdatedPayloadDataPayoutMethod + from .post_payout_updated_payload_data_payout_method_supported_payout_method import ( + PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod, ) - from .post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type import ( - PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, + from .post_payout_updated_payload_data_payout_method_supported_payout_method_delivery_type import ( + PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, ) - from .post_withdrawal_updated_payload_data_source import PostWithdrawalUpdatedPayloadDataSource - from .post_withdrawal_updated_payload_data_speed import PostWithdrawalUpdatedPayloadDataSpeed - from .post_withdrawal_updated_payload_data_status import PostWithdrawalUpdatedPayloadDataStatus - from .post_withdrawal_updated_payload_type import PostWithdrawalUpdatedPayloadType + from .post_payout_updated_payload_data_source import PostPayoutUpdatedPayloadDataSource + from .post_payout_updated_payload_data_speed import PostPayoutUpdatedPayloadDataSpeed + from .post_payout_updated_payload_data_status import PostPayoutUpdatedPayloadDataStatus + from .post_payout_updated_payload_type import PostPayoutUpdatedPayloadType from .retrieve_payouts_response import RetrievePayoutsResponse from .retrieve_payouts_response_failure import RetrievePayoutsResponseFailure from .retrieve_payouts_response_fee_paid_by import RetrievePayoutsResponseFeePaidBy @@ -131,6 +145,16 @@ from .retrieve_payouts_response_speed import RetrievePayoutsResponseSpeed from .retrieve_payouts_response_status import RetrievePayoutsResponseStatus _dynamic_imports: typing.Dict[str, str] = { + "CancelPayoutsResponse": ".cancel_payouts_response", + "CancelPayoutsResponseFailure": ".cancel_payouts_response_failure", + "CancelPayoutsResponseFeePaidBy": ".cancel_payouts_response_fee_paid_by", + "CancelPayoutsResponseObject": ".cancel_payouts_response_object", + "CancelPayoutsResponsePayoutMethod": ".cancel_payouts_response_payout_method", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethod": ".cancel_payouts_response_payout_method_supported_payout_method", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType": ".cancel_payouts_response_payout_method_supported_payout_method_delivery_type", + "CancelPayoutsResponseSource": ".cancel_payouts_response_source", + "CancelPayoutsResponseSpeed": ".cancel_payouts_response_speed", + "CancelPayoutsResponseStatus": ".cancel_payouts_response_status", "CreatePayoutsRequestBody": ".create_payouts_request_body", "CreatePayoutsRequestBodySpeed": ".create_payouts_request_body_speed", "CreatePayoutsResponse": ".create_payouts_response", @@ -157,6 +181,19 @@ "ListPayoutsResponseDataItemSpeed": ".list_payouts_response_data_item_speed", "ListPayoutsResponseDataItemStatus": ".list_payouts_response_data_item_status", "ListPayoutsResponsePageInfo": ".list_payouts_response_page_info", + "PostPayoutCreatedPayload": ".post_payout_created_payload", + "PostPayoutCreatedPayloadApiVersion": ".post_payout_created_payload_api_version", + "PostPayoutCreatedPayloadData": ".post_payout_created_payload_data", + "PostPayoutCreatedPayloadDataFailure": ".post_payout_created_payload_data_failure", + "PostPayoutCreatedPayloadDataFeePaidBy": ".post_payout_created_payload_data_fee_paid_by", + "PostPayoutCreatedPayloadDataObject": ".post_payout_created_payload_data_object", + "PostPayoutCreatedPayloadDataPayoutMethod": ".post_payout_created_payload_data_payout_method", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod": ".post_payout_created_payload_data_payout_method_supported_payout_method", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".post_payout_created_payload_data_payout_method_supported_payout_method_delivery_type", + "PostPayoutCreatedPayloadDataSource": ".post_payout_created_payload_data_source", + "PostPayoutCreatedPayloadDataSpeed": ".post_payout_created_payload_data_speed", + "PostPayoutCreatedPayloadDataStatus": ".post_payout_created_payload_data_status", + "PostPayoutCreatedPayloadType": ".post_payout_created_payload_type", "PostPayoutMethodCreatedPayload": ".post_payout_method_created_payload", "PostPayoutMethodCreatedPayloadApiVersion": ".post_payout_method_created_payload_api_version", "PostPayoutMethodCreatedPayloadData": ".post_payout_method_created_payload_data", @@ -172,45 +209,32 @@ "PostPayoutMethodCreatedPayloadDataSupportedPayoutMethodDeliveryType": ".post_payout_method_created_payload_data_supported_payout_method_delivery_type", "PostPayoutMethodCreatedPayloadDataUnavailableReason": ".post_payout_method_created_payload_data_unavailable_reason", "PostPayoutMethodCreatedPayloadType": ".post_payout_method_created_payload_type", - "PostWithdrawalCreatedPayload": ".post_withdrawal_created_payload", - "PostWithdrawalCreatedPayloadApiVersion": ".post_withdrawal_created_payload_api_version", - "PostWithdrawalCreatedPayloadData": ".post_withdrawal_created_payload_data", - "PostWithdrawalCreatedPayloadDataFailure": ".post_withdrawal_created_payload_data_failure", - "PostWithdrawalCreatedPayloadDataFeePaidBy": ".post_withdrawal_created_payload_data_fee_paid_by", - "PostWithdrawalCreatedPayloadDataObject": ".post_withdrawal_created_payload_data_object", - "PostWithdrawalCreatedPayloadDataPayoutMethod": ".post_withdrawal_created_payload_data_payout_method", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod": ".post_withdrawal_created_payload_data_payout_method_supported_payout_method", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".post_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type", - "PostWithdrawalCreatedPayloadDataSource": ".post_withdrawal_created_payload_data_source", - "PostWithdrawalCreatedPayloadDataSpeed": ".post_withdrawal_created_payload_data_speed", - "PostWithdrawalCreatedPayloadDataStatus": ".post_withdrawal_created_payload_data_status", - "PostWithdrawalCreatedPayloadType": ".post_withdrawal_created_payload_type", - "PostWithdrawalReversedPayload": ".post_withdrawal_reversed_payload", - "PostWithdrawalReversedPayloadApiVersion": ".post_withdrawal_reversed_payload_api_version", - "PostWithdrawalReversedPayloadData": ".post_withdrawal_reversed_payload_data", - "PostWithdrawalReversedPayloadDataFailure": ".post_withdrawal_reversed_payload_data_failure", - "PostWithdrawalReversedPayloadDataFeePaidBy": ".post_withdrawal_reversed_payload_data_fee_paid_by", - "PostWithdrawalReversedPayloadDataObject": ".post_withdrawal_reversed_payload_data_object", - "PostWithdrawalReversedPayloadDataPayoutMethod": ".post_withdrawal_reversed_payload_data_payout_method", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod": ".post_withdrawal_reversed_payload_data_payout_method_supported_payout_method", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".post_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type", - "PostWithdrawalReversedPayloadDataSource": ".post_withdrawal_reversed_payload_data_source", - "PostWithdrawalReversedPayloadDataSpeed": ".post_withdrawal_reversed_payload_data_speed", - "PostWithdrawalReversedPayloadDataStatus": ".post_withdrawal_reversed_payload_data_status", - "PostWithdrawalReversedPayloadType": ".post_withdrawal_reversed_payload_type", - "PostWithdrawalUpdatedPayload": ".post_withdrawal_updated_payload", - "PostWithdrawalUpdatedPayloadApiVersion": ".post_withdrawal_updated_payload_api_version", - "PostWithdrawalUpdatedPayloadData": ".post_withdrawal_updated_payload_data", - "PostWithdrawalUpdatedPayloadDataFailure": ".post_withdrawal_updated_payload_data_failure", - "PostWithdrawalUpdatedPayloadDataFeePaidBy": ".post_withdrawal_updated_payload_data_fee_paid_by", - "PostWithdrawalUpdatedPayloadDataObject": ".post_withdrawal_updated_payload_data_object", - "PostWithdrawalUpdatedPayloadDataPayoutMethod": ".post_withdrawal_updated_payload_data_payout_method", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod": ".post_withdrawal_updated_payload_data_payout_method_supported_payout_method", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type", - "PostWithdrawalUpdatedPayloadDataSource": ".post_withdrawal_updated_payload_data_source", - "PostWithdrawalUpdatedPayloadDataSpeed": ".post_withdrawal_updated_payload_data_speed", - "PostWithdrawalUpdatedPayloadDataStatus": ".post_withdrawal_updated_payload_data_status", - "PostWithdrawalUpdatedPayloadType": ".post_withdrawal_updated_payload_type", + "PostPayoutReversedPayload": ".post_payout_reversed_payload", + "PostPayoutReversedPayloadApiVersion": ".post_payout_reversed_payload_api_version", + "PostPayoutReversedPayloadData": ".post_payout_reversed_payload_data", + "PostPayoutReversedPayloadDataFailure": ".post_payout_reversed_payload_data_failure", + "PostPayoutReversedPayloadDataFeePaidBy": ".post_payout_reversed_payload_data_fee_paid_by", + "PostPayoutReversedPayloadDataObject": ".post_payout_reversed_payload_data_object", + "PostPayoutReversedPayloadDataPayoutMethod": ".post_payout_reversed_payload_data_payout_method", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod": ".post_payout_reversed_payload_data_payout_method_supported_payout_method", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".post_payout_reversed_payload_data_payout_method_supported_payout_method_delivery_type", + "PostPayoutReversedPayloadDataSource": ".post_payout_reversed_payload_data_source", + "PostPayoutReversedPayloadDataSpeed": ".post_payout_reversed_payload_data_speed", + "PostPayoutReversedPayloadDataStatus": ".post_payout_reversed_payload_data_status", + "PostPayoutReversedPayloadType": ".post_payout_reversed_payload_type", + "PostPayoutUpdatedPayload": ".post_payout_updated_payload", + "PostPayoutUpdatedPayloadApiVersion": ".post_payout_updated_payload_api_version", + "PostPayoutUpdatedPayloadData": ".post_payout_updated_payload_data", + "PostPayoutUpdatedPayloadDataFailure": ".post_payout_updated_payload_data_failure", + "PostPayoutUpdatedPayloadDataFeePaidBy": ".post_payout_updated_payload_data_fee_paid_by", + "PostPayoutUpdatedPayloadDataObject": ".post_payout_updated_payload_data_object", + "PostPayoutUpdatedPayloadDataPayoutMethod": ".post_payout_updated_payload_data_payout_method", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod": ".post_payout_updated_payload_data_payout_method_supported_payout_method", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType": ".post_payout_updated_payload_data_payout_method_supported_payout_method_delivery_type", + "PostPayoutUpdatedPayloadDataSource": ".post_payout_updated_payload_data_source", + "PostPayoutUpdatedPayloadDataSpeed": ".post_payout_updated_payload_data_speed", + "PostPayoutUpdatedPayloadDataStatus": ".post_payout_updated_payload_data_status", + "PostPayoutUpdatedPayloadType": ".post_payout_updated_payload_type", "RetrievePayoutsResponse": ".retrieve_payouts_response", "RetrievePayoutsResponseFailure": ".retrieve_payouts_response_failure", "RetrievePayoutsResponseFeePaidBy": ".retrieve_payouts_response_fee_paid_by", @@ -246,6 +270,16 @@ def __dir__(): __all__ = [ + "CancelPayoutsResponse", + "CancelPayoutsResponseFailure", + "CancelPayoutsResponseFeePaidBy", + "CancelPayoutsResponseObject", + "CancelPayoutsResponsePayoutMethod", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethod", + "CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType", + "CancelPayoutsResponseSource", + "CancelPayoutsResponseSpeed", + "CancelPayoutsResponseStatus", "CreatePayoutsRequestBody", "CreatePayoutsRequestBodySpeed", "CreatePayoutsResponse", @@ -272,6 +306,19 @@ def __dir__(): "ListPayoutsResponseDataItemSpeed", "ListPayoutsResponseDataItemStatus", "ListPayoutsResponsePageInfo", + "PostPayoutCreatedPayload", + "PostPayoutCreatedPayloadApiVersion", + "PostPayoutCreatedPayloadData", + "PostPayoutCreatedPayloadDataFailure", + "PostPayoutCreatedPayloadDataFeePaidBy", + "PostPayoutCreatedPayloadDataObject", + "PostPayoutCreatedPayloadDataPayoutMethod", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod", + "PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", + "PostPayoutCreatedPayloadDataSource", + "PostPayoutCreatedPayloadDataSpeed", + "PostPayoutCreatedPayloadDataStatus", + "PostPayoutCreatedPayloadType", "PostPayoutMethodCreatedPayload", "PostPayoutMethodCreatedPayloadApiVersion", "PostPayoutMethodCreatedPayloadData", @@ -287,45 +334,32 @@ def __dir__(): "PostPayoutMethodCreatedPayloadDataSupportedPayoutMethodDeliveryType", "PostPayoutMethodCreatedPayloadDataUnavailableReason", "PostPayoutMethodCreatedPayloadType", - "PostWithdrawalCreatedPayload", - "PostWithdrawalCreatedPayloadApiVersion", - "PostWithdrawalCreatedPayloadData", - "PostWithdrawalCreatedPayloadDataFailure", - "PostWithdrawalCreatedPayloadDataFeePaidBy", - "PostWithdrawalCreatedPayloadDataObject", - "PostWithdrawalCreatedPayloadDataPayoutMethod", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod", - "PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", - "PostWithdrawalCreatedPayloadDataSource", - "PostWithdrawalCreatedPayloadDataSpeed", - "PostWithdrawalCreatedPayloadDataStatus", - "PostWithdrawalCreatedPayloadType", - "PostWithdrawalReversedPayload", - "PostWithdrawalReversedPayloadApiVersion", - "PostWithdrawalReversedPayloadData", - "PostWithdrawalReversedPayloadDataFailure", - "PostWithdrawalReversedPayloadDataFeePaidBy", - "PostWithdrawalReversedPayloadDataObject", - "PostWithdrawalReversedPayloadDataPayoutMethod", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod", - "PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", - "PostWithdrawalReversedPayloadDataSource", - "PostWithdrawalReversedPayloadDataSpeed", - "PostWithdrawalReversedPayloadDataStatus", - "PostWithdrawalReversedPayloadType", - "PostWithdrawalUpdatedPayload", - "PostWithdrawalUpdatedPayloadApiVersion", - "PostWithdrawalUpdatedPayloadData", - "PostWithdrawalUpdatedPayloadDataFailure", - "PostWithdrawalUpdatedPayloadDataFeePaidBy", - "PostWithdrawalUpdatedPayloadDataObject", - "PostWithdrawalUpdatedPayloadDataPayoutMethod", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod", - "PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", - "PostWithdrawalUpdatedPayloadDataSource", - "PostWithdrawalUpdatedPayloadDataSpeed", - "PostWithdrawalUpdatedPayloadDataStatus", - "PostWithdrawalUpdatedPayloadType", + "PostPayoutReversedPayload", + "PostPayoutReversedPayloadApiVersion", + "PostPayoutReversedPayloadData", + "PostPayoutReversedPayloadDataFailure", + "PostPayoutReversedPayloadDataFeePaidBy", + "PostPayoutReversedPayloadDataObject", + "PostPayoutReversedPayloadDataPayoutMethod", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod", + "PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", + "PostPayoutReversedPayloadDataSource", + "PostPayoutReversedPayloadDataSpeed", + "PostPayoutReversedPayloadDataStatus", + "PostPayoutReversedPayloadType", + "PostPayoutUpdatedPayload", + "PostPayoutUpdatedPayloadApiVersion", + "PostPayoutUpdatedPayloadData", + "PostPayoutUpdatedPayloadDataFailure", + "PostPayoutUpdatedPayloadDataFeePaidBy", + "PostPayoutUpdatedPayloadDataObject", + "PostPayoutUpdatedPayloadDataPayoutMethod", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod", + "PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType", + "PostPayoutUpdatedPayloadDataSource", + "PostPayoutUpdatedPayloadDataSpeed", + "PostPayoutUpdatedPayloadDataStatus", + "PostPayoutUpdatedPayloadType", "RetrievePayoutsResponse", "RetrievePayoutsResponseFailure", "RetrievePayoutsResponseFeePaidBy", diff --git a/src/whop_sdk/payouts/types/cancel_payouts_response.py b/src/whop_sdk/payouts/types/cancel_payouts_response.py new file mode 100644 index 00000000..7b0efb32 --- /dev/null +++ b/src/whop_sdk/payouts/types/cancel_payouts_response.py @@ -0,0 +1,141 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .cancel_payouts_response_failure import CancelPayoutsResponseFailure +from .cancel_payouts_response_fee_paid_by import CancelPayoutsResponseFeePaidBy +from .cancel_payouts_response_object import CancelPayoutsResponseObject +from .cancel_payouts_response_payout_method import CancelPayoutsResponsePayoutMethod +from .cancel_payouts_response_source import CancelPayoutsResponseSource +from .cancel_payouts_response_speed import CancelPayoutsResponseSpeed +from .cancel_payouts_response_status import CancelPayoutsResponseStatus + + +class CancelPayoutsResponse(UniversalBaseModel): + amount: str = pydantic.Field() + """ + The payout amount in whole currency units, as a decimal string. + """ + + created_at: dt.datetime = pydantic.Field() + """ + When the payout was created. + """ + + currency: str = pydantic.Field() + """ + Payout currency. + """ + + destination_amount: typing.Optional[str] = pydantic.Field(default=None) + """ + The amount delivered in the destination currency, as a decimal string. Assigned when the payout is processed, so it is `null` before then and on payouts without a recorded conversion. + """ + + destination_currency: typing.Optional[str] = pydantic.Field(default=None) + """ + Currency the funds are delivered in, taken from the payout method when the payout is created. On a stablecoin payout it follows the settlement payout minted alongside it — the `GET /payouts` row carrying this payout's id as `payout_request_id` — and is `null` only when no settlement payout exists. + """ + + estimated_arrival: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + Estimated time the funds become available in the destination account. + """ + + exchange_rate: typing.Optional[float] = pydantic.Field(default=None) + """ + Exchange rate from the payout currency to the destination currency. Assigned when the payout is processed, so it is `null` before then and on payouts without a recorded rate. + """ + + failure: typing.Optional[CancelPayoutsResponseFailure] = pydantic.Field(default=None) + """ + Why the payout ended without paying, or why it reversed after settlement. Present on failed, canceled, denied, and reversed payouts; `null` otherwise. + """ + + fee_amount: str = pydantic.Field() + """ + The fee charged for the payout, in the payout currency, as a decimal string. + """ + + fee_paid_by: CancelPayoutsResponseFeePaidBy = pydantic.Field() + """ + Who bore the payout fee: the account itself, or its parent platform. + """ + + id: str = pydantic.Field() + """ + Payout ID, prefixed `wdrl_` for a payout returned by `GET /payouts` or `cofr_` for a payout request returned by `POST /payouts`. + """ + + markup_fee: str = pydantic.Field() + """ + Whop's markup on the provider fee, in the payout currency, as a decimal string. `"0.0"` when none applies. + """ + + metadata: typing.Dict[str, str] = pydantic.Field() + """ + Key-value data attached at creation and echoed on every read. At most 50 keys, key names up to 40 characters, string values up to 500 characters. + """ + + net_amount: str = pydantic.Field() + """ + The planned net for the destination, in the payout currency: amount minus fee_amount minus markup_fee when fee_paid_by is `self`; equal to amount when the platform covers the fees. A payout that ends denied, canceled, or failed delivered nothing — most keep the planned figure and `failure` says where the funds are, but a canceled stablecoin payout can report the settled outcome instead: `amount` carries what stayed in the balance, fees are zero because none were charged, and `net_amount` is 0 because nothing was delivered. + """ + + notes: typing.Optional[str] = pydantic.Field(default=None) + """ + Free-form notes attached by the payout creator, or `null` when none were provided. Maximum 255 characters. + """ + + object: CancelPayoutsResponseObject + payer_name: typing.Optional[str] = pydantic.Field(default=None) + """ + Name of the entity processing the payout. + """ + + payout_method: typing.Optional[CancelPayoutsResponsePayoutMethod] = pydantic.Field(default=None) + """ + The saved payout method used. Requires payout:destination:read; null without it. + """ + + payout_request_id: typing.Optional[str] = pydantic.Field(default=None) + """ + Payout request ID, prefixed `cofr_`, returned by `POST /payouts`. For a request retrieved by its own `cofr_` ID, this equals `id`. Returns `null` for payouts not created by `POST /payouts`. + """ + + source: typing.Optional[CancelPayoutsResponseSource] = pydantic.Field(default=None) + """ + How the payout was created. `automatic` means a scheduled auto-payout; `null` on payouts created before source tracking or through internal tooling. + """ + + speed: CancelPayoutsResponseSpeed = pydantic.Field() + """ + Payout delivery speed. + """ + + status: CancelPayoutsResponseStatus = pydantic.Field() + """ + Current payout status. + """ + + status_detail: str = pydantic.Field() + """ + The finest machine phase under `status` — for example `awaiting_provider_acceptance` vs `in_transit` under `processing`, or the stablecoin conversion phase under `requested`. Informational vocabulary: values can be added without a version bump; `status` is the versioned contract. + """ + + trace_code: typing.Optional[str] = pydantic.Field(default=None) + """ + ACH trace number the recipient's bank can use to locate this payout. Assigned when the payout is submitted to the bank, so it is `null` before then and on payouts not sent over ACH. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_failure.py b/src/whop_sdk/payouts/types/cancel_payouts_response_failure.py similarity index 95% rename from src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_failure.py rename to src/whop_sdk/payouts/types/cancel_payouts_response_failure.py index fb5282f8..8a38aa44 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_failure.py +++ b/src/whop_sdk/payouts/types/cancel_payouts_response_failure.py @@ -7,7 +7,7 @@ from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class PostWithdrawalCreatedPayloadDataFailure(UniversalBaseModel): +class CancelPayoutsResponseFailure(UniversalBaseModel): """ Why the payout ended without paying, or why it reversed after settlement. Present on failed, canceled, denied, and reversed payouts; `null` otherwise. """ diff --git a/src/whop_sdk/payouts/types/cancel_payouts_response_fee_paid_by.py b/src/whop_sdk/payouts/types/cancel_payouts_response_fee_paid_by.py new file mode 100644 index 00000000..0f001c2e --- /dev/null +++ b/src/whop_sdk/payouts/types/cancel_payouts_response_fee_paid_by.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CancelPayoutsResponseFeePaidBy = typing.Union[typing.Literal["self", "platform"], typing.Any] diff --git a/src/whop_sdk/payouts/types/cancel_payouts_response_object.py b/src/whop_sdk/payouts/types/cancel_payouts_response_object.py new file mode 100644 index 00000000..d86d6dea --- /dev/null +++ b/src/whop_sdk/payouts/types/cancel_payouts_response_object.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CancelPayoutsResponseObject = typing.Union[typing.Literal["payout"], typing.Any] diff --git a/src/whop_sdk/payouts/types/cancel_payouts_response_payout_method.py b/src/whop_sdk/payouts/types/cancel_payouts_response_payout_method.py new file mode 100644 index 00000000..d48dc762 --- /dev/null +++ b/src/whop_sdk/payouts/types/cancel_payouts_response_payout_method.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .cancel_payouts_response_payout_method_supported_payout_method import ( + CancelPayoutsResponsePayoutMethodSupportedPayoutMethod, +) + + +class CancelPayoutsResponsePayoutMethod(UniversalBaseModel): + """ + The saved payout method used. Requires payout:destination:read; null without it. + """ + + nickname: typing.Optional[str] = pydantic.Field(default=None) + """ + Saved payout method nickname. + """ + + supported_payout_method: typing.Optional[CancelPayoutsResponsePayoutMethodSupportedPayoutMethod] = pydantic.Field( + default=None + ) + """ + Supported payout method display details. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method_supported_payout_method.py b/src/whop_sdk/payouts/types/cancel_payouts_response_payout_method_supported_payout_method.py similarity index 68% rename from src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method_supported_payout_method.py rename to src/whop_sdk/payouts/types/cancel_payouts_response_payout_method_supported_payout_method.py index 7b1771eb..45433de2 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method_supported_payout_method.py +++ b/src/whop_sdk/payouts/types/cancel_payouts_response_payout_method_supported_payout_method.py @@ -4,17 +4,17 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type import ( - PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, +from .cancel_payouts_response_payout_method_supported_payout_method_delivery_type import ( + CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType, ) -class PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod(UniversalBaseModel): +class CancelPayoutsResponsePayoutMethodSupportedPayoutMethod(UniversalBaseModel): """ Supported payout method display details. """ - delivery_type: PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = pydantic.Field() + delivery_type: CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType = pydantic.Field() """ How the funds are delivered to the recipient. """ diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type.py b/src/whop_sdk/payouts/types/cancel_payouts_response_payout_method_supported_payout_method_delivery_type.py similarity index 77% rename from src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type.py rename to src/whop_sdk/payouts/types/cancel_payouts_response_payout_method_supported_payout_method_delivery_type.py index 2d91281d..6793fa9f 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type.py +++ b/src/whop_sdk/payouts/types/cancel_payouts_response_payout_method_supported_payout_method_delivery_type.py @@ -2,7 +2,7 @@ import typing -PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = typing.Union[ +CancelPayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType = typing.Union[ typing.Literal[ "cash_pickup", "bank_deposit", diff --git a/src/whop_sdk/payouts/types/cancel_payouts_response_source.py b/src/whop_sdk/payouts/types/cancel_payouts_response_source.py new file mode 100644 index 00000000..1ff8c268 --- /dev/null +++ b/src/whop_sdk/payouts/types/cancel_payouts_response_source.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CancelPayoutsResponseSource = typing.Union[typing.Literal["api", "dashboard", "automatic"], typing.Any] diff --git a/src/whop_sdk/payouts/types/cancel_payouts_response_speed.py b/src/whop_sdk/payouts/types/cancel_payouts_response_speed.py new file mode 100644 index 00000000..d6517839 --- /dev/null +++ b/src/whop_sdk/payouts/types/cancel_payouts_response_speed.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CancelPayoutsResponseSpeed = typing.Union[typing.Literal["standard", "instant"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_status.py b/src/whop_sdk/payouts/types/cancel_payouts_response_status.py similarity index 79% rename from src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_status.py rename to src/whop_sdk/payouts/types/cancel_payouts_response_status.py index 23107d2e..a6fcee26 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_status.py +++ b/src/whop_sdk/payouts/types/cancel_payouts_response_status.py @@ -2,7 +2,7 @@ import typing -PostWithdrawalCreatedPayloadDataStatus = typing.Union[ +CancelPayoutsResponseStatus = typing.Union[ typing.Literal["requested", "in_review", "processing", "completed", "reversed", "canceled", "failed", "denied"], typing.Any, ] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload.py b/src/whop_sdk/payouts/types/post_payout_created_payload.py similarity index 73% rename from src/whop_sdk/payouts/types/post_withdrawal_created_payload.py rename to src/whop_sdk/payouts/types/post_payout_created_payload.py index 8010fa2f..7a557db3 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload.py +++ b/src/whop_sdk/payouts/types/post_payout_created_payload.py @@ -5,18 +5,18 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_created_payload_api_version import PostWithdrawalCreatedPayloadApiVersion -from .post_withdrawal_created_payload_data import PostWithdrawalCreatedPayloadData -from .post_withdrawal_created_payload_type import PostWithdrawalCreatedPayloadType +from .post_payout_created_payload_api_version import PostPayoutCreatedPayloadApiVersion +from .post_payout_created_payload_data import PostPayoutCreatedPayloadData +from .post_payout_created_payload_type import PostPayoutCreatedPayloadType -class PostWithdrawalCreatedPayload(UniversalBaseModel): +class PostPayoutCreatedPayload(UniversalBaseModel): account_id: typing.Optional[str] = pydantic.Field(default=None) """ The account ID that this webhook event is associated with """ - api_version: PostWithdrawalCreatedPayloadApiVersion = pydantic.Field() + api_version: PostPayoutCreatedPayloadApiVersion = pydantic.Field() """ The API version for this webhook """ @@ -26,7 +26,7 @@ class PostWithdrawalCreatedPayload(UniversalBaseModel): The dated API version (Api-Version-Date) the payload is serialized to """ - data: PostWithdrawalCreatedPayloadData + data: PostPayoutCreatedPayloadData id: str = pydantic.Field() """ A unique ID for every single webhook request @@ -42,7 +42,7 @@ class PostWithdrawalCreatedPayload(UniversalBaseModel): The timestamp in ISO 8601 format that the webhook was sent at on the server """ - type: PostWithdrawalCreatedPayloadType = pydantic.Field() + type: PostPayoutCreatedPayloadType = pydantic.Field() """ The webhook event type """ diff --git a/src/whop_sdk/payouts/types/post_payout_created_payload_api_version.py b/src/whop_sdk/payouts/types/post_payout_created_payload_api_version.py new file mode 100644 index 00000000..dd08d17e --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_api_version.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutCreatedPayloadApiVersion = typing.Union[typing.Literal["v1"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data.py b/src/whop_sdk/payouts/types/post_payout_created_payload_data.py similarity index 78% rename from src/whop_sdk/payouts/types/post_withdrawal_created_payload_data.py rename to src/whop_sdk/payouts/types/post_payout_created_payload_data.py index 94952d0b..2a4e6ae2 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data.py +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_data.py @@ -5,16 +5,16 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_created_payload_data_failure import PostWithdrawalCreatedPayloadDataFailure -from .post_withdrawal_created_payload_data_fee_paid_by import PostWithdrawalCreatedPayloadDataFeePaidBy -from .post_withdrawal_created_payload_data_object import PostWithdrawalCreatedPayloadDataObject -from .post_withdrawal_created_payload_data_payout_method import PostWithdrawalCreatedPayloadDataPayoutMethod -from .post_withdrawal_created_payload_data_source import PostWithdrawalCreatedPayloadDataSource -from .post_withdrawal_created_payload_data_speed import PostWithdrawalCreatedPayloadDataSpeed -from .post_withdrawal_created_payload_data_status import PostWithdrawalCreatedPayloadDataStatus +from .post_payout_created_payload_data_failure import PostPayoutCreatedPayloadDataFailure +from .post_payout_created_payload_data_fee_paid_by import PostPayoutCreatedPayloadDataFeePaidBy +from .post_payout_created_payload_data_object import PostPayoutCreatedPayloadDataObject +from .post_payout_created_payload_data_payout_method import PostPayoutCreatedPayloadDataPayoutMethod +from .post_payout_created_payload_data_source import PostPayoutCreatedPayloadDataSource +from .post_payout_created_payload_data_speed import PostPayoutCreatedPayloadDataSpeed +from .post_payout_created_payload_data_status import PostPayoutCreatedPayloadDataStatus -class PostWithdrawalCreatedPayloadData(UniversalBaseModel): +class PostPayoutCreatedPayloadData(UniversalBaseModel): amount: str = pydantic.Field() """ The payout amount in whole currency units, as a decimal string. @@ -50,7 +50,7 @@ class PostWithdrawalCreatedPayloadData(UniversalBaseModel): Exchange rate from the payout currency to the destination currency. Assigned when the payout is processed, so it is `null` before then and on payouts without a recorded rate. """ - failure: typing.Optional[PostWithdrawalCreatedPayloadDataFailure] = pydantic.Field(default=None) + failure: typing.Optional[PostPayoutCreatedPayloadDataFailure] = pydantic.Field(default=None) """ Why the payout ended without paying, or why it reversed after settlement. Present on failed, canceled, denied, and reversed payouts; `null` otherwise. """ @@ -60,7 +60,7 @@ class PostWithdrawalCreatedPayloadData(UniversalBaseModel): The fee charged for the payout, in the payout currency, as a decimal string. """ - fee_paid_by: PostWithdrawalCreatedPayloadDataFeePaidBy = pydantic.Field() + fee_paid_by: PostPayoutCreatedPayloadDataFeePaidBy = pydantic.Field() """ Who bore the payout fee: the account itself, or its parent platform. """ @@ -90,13 +90,13 @@ class PostWithdrawalCreatedPayloadData(UniversalBaseModel): Free-form notes attached by the payout creator, or `null` when none were provided. Maximum 255 characters. """ - object: PostWithdrawalCreatedPayloadDataObject + object: PostPayoutCreatedPayloadDataObject payer_name: typing.Optional[str] = pydantic.Field(default=None) """ Name of the entity processing the payout. """ - payout_method: typing.Optional[PostWithdrawalCreatedPayloadDataPayoutMethod] = pydantic.Field(default=None) + payout_method: typing.Optional[PostPayoutCreatedPayloadDataPayoutMethod] = pydantic.Field(default=None) """ The saved payout method used. Requires payout:destination:read; null without it. """ @@ -106,17 +106,17 @@ class PostWithdrawalCreatedPayloadData(UniversalBaseModel): Payout request ID, prefixed `cofr_`, returned by `POST /payouts`. Match it to the settled payout in `GET /payouts`. Returns `null` for payouts not created by `POST /payouts`. """ - source: typing.Optional[PostWithdrawalCreatedPayloadDataSource] = pydantic.Field(default=None) + source: typing.Optional[PostPayoutCreatedPayloadDataSource] = pydantic.Field(default=None) """ How the payout was created. `automatic` means a scheduled auto-payout; `null` on payouts created before source tracking or through internal tooling. """ - speed: PostWithdrawalCreatedPayloadDataSpeed = pydantic.Field() + speed: PostPayoutCreatedPayloadDataSpeed = pydantic.Field() """ Payout delivery speed. """ - status: PostWithdrawalCreatedPayloadDataStatus = pydantic.Field() + status: PostPayoutCreatedPayloadDataStatus = pydantic.Field() """ Current payout status. """ diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_failure.py b/src/whop_sdk/payouts/types/post_payout_created_payload_data_failure.py similarity index 95% rename from src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_failure.py rename to src/whop_sdk/payouts/types/post_payout_created_payload_data_failure.py index 97cf8caf..4b465aed 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_failure.py +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_data_failure.py @@ -7,7 +7,7 @@ from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class PostWithdrawalUpdatedPayloadDataFailure(UniversalBaseModel): +class PostPayoutCreatedPayloadDataFailure(UniversalBaseModel): """ Why the payout ended without paying, or why it reversed after settlement. Present on failed, canceled, denied, and reversed payouts; `null` otherwise. """ diff --git a/src/whop_sdk/payouts/types/post_payout_created_payload_data_fee_paid_by.py b/src/whop_sdk/payouts/types/post_payout_created_payload_data_fee_paid_by.py new file mode 100644 index 00000000..3e5c9ea4 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_data_fee_paid_by.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutCreatedPayloadDataFeePaidBy = typing.Union[typing.Literal["self", "platform"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_payout_created_payload_data_object.py b/src/whop_sdk/payouts/types/post_payout_created_payload_data_object.py new file mode 100644 index 00000000..d5f0d6d4 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_data_object.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutCreatedPayloadDataObject = typing.Union[typing.Literal["payout"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method.py b/src/whop_sdk/payouts/types/post_payout_created_payload_data_payout_method.py similarity index 69% rename from src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method.py rename to src/whop_sdk/payouts/types/post_payout_created_payload_data_payout_method.py index 59fa65f1..e4fc2f8d 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method.py +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_data_payout_method.py @@ -4,12 +4,12 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_created_payload_data_payout_method_supported_payout_method import ( - PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod, +from .post_payout_created_payload_data_payout_method_supported_payout_method import ( + PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod, ) -class PostWithdrawalCreatedPayloadDataPayoutMethod(UniversalBaseModel): +class PostPayoutCreatedPayloadDataPayoutMethod(UniversalBaseModel): """ The saved payout method used. Requires payout:destination:read; null without it. """ @@ -19,7 +19,7 @@ class PostWithdrawalCreatedPayloadDataPayoutMethod(UniversalBaseModel): Saved payout method nickname. """ - supported_payout_method: typing.Optional[PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod] = ( + supported_payout_method: typing.Optional[PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod] = ( pydantic.Field(default=None) ) """ diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method_supported_payout_method.py b/src/whop_sdk/payouts/types/post_payout_created_payload_data_payout_method_supported_payout_method.py similarity index 68% rename from src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method_supported_payout_method.py rename to src/whop_sdk/payouts/types/post_payout_created_payload_data_payout_method_supported_payout_method.py index 58bec4d6..a0564862 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method_supported_payout_method.py +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_data_payout_method_supported_payout_method.py @@ -4,17 +4,17 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type import ( - PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, +from .post_payout_created_payload_data_payout_method_supported_payout_method_delivery_type import ( + PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, ) -class PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethod(UniversalBaseModel): +class PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethod(UniversalBaseModel): """ Supported payout method display details. """ - delivery_type: PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = pydantic.Field() + delivery_type: PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = pydantic.Field() """ How the funds are delivered to the recipient. """ diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type.py b/src/whop_sdk/payouts/types/post_payout_created_payload_data_payout_method_supported_payout_method_delivery_type.py similarity index 77% rename from src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type.py rename to src/whop_sdk/payouts/types/post_payout_created_payload_data_payout_method_supported_payout_method_delivery_type.py index d68f13ff..3d6104da 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type.py +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_data_payout_method_supported_payout_method_delivery_type.py @@ -2,7 +2,7 @@ import typing -PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = typing.Union[ +PostPayoutCreatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = typing.Union[ typing.Literal[ "cash_pickup", "bank_deposit", diff --git a/src/whop_sdk/payouts/types/post_payout_created_payload_data_source.py b/src/whop_sdk/payouts/types/post_payout_created_payload_data_source.py new file mode 100644 index 00000000..6f83b658 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_data_source.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutCreatedPayloadDataSource = typing.Union[typing.Literal["api", "dashboard", "automatic"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_payout_created_payload_data_speed.py b/src/whop_sdk/payouts/types/post_payout_created_payload_data_speed.py new file mode 100644 index 00000000..ca736c69 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_data_speed.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutCreatedPayloadDataSpeed = typing.Union[typing.Literal["standard", "instant"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_status.py b/src/whop_sdk/payouts/types/post_payout_created_payload_data_status.py similarity index 79% rename from src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_status.py rename to src/whop_sdk/payouts/types/post_payout_created_payload_data_status.py index e993db43..0dc49fe8 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_status.py +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_data_status.py @@ -2,7 +2,7 @@ import typing -PostWithdrawalUpdatedPayloadDataStatus = typing.Union[ +PostPayoutCreatedPayloadDataStatus = typing.Union[ typing.Literal["requested", "in_review", "processing", "completed", "reversed", "canceled", "failed", "denied"], typing.Any, ] diff --git a/src/whop_sdk/payouts/types/post_payout_created_payload_type.py b/src/whop_sdk/payouts/types/post_payout_created_payload_type.py new file mode 100644 index 00000000..1c5862c5 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_created_payload_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutCreatedPayloadType = typing.Union[typing.Literal["payout.created"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data.py b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data.py index 2c2ac67f..23eadc5b 100644 --- a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data.py +++ b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data.py @@ -106,7 +106,7 @@ class PostPayoutMethodCreatedPayloadData(UniversalBaseModel): quote: typing.Optional[PostPayoutMethodCreatedPayloadDataQuote] = pydantic.Field(default=None) """ - Fee and delivery estimate for withdrawing the requested amount through this method. Null unless an amount was provided, or when the estimate is unavailable. + Fee and delivery estimate for paying out the requested amount through this method. Null unless an amount was provided, or when the estimate is unavailable. """ status: PostPayoutMethodCreatedPayloadDataStatus = pydantic.Field() diff --git a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_fee_structure.py b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_fee_structure.py index eea9f395..bd343bb1 100644 --- a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_fee_structure.py +++ b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_fee_structure.py @@ -23,7 +23,7 @@ class PostPayoutMethodCreatedPayloadDataFeeStructure(UniversalBaseModel): percentage: float = pydantic.Field() """ - Percentage of the withdrawal amount charged as a fee. + Percentage of the payout amount charged as a fee. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote.py b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote.py index 03b8f99b..4d09c964 100644 --- a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote.py +++ b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote.py @@ -10,12 +10,12 @@ class PostPayoutMethodCreatedPayloadDataQuote(UniversalBaseModel): """ - Fee and delivery estimate for withdrawing the requested amount through this method. Null unless an amount was provided, or when the estimate is unavailable. + Fee and delivery estimate for paying out the requested amount through this method. Null unless an amount was provided, or when the estimate is unavailable. """ amount: float = pydantic.Field() """ - The withdrawal amount the quote is for. + The payout amount the quote is for. """ currency: str = pydantic.Field() @@ -25,7 +25,7 @@ class PostPayoutMethodCreatedPayloadDataQuote(UniversalBaseModel): exchange_rate: float = pydantic.Field() """ - Exchange rate from the withdrawal currency to the destination currency. + Exchange rate from the payout currency to the destination currency. """ instant: typing.Optional[PostPayoutMethodCreatedPayloadDataQuoteInstant] = pydantic.Field(default=None) @@ -35,12 +35,12 @@ class PostPayoutMethodCreatedPayloadDataQuote(UniversalBaseModel): max_limit: typing.Optional[float] = pydantic.Field(default=None) """ - Maximum withdrawal amount for this method, in the withdrawal currency. + Maximum payout amount for this method, in the payout currency. """ min_limit: float = pydantic.Field() """ - Minimum withdrawal amount for this method, in the withdrawal currency. + Minimum payout amount for this method, in the payout currency. """ standard: typing.Optional[PostPayoutMethodCreatedPayloadDataQuoteStandard] = pydantic.Field(default=None) diff --git a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote_instant.py b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote_instant.py index ffe6273a..4d0539d7 100644 --- a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote_instant.py +++ b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote_instant.py @@ -13,12 +13,12 @@ class PostPayoutMethodCreatedPayloadDataQuoteInstant(UniversalBaseModel): fee: float = pydantic.Field() """ - Total fee charged, in the withdrawal currency. + Total fee charged, in the payout currency. """ total_received: float = pydantic.Field() """ - Amount delivered after fees, in the withdrawal currency. + Amount delivered after fees, in the payout currency. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote_standard.py b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote_standard.py index b620945b..f46f8036 100644 --- a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote_standard.py +++ b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_quote_standard.py @@ -13,12 +13,12 @@ class PostPayoutMethodCreatedPayloadDataQuoteStandard(UniversalBaseModel): fee: float = pydantic.Field() """ - Total fee charged, in the withdrawal currency. + Total fee charged, in the payout currency. """ total_received: float = pydantic.Field() """ - Amount delivered after fees, in the withdrawal currency. + Amount delivered after fees, in the payout currency. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload.py similarity index 73% rename from src/whop_sdk/payouts/types/post_withdrawal_updated_payload.py rename to src/whop_sdk/payouts/types/post_payout_reversed_payload.py index fea115ef..039ac08b 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload.py +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload.py @@ -5,18 +5,18 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_updated_payload_api_version import PostWithdrawalUpdatedPayloadApiVersion -from .post_withdrawal_updated_payload_data import PostWithdrawalUpdatedPayloadData -from .post_withdrawal_updated_payload_type import PostWithdrawalUpdatedPayloadType +from .post_payout_reversed_payload_api_version import PostPayoutReversedPayloadApiVersion +from .post_payout_reversed_payload_data import PostPayoutReversedPayloadData +from .post_payout_reversed_payload_type import PostPayoutReversedPayloadType -class PostWithdrawalUpdatedPayload(UniversalBaseModel): +class PostPayoutReversedPayload(UniversalBaseModel): account_id: typing.Optional[str] = pydantic.Field(default=None) """ The account ID that this webhook event is associated with """ - api_version: PostWithdrawalUpdatedPayloadApiVersion = pydantic.Field() + api_version: PostPayoutReversedPayloadApiVersion = pydantic.Field() """ The API version for this webhook """ @@ -26,7 +26,7 @@ class PostWithdrawalUpdatedPayload(UniversalBaseModel): The dated API version (Api-Version-Date) the payload is serialized to """ - data: PostWithdrawalUpdatedPayloadData + data: PostPayoutReversedPayloadData id: str = pydantic.Field() """ A unique ID for every single webhook request @@ -42,7 +42,7 @@ class PostWithdrawalUpdatedPayload(UniversalBaseModel): The timestamp in ISO 8601 format that the webhook was sent at on the server """ - type: PostWithdrawalUpdatedPayloadType = pydantic.Field() + type: PostPayoutReversedPayloadType = pydantic.Field() """ The webhook event type """ diff --git a/src/whop_sdk/payouts/types/post_payout_reversed_payload_api_version.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_api_version.py new file mode 100644 index 00000000..45e87e83 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_api_version.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutReversedPayloadApiVersion = typing.Union[typing.Literal["v1"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data.py similarity index 78% rename from src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data.py rename to src/whop_sdk/payouts/types/post_payout_reversed_payload_data.py index 9b6f6aba..e7e28fe5 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data.py +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data.py @@ -5,16 +5,16 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_updated_payload_data_failure import PostWithdrawalUpdatedPayloadDataFailure -from .post_withdrawal_updated_payload_data_fee_paid_by import PostWithdrawalUpdatedPayloadDataFeePaidBy -from .post_withdrawal_updated_payload_data_object import PostWithdrawalUpdatedPayloadDataObject -from .post_withdrawal_updated_payload_data_payout_method import PostWithdrawalUpdatedPayloadDataPayoutMethod -from .post_withdrawal_updated_payload_data_source import PostWithdrawalUpdatedPayloadDataSource -from .post_withdrawal_updated_payload_data_speed import PostWithdrawalUpdatedPayloadDataSpeed -from .post_withdrawal_updated_payload_data_status import PostWithdrawalUpdatedPayloadDataStatus +from .post_payout_reversed_payload_data_failure import PostPayoutReversedPayloadDataFailure +from .post_payout_reversed_payload_data_fee_paid_by import PostPayoutReversedPayloadDataFeePaidBy +from .post_payout_reversed_payload_data_object import PostPayoutReversedPayloadDataObject +from .post_payout_reversed_payload_data_payout_method import PostPayoutReversedPayloadDataPayoutMethod +from .post_payout_reversed_payload_data_source import PostPayoutReversedPayloadDataSource +from .post_payout_reversed_payload_data_speed import PostPayoutReversedPayloadDataSpeed +from .post_payout_reversed_payload_data_status import PostPayoutReversedPayloadDataStatus -class PostWithdrawalUpdatedPayloadData(UniversalBaseModel): +class PostPayoutReversedPayloadData(UniversalBaseModel): amount: str = pydantic.Field() """ The payout amount in whole currency units, as a decimal string. @@ -50,7 +50,7 @@ class PostWithdrawalUpdatedPayloadData(UniversalBaseModel): Exchange rate from the payout currency to the destination currency. Assigned when the payout is processed, so it is `null` before then and on payouts without a recorded rate. """ - failure: typing.Optional[PostWithdrawalUpdatedPayloadDataFailure] = pydantic.Field(default=None) + failure: typing.Optional[PostPayoutReversedPayloadDataFailure] = pydantic.Field(default=None) """ Why the payout ended without paying, or why it reversed after settlement. Present on failed, canceled, denied, and reversed payouts; `null` otherwise. """ @@ -60,7 +60,7 @@ class PostWithdrawalUpdatedPayloadData(UniversalBaseModel): The fee charged for the payout, in the payout currency, as a decimal string. """ - fee_paid_by: PostWithdrawalUpdatedPayloadDataFeePaidBy = pydantic.Field() + fee_paid_by: PostPayoutReversedPayloadDataFeePaidBy = pydantic.Field() """ Who bore the payout fee: the account itself, or its parent platform. """ @@ -90,13 +90,13 @@ class PostWithdrawalUpdatedPayloadData(UniversalBaseModel): Free-form notes attached by the payout creator, or `null` when none were provided. Maximum 255 characters. """ - object: PostWithdrawalUpdatedPayloadDataObject + object: PostPayoutReversedPayloadDataObject payer_name: typing.Optional[str] = pydantic.Field(default=None) """ Name of the entity processing the payout. """ - payout_method: typing.Optional[PostWithdrawalUpdatedPayloadDataPayoutMethod] = pydantic.Field(default=None) + payout_method: typing.Optional[PostPayoutReversedPayloadDataPayoutMethod] = pydantic.Field(default=None) """ The saved payout method used. Requires payout:destination:read; null without it. """ @@ -106,17 +106,17 @@ class PostWithdrawalUpdatedPayloadData(UniversalBaseModel): Payout request ID, prefixed `cofr_`, returned by `POST /payouts`. Match it to the settled payout in `GET /payouts`. Returns `null` for payouts not created by `POST /payouts`. """ - source: typing.Optional[PostWithdrawalUpdatedPayloadDataSource] = pydantic.Field(default=None) + source: typing.Optional[PostPayoutReversedPayloadDataSource] = pydantic.Field(default=None) """ How the payout was created. `automatic` means a scheduled auto-payout; `null` on payouts created before source tracking or through internal tooling. """ - speed: PostWithdrawalUpdatedPayloadDataSpeed = pydantic.Field() + speed: PostPayoutReversedPayloadDataSpeed = pydantic.Field() """ Payout delivery speed. """ - status: PostWithdrawalUpdatedPayloadDataStatus = pydantic.Field() + status: PostPayoutReversedPayloadDataStatus = pydantic.Field() """ Current payout status. """ diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_failure.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_failure.py similarity index 95% rename from src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_failure.py rename to src/whop_sdk/payouts/types/post_payout_reversed_payload_data_failure.py index dca4eb9f..ff8ef84b 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_failure.py +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_failure.py @@ -7,7 +7,7 @@ from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class PostWithdrawalReversedPayloadDataFailure(UniversalBaseModel): +class PostPayoutReversedPayloadDataFailure(UniversalBaseModel): """ Why the payout ended without paying, or why it reversed after settlement. Present on failed, canceled, denied, and reversed payouts; `null` otherwise. """ diff --git a/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_fee_paid_by.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_fee_paid_by.py new file mode 100644 index 00000000..c417b165 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_fee_paid_by.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutReversedPayloadDataFeePaidBy = typing.Union[typing.Literal["self", "platform"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_object.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_object.py new file mode 100644 index 00000000..4b17fb5f --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_object.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutReversedPayloadDataObject = typing.Union[typing.Literal["payout"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_payout_method.py similarity index 69% rename from src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method.py rename to src/whop_sdk/payouts/types/post_payout_reversed_payload_data_payout_method.py index 0d65f0eb..1bde1ee0 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method.py +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_payout_method.py @@ -4,12 +4,12 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_updated_payload_data_payout_method_supported_payout_method import ( - PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod, +from .post_payout_reversed_payload_data_payout_method_supported_payout_method import ( + PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod, ) -class PostWithdrawalUpdatedPayloadDataPayoutMethod(UniversalBaseModel): +class PostPayoutReversedPayloadDataPayoutMethod(UniversalBaseModel): """ The saved payout method used. Requires payout:destination:read; null without it. """ @@ -19,7 +19,7 @@ class PostWithdrawalUpdatedPayloadDataPayoutMethod(UniversalBaseModel): Saved payout method nickname. """ - supported_payout_method: typing.Optional[PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethod] = ( + supported_payout_method: typing.Optional[PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod] = ( pydantic.Field(default=None) ) """ diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method_supported_payout_method.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_payout_method_supported_payout_method.py similarity index 67% rename from src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method_supported_payout_method.py rename to src/whop_sdk/payouts/types/post_payout_reversed_payload_data_payout_method_supported_payout_method.py index 55aeda11..7f651b3c 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method_supported_payout_method.py +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_payout_method_supported_payout_method.py @@ -4,17 +4,17 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type import ( - PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, +from .post_payout_reversed_payload_data_payout_method_supported_payout_method_delivery_type import ( + PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, ) -class PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod(UniversalBaseModel): +class PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethod(UniversalBaseModel): """ Supported payout method display details. """ - delivery_type: PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = pydantic.Field() + delivery_type: PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = pydantic.Field() """ How the funds are delivered to the recipient. """ diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_payout_method_supported_payout_method_delivery_type.py similarity index 76% rename from src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type.py rename to src/whop_sdk/payouts/types/post_payout_reversed_payload_data_payout_method_supported_payout_method_delivery_type.py index 4085e693..2763862d 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type.py +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_payout_method_supported_payout_method_delivery_type.py @@ -2,7 +2,7 @@ import typing -PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = typing.Union[ +PostPayoutReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = typing.Union[ typing.Literal[ "cash_pickup", "bank_deposit", diff --git a/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_source.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_source.py new file mode 100644 index 00000000..bc42fa58 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_source.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutReversedPayloadDataSource = typing.Union[typing.Literal["api", "dashboard", "automatic"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_speed.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_speed.py new file mode 100644 index 00000000..c3ed4de9 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_speed.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutReversedPayloadDataSpeed = typing.Union[typing.Literal["standard", "instant"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_status.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_status.py similarity index 79% rename from src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_status.py rename to src/whop_sdk/payouts/types/post_payout_reversed_payload_data_status.py index c8aa01f9..1b94504d 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_status.py +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_data_status.py @@ -2,7 +2,7 @@ import typing -PostWithdrawalReversedPayloadDataStatus = typing.Union[ +PostPayoutReversedPayloadDataStatus = typing.Union[ typing.Literal["requested", "in_review", "processing", "completed", "reversed", "canceled", "failed", "denied"], typing.Any, ] diff --git a/src/whop_sdk/payouts/types/post_payout_reversed_payload_type.py b/src/whop_sdk/payouts/types/post_payout_reversed_payload_type.py new file mode 100644 index 00000000..05880d2f --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_reversed_payload_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutReversedPayloadType = typing.Union[typing.Literal["payout.reversed"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload.py b/src/whop_sdk/payouts/types/post_payout_updated_payload.py similarity index 73% rename from src/whop_sdk/payouts/types/post_withdrawal_reversed_payload.py rename to src/whop_sdk/payouts/types/post_payout_updated_payload.py index aa778179..61bc373a 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload.py +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload.py @@ -5,18 +5,18 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_reversed_payload_api_version import PostWithdrawalReversedPayloadApiVersion -from .post_withdrawal_reversed_payload_data import PostWithdrawalReversedPayloadData -from .post_withdrawal_reversed_payload_type import PostWithdrawalReversedPayloadType +from .post_payout_updated_payload_api_version import PostPayoutUpdatedPayloadApiVersion +from .post_payout_updated_payload_data import PostPayoutUpdatedPayloadData +from .post_payout_updated_payload_type import PostPayoutUpdatedPayloadType -class PostWithdrawalReversedPayload(UniversalBaseModel): +class PostPayoutUpdatedPayload(UniversalBaseModel): account_id: typing.Optional[str] = pydantic.Field(default=None) """ The account ID that this webhook event is associated with """ - api_version: PostWithdrawalReversedPayloadApiVersion = pydantic.Field() + api_version: PostPayoutUpdatedPayloadApiVersion = pydantic.Field() """ The API version for this webhook """ @@ -26,7 +26,7 @@ class PostWithdrawalReversedPayload(UniversalBaseModel): The dated API version (Api-Version-Date) the payload is serialized to """ - data: PostWithdrawalReversedPayloadData + data: PostPayoutUpdatedPayloadData id: str = pydantic.Field() """ A unique ID for every single webhook request @@ -42,7 +42,7 @@ class PostWithdrawalReversedPayload(UniversalBaseModel): The timestamp in ISO 8601 format that the webhook was sent at on the server """ - type: PostWithdrawalReversedPayloadType = pydantic.Field() + type: PostPayoutUpdatedPayloadType = pydantic.Field() """ The webhook event type """ diff --git a/src/whop_sdk/payouts/types/post_payout_updated_payload_api_version.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_api_version.py new file mode 100644 index 00000000..917c50ad --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_api_version.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutUpdatedPayloadApiVersion = typing.Union[typing.Literal["v1"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_data.py similarity index 78% rename from src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data.py rename to src/whop_sdk/payouts/types/post_payout_updated_payload_data.py index 315bcd3d..1eaf5749 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data.py +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_data.py @@ -5,16 +5,16 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_reversed_payload_data_failure import PostWithdrawalReversedPayloadDataFailure -from .post_withdrawal_reversed_payload_data_fee_paid_by import PostWithdrawalReversedPayloadDataFeePaidBy -from .post_withdrawal_reversed_payload_data_object import PostWithdrawalReversedPayloadDataObject -from .post_withdrawal_reversed_payload_data_payout_method import PostWithdrawalReversedPayloadDataPayoutMethod -from .post_withdrawal_reversed_payload_data_source import PostWithdrawalReversedPayloadDataSource -from .post_withdrawal_reversed_payload_data_speed import PostWithdrawalReversedPayloadDataSpeed -from .post_withdrawal_reversed_payload_data_status import PostWithdrawalReversedPayloadDataStatus +from .post_payout_updated_payload_data_failure import PostPayoutUpdatedPayloadDataFailure +from .post_payout_updated_payload_data_fee_paid_by import PostPayoutUpdatedPayloadDataFeePaidBy +from .post_payout_updated_payload_data_object import PostPayoutUpdatedPayloadDataObject +from .post_payout_updated_payload_data_payout_method import PostPayoutUpdatedPayloadDataPayoutMethod +from .post_payout_updated_payload_data_source import PostPayoutUpdatedPayloadDataSource +from .post_payout_updated_payload_data_speed import PostPayoutUpdatedPayloadDataSpeed +from .post_payout_updated_payload_data_status import PostPayoutUpdatedPayloadDataStatus -class PostWithdrawalReversedPayloadData(UniversalBaseModel): +class PostPayoutUpdatedPayloadData(UniversalBaseModel): amount: str = pydantic.Field() """ The payout amount in whole currency units, as a decimal string. @@ -50,7 +50,7 @@ class PostWithdrawalReversedPayloadData(UniversalBaseModel): Exchange rate from the payout currency to the destination currency. Assigned when the payout is processed, so it is `null` before then and on payouts without a recorded rate. """ - failure: typing.Optional[PostWithdrawalReversedPayloadDataFailure] = pydantic.Field(default=None) + failure: typing.Optional[PostPayoutUpdatedPayloadDataFailure] = pydantic.Field(default=None) """ Why the payout ended without paying, or why it reversed after settlement. Present on failed, canceled, denied, and reversed payouts; `null` otherwise. """ @@ -60,7 +60,7 @@ class PostWithdrawalReversedPayloadData(UniversalBaseModel): The fee charged for the payout, in the payout currency, as a decimal string. """ - fee_paid_by: PostWithdrawalReversedPayloadDataFeePaidBy = pydantic.Field() + fee_paid_by: PostPayoutUpdatedPayloadDataFeePaidBy = pydantic.Field() """ Who bore the payout fee: the account itself, or its parent platform. """ @@ -90,13 +90,13 @@ class PostWithdrawalReversedPayloadData(UniversalBaseModel): Free-form notes attached by the payout creator, or `null` when none were provided. Maximum 255 characters. """ - object: PostWithdrawalReversedPayloadDataObject + object: PostPayoutUpdatedPayloadDataObject payer_name: typing.Optional[str] = pydantic.Field(default=None) """ Name of the entity processing the payout. """ - payout_method: typing.Optional[PostWithdrawalReversedPayloadDataPayoutMethod] = pydantic.Field(default=None) + payout_method: typing.Optional[PostPayoutUpdatedPayloadDataPayoutMethod] = pydantic.Field(default=None) """ The saved payout method used. Requires payout:destination:read; null without it. """ @@ -106,17 +106,17 @@ class PostWithdrawalReversedPayloadData(UniversalBaseModel): Payout request ID, prefixed `cofr_`, returned by `POST /payouts`. Match it to the settled payout in `GET /payouts`. Returns `null` for payouts not created by `POST /payouts`. """ - source: typing.Optional[PostWithdrawalReversedPayloadDataSource] = pydantic.Field(default=None) + source: typing.Optional[PostPayoutUpdatedPayloadDataSource] = pydantic.Field(default=None) """ How the payout was created. `automatic` means a scheduled auto-payout; `null` on payouts created before source tracking or through internal tooling. """ - speed: PostWithdrawalReversedPayloadDataSpeed = pydantic.Field() + speed: PostPayoutUpdatedPayloadDataSpeed = pydantic.Field() """ Payout delivery speed. """ - status: PostWithdrawalReversedPayloadDataStatus = pydantic.Field() + status: PostPayoutUpdatedPayloadDataStatus = pydantic.Field() """ Current payout status. """ diff --git a/src/whop_sdk/payouts/types/post_payout_updated_payload_data_failure.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_failure.py new file mode 100644 index 00000000..4779079b --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_failure.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class PostPayoutUpdatedPayloadDataFailure(UniversalBaseModel): + """ + Why the payout ended without paying, or why it reversed after settlement. Present on failed, canceled, denied, and reversed payouts; `null` otherwise. + """ + + code: typing.Optional[str] = pydantic.Field(default=None) + """ + Classified failure code from the maintained error catalog. + """ + + funds_returned_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + The effective time of the reversal that put the funds back in the balance — `null` if they never left it or have not returned yet. Set only once the return is confirmed in the ledger; the ledger posting itself can land moments after this time. + """ + + message: typing.Optional[str] = pydantic.Field(default=None) + """ + Human-readable explanation of the failure. Callers holding `payout:destination:read` may receive text personalized to the destination; other callers get the generic catalog message. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/payouts/types/post_payout_updated_payload_data_fee_paid_by.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_fee_paid_by.py new file mode 100644 index 00000000..2fc2d2b9 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_fee_paid_by.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutUpdatedPayloadDataFeePaidBy = typing.Union[typing.Literal["self", "platform"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_payout_updated_payload_data_object.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_object.py new file mode 100644 index 00000000..559c6ba4 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_object.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutUpdatedPayloadDataObject = typing.Union[typing.Literal["payout"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_payout_method.py similarity index 69% rename from src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method.py rename to src/whop_sdk/payouts/types/post_payout_updated_payload_data_payout_method.py index ea13071f..ffc5a363 100644 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method.py +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_payout_method.py @@ -4,12 +4,12 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .post_withdrawal_reversed_payload_data_payout_method_supported_payout_method import ( - PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod, +from .post_payout_updated_payload_data_payout_method_supported_payout_method import ( + PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod, ) -class PostWithdrawalReversedPayloadDataPayoutMethod(UniversalBaseModel): +class PostPayoutUpdatedPayloadDataPayoutMethod(UniversalBaseModel): """ The saved payout method used. Requires payout:destination:read; null without it. """ @@ -19,7 +19,7 @@ class PostWithdrawalReversedPayloadDataPayoutMethod(UniversalBaseModel): Saved payout method nickname. """ - supported_payout_method: typing.Optional[PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethod] = ( + supported_payout_method: typing.Optional[PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod] = ( pydantic.Field(default=None) ) """ diff --git a/src/whop_sdk/payouts/types/post_payout_updated_payload_data_payout_method_supported_payout_method.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_payout_method_supported_payout_method.py new file mode 100644 index 00000000..73e5ae57 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_payout_method_supported_payout_method.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .post_payout_updated_payload_data_payout_method_supported_payout_method_delivery_type import ( + PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType, +) + + +class PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethod(UniversalBaseModel): + """ + Supported payout method display details. + """ + + delivery_type: PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = pydantic.Field() + """ + How the funds are delivered to the recipient. + """ + + icon_url: typing.Optional[str] = pydantic.Field(default=None) + """ + Supported payout method icon URL. + """ + + payer_name: typing.Optional[str] = pydantic.Field(default=None) + """ + Supported payout method display name. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/payouts/types/post_payout_updated_payload_data_payout_method_supported_payout_method_delivery_type.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_payout_method_supported_payout_method_delivery_type.py new file mode 100644 index 00000000..9447e31c --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_payout_method_supported_payout_method_delivery_type.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDeliveryType = typing.Union[ + typing.Literal[ + "cash_pickup", + "bank_deposit", + "home_delivery", + "mobile_wallet", + "card", + "check", + "bill", + "cryptocurrency", + "unknown", + ], + typing.Any, +] diff --git a/src/whop_sdk/payouts/types/post_payout_updated_payload_data_source.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_source.py new file mode 100644 index 00000000..f7ccb2eb --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_source.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutUpdatedPayloadDataSource = typing.Union[typing.Literal["api", "dashboard", "automatic"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_payout_updated_payload_data_speed.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_speed.py new file mode 100644 index 00000000..a7718d21 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_speed.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutUpdatedPayloadDataSpeed = typing.Union[typing.Literal["standard", "instant"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_payout_updated_payload_data_status.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_status.py new file mode 100644 index 00000000..360ade38 --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_data_status.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutUpdatedPayloadDataStatus = typing.Union[ + typing.Literal["requested", "in_review", "processing", "completed", "reversed", "canceled", "failed", "denied"], + typing.Any, +] diff --git a/src/whop_sdk/payouts/types/post_payout_updated_payload_type.py b/src/whop_sdk/payouts/types/post_payout_updated_payload_type.py new file mode 100644 index 00000000..97b7343b --- /dev/null +++ b/src/whop_sdk/payouts/types/post_payout_updated_payload_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostPayoutUpdatedPayloadType = typing.Union[typing.Literal["payout.updated"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_api_version.py b/src/whop_sdk/payouts/types/post_withdrawal_created_payload_api_version.py deleted file mode 100644 index 4ea95d14..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_api_version.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalCreatedPayloadApiVersion = typing.Union[typing.Literal["v1"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_fee_paid_by.py b/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_fee_paid_by.py deleted file mode 100644 index d198b58c..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_fee_paid_by.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalCreatedPayloadDataFeePaidBy = typing.Union[typing.Literal["self", "platform"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_object.py b/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_object.py deleted file mode 100644 index 85f37ed0..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_object.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalCreatedPayloadDataObject = typing.Union[typing.Literal["payout"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_source.py b/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_source.py deleted file mode 100644 index af7ca1aa..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_source.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalCreatedPayloadDataSource = typing.Union[typing.Literal["api", "dashboard", "automatic"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_speed.py b/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_speed.py deleted file mode 100644 index 8bc43024..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_data_speed.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalCreatedPayloadDataSpeed = typing.Union[typing.Literal["standard", "instant"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_type.py b/src/whop_sdk/payouts/types/post_withdrawal_created_payload_type.py deleted file mode 100644 index d2c676fa..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_created_payload_type.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalCreatedPayloadType = typing.Union[typing.Literal["withdrawal.created"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_api_version.py b/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_api_version.py deleted file mode 100644 index 604bf0da..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_api_version.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalReversedPayloadApiVersion = typing.Union[typing.Literal["v1"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_fee_paid_by.py b/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_fee_paid_by.py deleted file mode 100644 index 2da7f155..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_fee_paid_by.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalReversedPayloadDataFeePaidBy = typing.Union[typing.Literal["self", "platform"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_object.py b/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_object.py deleted file mode 100644 index 142cdca2..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_object.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalReversedPayloadDataObject = typing.Union[typing.Literal["payout"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_source.py b/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_source.py deleted file mode 100644 index 200de90b..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_source.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalReversedPayloadDataSource = typing.Union[typing.Literal["api", "dashboard", "automatic"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_speed.py b/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_speed.py deleted file mode 100644 index be1c6f4d..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_speed.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalReversedPayloadDataSpeed = typing.Union[typing.Literal["standard", "instant"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_type.py b/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_type.py deleted file mode 100644 index c49bd0df..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_reversed_payload_type.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalReversedPayloadType = typing.Union[typing.Literal["withdrawal.reversed"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_api_version.py b/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_api_version.py deleted file mode 100644 index e8750ea1..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_api_version.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalUpdatedPayloadApiVersion = typing.Union[typing.Literal["v1"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_fee_paid_by.py b/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_fee_paid_by.py deleted file mode 100644 index a4758e8f..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_fee_paid_by.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalUpdatedPayloadDataFeePaidBy = typing.Union[typing.Literal["self", "platform"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_object.py b/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_object.py deleted file mode 100644 index 5280365b..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_object.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalUpdatedPayloadDataObject = typing.Union[typing.Literal["payout"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_source.py b/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_source.py deleted file mode 100644 index ad367c7a..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_source.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalUpdatedPayloadDataSource = typing.Union[typing.Literal["api", "dashboard", "automatic"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_speed.py b/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_speed.py deleted file mode 100644 index 266c499c..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_speed.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalUpdatedPayloadDataSpeed = typing.Union[typing.Literal["standard", "instant"], typing.Any] diff --git a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_type.py b/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_type.py deleted file mode 100644 index 275bd2cd..00000000 --- a/src/whop_sdk/payouts/types/post_withdrawal_updated_payload_type.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PostWithdrawalUpdatedPayloadType = typing.Union[typing.Literal["withdrawal.updated"], typing.Any] diff --git a/src/whop_sdk/people/client.py b/src/whop_sdk/people/client.py index eeddf2e3..738efca8 100644 --- a/src/whop_sdk/people/client.py +++ b/src/whop_sdk/people/client.py @@ -157,7 +157,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -232,7 +232,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -388,7 +388,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -472,7 +472,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/permissions/client.py b/src/whop_sdk/permissions/client.py index cca439b9..165adff0 100644 --- a/src/whop_sdk/permissions/client.py +++ b/src/whop_sdk/permissions/client.py @@ -54,7 +54,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -114,7 +114,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/plans/client.py b/src/whop_sdk/plans/client.py index 359c7edb..a32d7ae5 100644 --- a/src/whop_sdk/plans/client.py +++ b/src/whop_sdk/plans/client.py @@ -118,7 +118,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -274,7 +274,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -332,7 +332,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -365,7 +365,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -507,7 +507,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -587,7 +587,7 @@ def calculate_tax( from whop_sdk.plans import CalculateTaxPlansRequestAddress client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -697,7 +697,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -862,7 +862,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -928,7 +928,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -969,7 +969,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1119,7 +1119,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1207,7 +1207,7 @@ async def calculate_tax( from whop_sdk.plans import CalculateTaxPlansRequestAddress client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/products/client.py b/src/whop_sdk/products/client.py index 3dcae5d9..acf84a71 100644 --- a/src/whop_sdk/products/client.py +++ b/src/whop_sdk/products/client.py @@ -129,7 +129,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -263,7 +263,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -317,7 +317,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -350,7 +350,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -424,7 +424,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -469,7 +469,7 @@ def publish(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -502,7 +502,7 @@ def unpublish(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -624,7 +624,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -767,7 +767,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -829,7 +829,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -872,7 +872,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -954,7 +954,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1007,7 +1007,7 @@ async def publish(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1048,7 +1048,7 @@ async def unpublish(self, id: str, *, request_options: typing.Optional[RequestOp from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/promo_codes/client.py b/src/whop_sdk/promo_codes/client.py index 3bc9e779..f10d79a6 100644 --- a/src/whop_sdk/promo_codes/client.py +++ b/src/whop_sdk/promo_codes/client.py @@ -107,7 +107,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -206,7 +206,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -262,7 +262,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -295,7 +295,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -328,7 +328,7 @@ def activate(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -361,7 +361,7 @@ def deactivate(self, id: str, *, request_options: typing.Optional[RequestOptions from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -461,7 +461,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -569,7 +569,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -633,7 +633,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -676,7 +676,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -717,7 +717,7 @@ async def activate(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -758,7 +758,7 @@ async def deactivate(self, id: str, *, request_options: typing.Optional[RequestO from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/reactions/client.py b/src/whop_sdk/reactions/client.py index ca87d24d..91511f32 100644 --- a/src/whop_sdk/reactions/client.py +++ b/src/whop_sdk/reactions/client.py @@ -79,7 +79,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -140,7 +140,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -182,7 +182,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -227,7 +227,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -306,7 +306,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -376,7 +376,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -426,7 +426,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -479,7 +479,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/recommended_actions/client.py b/src/whop_sdk/recommended_actions/client.py index 818eadaa..db93de0d 100644 --- a/src/whop_sdk/recommended_actions/client.py +++ b/src/whop_sdk/recommended_actions/client.py @@ -50,7 +50,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -90,7 +90,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -132,7 +132,7 @@ def run( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -174,7 +174,7 @@ def list_executions( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -227,7 +227,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -275,7 +275,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -325,7 +325,7 @@ async def run( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -375,7 +375,7 @@ async def list_executions( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/refunds/client.py b/src/whop_sdk/refunds/client.py index ebfa0ace..31b0f3e6 100644 --- a/src/whop_sdk/refunds/client.py +++ b/src/whop_sdk/refunds/client.py @@ -95,7 +95,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -162,7 +162,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -257,7 +257,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -333,7 +333,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/resolution_center_cases/client.py b/src/whop_sdk/resolution_center_cases/client.py index 35198670..79f076da 100644 --- a/src/whop_sdk/resolution_center_cases/client.py +++ b/src/whop_sdk/resolution_center_cases/client.py @@ -145,7 +145,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -211,7 +211,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -305,7 +305,7 @@ def summary( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -346,7 +346,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -396,7 +396,7 @@ def accept( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -448,7 +448,7 @@ def appeal( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -497,7 +497,7 @@ def deny( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -552,7 +552,7 @@ def events( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -604,7 +604,7 @@ def reply( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -653,7 +653,7 @@ def request_info( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -688,7 +688,7 @@ def withdraw(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -805,7 +805,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -880,7 +880,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -982,7 +982,7 @@ async def summary( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1033,7 +1033,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1091,7 +1091,7 @@ async def accept( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1151,7 +1151,7 @@ async def appeal( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1208,7 +1208,7 @@ async def deny( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1273,7 +1273,7 @@ async def events( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1334,7 +1334,7 @@ async def reply( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1391,7 +1391,7 @@ async def request_info( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1436,7 +1436,7 @@ async def withdraw( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/reviews/client.py b/src/whop_sdk/reviews/client.py index ac44757e..76ce1d26 100644 --- a/src/whop_sdk/reviews/client.py +++ b/src/whop_sdk/reviews/client.py @@ -88,7 +88,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -146,7 +146,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -235,7 +235,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -302,7 +302,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/setup_intents/client.py b/src/whop_sdk/setup_intents/client.py index ddf355a0..265854c9 100644 --- a/src/whop_sdk/setup_intents/client.py +++ b/src/whop_sdk/setup_intents/client.py @@ -95,7 +95,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -157,7 +157,7 @@ def create( from whop_sdk.setup_intents import CreateSetupIntentsRequestConfirmationToken client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -198,7 +198,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -236,7 +236,7 @@ def update_return_url( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -274,7 +274,7 @@ def retrieve_status( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -363,7 +363,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -434,7 +434,7 @@ async def create( from whop_sdk.setup_intents import CreateSetupIntentsRequestConfirmationToken client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -483,7 +483,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -529,7 +529,7 @@ async def update_return_url( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -575,7 +575,7 @@ async def retrieve_status( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/shipments/client.py b/src/whop_sdk/shipments/client.py index 96b6cdb7..f5ecdbc1 100644 --- a/src/whop_sdk/shipments/client.py +++ b/src/whop_sdk/shipments/client.py @@ -98,7 +98,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -161,7 +161,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -200,7 +200,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -238,7 +238,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -335,7 +335,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -407,7 +407,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -454,7 +454,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -500,7 +500,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/social_accounts/client.py b/src/whop_sdk/social_accounts/client.py index 252d1657..e9c78662 100644 --- a/src/whop_sdk/social_accounts/client.py +++ b/src/whop_sdk/social_accounts/client.py @@ -109,7 +109,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -166,7 +166,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -216,7 +216,7 @@ def connect( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -268,7 +268,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -306,7 +306,7 @@ def lead_forms( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -361,7 +361,7 @@ def posts( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -466,7 +466,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -532,7 +532,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -592,7 +592,7 @@ async def connect( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -652,7 +652,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -700,7 +700,7 @@ async def lead_forms( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -763,7 +763,7 @@ async def posts( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/stats/client.py b/src/whop_sdk/stats/client.py index 1972fc00..c19eaba1 100644 --- a/src/whop_sdk/stats/client.py +++ b/src/whop_sdk/stats/client.py @@ -51,7 +51,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> Li from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -98,7 +98,7 @@ def describe_stats( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -176,7 +176,7 @@ def metric_stats( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -269,7 +269,7 @@ def raw_stats( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -463,7 +463,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -553,7 +553,7 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -608,7 +608,7 @@ async def describe_stats( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -693,7 +693,7 @@ async def metric_stats( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -793,7 +793,7 @@ async def raw_stats( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -995,7 +995,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/support_channels/client.py b/src/whop_sdk/support_channels/client.py index 00fbc86f..92b0af2a 100644 --- a/src/whop_sdk/support_channels/client.py +++ b/src/whop_sdk/support_channels/client.py @@ -91,7 +91,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -161,7 +161,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -204,7 +204,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -292,7 +292,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -371,7 +371,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -422,7 +422,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/swaps/client.py b/src/whop_sdk/swaps/client.py index 1f458599..48901b41 100644 --- a/src/whop_sdk/swaps/client.py +++ b/src/whop_sdk/swaps/client.py @@ -55,7 +55,7 @@ def list(self, *, account_id: str, request_options: typing.Optional[RequestOptio from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -121,7 +121,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -203,7 +203,7 @@ def create_quote( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -249,7 +249,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -302,7 +302,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -376,7 +376,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -466,7 +466,7 @@ async def create_quote( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -522,7 +522,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/team_members/client.py b/src/whop_sdk/team_members/client.py index de3c2820..617adfe7 100644 --- a/src/whop_sdk/team_members/client.py +++ b/src/whop_sdk/team_members/client.py @@ -106,7 +106,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -174,7 +174,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -210,7 +210,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -243,7 +243,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -281,7 +281,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -382,7 +382,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -459,7 +459,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -503,7 +503,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -546,7 +546,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -592,7 +592,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/topups/client.py b/src/whop_sdk/topups/client.py index 9e6b826e..835375a2 100644 --- a/src/whop_sdk/topups/client.py +++ b/src/whop_sdk/topups/client.py @@ -69,7 +69,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -149,7 +149,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/transfers/client.py b/src/whop_sdk/transfers/client.py index 172f37fb..53174aa9 100644 --- a/src/whop_sdk/transfers/client.py +++ b/src/whop_sdk/transfers/client.py @@ -99,7 +99,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -187,7 +187,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -250,7 +250,7 @@ def list_recipients( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -291,7 +291,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -383,7 +383,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -480,7 +480,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -551,7 +551,7 @@ async def list_recipients( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -601,7 +601,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/types/__init__.py b/src/whop_sdk/types/__init__.py index e9d0d94d..5b6959b0 100644 --- a/src/whop_sdk/types/__init__.py +++ b/src/whop_sdk/types/__init__.py @@ -310,89 +310,7 @@ from .checkout_configuration_three_ds_level import CheckoutConfigurationThreeDsLevel from .checkout_fonts import CheckoutFonts from .checkout_modes import CheckoutModes - from .checkout_session import CheckoutSession - from .checkout_session_authenticate_action import CheckoutSessionAuthenticateAction - from .checkout_session_await_claim_action import CheckoutSessionAwaitClaimAction - from .checkout_session_await_claim_action_state import CheckoutSessionAwaitClaimActionState - from .checkout_session_branding import CheckoutSessionBranding - from .checkout_session_branding_border_style import CheckoutSessionBrandingBorderStyle - from .checkout_session_branding_font_family import CheckoutSessionBrandingFontFamily - from .checkout_session_breakdown import CheckoutSessionBreakdown - from .checkout_session_breakdown_adjustment import CheckoutSessionBreakdownAdjustment - from .checkout_session_breakdown_adjustment_applied import CheckoutSessionBreakdownAdjustmentApplied - from .checkout_session_breakdown_adjustment_kind import CheckoutSessionBreakdownAdjustmentKind - from .checkout_session_breakdown_adjustment_status import CheckoutSessionBreakdownAdjustmentStatus - from .checkout_session_breakdown_currency import CheckoutSessionBreakdownCurrency - from .checkout_session_breakdown_display import CheckoutSessionBreakdownDisplay - from .checkout_session_breakdown_display_headline import CheckoutSessionBreakdownDisplayHeadline - from .checkout_session_breakdown_display_headline_kind import CheckoutSessionBreakdownDisplayHeadlineKind - from .checkout_session_breakdown_display_row import CheckoutSessionBreakdownDisplayRow - from .checkout_session_breakdown_display_row_detail import CheckoutSessionBreakdownDisplayRowDetail - from .checkout_session_breakdown_display_row_detail_applied import CheckoutSessionBreakdownDisplayRowDetailApplied - from .checkout_session_breakdown_display_row_kind import CheckoutSessionBreakdownDisplayRowKind - from .checkout_session_breakdown_display_row_status import CheckoutSessionBreakdownDisplayRowStatus - from .checkout_session_breakdown_display_sections import CheckoutSessionBreakdownDisplaySections - from .checkout_session_breakdown_line import CheckoutSessionBreakdownLine - from .checkout_session_breakdown_line_kind import CheckoutSessionBreakdownLineKind - from .checkout_session_breakdown_upcoming import ( - CheckoutSessionBreakdownUpcoming, - CheckoutSessionBreakdownUpcoming_Installments, - CheckoutSessionBreakdownUpcoming_OneTime, - CheckoutSessionBreakdownUpcoming_Recurring, - ) - from .checkout_session_breakdown_upcoming_installments import CheckoutSessionBreakdownUpcomingInstallments - from .checkout_session_breakdown_upcoming_one_time import CheckoutSessionBreakdownUpcomingOneTime - from .checkout_session_breakdown_upcoming_recurring import CheckoutSessionBreakdownUpcomingRecurring - from .checkout_session_buyer_identity import CheckoutSessionBuyerIdentity - from .checkout_session_buyer_identity_method import CheckoutSessionBuyerIdentityMethod - from .checkout_session_complete_action import CheckoutSessionCompleteAction - from .checkout_session_complete_action_kind import CheckoutSessionCompleteActionKind - from .checkout_session_confirm_error import CheckoutSessionConfirmError - from .checkout_session_confirm_error_code import CheckoutSessionConfirmErrorCode - from .checkout_session_cta_label import CheckoutSessionCtaLabel - from .checkout_session_custom_field import CheckoutSessionCustomField - from .checkout_session_custom_field_field_type import CheckoutSessionCustomFieldFieldType - from .checkout_session_custom_field_response import CheckoutSessionCustomFieldResponse - from .checkout_session_entry import CheckoutSessionEntry - from .checkout_session_entry_status import CheckoutSessionEntryStatus - from .checkout_session_item import CheckoutSessionItem - from .checkout_session_mode import CheckoutSessionMode - from .checkout_session_next_action import ( - CheckoutSessionNextAction, - CheckoutSessionNextAction_Authenticate, - CheckoutSessionNextAction_AwaitClaim, - CheckoutSessionNextAction_Complete, - CheckoutSessionNextAction_Redirect, - CheckoutSessionNextAction_UpgradeAuthentication, - CheckoutSessionNextAction_VerifyPhone, - CheckoutSessionNextAction_WaitForPayment, - ) - from .checkout_session_payment import CheckoutSessionPayment from .checkout_session_payment_method_configuration import CheckoutSessionPaymentMethodConfiguration - from .checkout_session_payment_status import CheckoutSessionPaymentStatus - from .checkout_session_promo import CheckoutSessionPromo - from .checkout_session_promo_currency import CheckoutSessionPromoCurrency - from .checkout_session_promo_duration import CheckoutSessionPromoDuration - from .checkout_session_promo_promo_type import CheckoutSessionPromoPromoType - from .checkout_session_quote import CheckoutSessionQuote - from .checkout_session_redirect_action import CheckoutSessionRedirectAction - from .checkout_session_requirement import CheckoutSessionRequirement - from .checkout_session_requirement_type import CheckoutSessionRequirementType - from .checkout_session_seller import CheckoutSessionSeller - from .checkout_session_seller_terms import CheckoutSessionSellerTerms - from .checkout_session_shipping_address import CheckoutSessionShippingAddress - from .checkout_session_status import CheckoutSessionStatus - from .checkout_session_tax_behavior import CheckoutSessionTaxBehavior - from .checkout_session_tax_id import CheckoutSessionTaxId - from .checkout_session_tax_id_type import CheckoutSessionTaxIdType - from .checkout_session_three_ds_level import CheckoutSessionThreeDsLevel - from .checkout_session_transfer import CheckoutSessionTransfer - from .checkout_session_upgrade_authentication_action import CheckoutSessionUpgradeAuthenticationAction - from .checkout_session_upgrade_authentication_action_sign_in_intent import ( - CheckoutSessionUpgradeAuthenticationActionSignInIntent, - ) - from .checkout_session_verify_phone_action import CheckoutSessionVerifyPhoneAction - from .checkout_session_wait_for_payment_action import CheckoutSessionWaitForPaymentAction from .checkout_shapes import CheckoutShapes from .company import Company from .company_featured_affiliate_product import CompanyFeaturedAffiliateProduct @@ -648,6 +566,9 @@ from .ledger_activity_object import LedgerActivityObject from .ledger_activity_payment import LedgerActivityPayment from .ledger_activity_payment_object import LedgerActivityPaymentObject + from .ledger_activity_payment_plan import LedgerActivityPaymentPlan + from .ledger_activity_payment_product import LedgerActivityPaymentProduct + from .ledger_activity_payment_user import LedgerActivityPaymentUser from .ledger_activity_resource import LedgerActivityResource from .ledger_activity_resource_account_reference import LedgerActivityResourceAccountReference from .ledger_activity_resource_account_reference_object import LedgerActivityResourceAccountReferenceObject @@ -799,7 +720,6 @@ PaymentMethod_CardPaymentMethod, PaymentMethod_CashappPaymentMethod, PaymentMethod_IdealPaymentMethod, - PaymentMethod_PlatformBalancePaymentMethod, PaymentMethod_SepaDebitPaymentMethod, PaymentMethod_UsBankAccountPaymentMethod, ) @@ -854,7 +774,6 @@ PaymentMethodListItem_CardPaymentMethod, PaymentMethodListItem_CashappPaymentMethod, PaymentMethodListItem_IdealPaymentMethod, - PaymentMethodListItem_PlatformBalancePaymentMethod, PaymentMethodListItem_SepaDebitPaymentMethod, PaymentMethodListItem_UsBankAccountPaymentMethod, ) @@ -939,42 +858,6 @@ PaymentMethodListItemIdealPaymentMethodIconsSquareLight, ) from .payment_method_list_item_ideal_payment_method_ideal import PaymentMethodListItemIdealPaymentMethodIdeal - from .payment_method_list_item_platform_balance_payment_method import ( - PaymentMethodListItemPlatformBalancePaymentMethod, - ) - from .payment_method_list_item_platform_balance_payment_method_icons import ( - PaymentMethodListItemPlatformBalancePaymentMethodIcons, - ) - from .payment_method_list_item_platform_balance_payment_method_icons_card import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsCard, - ) - from .payment_method_list_item_platform_balance_payment_method_icons_card_dark import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsCardDark, - ) - from .payment_method_list_item_platform_balance_payment_method_icons_card_light import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsCardLight, - ) - from .payment_method_list_item_platform_balance_payment_method_icons_square import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsSquare, - ) - from .payment_method_list_item_platform_balance_payment_method_icons_square_dark import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareDark, - ) - from .payment_method_list_item_platform_balance_payment_method_icons_square_light import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareLight, - ) - from .payment_method_list_item_platform_balance_payment_method_platform_balance import ( - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalance, - ) - from .payment_method_list_item_platform_balance_payment_method_platform_balance_account import ( - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccount, - ) - from .payment_method_list_item_platform_balance_payment_method_platform_balance_account_logo import ( - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccountLogo, - ) - from .payment_method_list_item_platform_balance_payment_method_platform_balance_balances_item import ( - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceBalancesItem, - ) from .payment_method_list_item_sepa_debit_payment_method import PaymentMethodListItemSepaDebitPaymentMethod from .payment_method_list_item_sepa_debit_payment_method_icons import ( PaymentMethodListItemSepaDebitPaymentMethodIcons, @@ -1025,38 +908,6 @@ from .payment_method_list_item_us_bank_account_payment_method_us_bank_account import ( PaymentMethodListItemUsBankAccountPaymentMethodUsBankAccount, ) - from .payment_method_platform_balance_payment_method import PaymentMethodPlatformBalancePaymentMethod - from .payment_method_platform_balance_payment_method_icons import PaymentMethodPlatformBalancePaymentMethodIcons - from .payment_method_platform_balance_payment_method_icons_card import ( - PaymentMethodPlatformBalancePaymentMethodIconsCard, - ) - from .payment_method_platform_balance_payment_method_icons_card_dark import ( - PaymentMethodPlatformBalancePaymentMethodIconsCardDark, - ) - from .payment_method_platform_balance_payment_method_icons_card_light import ( - PaymentMethodPlatformBalancePaymentMethodIconsCardLight, - ) - from .payment_method_platform_balance_payment_method_icons_square import ( - PaymentMethodPlatformBalancePaymentMethodIconsSquare, - ) - from .payment_method_platform_balance_payment_method_icons_square_dark import ( - PaymentMethodPlatformBalancePaymentMethodIconsSquareDark, - ) - from .payment_method_platform_balance_payment_method_icons_square_light import ( - PaymentMethodPlatformBalancePaymentMethodIconsSquareLight, - ) - from .payment_method_platform_balance_payment_method_platform_balance import ( - PaymentMethodPlatformBalancePaymentMethodPlatformBalance, - ) - from .payment_method_platform_balance_payment_method_platform_balance_account import ( - PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccount, - ) - from .payment_method_platform_balance_payment_method_platform_balance_account_logo import ( - PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccountLogo, - ) - from .payment_method_platform_balance_payment_method_platform_balance_balances_item import ( - PaymentMethodPlatformBalancePaymentMethodPlatformBalanceBalancesItem, - ) from .payment_method_sepa_debit_payment_method import PaymentMethodSepaDebitPaymentMethod from .payment_method_sepa_debit_payment_method_icons import PaymentMethodSepaDebitPaymentMethodIcons from .payment_method_sepa_debit_payment_method_icons_card import PaymentMethodSepaDebitPaymentMethodIconsCard @@ -1152,7 +1003,6 @@ from .payout_account_calculated_statuses import PayoutAccountCalculatedStatuses from .payout_account_latest_verification import PayoutAccountLatestVerification from .payout_destination_category import PayoutDestinationCategory - from .payout_error_codes import PayoutErrorCodes from .payout_method import PayoutMethod from .payout_method_company import PayoutMethodCompany from .payout_method_destination import PayoutMethodDestination @@ -1381,13 +1231,6 @@ from .webhook_testable_events_item import WebhookTestableEventsItem from .who_can_post_types import WhoCanPostTypes from .who_can_react_types import WhoCanReactTypes - from .withdrawal import Withdrawal - from .withdrawal_fee_types import WithdrawalFeeTypes - from .withdrawal_ledger_account import WithdrawalLedgerAccount - from .withdrawal_list_item import WithdrawalListItem - from .withdrawal_payout_token import WithdrawalPayoutToken - from .withdrawal_speeds import WithdrawalSpeeds - from .withdrawal_status import WithdrawalStatus from .workforce_bounty import WorkforceBounty from .workforce_bounty_list_item import WorkforceBountyListItem _dynamic_imports: typing.Dict[str, str] = { @@ -1685,83 +1528,7 @@ "CheckoutConfigurationThreeDsLevel": ".checkout_configuration_three_ds_level", "CheckoutFonts": ".checkout_fonts", "CheckoutModes": ".checkout_modes", - "CheckoutSession": ".checkout_session", - "CheckoutSessionAuthenticateAction": ".checkout_session_authenticate_action", - "CheckoutSessionAwaitClaimAction": ".checkout_session_await_claim_action", - "CheckoutSessionAwaitClaimActionState": ".checkout_session_await_claim_action_state", - "CheckoutSessionBranding": ".checkout_session_branding", - "CheckoutSessionBrandingBorderStyle": ".checkout_session_branding_border_style", - "CheckoutSessionBrandingFontFamily": ".checkout_session_branding_font_family", - "CheckoutSessionBreakdown": ".checkout_session_breakdown", - "CheckoutSessionBreakdownAdjustment": ".checkout_session_breakdown_adjustment", - "CheckoutSessionBreakdownAdjustmentApplied": ".checkout_session_breakdown_adjustment_applied", - "CheckoutSessionBreakdownAdjustmentKind": ".checkout_session_breakdown_adjustment_kind", - "CheckoutSessionBreakdownAdjustmentStatus": ".checkout_session_breakdown_adjustment_status", - "CheckoutSessionBreakdownCurrency": ".checkout_session_breakdown_currency", - "CheckoutSessionBreakdownDisplay": ".checkout_session_breakdown_display", - "CheckoutSessionBreakdownDisplayHeadline": ".checkout_session_breakdown_display_headline", - "CheckoutSessionBreakdownDisplayHeadlineKind": ".checkout_session_breakdown_display_headline_kind", - "CheckoutSessionBreakdownDisplayRow": ".checkout_session_breakdown_display_row", - "CheckoutSessionBreakdownDisplayRowDetail": ".checkout_session_breakdown_display_row_detail", - "CheckoutSessionBreakdownDisplayRowDetailApplied": ".checkout_session_breakdown_display_row_detail_applied", - "CheckoutSessionBreakdownDisplayRowKind": ".checkout_session_breakdown_display_row_kind", - "CheckoutSessionBreakdownDisplayRowStatus": ".checkout_session_breakdown_display_row_status", - "CheckoutSessionBreakdownDisplaySections": ".checkout_session_breakdown_display_sections", - "CheckoutSessionBreakdownLine": ".checkout_session_breakdown_line", - "CheckoutSessionBreakdownLineKind": ".checkout_session_breakdown_line_kind", - "CheckoutSessionBreakdownUpcoming": ".checkout_session_breakdown_upcoming", - "CheckoutSessionBreakdownUpcomingInstallments": ".checkout_session_breakdown_upcoming_installments", - "CheckoutSessionBreakdownUpcomingOneTime": ".checkout_session_breakdown_upcoming_one_time", - "CheckoutSessionBreakdownUpcomingRecurring": ".checkout_session_breakdown_upcoming_recurring", - "CheckoutSessionBreakdownUpcoming_Installments": ".checkout_session_breakdown_upcoming", - "CheckoutSessionBreakdownUpcoming_OneTime": ".checkout_session_breakdown_upcoming", - "CheckoutSessionBreakdownUpcoming_Recurring": ".checkout_session_breakdown_upcoming", - "CheckoutSessionBuyerIdentity": ".checkout_session_buyer_identity", - "CheckoutSessionBuyerIdentityMethod": ".checkout_session_buyer_identity_method", - "CheckoutSessionCompleteAction": ".checkout_session_complete_action", - "CheckoutSessionCompleteActionKind": ".checkout_session_complete_action_kind", - "CheckoutSessionConfirmError": ".checkout_session_confirm_error", - "CheckoutSessionConfirmErrorCode": ".checkout_session_confirm_error_code", - "CheckoutSessionCtaLabel": ".checkout_session_cta_label", - "CheckoutSessionCustomField": ".checkout_session_custom_field", - "CheckoutSessionCustomFieldFieldType": ".checkout_session_custom_field_field_type", - "CheckoutSessionCustomFieldResponse": ".checkout_session_custom_field_response", - "CheckoutSessionEntry": ".checkout_session_entry", - "CheckoutSessionEntryStatus": ".checkout_session_entry_status", - "CheckoutSessionItem": ".checkout_session_item", - "CheckoutSessionMode": ".checkout_session_mode", - "CheckoutSessionNextAction": ".checkout_session_next_action", - "CheckoutSessionNextAction_Authenticate": ".checkout_session_next_action", - "CheckoutSessionNextAction_AwaitClaim": ".checkout_session_next_action", - "CheckoutSessionNextAction_Complete": ".checkout_session_next_action", - "CheckoutSessionNextAction_Redirect": ".checkout_session_next_action", - "CheckoutSessionNextAction_UpgradeAuthentication": ".checkout_session_next_action", - "CheckoutSessionNextAction_VerifyPhone": ".checkout_session_next_action", - "CheckoutSessionNextAction_WaitForPayment": ".checkout_session_next_action", - "CheckoutSessionPayment": ".checkout_session_payment", "CheckoutSessionPaymentMethodConfiguration": ".checkout_session_payment_method_configuration", - "CheckoutSessionPaymentStatus": ".checkout_session_payment_status", - "CheckoutSessionPromo": ".checkout_session_promo", - "CheckoutSessionPromoCurrency": ".checkout_session_promo_currency", - "CheckoutSessionPromoDuration": ".checkout_session_promo_duration", - "CheckoutSessionPromoPromoType": ".checkout_session_promo_promo_type", - "CheckoutSessionQuote": ".checkout_session_quote", - "CheckoutSessionRedirectAction": ".checkout_session_redirect_action", - "CheckoutSessionRequirement": ".checkout_session_requirement", - "CheckoutSessionRequirementType": ".checkout_session_requirement_type", - "CheckoutSessionSeller": ".checkout_session_seller", - "CheckoutSessionSellerTerms": ".checkout_session_seller_terms", - "CheckoutSessionShippingAddress": ".checkout_session_shipping_address", - "CheckoutSessionStatus": ".checkout_session_status", - "CheckoutSessionTaxBehavior": ".checkout_session_tax_behavior", - "CheckoutSessionTaxId": ".checkout_session_tax_id", - "CheckoutSessionTaxIdType": ".checkout_session_tax_id_type", - "CheckoutSessionThreeDsLevel": ".checkout_session_three_ds_level", - "CheckoutSessionTransfer": ".checkout_session_transfer", - "CheckoutSessionUpgradeAuthenticationAction": ".checkout_session_upgrade_authentication_action", - "CheckoutSessionUpgradeAuthenticationActionSignInIntent": ".checkout_session_upgrade_authentication_action_sign_in_intent", - "CheckoutSessionVerifyPhoneAction": ".checkout_session_verify_phone_action", - "CheckoutSessionWaitForPaymentAction": ".checkout_session_wait_for_payment_action", "CheckoutShapes": ".checkout_shapes", "Company": ".company", "CompanyFeaturedAffiliateProduct": ".company_featured_affiliate_product", @@ -2003,6 +1770,9 @@ "LedgerActivityObject": ".ledger_activity_object", "LedgerActivityPayment": ".ledger_activity_payment", "LedgerActivityPaymentObject": ".ledger_activity_payment_object", + "LedgerActivityPaymentPlan": ".ledger_activity_payment_plan", + "LedgerActivityPaymentProduct": ".ledger_activity_payment_product", + "LedgerActivityPaymentUser": ".ledger_activity_payment_user", "LedgerActivityResource": ".ledger_activity_resource", "LedgerActivityResourceAccountReference": ".ledger_activity_resource_account_reference", "LedgerActivityResourceAccountReferenceObject": ".ledger_activity_resource_account_reference_object", @@ -2222,18 +1992,6 @@ "PaymentMethodListItemIdealPaymentMethodIconsSquareDark": ".payment_method_list_item_ideal_payment_method_icons_square_dark", "PaymentMethodListItemIdealPaymentMethodIconsSquareLight": ".payment_method_list_item_ideal_payment_method_icons_square_light", "PaymentMethodListItemIdealPaymentMethodIdeal": ".payment_method_list_item_ideal_payment_method_ideal", - "PaymentMethodListItemPlatformBalancePaymentMethod": ".payment_method_list_item_platform_balance_payment_method", - "PaymentMethodListItemPlatformBalancePaymentMethodIcons": ".payment_method_list_item_platform_balance_payment_method_icons", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCard": ".payment_method_list_item_platform_balance_payment_method_icons_card", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCardDark": ".payment_method_list_item_platform_balance_payment_method_icons_card_dark", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCardLight": ".payment_method_list_item_platform_balance_payment_method_icons_card_light", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquare": ".payment_method_list_item_platform_balance_payment_method_icons_square", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareDark": ".payment_method_list_item_platform_balance_payment_method_icons_square_dark", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareLight": ".payment_method_list_item_platform_balance_payment_method_icons_square_light", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalance": ".payment_method_list_item_platform_balance_payment_method_platform_balance", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccount": ".payment_method_list_item_platform_balance_payment_method_platform_balance_account", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccountLogo": ".payment_method_list_item_platform_balance_payment_method_platform_balance_account_logo", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceBalancesItem": ".payment_method_list_item_platform_balance_payment_method_platform_balance_balances_item", "PaymentMethodListItemSepaDebitPaymentMethod": ".payment_method_list_item_sepa_debit_payment_method", "PaymentMethodListItemSepaDebitPaymentMethodIcons": ".payment_method_list_item_sepa_debit_payment_method_icons", "PaymentMethodListItemSepaDebitPaymentMethodIconsCard": ".payment_method_list_item_sepa_debit_payment_method_icons_card", @@ -2256,21 +2014,8 @@ "PaymentMethodListItem_CardPaymentMethod": ".payment_method_list_item", "PaymentMethodListItem_CashappPaymentMethod": ".payment_method_list_item", "PaymentMethodListItem_IdealPaymentMethod": ".payment_method_list_item", - "PaymentMethodListItem_PlatformBalancePaymentMethod": ".payment_method_list_item", "PaymentMethodListItem_SepaDebitPaymentMethod": ".payment_method_list_item", "PaymentMethodListItem_UsBankAccountPaymentMethod": ".payment_method_list_item", - "PaymentMethodPlatformBalancePaymentMethod": ".payment_method_platform_balance_payment_method", - "PaymentMethodPlatformBalancePaymentMethodIcons": ".payment_method_platform_balance_payment_method_icons", - "PaymentMethodPlatformBalancePaymentMethodIconsCard": ".payment_method_platform_balance_payment_method_icons_card", - "PaymentMethodPlatformBalancePaymentMethodIconsCardDark": ".payment_method_platform_balance_payment_method_icons_card_dark", - "PaymentMethodPlatformBalancePaymentMethodIconsCardLight": ".payment_method_platform_balance_payment_method_icons_card_light", - "PaymentMethodPlatformBalancePaymentMethodIconsSquare": ".payment_method_platform_balance_payment_method_icons_square", - "PaymentMethodPlatformBalancePaymentMethodIconsSquareDark": ".payment_method_platform_balance_payment_method_icons_square_dark", - "PaymentMethodPlatformBalancePaymentMethodIconsSquareLight": ".payment_method_platform_balance_payment_method_icons_square_light", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalance": ".payment_method_platform_balance_payment_method_platform_balance", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccount": ".payment_method_platform_balance_payment_method_platform_balance_account", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccountLogo": ".payment_method_platform_balance_payment_method_platform_balance_account_logo", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceBalancesItem": ".payment_method_platform_balance_payment_method_platform_balance_balances_item", "PaymentMethodSepaDebitPaymentMethod": ".payment_method_sepa_debit_payment_method", "PaymentMethodSepaDebitPaymentMethodIcons": ".payment_method_sepa_debit_payment_method_icons", "PaymentMethodSepaDebitPaymentMethodIconsCard": ".payment_method_sepa_debit_payment_method_icons_card", @@ -2294,7 +2039,6 @@ "PaymentMethod_CardPaymentMethod": ".payment_method", "PaymentMethod_CashappPaymentMethod": ".payment_method", "PaymentMethod_IdealPaymentMethod": ".payment_method", - "PaymentMethod_PlatformBalancePaymentMethod": ".payment_method", "PaymentMethod_SepaDebitPaymentMethod": ".payment_method", "PaymentMethod_UsBankAccountPaymentMethod": ".payment_method", "PaymentNextAction": ".payment_next_action", @@ -2349,7 +2093,6 @@ "PayoutAccountCalculatedStatuses": ".payout_account_calculated_statuses", "PayoutAccountLatestVerification": ".payout_account_latest_verification", "PayoutDestinationCategory": ".payout_destination_category", - "PayoutErrorCodes": ".payout_error_codes", "PayoutMethod": ".payout_method", "PayoutMethodCompany": ".payout_method_company", "PayoutMethodDestination": ".payout_method_destination", @@ -2576,13 +2319,6 @@ "WebhookTestableEventsItem": ".webhook_testable_events_item", "WhoCanPostTypes": ".who_can_post_types", "WhoCanReactTypes": ".who_can_react_types", - "Withdrawal": ".withdrawal", - "WithdrawalFeeTypes": ".withdrawal_fee_types", - "WithdrawalLedgerAccount": ".withdrawal_ledger_account", - "WithdrawalListItem": ".withdrawal_list_item", - "WithdrawalPayoutToken": ".withdrawal_payout_token", - "WithdrawalSpeeds": ".withdrawal_speeds", - "WithdrawalStatus": ".withdrawal_status", "WorkforceBounty": ".workforce_bounty", "WorkforceBountyListItem": ".workforce_bounty_list_item", } @@ -2904,83 +2640,7 @@ def __dir__(): "CheckoutConfigurationThreeDsLevel", "CheckoutFonts", "CheckoutModes", - "CheckoutSession", - "CheckoutSessionAuthenticateAction", - "CheckoutSessionAwaitClaimAction", - "CheckoutSessionAwaitClaimActionState", - "CheckoutSessionBranding", - "CheckoutSessionBrandingBorderStyle", - "CheckoutSessionBrandingFontFamily", - "CheckoutSessionBreakdown", - "CheckoutSessionBreakdownAdjustment", - "CheckoutSessionBreakdownAdjustmentApplied", - "CheckoutSessionBreakdownAdjustmentKind", - "CheckoutSessionBreakdownAdjustmentStatus", - "CheckoutSessionBreakdownCurrency", - "CheckoutSessionBreakdownDisplay", - "CheckoutSessionBreakdownDisplayHeadline", - "CheckoutSessionBreakdownDisplayHeadlineKind", - "CheckoutSessionBreakdownDisplayRow", - "CheckoutSessionBreakdownDisplayRowDetail", - "CheckoutSessionBreakdownDisplayRowDetailApplied", - "CheckoutSessionBreakdownDisplayRowKind", - "CheckoutSessionBreakdownDisplayRowStatus", - "CheckoutSessionBreakdownDisplaySections", - "CheckoutSessionBreakdownLine", - "CheckoutSessionBreakdownLineKind", - "CheckoutSessionBreakdownUpcoming", - "CheckoutSessionBreakdownUpcomingInstallments", - "CheckoutSessionBreakdownUpcomingOneTime", - "CheckoutSessionBreakdownUpcomingRecurring", - "CheckoutSessionBreakdownUpcoming_Installments", - "CheckoutSessionBreakdownUpcoming_OneTime", - "CheckoutSessionBreakdownUpcoming_Recurring", - "CheckoutSessionBuyerIdentity", - "CheckoutSessionBuyerIdentityMethod", - "CheckoutSessionCompleteAction", - "CheckoutSessionCompleteActionKind", - "CheckoutSessionConfirmError", - "CheckoutSessionConfirmErrorCode", - "CheckoutSessionCtaLabel", - "CheckoutSessionCustomField", - "CheckoutSessionCustomFieldFieldType", - "CheckoutSessionCustomFieldResponse", - "CheckoutSessionEntry", - "CheckoutSessionEntryStatus", - "CheckoutSessionItem", - "CheckoutSessionMode", - "CheckoutSessionNextAction", - "CheckoutSessionNextAction_Authenticate", - "CheckoutSessionNextAction_AwaitClaim", - "CheckoutSessionNextAction_Complete", - "CheckoutSessionNextAction_Redirect", - "CheckoutSessionNextAction_UpgradeAuthentication", - "CheckoutSessionNextAction_VerifyPhone", - "CheckoutSessionNextAction_WaitForPayment", - "CheckoutSessionPayment", "CheckoutSessionPaymentMethodConfiguration", - "CheckoutSessionPaymentStatus", - "CheckoutSessionPromo", - "CheckoutSessionPromoCurrency", - "CheckoutSessionPromoDuration", - "CheckoutSessionPromoPromoType", - "CheckoutSessionQuote", - "CheckoutSessionRedirectAction", - "CheckoutSessionRequirement", - "CheckoutSessionRequirementType", - "CheckoutSessionSeller", - "CheckoutSessionSellerTerms", - "CheckoutSessionShippingAddress", - "CheckoutSessionStatus", - "CheckoutSessionTaxBehavior", - "CheckoutSessionTaxId", - "CheckoutSessionTaxIdType", - "CheckoutSessionThreeDsLevel", - "CheckoutSessionTransfer", - "CheckoutSessionUpgradeAuthenticationAction", - "CheckoutSessionUpgradeAuthenticationActionSignInIntent", - "CheckoutSessionVerifyPhoneAction", - "CheckoutSessionWaitForPaymentAction", "CheckoutShapes", "Company", "CompanyFeaturedAffiliateProduct", @@ -3222,6 +2882,9 @@ def __dir__(): "LedgerActivityObject", "LedgerActivityPayment", "LedgerActivityPaymentObject", + "LedgerActivityPaymentPlan", + "LedgerActivityPaymentProduct", + "LedgerActivityPaymentUser", "LedgerActivityResource", "LedgerActivityResourceAccountReference", "LedgerActivityResourceAccountReferenceObject", @@ -3441,18 +3104,6 @@ def __dir__(): "PaymentMethodListItemIdealPaymentMethodIconsSquareDark", "PaymentMethodListItemIdealPaymentMethodIconsSquareLight", "PaymentMethodListItemIdealPaymentMethodIdeal", - "PaymentMethodListItemPlatformBalancePaymentMethod", - "PaymentMethodListItemPlatformBalancePaymentMethodIcons", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCard", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCardDark", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsCardLight", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquare", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareDark", - "PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareLight", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalance", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccount", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccountLogo", - "PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceBalancesItem", "PaymentMethodListItemSepaDebitPaymentMethod", "PaymentMethodListItemSepaDebitPaymentMethodIcons", "PaymentMethodListItemSepaDebitPaymentMethodIconsCard", @@ -3475,21 +3126,8 @@ def __dir__(): "PaymentMethodListItem_CardPaymentMethod", "PaymentMethodListItem_CashappPaymentMethod", "PaymentMethodListItem_IdealPaymentMethod", - "PaymentMethodListItem_PlatformBalancePaymentMethod", "PaymentMethodListItem_SepaDebitPaymentMethod", "PaymentMethodListItem_UsBankAccountPaymentMethod", - "PaymentMethodPlatformBalancePaymentMethod", - "PaymentMethodPlatformBalancePaymentMethodIcons", - "PaymentMethodPlatformBalancePaymentMethodIconsCard", - "PaymentMethodPlatformBalancePaymentMethodIconsCardDark", - "PaymentMethodPlatformBalancePaymentMethodIconsCardLight", - "PaymentMethodPlatformBalancePaymentMethodIconsSquare", - "PaymentMethodPlatformBalancePaymentMethodIconsSquareDark", - "PaymentMethodPlatformBalancePaymentMethodIconsSquareLight", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalance", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccount", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccountLogo", - "PaymentMethodPlatformBalancePaymentMethodPlatformBalanceBalancesItem", "PaymentMethodSepaDebitPaymentMethod", "PaymentMethodSepaDebitPaymentMethodIcons", "PaymentMethodSepaDebitPaymentMethodIconsCard", @@ -3513,7 +3151,6 @@ def __dir__(): "PaymentMethod_CardPaymentMethod", "PaymentMethod_CashappPaymentMethod", "PaymentMethod_IdealPaymentMethod", - "PaymentMethod_PlatformBalancePaymentMethod", "PaymentMethod_SepaDebitPaymentMethod", "PaymentMethod_UsBankAccountPaymentMethod", "PaymentNextAction", @@ -3568,7 +3205,6 @@ def __dir__(): "PayoutAccountCalculatedStatuses", "PayoutAccountLatestVerification", "PayoutDestinationCategory", - "PayoutErrorCodes", "PayoutMethod", "PayoutMethodCompany", "PayoutMethodDestination", @@ -3795,13 +3431,6 @@ def __dir__(): "WebhookTestableEventsItem", "WhoCanPostTypes", "WhoCanReactTypes", - "Withdrawal", - "WithdrawalFeeTypes", - "WithdrawalLedgerAccount", - "WithdrawalListItem", - "WithdrawalPayoutToken", - "WithdrawalSpeeds", - "WithdrawalStatus", "WorkforceBounty", "WorkforceBountyListItem", ] diff --git a/src/whop_sdk/types/ad.py b/src/whop_sdk/types/ad.py index 3523e759..a35ecb5d 100644 --- a/src/whop_sdk/types/ad.py +++ b/src/whop_sdk/types/ad.py @@ -159,6 +159,11 @@ class Ad(UniversalBaseModel): """ descriptions: typing.List[str] + existing_post_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The post you pointed this ad at, when it promotes one you already published — a Facebook post, Instagram media, or TikTok video ID. `null` when the ad uses uploaded creatives. + """ + frequency: typing.Optional[float] = pydantic.Field(default=None) """ Platform-reported impressions divided by reach. @@ -208,17 +213,17 @@ class Ad(UniversalBaseModel): post_id: typing.Optional[str] = pydantic.Field(default=None) """ - The existing post this ad promotes — a Facebook post or Instagram media ID. `null` when the ad uses uploaded creatives. + The post the ad network serves for this ad, as `pageID_postID` on Meta — the post Meta created for an uploaded creative, or the post being promoted. Use it to open the live post, or to promote the same post from another ad. `null` until the network has created the post. """ post_source: typing.Optional[AdPostSource] = pydantic.Field(default=None) """ - Identifies the network that owns `post_id`; `null` when the ad uses uploaded creatives. + Identifies the network that owns `existing_post_id`; `null` when the ad uses uploaded creatives. """ post_thumbnail_url: typing.Optional[str] = pydantic.Field(default=None) """ - Preview image of the existing post this ad promotes. `null` for ads that use uploaded creatives, or until the post's media has been fetched from the network. + Preview image of the post named by `existing_post_id`. `null` for ads that use uploaded creatives, or until the post's media has been fetched from the network. """ primary_texts: typing.List[str] diff --git a/src/whop_sdk/types/api_key_api_version_date.py b/src/whop_sdk/types/api_key_api_version_date.py index 2ac27991..10552b0e 100644 --- a/src/whop_sdk/types/api_key_api_version_date.py +++ b/src/whop_sdk/types/api_key_api_version_date.py @@ -30,6 +30,8 @@ "2026-08-14", "2026-08-21", "2026-08-21-1", + "2026-08-25", + "2026-08-25-1", ], typing.Any, ] diff --git a/src/whop_sdk/types/bounty_list_item.py b/src/whop_sdk/types/bounty_list_item.py index d1063aff..efed7661 100644 --- a/src/whop_sdk/types/bounty_list_item.py +++ b/src/whop_sdk/types/bounty_list_item.py @@ -9,6 +9,7 @@ from .bounty_list_item_business_goal_type import BountyListItemBusinessGoalType from .bounty_list_item_scheduled_frequency import BountyListItemScheduledFrequency from .bounty_list_item_status import BountyListItemStatus +from .storefront_account import StorefrontAccount from .user_summary import UserSummary @@ -100,6 +101,11 @@ class BountyListItem(UniversalBaseModel): Gross bounty-pool amount allocated per accepted submission, in whole currency units. """ + hosting_account: typing.Optional[StorefrontAccount] = pydantic.Field(default=None) + """ + Account hosting the bounty's forum — the one whose `route` and `experience_id` address its discussion thread, and where its submissions dashboard lives. `null` for a platform-wide bounty with no host. May differ from `funding_account`. + """ + id: str = pydantic.Field() """ Bounty ID, prefixed `bnty_`. diff --git a/src/whop_sdk/types/checkout_session.py b/src/whop_sdk/types/checkout_session.py deleted file mode 100644 index 12a039d7..00000000 --- a/src/whop_sdk/types/checkout_session.py +++ /dev/null @@ -1,245 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_branding import CheckoutSessionBranding -from .checkout_session_buyer_identity import CheckoutSessionBuyerIdentity -from .checkout_session_buyer_identity_method import CheckoutSessionBuyerIdentityMethod -from .checkout_session_confirm_error import CheckoutSessionConfirmError -from .checkout_session_cta_label import CheckoutSessionCtaLabel -from .checkout_session_custom_field_response import CheckoutSessionCustomFieldResponse -from .checkout_session_entry import CheckoutSessionEntry -from .checkout_session_item import CheckoutSessionItem -from .checkout_session_mode import CheckoutSessionMode -from .checkout_session_next_action import CheckoutSessionNextAction -from .checkout_session_payment import CheckoutSessionPayment -from .checkout_session_payment_method_configuration import CheckoutSessionPaymentMethodConfiguration -from .checkout_session_promo import CheckoutSessionPromo -from .checkout_session_quote import CheckoutSessionQuote -from .checkout_session_requirement import CheckoutSessionRequirement -from .checkout_session_seller import CheckoutSessionSeller -from .checkout_session_shipping_address import CheckoutSessionShippingAddress -from .checkout_session_status import CheckoutSessionStatus -from .checkout_session_tax_behavior import CheckoutSessionTaxBehavior -from .checkout_session_tax_id import CheckoutSessionTaxId -from .checkout_session_three_ds_level import CheckoutSessionThreeDsLevel -from .checkout_session_transfer import CheckoutSessionTransfer - - -class CheckoutSession(UniversalBaseModel): - affiliate_code: typing.Optional[str] = pydantic.Field(default=None) - """ - The affiliate this checkout is attributed to, or `null`. Set at create only. - """ - - available_currencies: typing.List[str] - branding: typing.Optional[CheckoutSessionBranding] = pydantic.Field(default=None) - """ - The seller's checkout appearance, resolved configuration first, then plan, then account. `null` when nobody set any. - """ - - buyer_email: typing.Optional[str] = pydantic.Field(default=None) - """ - The buyer's email, once one has been resolved for this checkout — `null` until then. Read-only, and read it together with `buyer_identity`: an address alone does not mean the person holds it. - """ - - buyer_id: typing.Optional[str] = pydantic.Field(default=None) - """ - The buyer's user account (`user_…`), once one has been resolved for this checkout — `null` until then. Read-only, and read it together with `buyer_identity`: `attributed` names the account the purchase is for and proves nothing about who is at the keyboard. - """ - - buyer_identity: typing.Optional[CheckoutSessionBuyerIdentity] = pydantic.Field(default=None) - """ - How well this checkout knows its buyer, or `null` before one is resolved. `attributed` means an account was matched from what the buyer typed — it says who the purchase is for and nothing about who is at the keyboard. `authenticated` means the person proved they hold that account during this checkout. Only `authenticated` may be handed anything that acts as the buyer, and the value only strengthens. - """ - - buyer_identity_at: typing.Optional[str] = pydantic.Field(default=None) - """ - When the buyer's identity was last established or strengthened, as an ISO 8601 timestamp. `null` before a buyer is resolved. - """ - - buyer_identity_method: typing.Optional[CheckoutSessionBuyerIdentityMethod] = pydantic.Field(default=None) - """ - How the buyer's identity was established — the mechanism behind `buyer_identity`, so a checkout stays explicable long after it completed. `null` before a buyer is resolved. New mechanisms are added over time. - """ - - checkout_configuration: typing.Optional[str] = pydantic.Field(default=None) - """ - The seller's checkout configuration this session was mounted from (`ch_…`), or `null` when it was opened directly from a plan. Its presets seeded this session at create. - """ - - client_secret: typing.Optional[str] = pydantic.Field(default=None) - """ - The session's one credential — returned by create, and echoed on a session read authenticated with it (or with the checkout's own resume cookie, which holds the same value). Every other call authenticates with it; treat it like a password for this checkout. - """ - - collect_tax_id: bool = pydantic.Field() - """ - Whether this seller offers tax ID entry on checkout (their VAT ID setting). When `false`, hide the input — a stored `tax_id` still applies either way. - """ - - created_at: str = pydantic.Field() - """ - When the session was created, as an ISO 8601 timestamp. - """ - - cta_label: CheckoutSessionCtaLabel = pydantic.Field() - """ - The verb for the button that confirms this checkout, so every surface names the act the same way: `pay`, `subscribe`, `start_trial`, `join_waitlist`, or `continue` when nothing is charged today (a free checkout, `setup` mode saving a payment method, or a transfer that charges nothing). Render your own wording for each value — this is a key, never display text — and fall back to a generic label on a value you do not recognize. - """ - - custom_field_responses: typing.List[CheckoutSessionCustomFieldResponse] - display_currency: str = pydantic.Field() - """ - The currency this checkout is priced AND charged in, lowercase. Seeded at create from where the buyer is; update it to one of `available_currencies` to price and charge in that currency instead. - """ - - entry: typing.Optional[CheckoutSessionEntry] = pydantic.Field(default=None) - """ - The waitlist entry the confirm created, or `null`. Only a waitlist plan produces one: joining charges nothing — the payment method is saved and the seller charges it if they accept the entry — so a completed waitlist session carries an `entry` and a `null` payment. Read it with its `status`: `succeeded` means the join stands; `failed` (the card save died — the buyer is not on the waitlist) is transient, reopening the session on the next read with the failure on `last_confirm_error`. - """ - - expires_at: str = pydantic.Field() - """ - When the session expires, as an ISO 8601 timestamp. An expired session cannot be updated or confirmed — start a new one. - """ - - id: str = pydantic.Field() - """ - Checkout session ID, prefixed `chs_`. - """ - - invoice_due_at: typing.Optional[str] = pydantic.Field(default=None) - """ - When this checkout's invoice is due, as an ISO 8601 timestamp — `null` for everything that is not an invoice checkout, and for an invoice without a due date. Present when the plan collects a seller-issued invoice; a surface should state the date, and a date in the past reads as overdue. - """ - - items: typing.List[CheckoutSessionItem] - last_confirm_error: typing.Optional[CheckoutSessionConfirmError] = pydantic.Field(default=None) - """ - Why the most recent confirm attempt did not complete, or `null`. Only terminal refusals land here — anything the buyer can resolve is a `next_action` instead. The session stays open; fix what the code names and confirm again. - """ - - metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(default=None) - """ - Free-form string-to-string map set at create. Whop never interprets it. - """ - - mode: CheckoutSessionMode = pydantic.Field() - """ - `payment` charges the items at confirm; `setup` saves a payment method for later use. - """ - - next_action: typing.Optional[CheckoutSessionNextAction] = pydantic.Field(default=None) - """ - The one thing to do now, or `null` when there is nothing. Do it, re-read the session, and repeat until it is `null`. A `completed` session with no `next_action` has nothing left to do — whether the checkout WENT THROUGH is the result's own `status` (`payment.status`, or `entry.status` for a waitlist join): a charge that decisively dies REOPENS the session on the next read, with the failure on `last_confirm_error` — so a `failed` result is a transient reading, never a resting state, and nothing about it may be presented as a success. `type` picks the shape, and each type carries only its own fields: switch on `type` and the payload it needs is there; a type you do not recognize is safe to skip when it is not blocking. `blocking` says whether the flow may move past it — read it rather than inferring it from the type. Before the charge, blocking means the buyer cannot pay until it is done. `complete` is the attempt's own unfinished ceremony — a 3D Secure challenge, a bank redirect — and one executor serves it whatever its `kind`: hand its `client_secret` to the payments element's `handleNextAction`. After it, `wait_for_payment` is blocking because the money is still moving and everything past that point would tell the buyer their order landed — hold, wait `poll_after_seconds`, and read again. The post-completion actions (`upgrade_authentication`, `redirect`, `await_claim`) are advisory: the purchase stands either way. After completion the action can also depend on WHO is reading: a signed-in buyer may be handed the `redirect` where an anonymous read of the same session gets `await_claim` — told to check their email to claim the purchase, or that the checkout finished on another device — and a read from outside whop.com's own pages (an embedded element) may be handed a `redirect` whose destination is whop.com's checkout-finish page instead of the seller's: execute it like any other redirect, and treat the URL as the credential it carries. This is an instruction, never the gate: confirm re-checks everything for itself, so a client that skips a blocking action is refused all the same. `upgrade_authentication` carries its own recipe (`email`, `sign_in_intent`); when its `session_intent_id` is non-null, the reader's own mid-checkout sign-in already proved the first factor and the recipe collapses to its last step — call that session intent's upgrade endpoint directly (the credential the sign-in installed authorizes it) and collect only what the login still owes. - """ - - object: str = pydantic.Field() - """ - Always `checkout_session`. - """ - - payment: typing.Optional[CheckoutSessionPayment] = pydantic.Field(default=None) - """ - The payment the confirm created, or `null` while none exists. Read it with its `status`: a completed session's payment can still be `requires_action` (a step remains) or `processing` (accepted, settling). `failed` is a transient reading — a charge that decisively dies reopens the session on the next read, unbinding the dead payment and recording the failure on `last_confirm_error`. Anything the charge still needs comes through `next_action`, which is also where the payment's own credential lives. - """ - - payment_method_configuration: typing.Optional[CheckoutSessionPaymentMethodConfiguration] = pydantic.Field( - default=None - ) - """ - The configuration governing this session, resolved through every layer — the checkout configuration it was mounted from, the plan's, and the account's. Apply it over the payment method types catalogue for the offerable set. `null` means nothing is configured at any layer: platform defaults apply. - """ - - payment_method_required: bool = pydantic.Field() - """ - Whether confirm needs a `confirmation_token`. `false` when no charge will ever take money — a free plan, a transfer of a non-renewing plan, or an applied promo code that makes every charge free, now and forever: collect no payment method there and confirm without a token. Live like every session fact: applying or removing a code can flip it, so mount your payment surface off this field, never off a zero total — a checkout that charges nothing today but something later (a trial, a first-charge-only code) stays `true`. - """ - - phone_number: typing.Optional[str] = pydantic.Field(default=None) - """ - The buyer's phone number, or `null`. Collected when the session publishes a `phone_number` requirement (the seller collects numbers), set through update, and recorded against the order. Buyer-typed and unverified — sellers who VERIFY numbers get the `verify_phone` next action instead, which writes to the buyer's account. - """ - - promo: typing.Optional[CheckoutSessionPromo] = pydantic.Field(default=None) - """ - What the applied code takes off and which charges it covers, or `null` when no code applies. `promo_code` is the writable field; this is its resolved semantics — the duration says which future charges the breakdown's `upcoming` amounts have the discount in. - """ - - promo_code: typing.Optional[str] = pydantic.Field(default=None) - """ - The promo code applied to the quote, or `null`. Set it via update; the discount shows up in the quote. - """ - - quote: CheckoutSessionQuote = pydantic.Field() - """ - The current price of the items, computed by the server on every read. Confirm charges this number while it is fresh. - """ - - redirect_url: typing.Optional[str] = pydantic.Field(default=None) - """ - Where the SELLER sends the buyer after a completed purchase, when the checkout configuration this session was mounted from sets one. Always an absolute HTTP or HTTPS URL — anything else serializes as `null`. Distinct from `return_url`, which is the payment provider's return leg. - """ - - requirements: typing.List[CheckoutSessionRequirement] - return_url: typing.Optional[str] = pydantic.Field(default=None) - """ - Where the buyer lands after an off-site payment step. Must be an absolute https URL without credentials (http is allowed for localhost). - """ - - seller: CheckoutSessionSeller = pydantic.Field() - """ - The seller this checkout purchases from. - """ - - shipping_address: typing.Optional[CheckoutSessionShippingAddress] = pydantic.Field(default=None) - """ - Where physical goods ship, or `null`. Only the keys the buyer supplied are present. - """ - - show_promo_code_input: bool = pydantic.Field() - """ - Whether to offer promo code entry on this checkout: `false` on a membership transfer, a checkout with nothing due, or a one-off purchase — no code can apply — and when the seller disabled codes for it, or none exists to enter. A code already on the session still discounts either way. - """ - - status: CheckoutSessionStatus = pydantic.Field() - """ - `open` until a confirm succeeds (`completed`) or the session ages out (`expired`). Only an `open` session can be updated or confirmed. A `completed` session whose charge later decisively dies returns to `open` with the failure on `last_confirm_error` — the same session takes the retry. - """ - - tax_behavior: typing.Optional[CheckoutSessionTaxBehavior] = pydantic.Field(default=None) - """ - Whether this checkout collects tax, and how its price reads when it does. `null` means no tax is collected here — skip `calculate_tax` entirely and ask for no more address than the payment method itself needs. `exclusive` means tax is ADDED to the quote, `inclusive` that the quote already contains it. Present before any address is known, so a surface can decide what to collect up front; the value is what this checkout expects to price with, and `calculate_tax` answers with the authoritative one once a location is known (tax behaviour varies by country). - """ - - tax_id: typing.Optional[CheckoutSessionTaxId] = pydantic.Field(default=None) - """ - The buyer's tax registration for a business purchase, or `null`. Set it via update (`null` clears it); a stored registration re-prices the quote's tax row — a valid EU B2B id reverse-charges EU VAT — and confirm charges tax under the same registration, so the shown total and the taken one agree. - """ - - three_ds_level: typing.Optional[CheckoutSessionThreeDsLevel] = pydantic.Field(default=None) - """ - The 3D Secure behavior the checkout configuration asks for, or `null` to use the plan's or the account's default. - """ - - top_up_membership: typing.Optional[str] = pydantic.Field(default=None) - """ - The membership this checkout tops up (`mem_…`), or `null` for an ordinary purchase. Set at create only. Confirming charges the plan's price against that existing membership instead of creating a new one — no stock is taken, and for an expiring plan the paid time stacks onto what is left. The buyer must own it: confirm resolves it against the resolved buyer's own memberships and refuses anything else as not found. - """ - - transfer: typing.Optional[CheckoutSessionTransfer] = pydantic.Field(default=None) - """ - The membership transfer this checkout performs, or `null` for an ordinary purchase. Present when the session was mounted from a transfer link: confirming moves the linked membership to this buyer instead of creating a fresh purchase, the quote prices zero due today, and for a renewing plan the collected payment method takes over the origin's future renewals. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_authenticate_action.py b/src/whop_sdk/types/checkout_session_authenticate_action.py deleted file mode 100644 index f09d8b2f..00000000 --- a/src/whop_sdk/types/checkout_session_authenticate_action.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class CheckoutSessionAuthenticateAction(UniversalBaseModel): - blocking: bool = pydantic.Field() - """ - Whether the sale depends on this. `true` stops the purchase until it is done — confirm refuses regardless of whether you ran it, so skipping it only costs the buyer an unexplained refusal. `false` is advisory: the purchase is already made and it stands whether or not the buyer ever does this, so the buyer may close the tab. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_await_claim_action.py b/src/whop_sdk/types/checkout_session_await_claim_action.py deleted file mode 100644 index 1f3faaa6..00000000 --- a/src/whop_sdk/types/checkout_session_await_claim_action.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_await_claim_action_state import CheckoutSessionAwaitClaimActionState - - -class CheckoutSessionAwaitClaimAction(UniversalBaseModel): - blocking: bool = pydantic.Field() - """ - Whether the sale depends on this. `true` stops the purchase until it is done — confirm refuses regardless of whether you ran it, so skipping it only costs the buyer an unexplained refusal. `false` is advisory: the purchase is already made and it stands whether or not the buyer ever does this, so the buyer may close the tab. - """ - - state: CheckoutSessionAwaitClaimActionState = pydantic.Field() - """ - `check_email` — the claim is not recorded yet: tell the buyer to check their email to claim their purchase. `handed_off` — the claim is recorded and the checkout finished on another device: this reader keeps seeing it, which is correct — the session never unlocks across devices. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_await_claim_action_state.py b/src/whop_sdk/types/checkout_session_await_claim_action_state.py deleted file mode 100644 index 8da8539b..00000000 --- a/src/whop_sdk/types/checkout_session_await_claim_action_state.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionAwaitClaimActionState = typing.Union[typing.Literal["check_email", "handed_off"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_branding.py b/src/whop_sdk/types/checkout_session_branding.py deleted file mode 100644 index 39805328..00000000 --- a/src/whop_sdk/types/checkout_session_branding.py +++ /dev/null @@ -1,74 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_branding_border_style import CheckoutSessionBrandingBorderStyle -from .checkout_session_branding_font_family import CheckoutSessionBrandingFontFamily - - -class CheckoutSessionBranding(UniversalBaseModel): - background_color: typing.Optional[str] = pydantic.Field(default=None) - """ - Page background, as a `#rrggbb` hex color. - """ - - background_text_color: typing.Optional[str] = pydantic.Field(default=None) - """ - `black` or `white`, whichever reads against the background. - """ - - border_style: typing.Optional[CheckoutSessionBrandingBorderStyle] = pydantic.Field(default=None) - """ - The corner style the seller chose. - """ - - button_color: typing.Optional[str] = pydantic.Field(default=None) - """ - Pay button fill, as a `#rrggbb` hex color. - """ - - button_radius: typing.Optional[str] = pydantic.Field(default=None) - """ - The CSS `border-radius` for buttons at that border style. - """ - - button_text_color: typing.Optional[str] = pydantic.Field(default=None) - """ - `black` or `white`, whichever reads against the button. - """ - - container_radius: typing.Optional[str] = pydantic.Field(default=None) - """ - The CSS `border-radius` for containers at that border style. - """ - - font_family: typing.Optional[CheckoutSessionBrandingFontFamily] = pydantic.Field(default=None) - """ - The font the seller chose. - """ - - font_url: typing.Optional[str] = pydantic.Field(default=None) - """ - The stylesheet to load for that font, or `null` for the system font. - """ - - input_radius: typing.Optional[str] = pydantic.Field(default=None) - """ - The CSS `border-radius` for inputs at that border style. - """ - - resolved_font_family: typing.Optional[str] = pydantic.Field(default=None) - """ - The CSS `font-family` value for that font, or `null` for the system font. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_branding_border_style.py b/src/whop_sdk/types/checkout_session_branding_border_style.py deleted file mode 100644 index 0568adc0..00000000 --- a/src/whop_sdk/types/checkout_session_branding_border_style.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBrandingBorderStyle = typing.Union[typing.Literal["rounded", "pill", "rectangular"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_branding_font_family.py b/src/whop_sdk/types/checkout_session_branding_font_family.py deleted file mode 100644 index f61e5707..00000000 --- a/src/whop_sdk/types/checkout_session_branding_font_family.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBrandingFontFamily = typing.Union[typing.Literal["system", "roboto", "open_sans"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_breakdown.py b/src/whop_sdk/types/checkout_session_breakdown.py deleted file mode 100644 index fc90ab15..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown.py +++ /dev/null @@ -1,50 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_breakdown_adjustment import CheckoutSessionBreakdownAdjustment -from .checkout_session_breakdown_currency import CheckoutSessionBreakdownCurrency -from .checkout_session_breakdown_display import CheckoutSessionBreakdownDisplay -from .checkout_session_breakdown_line import CheckoutSessionBreakdownLine -from .checkout_session_breakdown_upcoming import CheckoutSessionBreakdownUpcoming -from .money import Money - - -class CheckoutSessionBreakdown(UniversalBaseModel): - adjustments: typing.List[CheckoutSessionBreakdownAdjustment] - currency: CheckoutSessionBreakdownCurrency = pydantic.Field() - """ - ISO currency every figure below is in, lowercase. Every amount here is a Money object, never a bare number — see `subtotal`. - """ - - display: CheckoutSessionBreakdownDisplay = pydantic.Field() - """ - WHAT TO RENDER — the summary's headline and itemized sections, decided server-side from the same computation as the figures above so the two cannot disagree. Render this rather than re-deriving rows from the figures; the figures stay authoritative for arithmetic. - """ - - lines: typing.List[CheckoutSessionBreakdownLine] - subtotal: Money = pydantic.Field() - """ - The lines summed, before any adjustment. - """ - - total: Money = pydantic.Field() - """ - What confirm charges: the subtotal plus every RESOLVED `added` adjustment. A `pending` adjustment is deliberately NOT in it, so the number is never inflated by a figure the buyer cannot yet see itemized — with exclusive tax it therefore grows once tax resolves, and with inclusive tax it does not move at all. Once the session is `completed` it is what WAS charged: the fee and tax on the order's own receipt, and nothing is `pending`. - """ - - upcoming: typing.List[CheckoutSessionBreakdownUpcoming] = pydantic.Field() - """ - WHEN the rest is owed — empty for a purchase that is settled today. `type` picks the shape and each variant carries only its own fields. An order can carry several at once (a split-pay plan alongside a subscription upsell), which is why it is a list. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_breakdown_adjustment.py b/src/whop_sdk/types/checkout_session_breakdown_adjustment.py deleted file mode 100644 index d37d1593..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_adjustment.py +++ /dev/null @@ -1,51 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_breakdown_adjustment_applied import CheckoutSessionBreakdownAdjustmentApplied -from .checkout_session_breakdown_adjustment_kind import CheckoutSessionBreakdownAdjustmentKind -from .checkout_session_breakdown_adjustment_status import CheckoutSessionBreakdownAdjustmentStatus -from .money import Money - - -class CheckoutSessionBreakdownAdjustment(UniversalBaseModel): - amount: typing.Optional[Money] = pydantic.Field(default=None) - """ - What this adjustment does to the total — negative for a discount. `null` only while `status` is `pending`. - """ - - applied: CheckoutSessionBreakdownAdjustmentApplied = pydantic.Field() - """ - `added` counts toward the total; `included` is already inside the lines and is shown for disclosure only (inclusive-tax markets). - """ - - kind: CheckoutSessionBreakdownAdjustmentKind = pydantic.Field() - """ - What changes the price: the promo's `discount`, the `buyer_fee` the charge adds, or `tax`. - """ - - label: str = pydantic.Field() - """ - What to show the buyer for this row. - """ - - rate: typing.Optional[str] = pydantic.Field(default=None) - """ - The `tax` row's effective rate as a decimal fraction (`"0.0725"` is 7.25%) — the tax as a share of the base it was priced on, stated so a surface can label the row with the percentage. Present only on a resolved tax adjustment from `calculate_breakdown` or `calculate_tax`; absent on other kinds, on a `pending` row, and on a completed session's settled row. - """ - - status: typing.Optional[CheckoutSessionBreakdownAdjustmentStatus] = pydantic.Field(default=None) - """ - Present only on an adjustment with no figure yet — render its row in a loading state and expect `calculate_breakdown` to resolve it. An adjustment that does not apply is absent from the list entirely, never a zero row. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_breakdown_adjustment_applied.py b/src/whop_sdk/types/checkout_session_breakdown_adjustment_applied.py deleted file mode 100644 index 3c7217a8..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_adjustment_applied.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBreakdownAdjustmentApplied = typing.Union[typing.Literal["added", "included"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_breakdown_adjustment_kind.py b/src/whop_sdk/types/checkout_session_breakdown_adjustment_kind.py deleted file mode 100644 index 877f6a86..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_adjustment_kind.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBreakdownAdjustmentKind = typing.Union[typing.Literal["discount", "buyer_fee", "tax"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_breakdown_adjustment_status.py b/src/whop_sdk/types/checkout_session_breakdown_adjustment_status.py deleted file mode 100644 index 4d0ac149..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_adjustment_status.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBreakdownAdjustmentStatus = typing.Union[typing.Literal["pending"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_breakdown_currency.py b/src/whop_sdk/types/checkout_session_breakdown_currency.py deleted file mode 100644 index 0300105b..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_currency.py +++ /dev/null @@ -1,99 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBreakdownCurrency = typing.Union[ - typing.Literal[ - "usd", - "sgd", - "inr", - "aud", - "brl", - "cad", - "dkk", - "eur", - "nok", - "gbp", - "sek", - "chf", - "hkd", - "huf", - "jpy", - "mxn", - "myr", - "pln", - "czk", - "nzd", - "aed", - "eth", - "ape", - "cop", - "ron", - "thb", - "bgn", - "idr", - "dop", - "php", - "try", - "krw", - "twd", - "vnd", - "pkr", - "clp", - "uyu", - "ars", - "zar", - "dzd", - "tnd", - "mad", - "kes", - "kwd", - "jod", - "all", - "xcd", - "amd", - "bsd", - "bhd", - "bob", - "bam", - "khr", - "crc", - "xof", - "egp", - "etb", - "gmd", - "ghs", - "gtq", - "gyd", - "ils", - "jmd", - "mop", - "mga", - "mur", - "mdl", - "mnt", - "nad", - "ngn", - "mkd", - "omr", - "pyg", - "pen", - "qar", - "rwf", - "sar", - "rsd", - "lkr", - "tzs", - "ttd", - "uzs", - "rub", - "btc", - "cny", - "usdt", - "kzt", - "awg", - "whop_usd", - "xau", - ], - typing.Any, -] diff --git a/src/whop_sdk/types/checkout_session_breakdown_display.py b/src/whop_sdk/types/checkout_session_breakdown_display.py deleted file mode 100644 index fa82792e..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_display.py +++ /dev/null @@ -1,29 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_breakdown_display_headline import CheckoutSessionBreakdownDisplayHeadline -from .checkout_session_breakdown_display_sections import CheckoutSessionBreakdownDisplaySections - - -class CheckoutSessionBreakdownDisplay(UniversalBaseModel): - headline: CheckoutSessionBreakdownDisplayHeadline = pydantic.Field() - """ - The hero: the figure (or trial length, or the word "Free") and the one-line context under it. - """ - - sections: CheckoutSessionBreakdownDisplaySections = pydantic.Field() - """ - The itemized sections below — line items, charges, totals, and the collapsible fee breakdown. All empty on a free checkout. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_breakdown_display_headline.py b/src/whop_sdk/types/checkout_session_breakdown_display_headline.py deleted file mode 100644 index 510cbbdb..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_display_headline.py +++ /dev/null @@ -1,51 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_breakdown_display_headline_kind import CheckoutSessionBreakdownDisplayHeadlineKind -from .checkout_session_breakdown_display_row import CheckoutSessionBreakdownDisplayRow -from .money import Money - - -class CheckoutSessionBreakdownDisplayHeadline(UniversalBaseModel): - amount: typing.Optional[Money] = pydantic.Field(default=None) - """ - The figure to headline when `kind` is `amount` — already posture-correct. `null` on the other kinds. - """ - - context: typing.List[CheckoutSessionBreakdownDisplayRow] - free_until: typing.Optional[str] = pydantic.Field(default=None) - """ - When `kind` is `free` on a renewing membership transfer: the instant the transferred paid period ends and the takeover starts billing, as an ISO 8601 timestamp — word the headline "Free until …". `null` everywhere else. - """ - - kind: CheckoutSessionBreakdownDisplayHeadlineKind = pydantic.Field() - """ - The headline's face: `amount` headlines the figure in `amount`; `trial` headlines the free-trial length off `trial_days`; `free` headlines the word — the served free signal or a membership transfer collecting nothing today (a renewing transfer states when its free stretch ends in `free_until`), never derived from zero prices (a promo covering the whole first charge is not a free plan). - """ - - original_amount: typing.Optional[Money] = pydantic.Field(default=None) - """ - The pre-promo figure to strike through beside `amount`, or `null` when no discount moved today's charge. - """ - - text: str = pydantic.Field() - """ - The headline in English — the fallback for a kind the surface cannot name. A surface that knows the kind renders its own wording from `amount`/`trial_days`/`free_until`. - """ - - trial_days: typing.Optional[int] = pydantic.Field(default=None) - """ - The free-trial length when `kind` is `trial`, in days. `null` on the other kinds. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_breakdown_display_headline_kind.py b/src/whop_sdk/types/checkout_session_breakdown_display_headline_kind.py deleted file mode 100644 index 3c5589ba..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_display_headline_kind.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBreakdownDisplayHeadlineKind = typing.Union[typing.Literal["amount", "trial", "free"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_breakdown_display_row.py b/src/whop_sdk/types/checkout_session_breakdown_display_row.py deleted file mode 100644 index 4b3b78ec..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_display_row.py +++ /dev/null @@ -1,51 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_breakdown_display_row_detail import CheckoutSessionBreakdownDisplayRowDetail -from .checkout_session_breakdown_display_row_kind import CheckoutSessionBreakdownDisplayRowKind -from .checkout_session_breakdown_display_row_status import CheckoutSessionBreakdownDisplayRowStatus -from .money import Money - - -class CheckoutSessionBreakdownDisplayRow(UniversalBaseModel): - amount: typing.Optional[Money] = pydantic.Field(default=None) - """ - The row's figure as a Money object, when it has one — what a surface formats in the buyer's locale. - """ - - detail: typing.Optional[CheckoutSessionBreakdownDisplayRowDetail] = pydantic.Field(default=None) - """ - The typed parameters this row's wording is built from — the localization rail. Absent when the kind needs none. - """ - - kind: CheckoutSessionBreakdownDisplayRowKind = pydantic.Field() - """ - Which row this is. Render a kind you know from `detail` in your own wording; render one you do not from `label` and `text` verbatim — never drop it. - """ - - label: typing.Optional[str] = pydantic.Field(default=None) - """ - The row's left side in English — the fallback for a kind the surface cannot name. Absent on a row that is a single line rather than a label/value pair (the headline's context). - """ - - status: typing.Optional[CheckoutSessionBreakdownDisplayRowStatus] = pydantic.Field(default=None) - """ - Present only on a row whose figure is still being calculated — render it in a loading state and expect `calculate_breakdown` to resolve it. - """ - - text: typing.Optional[str] = pydantic.Field(default=None) - """ - The row's value (or its whole line) in English — the fallback for a kind the surface cannot name. Absent while `status` is `pending`. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_breakdown_display_row_detail.py b/src/whop_sdk/types/checkout_session_breakdown_display_row_detail.py deleted file mode 100644 index 3efca7f8..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_display_row_detail.py +++ /dev/null @@ -1,89 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_breakdown_display_row_detail_applied import CheckoutSessionBreakdownDisplayRowDetailApplied -from .money import Money - - -class CheckoutSessionBreakdownDisplayRowDetail(UniversalBaseModel): - access_days: typing.Optional[int] = pydantic.Field(default=None) - """ - How many days of access a one-time purchase grants, when it expires. - """ - - access_until: typing.Optional[str] = pydantic.Field(default=None) - """ - When a transferred membership's access ends, as an ISO 8601 timestamp — the recipient gets the origin's REMAINING time, never a fresh grant of the plan's window. - """ - - applied: typing.Optional[CheckoutSessionBreakdownDisplayRowDetailApplied] = pydantic.Field(default=None) - """ - The tax row's application: `added` counts toward the total; `included` is already inside the prices and is disclosed, never added. - """ - - charge_at: typing.Optional[str] = pydantic.Field(default=None) - """ - The instant this row's charge lands, as an ISO 8601 timestamp — format it in the buyer's locale rather than deriving a date client-side. - """ - - code: typing.Optional[str] = pydantic.Field(default=None) - """ - The promo code (uppercased) whose coverage this row states — "Then your first month is free with FREETODAY". - """ - - initial_fee: typing.Optional[Money] = pydantic.Field(default=None) - """ - The one-off fee inside today's `due_today` charge — name it ("Due today — includes a one-time $50.00 fee") so the figure does not read as the recurring rate. - """ - - interval_days: typing.Optional[int] = pydantic.Field(default=None) - """ - Days between recurring charges, for wording the billing period (30 is monthly, 365 yearly). - """ - - invoice: typing.Optional[bool] = pydantic.Field(default=None) - """ - Present (and `true`) when this one-time payment collects a seller-issued invoice — word it as a bill ("Invoice — one-time payment.") beside the session's own due date, never as a storefront purchase. - """ - - paid_trial: typing.Optional[bool] = pydantic.Field(default=None) - """ - Present (and `true`) when the trial this row follows charges a fee today — the wording drops the word "trial" for the neutral "after N days", exactly as the legacy checkout worded a paid trial. - """ - - rate: typing.Optional[str] = pydantic.Field(default=None) - """ - The tax row's effective rate as a decimal fraction (`"0.0725"` is 7.25%), when the calculation stated one. - """ - - remaining_payments: typing.Optional[int] = pydantic.Field(default=None) - """ - How many payments are still AHEAD at this row's amount — today's paying receipt already consumed one of the plan's total, exactly as billing counts receipts. Word it as the future stream ("for 3 more payments"), never as the plan's total. - """ - - total_payments: typing.Optional[int] = pydantic.Field(default=None) - """ - An installment plan's PLAN-WIDE payment count, today's paying charge included — word it as the plan's total ("for a total of 4 payments"). Mutually exclusive with `remaining_payments`: a row states whichever count it means. - """ - - trial_days: typing.Optional[int] = pydantic.Field(default=None) - """ - The free-trial length this row speaks about, in days. - """ - - without_tax: typing.Optional[bool] = pydantic.Field(default=None) - """ - Present (and `true`) when this row's amount is stated before tax and the wording must say so — the checkout adds exclusive tax the future charge will carry on top. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_breakdown_display_row_detail_applied.py b/src/whop_sdk/types/checkout_session_breakdown_display_row_detail_applied.py deleted file mode 100644 index 354007d1..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_display_row_detail_applied.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBreakdownDisplayRowDetailApplied = typing.Union[typing.Literal["added", "included"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_breakdown_display_row_kind.py b/src/whop_sdk/types/checkout_session_breakdown_display_row_kind.py deleted file mode 100644 index 3bdcb56a..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_display_row_kind.py +++ /dev/null @@ -1,32 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBreakdownDisplayRowKind = typing.Union[ - typing.Literal[ - "then_starting", - "then_after_trial", - "due_today", - "period", - "one_time_payment", - "access_window", - "access_until", - "trial_window", - "waitlist_notice", - "waitlist_trial_notice", - "free_forever", - "tax_included", - "promo_free_period", - "initial_fee", - "renewal_fee", - "tax_today", - "total_due_today", - "total_if_accepted", - "total_due_starting", - "total_after_trial", - "post_promo", - "item_subtotal", - "service_fee", - ], - typing.Any, -] diff --git a/src/whop_sdk/types/checkout_session_breakdown_display_row_status.py b/src/whop_sdk/types/checkout_session_breakdown_display_row_status.py deleted file mode 100644 index 2933b3a6..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_display_row_status.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBreakdownDisplayRowStatus = typing.Union[typing.Literal["pending"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_breakdown_display_sections.py b/src/whop_sdk/types/checkout_session_breakdown_display_sections.py deleted file mode 100644 index d63898d0..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_display_sections.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_breakdown_display_row import CheckoutSessionBreakdownDisplayRow - - -class CheckoutSessionBreakdownDisplaySections(UniversalBaseModel): - charges: typing.List[CheckoutSessionBreakdownDisplayRow] - fee_breakdown: typing.List[CheckoutSessionBreakdownDisplayRow] - line_items: typing.List[CheckoutSessionBreakdownDisplayRow] - totals: typing.List[CheckoutSessionBreakdownDisplayRow] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_breakdown_line.py b/src/whop_sdk/types/checkout_session_breakdown_line.py deleted file mode 100644 index 38818bcc..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_line.py +++ /dev/null @@ -1,44 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_breakdown_line_kind import CheckoutSessionBreakdownLineKind -from .money import Money - - -class CheckoutSessionBreakdownLine(UniversalBaseModel): - amount: Money = pydantic.Field() - """ - The line's own total — `unit_amount` × `quantity`, before any adjustment. - """ - - description: str = pydantic.Field() - """ - What to show the buyer for this line. - """ - - kind: CheckoutSessionBreakdownLineKind = pydantic.Field() - """ - What this line is — `plan` today. New kinds arrive as checkout learns to sell more than one thing at once. - """ - - quantity: int = pydantic.Field() - """ - How many. - """ - - unit_amount: Money = pydantic.Field() - """ - Price of one, before any adjustment. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_breakdown_line_kind.py b/src/whop_sdk/types/checkout_session_breakdown_line_kind.py deleted file mode 100644 index e3ae7676..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_line_kind.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBreakdownLineKind = typing.Union[typing.Literal["plan"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_breakdown_upcoming.py b/src/whop_sdk/types/checkout_session_breakdown_upcoming.py deleted file mode 100644 index 14a25630..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_upcoming.py +++ /dev/null @@ -1,87 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .money import Money - - -class CheckoutSessionBreakdownUpcoming_Installments(UniversalBaseModel): - """ - One amount owed after today. `type` picks the shape — `one_time` is a single later charge, `recurring` an open-ended subscription, `installments` a fixed count of payments — and each variant carries only its own fields, so switching on `type` gives you exactly that entry's payload. - """ - - type: typing.Literal["installments"] = "installments" - amount: Money - charge_at: str - description: str - interval_days: int - post_promo_amount: typing.Optional[Money] = None - remaining: int - trial_days: typing.Optional[int] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class CheckoutSessionBreakdownUpcoming_OneTime(UniversalBaseModel): - """ - One amount owed after today. `type` picks the shape — `one_time` is a single later charge, `recurring` an open-ended subscription, `installments` a fixed count of payments — and each variant carries only its own fields, so switching on `type` gives you exactly that entry's payload. - """ - - type: typing.Literal["one_time"] = "one_time" - amount: Money - charge_at: str - description: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class CheckoutSessionBreakdownUpcoming_Recurring(UniversalBaseModel): - """ - One amount owed after today. `type` picks the shape — `one_time` is a single later charge, `recurring` an open-ended subscription, `installments` a fixed count of payments — and each variant carries only its own fields, so switching on `type` gives you exactly that entry's payload. - """ - - type: typing.Literal["recurring"] = "recurring" - amount: Money - charge_at: str - description: str - interval_days: int - post_promo_amount: typing.Optional[Money] = None - trial_days: typing.Optional[int] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -CheckoutSessionBreakdownUpcoming = typing_extensions.Annotated[ - typing.Union[ - CheckoutSessionBreakdownUpcoming_Installments, - CheckoutSessionBreakdownUpcoming_OneTime, - CheckoutSessionBreakdownUpcoming_Recurring, - ], - pydantic.Field(discriminator="type"), -] diff --git a/src/whop_sdk/types/checkout_session_breakdown_upcoming_installments.py b/src/whop_sdk/types/checkout_session_breakdown_upcoming_installments.py deleted file mode 100644 index 44f6bf44..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_upcoming_installments.py +++ /dev/null @@ -1,53 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .money import Money - - -class CheckoutSessionBreakdownUpcomingInstallments(UniversalBaseModel): - amount: Money = pydantic.Field() - """ - What the NEXT installment takes, priced as its receipt will be: the cycle for the quantity, the buyer service fee it carries, and the promo applied only when its duration still covers that charge. Stated before tax. - """ - - charge_at: str = pydantic.Field() - """ - When the next installment is charged, as an ISO 8601 timestamp. - """ - - description: str = pydantic.Field() - """ - What to show the buyer for this future charge. - """ - - interval_days: int = pydantic.Field() - """ - Days between installments. - """ - - post_promo_amount: typing.Optional[Money] = pydantic.Field(default=None) - """ - What each installment takes once the applied promo stops covering them — the plan's own installment price, stated like `amount` (quantity, buyer fee, before tax). Present only when `amount` is discounted by a promo that expires before the remaining installments do; absent when no promo discounts the next installment, and for a `forever` code. - """ - - remaining: int = pydantic.Field() - """ - How many of the plan's payments are LEFT after today. Only a charge that takes money consumes one — today's does when something is due now, while a free trial or a transfer leaves every payment ahead. - """ - - trial_days: typing.Optional[int] = pydantic.Field(default=None) - """ - Free-trial days before the first installment. Absent when the plan starts billing with this purchase. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_breakdown_upcoming_recurring.py b/src/whop_sdk/types/checkout_session_breakdown_upcoming_recurring.py deleted file mode 100644 index aab679f7..00000000 --- a/src/whop_sdk/types/checkout_session_breakdown_upcoming_recurring.py +++ /dev/null @@ -1,48 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .money import Money - - -class CheckoutSessionBreakdownUpcomingRecurring(UniversalBaseModel): - amount: Money = pydantic.Field() - """ - What the NEXT charge takes, priced as its receipt will be: the renewal for the quantity, the buyer service fee it carries, and the promo applied only when its duration still covers that charge — a `forever` code discounts every cycle, a `once` or `repeating` one only the paying charges it has left. Stated before tax. - """ - - charge_at: str = pydantic.Field() - """ - When the NEXT charge happens — a trial's end, a transfer's inherited period end, or the next cycle — as an ISO 8601 timestamp. - """ - - description: str = pydantic.Field() - """ - What to show the buyer for this future charge. - """ - - interval_days: int = pydantic.Field() - """ - Days between charges. - """ - - post_promo_amount: typing.Optional[Money] = pydantic.Field(default=None) - """ - What each charge takes once the applied promo stops covering renewals — the steady price the subscription returns to, priced like `amount` (quantity, buyer fee, before tax). Present only when `amount` is discounted by a promo that expires (a `once` code covering the first real charge, or a `repeating` window the schedule outlives — `promo.duration` says which). Absent when no promo discounts the next charge, and for a `forever` code, whose discount never ends. - """ - - trial_days: typing.Optional[int] = pydantic.Field(default=None) - """ - Free-trial days before the first charge. Absent when billing starts with this purchase — and on a membership transfer, which inherits the origin's clock and never re-trials. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_buyer_identity.py b/src/whop_sdk/types/checkout_session_buyer_identity.py deleted file mode 100644 index e44fe6af..00000000 --- a/src/whop_sdk/types/checkout_session_buyer_identity.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBuyerIdentity = typing.Union[typing.Literal["attributed", "authenticated"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_buyer_identity_method.py b/src/whop_sdk/types/checkout_session_buyer_identity_method.py deleted file mode 100644 index 7701d713..00000000 --- a/src/whop_sdk/types/checkout_session_buyer_identity_method.py +++ /dev/null @@ -1,10 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionBuyerIdentityMethod = typing.Union[ - typing.Literal[ - "confirmation_token_email", "buyer_email", "saved_payment_method", "session_intent", "post_purchase_claim" - ], - typing.Any, -] diff --git a/src/whop_sdk/types/checkout_session_complete_action.py b/src/whop_sdk/types/checkout_session_complete_action.py deleted file mode 100644 index c67ddedf..00000000 --- a/src/whop_sdk/types/checkout_session_complete_action.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_complete_action_kind import CheckoutSessionCompleteActionKind - - -class CheckoutSessionCompleteAction(UniversalBaseModel): - blocking: bool = pydantic.Field() - """ - Whether the sale depends on this. `true` stops the purchase until it is done — confirm refuses regardless of whether you ran it, so skipping it only costs the buyer an unexplained refusal. `false` is advisory: the purchase is already made and it stands whether or not the buyer ever does this, so the buyer may close the tab. - """ - - client_secret: str = pydantic.Field() - """ - The ATTEMPT's own credential — the payment's or the setup's, never the session's. Hand it to the payments element to finish the remaining ceremony. - """ - - kind: CheckoutSessionCompleteActionKind = pydantic.Field() - """ - What the ceremony finishes: `payment` for a charge with a step left, `setup` for a payment method still being saved — a paid waitlist vaults the card without charging it. Informational: the executor is the same either way, so run the secret regardless of a `kind` you do not recognize. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_complete_action_kind.py b/src/whop_sdk/types/checkout_session_complete_action_kind.py deleted file mode 100644 index 24cc67f6..00000000 --- a/src/whop_sdk/types/checkout_session_complete_action_kind.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionCompleteActionKind = typing.Union[typing.Literal["payment", "setup"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_confirm_error.py b/src/whop_sdk/types/checkout_session_confirm_error.py deleted file mode 100644 index af39d60a..00000000 --- a/src/whop_sdk/types/checkout_session_confirm_error.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_confirm_error_code import CheckoutSessionConfirmErrorCode - - -class CheckoutSessionConfirmError(UniversalBaseModel): - code: CheckoutSessionConfirmErrorCode = pydantic.Field() - """ - What stopped the confirm. The session: `session_expired`, `session_completed`, `confirm_in_progress`, `attestation_required`. The price: `quote_expired` (already refreshed), `quote_changed` (the stored quote is not what this confirm would charge — the buyer who resolved at confirm prices differently, e.g. a returning buyer skipped past the plan's free trial; the session is already re-quoted, so re-read it, show the new total, and confirm again), `rate_expired` (the exchange rate behind a local-currency price aged out — re-read the session for a fresh one). The payment method: `token_invalid`, `payment_method_unsupported`, `payment_method_unavailable` (a saved method the token names no longer exists in the buyer's wallet — collect a fresh one). What is being sold, and whether it may still be sold: `seller_unavailable`, `promo_invalid`, `shipping_address_required`, `custom_field_invalid` (a required question is unanswered, or an answer names a question this product does not ask), `plan_archived`, `product_archived`, `out_of_stock`, `purchases_disabled`, `blocked_country`, `custom_password` (the plan's purchase password is unanswered — update the session's `password` and confirm again), `waitlist_unavailable` (this waitlist cannot be joined as asked — the message says why). The buyer: `user_suspended`, `user_banned_from_whop`, `email_required`, `free_plan_already_owned`, `waitlist_entry_pending`, `waitlist_already_member`, and `buyer_ineligible` — an account-state refusal read by someone who never proved they hold that account, so which state stays undisclosed. The payment itself: `payment_failed`. And `engine_unavailable` for a session whose mode this checkout cannot charge yet. Every one of these is terminal for this attempt as it stands — a refusal the buyer can resolve by doing something arrives as `next_action` instead. - """ - - message: str = pydantic.Field() - """ - A human-readable explanation of the failure, safe to show the buyer. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_confirm_error_code.py b/src/whop_sdk/types/checkout_session_confirm_error_code.py deleted file mode 100644 index f48ecc07..00000000 --- a/src/whop_sdk/types/checkout_session_confirm_error_code.py +++ /dev/null @@ -1,39 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionConfirmErrorCode = typing.Union[ - typing.Literal[ - "session_expired", - "session_completed", - "attestation_required", - "quote_expired", - "quote_changed", - "rate_expired", - "token_invalid", - "confirm_in_progress", - "engine_unavailable", - "seller_unavailable", - "promo_invalid", - "payment_method_unsupported", - "payment_method_unavailable", - "shipping_address_required", - "custom_field_invalid", - "payment_failed", - "waitlist_unavailable", - "purchases_disabled", - "plan_archived", - "product_archived", - "out_of_stock", - "custom_password", - "blocked_country", - "user_suspended", - "user_banned_from_whop", - "email_required", - "free_plan_already_owned", - "waitlist_entry_pending", - "waitlist_already_member", - "buyer_ineligible", - ], - typing.Any, -] diff --git a/src/whop_sdk/types/checkout_session_cta_label.py b/src/whop_sdk/types/checkout_session_cta_label.py deleted file mode 100644 index 8ed8f81b..00000000 --- a/src/whop_sdk/types/checkout_session_cta_label.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionCtaLabel = typing.Union[ - typing.Literal["accept_transfer", "pay", "continue", "start_trial", "subscribe", "join_waitlist"], typing.Any -] diff --git a/src/whop_sdk/types/checkout_session_custom_field.py b/src/whop_sdk/types/checkout_session_custom_field.py deleted file mode 100644 index dfeeb9c2..00000000 --- a/src/whop_sdk/types/checkout_session_custom_field.py +++ /dev/null @@ -1,48 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_custom_field_field_type import CheckoutSessionCustomFieldFieldType - - -class CheckoutSessionCustomField(UniversalBaseModel): - description: typing.Optional[str] = pydantic.Field(default=None) - """ - The seller's longer explanation of the question, or `null`. - """ - - field_type: CheckoutSessionCustomFieldFieldType = pydantic.Field() - """ - What kind of input to render. `text` today. - """ - - id: str = pydantic.Field() - """ - The question's ID, prefixed `field_`. Echo it as the `id` of the matching `custom_field_responses` entry. - """ - - name: str = pydantic.Field() - """ - The question as the seller wrote it — the field's label. - """ - - placeholder: typing.Optional[str] = pydantic.Field(default=None) - """ - Placeholder text for the input, or `null`. - """ - - required: bool = pydantic.Field() - """ - Whether confirm refuses without an answer. An unanswered required question is refused with `custom_field_invalid`. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_custom_field_field_type.py b/src/whop_sdk/types/checkout_session_custom_field_field_type.py deleted file mode 100644 index dd001e73..00000000 --- a/src/whop_sdk/types/checkout_session_custom_field_field_type.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionCustomFieldFieldType = typing.Union[typing.Literal["text"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_entry.py b/src/whop_sdk/types/checkout_session_entry.py deleted file mode 100644 index 292fc485..00000000 --- a/src/whop_sdk/types/checkout_session_entry.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_entry_status import CheckoutSessionEntryStatus - - -class CheckoutSessionEntry(UniversalBaseModel): - id: str = pydantic.Field() - """ - The waitlist entry created by the confirm, prefixed `entry_`. - """ - - status: CheckoutSessionEntryStatus = pydantic.Field() - """ - Where the join stands. `succeeded` — the join stands (whether the seller accepts it is the entry resource's own story). `requires_action` — the card save has a step left, carried by `next_action`. `processing` — the save is being decided; hold. `failed` — the card save died: the buyer is NOT on the waitlist, and needs a fresh checkout to join. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_entry_status.py b/src/whop_sdk/types/checkout_session_entry_status.py deleted file mode 100644 index 45490026..00000000 --- a/src/whop_sdk/types/checkout_session_entry_status.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionEntryStatus = typing.Union[ - typing.Literal["requires_action", "processing", "succeeded", "failed"], typing.Any -] diff --git a/src/whop_sdk/types/checkout_session_item.py b/src/whop_sdk/types/checkout_session_item.py deleted file mode 100644 index 381c5e7f..00000000 --- a/src/whop_sdk/types/checkout_session_item.py +++ /dev/null @@ -1,52 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class CheckoutSessionItem(UniversalBaseModel): - description: typing.Optional[str] = pydantic.Field(default=None) - """ - The seller's longer description of the item, or `null`. Multi-line text as the seller wrote it, suited to a collapsible details block. - """ - - expiration_days: typing.Optional[int] = pydantic.Field(default=None) - """ - How many days of access a one-time purchase grants, or `null` when access does not expire (a renewing plan's access follows its billing instead). - """ - - headline: typing.Optional[str] = pydantic.Field(default=None) - """ - One line describing the item, or `null`. The checkout link's own description when the seller wrote one, otherwise the product's headline. - """ - - image_url: typing.Optional[str] = pydantic.Field(default=None) - """ - The item's square art image URL, or `null` when the seller uploaded none. - """ - - name: str = pydantic.Field() - """ - What this item is called, ready to render — the product's title, falling back to the seller's name. Never empty. - """ - - plan: str = pydantic.Field() - """ - The plan being purchased (`plan_…`). The plan is the price — sessions never carry client-asserted amounts. - """ - - quantity: int = pydantic.Field() - """ - How many of the plan the buyer is purchasing. At least 1. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_mode.py b/src/whop_sdk/types/checkout_session_mode.py deleted file mode 100644 index 535702c5..00000000 --- a/src/whop_sdk/types/checkout_session_mode.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionMode = typing.Union[typing.Literal["payment", "setup"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_next_action.py b/src/whop_sdk/types/checkout_session_next_action.py deleted file mode 100644 index 85ae787c..00000000 --- a/src/whop_sdk/types/checkout_session_next_action.py +++ /dev/null @@ -1,162 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_await_claim_action_state import CheckoutSessionAwaitClaimActionState -from .checkout_session_complete_action_kind import CheckoutSessionCompleteActionKind -from .checkout_session_upgrade_authentication_action_sign_in_intent import ( - CheckoutSessionUpgradeAuthenticationActionSignInIntent, -) - - -class CheckoutSessionNextAction_Authenticate(UniversalBaseModel): - """ - The ceremony to run. `type` picks the shape, and each type carries only the fields it needs, so switching on `type` gives you exactly that action's payload. Every type carries `blocking`, which says whether the sale depends on this one. - """ - - type: typing.Literal["authenticate"] = "authenticate" - blocking: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class CheckoutSessionNextAction_AwaitClaim(UniversalBaseModel): - """ - The ceremony to run. `type` picks the shape, and each type carries only the fields it needs, so switching on `type` gives you exactly that action's payload. Every type carries `blocking`, which says whether the sale depends on this one. - """ - - type: typing.Literal["await_claim"] = "await_claim" - blocking: bool - state: CheckoutSessionAwaitClaimActionState - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class CheckoutSessionNextAction_Complete(UniversalBaseModel): - """ - The ceremony to run. `type` picks the shape, and each type carries only the fields it needs, so switching on `type` gives you exactly that action's payload. Every type carries `blocking`, which says whether the sale depends on this one. - """ - - type: typing.Literal["complete"] = "complete" - blocking: bool - client_secret: str - kind: CheckoutSessionCompleteActionKind - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class CheckoutSessionNextAction_Redirect(UniversalBaseModel): - """ - The ceremony to run. `type` picks the shape, and each type carries only the fields it needs, so switching on `type` gives you exactly that action's payload. Every type carries `blocking`, which says whether the sale depends on this one. - """ - - type: typing.Literal["redirect"] = "redirect" - blocking: bool - destination_url: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class CheckoutSessionNextAction_UpgradeAuthentication(UniversalBaseModel): - """ - The ceremony to run. `type` picks the shape, and each type carries only the fields it needs, so switching on `type` gives you exactly that action's payload. Every type carries `blocking`, which says whether the sale depends on this one. - """ - - type: typing.Literal["upgrade_authentication"] = "upgrade_authentication" - blocking: bool - email: str - session_intent_id: typing.Optional[str] = None - sign_in_intent: CheckoutSessionUpgradeAuthenticationActionSignInIntent - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class CheckoutSessionNextAction_VerifyPhone(UniversalBaseModel): - """ - The ceremony to run. `type` picks the shape, and each type carries only the fields it needs, so switching on `type` gives you exactly that action's payload. Every type carries `blocking`, which says whether the sale depends on this one. - """ - - type: typing.Literal["verify_phone"] = "verify_phone" - blocking: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class CheckoutSessionNextAction_WaitForPayment(UniversalBaseModel): - """ - The ceremony to run. `type` picks the shape, and each type carries only the fields it needs, so switching on `type` gives you exactly that action's payload. Every type carries `blocking`, which says whether the sale depends on this one. - """ - - type: typing.Literal["wait_for_payment"] = "wait_for_payment" - blocking: bool - poll_after_seconds: int - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -CheckoutSessionNextAction = typing_extensions.Annotated[ - typing.Union[ - CheckoutSessionNextAction_Authenticate, - CheckoutSessionNextAction_AwaitClaim, - CheckoutSessionNextAction_Complete, - CheckoutSessionNextAction_Redirect, - CheckoutSessionNextAction_UpgradeAuthentication, - CheckoutSessionNextAction_VerifyPhone, - CheckoutSessionNextAction_WaitForPayment, - ], - pydantic.Field(discriminator="type"), -] diff --git a/src/whop_sdk/types/checkout_session_payment.py b/src/whop_sdk/types/checkout_session_payment.py deleted file mode 100644 index 9c9799bc..00000000 --- a/src/whop_sdk/types/checkout_session_payment.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_payment_status import CheckoutSessionPaymentStatus - - -class CheckoutSessionPayment(UniversalBaseModel): - id: str = pydantic.Field() - """ - The payment created by the confirm, prefixed `pay_`. - """ - - status: CheckoutSessionPaymentStatus = pydantic.Field() - """ - Where the payment stands, and the only honest reading of a completed checkout's outcome. `requires_action` — a step remains and `next_action` carries it. `processing` — accepted and settling (or deciding); hold. `succeeded` — the money moved. `failed` — the charge died (declined, expired, voided): the checkout did not go through, whatever the session's own `status` says, and the buyer needs a fresh checkout to try again. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_payment_status.py b/src/whop_sdk/types/checkout_session_payment_status.py deleted file mode 100644 index a4ff911c..00000000 --- a/src/whop_sdk/types/checkout_session_payment_status.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionPaymentStatus = typing.Union[ - typing.Literal["requires_action", "processing", "succeeded", "failed"], typing.Any -] diff --git a/src/whop_sdk/types/checkout_session_promo.py b/src/whop_sdk/types/checkout_session_promo.py deleted file mode 100644 index d2a26f6a..00000000 --- a/src/whop_sdk/types/checkout_session_promo.py +++ /dev/null @@ -1,50 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_promo_currency import CheckoutSessionPromoCurrency -from .checkout_session_promo_duration import CheckoutSessionPromoDuration -from .checkout_session_promo_promo_type import CheckoutSessionPromoPromoType - - -class CheckoutSessionPromo(UniversalBaseModel): - amount_off: float = pydantic.Field() - """ - What each covered charge is discounted by. Percentage discounts are represented as a decimal fraction; fixed-amount discounts are in `currency`. - """ - - code: str = pydantic.Field() - """ - The promo code, exactly as `promo_code` states it. - """ - - currency: typing.Optional[CheckoutSessionPromoCurrency] = pydantic.Field(default=None) - """ - Currency of a fixed-amount discount; `null` for a percentage one. - """ - - duration: CheckoutSessionPromoDuration = pydantic.Field() - """ - Which charges the discount covers: `forever` discounts every charge; `once` covers only the charge at purchase — the code is spent then even when it made that charge free, except on a free trial with nothing due today, where it holds until the trial's first real charge; `repeating` covers every charge landing within `number_of_intervals` calendar months of purchase. - """ - - number_of_intervals: typing.Optional[int] = pydantic.Field(default=None) - """ - How many calendar months of charges a `repeating` promo covers, counted from purchase — a renewal scheduled past that window bills full price however few charges came before it. `null` for the other durations. - """ - - promo_type: CheckoutSessionPromoPromoType = pydantic.Field() - """ - Whether the discount is percentage-based or a fixed amount. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_promo_currency.py b/src/whop_sdk/types/checkout_session_promo_currency.py deleted file mode 100644 index 5324c9f5..00000000 --- a/src/whop_sdk/types/checkout_session_promo_currency.py +++ /dev/null @@ -1,99 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionPromoCurrency = typing.Union[ - typing.Literal[ - "usd", - "sgd", - "inr", - "aud", - "brl", - "cad", - "dkk", - "eur", - "nok", - "gbp", - "sek", - "chf", - "hkd", - "huf", - "jpy", - "mxn", - "myr", - "pln", - "czk", - "nzd", - "aed", - "eth", - "ape", - "cop", - "ron", - "thb", - "bgn", - "idr", - "dop", - "php", - "try", - "krw", - "twd", - "vnd", - "pkr", - "clp", - "uyu", - "ars", - "zar", - "dzd", - "tnd", - "mad", - "kes", - "kwd", - "jod", - "all", - "xcd", - "amd", - "bsd", - "bhd", - "bob", - "bam", - "khr", - "crc", - "xof", - "egp", - "etb", - "gmd", - "ghs", - "gtq", - "gyd", - "ils", - "jmd", - "mop", - "mga", - "mur", - "mdl", - "mnt", - "nad", - "ngn", - "mkd", - "omr", - "pyg", - "pen", - "qar", - "rwf", - "sar", - "rsd", - "lkr", - "tzs", - "ttd", - "uzs", - "rub", - "btc", - "cny", - "usdt", - "kzt", - "awg", - "whop_usd", - "xau", - ], - typing.Any, -] diff --git a/src/whop_sdk/types/checkout_session_promo_duration.py b/src/whop_sdk/types/checkout_session_promo_duration.py deleted file mode 100644 index 57c3639a..00000000 --- a/src/whop_sdk/types/checkout_session_promo_duration.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionPromoDuration = typing.Union[typing.Literal["forever", "once", "repeating"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_promo_promo_type.py b/src/whop_sdk/types/checkout_session_promo_promo_type.py deleted file mode 100644 index 98efba39..00000000 --- a/src/whop_sdk/types/checkout_session_promo_promo_type.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionPromoPromoType = typing.Union[typing.Literal["percentage", "flat_amount"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_quote.py b/src/whop_sdk/types/checkout_session_quote.py deleted file mode 100644 index 55b8a0b4..00000000 --- a/src/whop_sdk/types/checkout_session_quote.py +++ /dev/null @@ -1,58 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_breakdown import CheckoutSessionBreakdown - - -class CheckoutSessionQuote(UniversalBaseModel): - base_amount: float = pydantic.Field() - """ - The total in `base_currency`, before conversion — what the seller prices in. The figure that is actually charged is `breakdown.total`, in `currency`. - """ - - base_currency: str = pydantic.Field() - """ - The seller's own currency for these items, lowercase. Equal to `currency` when no conversion applied. - """ - - breakdown: CheckoutSessionBreakdown = pydantic.Field() - """ - The same total, itemized — what is being bought, what changes the price, and what is owed later. The tax adjustment arrives `pending` here and resolves through `calculate_tax`, which answers with this same shape: render whichever you hold, preferring the calculated one. - """ - - currency: str = pydantic.Field() - """ - ISO currency the confirm will charge in, lowercase. This is the buyer's own currency whenever adaptive pricing applies — the card is charged in it, not shown a conversion of it. - """ - - exchange_rate: typing.Optional[float] = pydantic.Field(default=None) - """ - The locked rate `base_currency` was converted at, or `null` when the charge is in the seller's own currency. Fixed for the life of the quote. - """ - - expires_at: str = pydantic.Field() - """ - When this quote stops being chargeable, as an ISO 8601 timestamp. A converted quote expires with its exchange rate, which is sooner than an unconverted one. - """ - - quoted_at: str = pydantic.Field() - """ - When this quote was computed, as an ISO 8601 timestamp. A confirm against a stale quote is refused with `quote_expired` and the quote refreshes for the retry. - """ - - trial_skipped: bool = pydantic.Field() - """ - Whether this quote priced the plan's free trial as SKIPPED: the resolved buyer has held this plan before, so no trial applies and the full first price is due today. Tell the buyer so before they pay — the trial they can see on the plan is not theirs to start. `false` for a plan with no trial, and for a session whose buyer is not resolved yet: a returning buyer resolving at confirm is refused with `quote_changed` and this re-prices to `true` for the retry. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_redirect_action.py b/src/whop_sdk/types/checkout_session_redirect_action.py deleted file mode 100644 index 7bad2248..00000000 --- a/src/whop_sdk/types/checkout_session_redirect_action.py +++ /dev/null @@ -1,27 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class CheckoutSessionRedirectAction(UniversalBaseModel): - blocking: bool = pydantic.Field() - """ - Whether the sale depends on this. `true` stops the purchase until it is done — confirm refuses regardless of whether you ran it, so skipping it only costs the buyer an unexplained refusal. `false` is advisory: the purchase is already made and it stands whether or not the buyer ever does this, so the buyer may close the tab. - """ - - destination_url: str = pydantic.Field() - """ - Where to send the buyer. An absolute HTTP or HTTPS URL, resolved from the seller's post-purchase settings and already carrying the order's query parameters (`receipt_id`, `payment_id`, `checkout_status`, `status`, `state_id`) — navigate straight to it. Distinct from `return_url`, which is the payment provider's return leg. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_requirement.py b/src/whop_sdk/types/checkout_session_requirement.py deleted file mode 100644 index 94159ade..00000000 --- a/src/whop_sdk/types/checkout_session_requirement.py +++ /dev/null @@ -1,25 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_custom_field import CheckoutSessionCustomField -from .checkout_session_requirement_type import CheckoutSessionRequirementType - - -class CheckoutSessionRequirement(UniversalBaseModel): - fields: typing.Optional[typing.List[CheckoutSessionCustomField]] = None - type: CheckoutSessionRequirementType = pydantic.Field() - """ - What to collect. `custom_password` — the plan is password-protected: send the buyer's answer through update, and the entry disappears once it is right; confirm refuses while it stands. `email` — the buyer's email address; it identifies who the purchase is for, and confirm has no other way to resolve them. `terms` — explicit acceptance, sent as the `tos_accepted` attestation on confirm; show the seller's documents from `account.terms`. `custom_fields` — the seller's own questions, published in `fields`; answer them through `custom_field_responses`. `shipping_address` — a postal address for physical goods, set through `shipping_address`. `phone_number` — the seller collects buyer phone numbers: set one through update and it is recorded against the order; a missing number never refuses the confirm. The list is closed; new entries are added deliberately, so an unrecognized type is safe to skip. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_requirement_type.py b/src/whop_sdk/types/checkout_session_requirement_type.py deleted file mode 100644 index f0b09b88..00000000 --- a/src/whop_sdk/types/checkout_session_requirement_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionRequirementType = typing.Union[ - typing.Literal["custom_password", "email", "terms", "custom_fields", "shipping_address", "phone_number"], typing.Any -] diff --git a/src/whop_sdk/types/checkout_session_seller.py b/src/whop_sdk/types/checkout_session_seller.py deleted file mode 100644 index 490849fa..00000000 --- a/src/whop_sdk/types/checkout_session_seller.py +++ /dev/null @@ -1,48 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_seller_terms import CheckoutSessionSellerTerms - - -class CheckoutSessionSeller(UniversalBaseModel): - id: str = pydantic.Field() - """ - Account ID, prefixed `biz_`. - """ - - logo_url: typing.Optional[str] = pydantic.Field(default=None) - """ - The seller's logo image URL, or `null` when they have not uploaded one. - """ - - redirect_purchase_url: typing.Optional[str] = pydantic.Field(default=None) - """ - Where this seller sends buyers after any purchase, or `null`. The plan's and the checkout configuration's own redirects take precedence over it. - """ - - route: str = pydantic.Field() - """ - The seller's store-page slug — the `:route` in `whop.com/joined/:route`, which is where a purchase lands when nothing more specific is configured. - """ - - terms: CheckoutSessionSellerTerms = pydantic.Field() - """ - The seller's checkout legal surface: whether explicit acceptance is required, and the policy documents it covers. - """ - - title: str = pydantic.Field() - """ - The seller's public name, as the buyer knows them. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_seller_terms.py b/src/whop_sdk/types/checkout_session_seller_terms.py deleted file mode 100644 index 3131f503..00000000 --- a/src/whop_sdk/types/checkout_session_seller_terms.py +++ /dev/null @@ -1,42 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class CheckoutSessionSellerTerms(UniversalBaseModel): - eula_url: typing.Optional[str] = pydantic.Field(default=None) - """ - The seller's end-user licence agreement, or `null` if they have not published one. - """ - - privacy_policy_url: typing.Optional[str] = pydantic.Field(default=None) - """ - The seller's privacy policy, or `null` if they have not published one. - """ - - required: bool = pydantic.Field() - """ - Whether the buyer must explicitly accept the seller's terms before confirming. `true` means hold the confirm behind a deliberate act of acceptance; `false` means the buyer paying through a visible disclosure is the acceptance. - """ - - return_policy_url: typing.Optional[str] = pydantic.Field(default=None) - """ - The seller's return policy, or `null` if they have not published one. - """ - - terms_url: typing.Optional[str] = pydantic.Field(default=None) - """ - The seller's terms of service, or `null` if they have not published one. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_shipping_address.py b/src/whop_sdk/types/checkout_session_shipping_address.py deleted file mode 100644 index 17a58381..00000000 --- a/src/whop_sdk/types/checkout_session_shipping_address.py +++ /dev/null @@ -1,52 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class CheckoutSessionShippingAddress(UniversalBaseModel): - city: typing.Optional[str] = pydantic.Field(default=None) - """ - City name. - """ - - country: typing.Optional[str] = pydantic.Field(default=None) - """ - ISO 3166-1 alpha-2 country code, such as `US`. - """ - - line1: typing.Optional[str] = pydantic.Field(default=None) - """ - First line of the street address. - """ - - line2: typing.Optional[str] = pydantic.Field(default=None) - """ - Second line of the street address. - """ - - name: typing.Optional[str] = pydantic.Field(default=None) - """ - The recipient's full name, as it should appear on the shipping label. - """ - - postal_code: typing.Optional[str] = pydantic.Field(default=None) - """ - Postal or ZIP code. - """ - - state: typing.Optional[str] = pydantic.Field(default=None) - """ - State, province, or region code, such as `CA`. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_status.py b/src/whop_sdk/types/checkout_session_status.py deleted file mode 100644 index 666f5518..00000000 --- a/src/whop_sdk/types/checkout_session_status.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionStatus = typing.Union[typing.Literal["open", "completed", "expired"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_tax_behavior.py b/src/whop_sdk/types/checkout_session_tax_behavior.py deleted file mode 100644 index 7aa9f6d5..00000000 --- a/src/whop_sdk/types/checkout_session_tax_behavior.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionTaxBehavior = typing.Union[typing.Literal["inclusive", "exclusive"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_tax_id.py b/src/whop_sdk/types/checkout_session_tax_id.py deleted file mode 100644 index 2850f887..00000000 --- a/src/whop_sdk/types/checkout_session_tax_id.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_tax_id_type import CheckoutSessionTaxIdType - - -class CheckoutSessionTaxId(UniversalBaseModel): - type: CheckoutSessionTaxIdType = pydantic.Field() - """ - The registration's type, such as `eu_vat`. - """ - - value: str = pydantic.Field() - """ - The registration number, stored as the buyer entered it (whitespace removed). - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_tax_id_type.py b/src/whop_sdk/types/checkout_session_tax_id_type.py deleted file mode 100644 index 91ac66a3..00000000 --- a/src/whop_sdk/types/checkout_session_tax_id_type.py +++ /dev/null @@ -1,122 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionTaxIdType = typing.Union[ - typing.Literal[ - "ad_nrt", - "ao_tin", - "ar_cuit", - "al_tin", - "am_tin", - "aw_tin", - "au_abn", - "au_arn", - "eu_vat", - "az_tin", - "bs_tin", - "bh_vat", - "bd_bin", - "bb_tin", - "by_tin", - "bj_ifu", - "bo_tin", - "ba_tin", - "br_cnpj", - "br_cpf", - "bg_uic", - "bf_ifu", - "kh_tin", - "cm_niu", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cv_nif", - "cl_tin", - "cn_tin", - "co_nit", - "cd_nif", - "cr_tin", - "hr_oib", - "do_rcn", - "ec_ruc", - "eg_tin", - "sv_nit", - "et_tin", - "eu_oss_vat", - "ge_vat", - "gh_tin", - "de_stn", - "gb_vat", - "gn_nif", - "hk_br", - "hu_tin", - "is_vat", - "in_gst", - "id_npwp", - "il_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "kz_bin", - "ke_pin", - "kg_tin", - "la_tin", - "li_uid", - "li_vat", - "my_frp", - "my_itn", - "my_sst", - "mr_nif", - "mx_rfc", - "md_vat", - "me_pib", - "ma_vat", - "np_pan", - "nz_gst", - "ng_tin", - "mk_vat", - "no_vat", - "no_voec", - "om_vat", - "pe_ruc", - "ph_tin", - "pl_nip", - "ro_tin", - "ru_inn", - "ru_kpp", - "sa_vat", - "sn_ninea", - "rs_pib", - "sg_gst", - "sg_uen", - "si_tin", - "za_vat", - "kr_brn", - "es_cif", - "ch_uid", - "ch_vat", - "tw_vat", - "tj_tin", - "tz_vat", - "th_vat", - "tr_tin", - "ug_tin", - "ua_vat", - "ae_trn", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "zm_tin", - "zw_tin", - "sr_fin", - "xi_vat", - ], - typing.Any, -] diff --git a/src/whop_sdk/types/checkout_session_three_ds_level.py b/src/whop_sdk/types/checkout_session_three_ds_level.py deleted file mode 100644 index df851238..00000000 --- a/src/whop_sdk/types/checkout_session_three_ds_level.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionThreeDsLevel = typing.Union[typing.Literal["mandate_challenge", "frictionless"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_transfer.py b/src/whop_sdk/types/checkout_session_transfer.py deleted file mode 100644 index d2d5e353..00000000 --- a/src/whop_sdk/types/checkout_session_transfer.py +++ /dev/null @@ -1,32 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class CheckoutSessionTransfer(UniversalBaseModel): - code: str = pydantic.Field() - """ - The 40-character transfer code this checkout was opened from — the same value the link carried. - """ - - origin_expires_at: typing.Optional[str] = pydantic.Field(default=None) - """ - When the transferred membership's access expires, as an ISO 8601 timestamp, or `null` when it does not. The recipient inherits this — a transfer moves the remaining time, it does not restart it. - """ - - origin_renewal_period_end: typing.Optional[str] = pydantic.Field(default=None) - """ - When the transferred membership's current billing period ends, as an ISO 8601 timestamp, or `null` for a non-renewing membership. The recipient's first renewal charge falls here — nothing is charged at the transfer itself. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_upgrade_authentication_action.py b/src/whop_sdk/types/checkout_session_upgrade_authentication_action.py deleted file mode 100644 index a4db1cf8..00000000 --- a/src/whop_sdk/types/checkout_session_upgrade_authentication_action.py +++ /dev/null @@ -1,40 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .checkout_session_upgrade_authentication_action_sign_in_intent import ( - CheckoutSessionUpgradeAuthenticationActionSignInIntent, -) - - -class CheckoutSessionUpgradeAuthenticationAction(UniversalBaseModel): - blocking: bool = pydantic.Field() - """ - Whether the sale depends on this. `true` stops the purchase until it is done — confirm refuses regardless of whether you ran it, so skipping it only costs the buyer an unexplained refusal. `false` is advisory: the purchase is already made and it stands whether or not the buyer ever does this, so the buyer may close the tab. - """ - - email: str = pydantic.Field() - """ - The address the sign-in starts with — the buyer's own, resolved by this checkout. Pass it to the session-intent create; the one-time code goes to this inbox, and holding that inbox is the entire proof. - """ - - session_intent_id: typing.Optional[str] = pydantic.Field(default=None) - """ - The continuation, when this reader can take it: the id (`ses_…`) of the buyer's own mid-checkout sign-in, named only when the read presented the credential that sign-in's verify installed and the sign-in can still be finished. Skip the create and the verify — the emailed factor is already proven — and call THIS intent's `upgrade` endpoint naming the checkout session: on a first-party page the same credential authorizes it with no bearer at all, and the login collects only what it still owes (nothing, or the account's second factor). `null` runs the full recipe; a refused continuation is answered the same way, by falling back to it. - """ - - sign_in_intent: CheckoutSessionUpgradeAuthenticationActionSignInIntent = pydantic.Field() - """ - The `intent` to declare on the session-intent create. Declaring it is what keeps the verification credential checkout-scoped — the full login is minted only by the upgrade call, never by the code alone. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_upgrade_authentication_action_sign_in_intent.py b/src/whop_sdk/types/checkout_session_upgrade_authentication_action_sign_in_intent.py deleted file mode 100644 index 8eadbc02..00000000 --- a/src/whop_sdk/types/checkout_session_upgrade_authentication_action_sign_in_intent.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CheckoutSessionUpgradeAuthenticationActionSignInIntent = typing.Union[typing.Literal["payment"], typing.Any] diff --git a/src/whop_sdk/types/checkout_session_verify_phone_action.py b/src/whop_sdk/types/checkout_session_verify_phone_action.py deleted file mode 100644 index 5141792e..00000000 --- a/src/whop_sdk/types/checkout_session_verify_phone_action.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class CheckoutSessionVerifyPhoneAction(UniversalBaseModel): - blocking: bool = pydantic.Field() - """ - Whether the sale depends on this. `true` stops the purchase until it is done — confirm refuses regardless of whether you ran it, so skipping it only costs the buyer an unexplained refusal. `false` is advisory: the purchase is already made and it stands whether or not the buyer ever does this, so the buyer may close the tab. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/checkout_session_wait_for_payment_action.py b/src/whop_sdk/types/checkout_session_wait_for_payment_action.py deleted file mode 100644 index 3f941141..00000000 --- a/src/whop_sdk/types/checkout_session_wait_for_payment_action.py +++ /dev/null @@ -1,27 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class CheckoutSessionWaitForPaymentAction(UniversalBaseModel): - blocking: bool = pydantic.Field() - """ - Whether the sale depends on this. `true` stops the purchase until it is done — confirm refuses regardless of whether you ran it, so skipping it only costs the buyer an unexplained refusal. `false` is advisory: the purchase is already made and it stands whether or not the buyer ever does this, so the buyer may close the tab. - """ - - poll_after_seconds: int = pydantic.Field() - """ - How long to hold before reading the session again, in seconds. A hint for the next read's timing, not a budget: how long a surface is willing to keep the buyer waiting before saying "we'll email you when it clears" is the surface's own call. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/ledger_account_payout_account_details.py b/src/whop_sdk/types/ledger_account_payout_account_details.py index 0df6db46..6af584eb 100644 --- a/src/whop_sdk/types/ledger_account_payout_account_details.py +++ b/src/whop_sdk/types/ledger_account_payout_account_details.py @@ -60,7 +60,7 @@ class LedgerAccountPayoutAccountDetails(UniversalBaseModel): status: typing.Optional[PayoutAccountCalculatedStatuses] = pydantic.Field(default=None) """ - The granular calculated status of the payout account reflecting its current KYC and withdrawal readiness state. + The granular calculated status of the payout account reflecting its current KYC and payout readiness state. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/ledger_activity.py b/src/whop_sdk/types/ledger_activity.py index d4021d8a..65043b09 100644 --- a/src/whop_sdk/types/ledger_activity.py +++ b/src/whop_sdk/types/ledger_activity.py @@ -27,7 +27,7 @@ class LedgerActivity(UniversalBaseModel): available_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - ISO 8601 timestamp these funds became (or are scheduled to become) withdrawable: the posted time for already-settled funds, or 00:00:00 UTC on the scheduled release date for pending funds. Present only on inflows entering the balance (payments, top-ups, incoming transfers/affiliate); null on withdrawals, refunds, disputes and on-chain rows. The available_after/before filters window on its UTC settlement date. + ISO 8601 timestamp these funds became (or are scheduled to become) withdrawable: the posted time for already-settled funds, or 00:00:00 UTC on the scheduled release date for pending funds. Present only on inflows entering the balance (payments, top-ups, incoming transfers/affiliate); null on payouts, refunds, disputes and on-chain rows. The available_after/before filters window on its UTC settlement date. """ created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) @@ -61,11 +61,36 @@ class LedgerActivity(UniversalBaseModel): Payment related to this ledger activity. Included when rich resource hydration is enabled and the movement is tied to a payment. """ + payment_id: typing.Optional[str] = pydantic.Field(default=None) + """ + Payment ID for any payment-related activity, including refunds and disputes. + """ + + plan_id: typing.Optional[str] = pydantic.Field(default=None) + """ + ID of the plan associated with the payment, when applicable. + """ + + plan_name: typing.Optional[str] = pydantic.Field(default=None) + """ + Name of the plan associated with the payment, when applicable. + """ + posted_at: dt.datetime = pydantic.Field() """ When the activity posted to the ledger. """ + product_id: typing.Optional[str] = pydantic.Field(default=None) + """ + ID of the product associated with the payment, when applicable. + """ + + product_name: typing.Optional[str] = pydantic.Field(default=None) + """ + Name of the product associated with the payment, when applicable. + """ + resource: typing.Optional[LedgerActivityResource] = pydantic.Field(default=None) """ Resource associated with this ledger activity. @@ -76,6 +101,21 @@ class LedgerActivity(UniversalBaseModel): Source of this ledger activity. """ + user_email: typing.Optional[str] = pydantic.Field(default=None) + """ + Email of the customer associated with the payment. Requires member:email:read. + """ + + user_id: typing.Optional[str] = pydantic.Field(default=None) + """ + ID of the customer associated with the payment. + """ + + user_name: typing.Optional[str] = pydantic.Field(default=None) + """ + Display name of the customer associated with the payment. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/whop_sdk/types/ledger_activity_payment.py b/src/whop_sdk/types/ledger_activity_payment.py index 1daeae45..5a8c94f0 100644 --- a/src/whop_sdk/types/ledger_activity_payment.py +++ b/src/whop_sdk/types/ledger_activity_payment.py @@ -6,6 +6,9 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .ledger_activity_payment_object import LedgerActivityPaymentObject +from .ledger_activity_payment_plan import LedgerActivityPaymentPlan +from .ledger_activity_payment_product import LedgerActivityPaymentProduct +from .ledger_activity_payment_user import LedgerActivityPaymentUser from .money import Money @@ -46,6 +49,21 @@ class LedgerActivityPayment(UniversalBaseModel): Processor that handled the payment, such as `stripe`. """ + plan: typing.Optional[LedgerActivityPaymentPlan] = pydantic.Field(default=None) + """ + Plan associated with the payment, when applicable. + """ + + product: typing.Optional[LedgerActivityPaymentProduct] = pydantic.Field(default=None) + """ + Product associated with the payment, when applicable. + """ + + user: typing.Optional[LedgerActivityPaymentUser] = pydantic.Field(default=None) + """ + Customer associated with the payment. Email requires member:email:read. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/whop_sdk/types/checkout_session_custom_field_response.py b/src/whop_sdk/types/ledger_activity_payment_plan.py similarity index 66% rename from src/whop_sdk/types/checkout_session_custom_field_response.py rename to src/whop_sdk/types/ledger_activity_payment_plan.py index 4291f1a6..999aa309 100644 --- a/src/whop_sdk/types/checkout_session_custom_field_response.py +++ b/src/whop_sdk/types/ledger_activity_payment_plan.py @@ -6,15 +6,19 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class CheckoutSessionCustomFieldResponse(UniversalBaseModel): +class LedgerActivityPaymentPlan(UniversalBaseModel): + """ + Plan associated with the payment, when applicable. + """ + id: str = pydantic.Field() """ - The plan custom field this answers, prefixed `field_` — the `id` of the matching entry published by the `custom_fields` requirement. + Plan ID, prefixed `plan_`. """ - value: str = pydantic.Field() + name: typing.Optional[str] = pydantic.Field(default=None) """ - The buyer's answer, as typed. + Plan name. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance_account_logo.py b/src/whop_sdk/types/ledger_activity_payment_product.py similarity index 62% rename from src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance_account_logo.py rename to src/whop_sdk/types/ledger_activity_payment_product.py index 60b6791f..ccf35b41 100644 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance_account_logo.py +++ b/src/whop_sdk/types/ledger_activity_payment_product.py @@ -6,14 +6,19 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccountLogo(UniversalBaseModel): +class LedgerActivityPaymentProduct(UniversalBaseModel): """ - The company's logo. + Product associated with the payment, when applicable. """ - url: typing.Optional[str] = pydantic.Field(default=None) + id: str = pydantic.Field() """ - A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps. + Product ID, prefixed `prod_`. + """ + + name: str = pydantic.Field() + """ + Product name. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/checkout_session_breakdown_upcoming_one_time.py b/src/whop_sdk/types/ledger_activity_payment_user.py similarity index 56% rename from src/whop_sdk/types/checkout_session_breakdown_upcoming_one_time.py rename to src/whop_sdk/types/ledger_activity_payment_user.py index 76e7ce15..d507af12 100644 --- a/src/whop_sdk/types/checkout_session_breakdown_upcoming_one_time.py +++ b/src/whop_sdk/types/ledger_activity_payment_user.py @@ -4,23 +4,26 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .money import Money -class CheckoutSessionBreakdownUpcomingOneTime(UniversalBaseModel): - amount: Money = pydantic.Field() +class LedgerActivityPaymentUser(UniversalBaseModel): """ - What the charge takes. + Customer associated with the payment. Email requires member:email:read. """ - charge_at: str = pydantic.Field() + email: typing.Optional[str] = pydantic.Field(default=None) """ - When it is charged, as an ISO 8601 timestamp. + Customer email, or null without member:email:read. """ - description: str = pydantic.Field() + id: str = pydantic.Field() """ - What to show the buyer for this future charge. + Customer ID, prefixed `user_`. + """ + + name: str = pydantic.Field() + """ + Customer display name. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/ledger_activity_source.py b/src/whop_sdk/types/ledger_activity_source.py index 3bc85ac5..a83c65cd 100644 --- a/src/whop_sdk/types/ledger_activity_source.py +++ b/src/whop_sdk/types/ledger_activity_source.py @@ -16,7 +16,7 @@ class LedgerActivitySource(UniversalBaseModel): amount_float: typing.Optional[float] = pydantic.Field(default=None) """ - Withdrawal amount as a decimal number in the destination currency (withdrawal sources only; requires payout:withdrawal:read). + Payout amount as a decimal number in the destination currency (payout sources only; requires payout:withdrawal:read). """ card_brand: typing.Optional[str] = pydantic.Field(default=None) @@ -36,12 +36,12 @@ class LedgerActivitySource(UniversalBaseModel): created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - Withdrawal creation time as an ISO 8601 timestamp (withdrawal sources only; requires payout:withdrawal:read). + Payout creation time as an ISO 8601 timestamp (payout sources only; requires payout:withdrawal:read). """ estimated_arrival: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - Estimated arrival as an ISO 8601 timestamp (withdrawal sources only; requires payout:withdrawal:read). + Estimated arrival as an ISO 8601 timestamp (payout sources only; requires payout:withdrawal:read). """ from_amount: typing.Optional[str] = pydantic.Field(default=None) @@ -58,7 +58,7 @@ class LedgerActivitySource(UniversalBaseModel): object: str payer_name: typing.Optional[str] = pydantic.Field(default=None) """ - Name of the entity processing the payout (withdrawal sources only; requires payout:withdrawal:read). + Name of the entity processing the payout (payout sources only; requires payout:withdrawal:read). """ payment_amount: typing.Optional[Money] = pydantic.Field(default=None) @@ -78,17 +78,22 @@ class LedgerActivitySource(UniversalBaseModel): payout_destination: typing.Optional[LedgerActivitySourcePayoutDestination] = pydantic.Field(default=None) """ - Payout destination display info (withdrawal sources only). + Payout destination display info (payout sources only). """ payout_token_nickname: typing.Optional[str] = pydantic.Field(default=None) """ - Saved payout destination nickname (withdrawal sources only). + Saved payout destination nickname (payout sources only). """ reason: typing.Optional[str] = pydantic.Field(default=None) """ - Why the activity happened. On transfer sources this is the transfer reason, for example pool_top_up or bounty_return. On withdrawal sources it explains why the withdrawal was canceled, denied, or failed (requires payout:withdrawal:read); null while the withdrawal is progressing normally. + Why the activity happened. On transfer sources this is the transfer reason, for example pool_top_up or bounty_return. On payout sources it explains why the payout was canceled, denied, or failed (requires payout:withdrawal:read); null while the payout is progressing normally. + """ + + risk_review_hold: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether this payout is currently held for manual risk review (payout sources only; requires payout:withdrawal:read). """ sender_address: typing.Optional[str] = pydantic.Field(default=None) @@ -98,7 +103,7 @@ class LedgerActivitySource(UniversalBaseModel): status: typing.Optional[str] = pydantic.Field(default=None) """ - Lifecycle status. On withdrawal sources this is the withdrawal status (requires payout:withdrawal:read); on airdrop_link sources it is the claim-link status (ungated); on payment and top-up sources it is the friendly payment status such as succeeded/pending/failed (ungated). + Lifecycle status. On payout sources this is the payout status (requires payout:withdrawal:read); on airdrop_link sources it is the claim-link status (ungated); on payment and top-up sources it is the friendly payment status such as succeeded/pending/failed (ungated). """ to_amount: typing.Optional[str] = pydantic.Field(default=None) diff --git a/src/whop_sdk/types/ledger_activity_source_payout_destination.py b/src/whop_sdk/types/ledger_activity_source_payout_destination.py index ad41af15..a0cfc584 100644 --- a/src/whop_sdk/types/ledger_activity_source_payout_destination.py +++ b/src/whop_sdk/types/ledger_activity_source_payout_destination.py @@ -8,7 +8,7 @@ class LedgerActivitySourcePayoutDestination(UniversalBaseModel): """ - Payout destination display info (withdrawal sources only). + Payout destination display info (payout sources only). """ icon_url: typing.Optional[str] = None diff --git a/src/whop_sdk/types/payment_bank_transfer.py b/src/whop_sdk/types/payment_bank_transfer.py index 006f3a66..025cafe4 100644 --- a/src/whop_sdk/types/payment_bank_transfer.py +++ b/src/whop_sdk/types/payment_bank_transfer.py @@ -28,6 +28,11 @@ class PaymentBankTransfer(UniversalBaseModel): The kind of account receiving the transfer, such as a checking account, in the local system's own vocabulary. """ + bank_address: typing.Optional[str] = pydantic.Field(default=None) + """ + The receiving bank's address. + """ + bank_branch: typing.Optional[str] = pydantic.Field(default=None) """ The receiving branch, where the local system routes by branch. @@ -78,6 +83,11 @@ class PaymentBankTransfer(UniversalBaseModel): The reference the buyer must attach to the transfer so it can be matched to this payment. """ + routing_number: typing.Optional[str] = pydantic.Field(default=None) + """ + The receiving bank's routing number for US transfers. + """ + secondary_account_number: typing.Optional[str] = pydantic.Field(default=None) """ A second account number, where the rail publishes the same destination in more than one format. diff --git a/src/whop_sdk/types/payment_method.py b/src/whop_sdk/types/payment_method.py index 4404a984..6d5e6f88 100644 --- a/src/whop_sdk/types/payment_method.py +++ b/src/whop_sdk/types/payment_method.py @@ -15,10 +15,6 @@ from .payment_method_cashapp_payment_method_icons import PaymentMethodCashappPaymentMethodIcons from .payment_method_ideal_payment_method_icons import PaymentMethodIdealPaymentMethodIcons from .payment_method_ideal_payment_method_ideal import PaymentMethodIdealPaymentMethodIdeal -from .payment_method_platform_balance_payment_method_icons import PaymentMethodPlatformBalancePaymentMethodIcons -from .payment_method_platform_balance_payment_method_platform_balance import ( - PaymentMethodPlatformBalancePaymentMethodPlatformBalance, -) from .payment_method_sepa_debit_payment_method_icons import PaymentMethodSepaDebitPaymentMethodIcons from .payment_method_sepa_debit_payment_method_sepa_debit import PaymentMethodSepaDebitPaymentMethodSepaDebit from .payment_method_types import PaymentMethodTypes @@ -136,24 +132,6 @@ class Config: extra = pydantic.Extra.allow -class PaymentMethod_PlatformBalancePaymentMethod(UniversalBaseModel): - typename: typing.Literal["PlatformBalancePaymentMethod"] = "PlatformBalancePaymentMethod" - created_at: dt.datetime - icons: PaymentMethodPlatformBalancePaymentMethodIcons - id: str - payment_method_type: PaymentMethodTypes - platform_balance: PaymentMethodPlatformBalancePaymentMethodPlatformBalance - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - PaymentMethod = typing_extensions.Annotated[ typing.Union[ PaymentMethod_BasePaymentMethod, @@ -162,7 +140,6 @@ class Config: PaymentMethod_CashappPaymentMethod, PaymentMethod_IdealPaymentMethod, PaymentMethod_SepaDebitPaymentMethod, - PaymentMethod_PlatformBalancePaymentMethod, ], pydantic.Field(discriminator="typename"), ] diff --git a/src/whop_sdk/types/payment_method_list_item.py b/src/whop_sdk/types/payment_method_list_item.py index 368d7e51..dceefd6c 100644 --- a/src/whop_sdk/types/payment_method_list_item.py +++ b/src/whop_sdk/types/payment_method_list_item.py @@ -15,12 +15,6 @@ from .payment_method_list_item_cashapp_payment_method_icons import PaymentMethodListItemCashappPaymentMethodIcons from .payment_method_list_item_ideal_payment_method_icons import PaymentMethodListItemIdealPaymentMethodIcons from .payment_method_list_item_ideal_payment_method_ideal import PaymentMethodListItemIdealPaymentMethodIdeal -from .payment_method_list_item_platform_balance_payment_method_icons import ( - PaymentMethodListItemPlatformBalancePaymentMethodIcons, -) -from .payment_method_list_item_platform_balance_payment_method_platform_balance import ( - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalance, -) from .payment_method_list_item_sepa_debit_payment_method_icons import PaymentMethodListItemSepaDebitPaymentMethodIcons from .payment_method_list_item_sepa_debit_payment_method_sepa_debit import ( PaymentMethodListItemSepaDebitPaymentMethodSepaDebit, @@ -142,24 +136,6 @@ class Config: extra = pydantic.Extra.allow -class PaymentMethodListItem_PlatformBalancePaymentMethod(UniversalBaseModel): - typename: typing.Literal["PlatformBalancePaymentMethod"] = "PlatformBalancePaymentMethod" - created_at: dt.datetime - icons: PaymentMethodListItemPlatformBalancePaymentMethodIcons - id: str - payment_method_type: PaymentMethodTypes - platform_balance: PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalance - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - PaymentMethodListItem = typing_extensions.Annotated[ typing.Union[ PaymentMethodListItem_BasePaymentMethod, @@ -168,7 +144,6 @@ class Config: PaymentMethodListItem_CashappPaymentMethod, PaymentMethodListItem_IdealPaymentMethod, PaymentMethodListItem_SepaDebitPaymentMethod, - PaymentMethodListItem_PlatformBalancePaymentMethod, ], pydantic.Field(discriminator="typename"), ] diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method.py deleted file mode 100644 index 66c5c78e..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method.py +++ /dev/null @@ -1,54 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_list_item_platform_balance_payment_method_icons import ( - PaymentMethodListItemPlatformBalancePaymentMethodIcons, -) -from .payment_method_list_item_platform_balance_payment_method_platform_balance import ( - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalance, -) -from .payment_method_types import PaymentMethodTypes - - -class PaymentMethodListItemPlatformBalancePaymentMethod(UniversalBaseModel): - """ - A Whop balance the buyer can pay with — their own, or an account's they hold permission to spend. Charged by naming its ledger id on a `saved` confirmation token — it is a live wallet, not a stored credential, so it cannot be vaulted or charged off-session. - """ - - created_at: dt.datetime = pydantic.Field() - """ - The time of the event in ISO 8601 UTC format with millisecond precision - """ - - icons: PaymentMethodListItemPlatformBalancePaymentMethodIcons = pydantic.Field() - """ - Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art. - """ - - id: str = pydantic.Field() - """ - Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) input value will be accepted as an ID. - """ - - payment_method_type: PaymentMethodTypes = pydantic.Field() - """ - The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit). - """ - - platform_balance: PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalance = pydantic.Field() - """ - What is available to spend, and whether the account may spend it. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons.py deleted file mode 100644 index a4b443d5..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons.py +++ /dev/null @@ -1,37 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_list_item_platform_balance_payment_method_icons_card import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsCard, -) -from .payment_method_list_item_platform_balance_payment_method_icons_square import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsSquare, -) - - -class PaymentMethodListItemPlatformBalancePaymentMethodIcons(UniversalBaseModel): - """ - Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art. - """ - - card: PaymentMethodListItemPlatformBalancePaymentMethodIconsCard = pydantic.Field() - """ - The credit-card-proportioned tile (48x30). - """ - - square: PaymentMethodListItemPlatformBalancePaymentMethodIconsSquare = pydantic.Field() - """ - The square tile (32x32). - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_card.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_card.py deleted file mode 100644 index 86be7b06..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_card.py +++ /dev/null @@ -1,37 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_list_item_platform_balance_payment_method_icons_card_dark import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsCardDark, -) -from .payment_method_list_item_platform_balance_payment_method_icons_card_light import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsCardLight, -) - - -class PaymentMethodListItemPlatformBalancePaymentMethodIconsCard(UniversalBaseModel): - """ - The credit-card-proportioned tile (48x30). - """ - - dark: PaymentMethodListItemPlatformBalancePaymentMethodIconsCardDark = pydantic.Field() - """ - The colorway for dark surfaces. - """ - - light: PaymentMethodListItemPlatformBalancePaymentMethodIconsCardLight = pydantic.Field() - """ - The colorway for light surfaces. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_card_dark.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_card_dark.py deleted file mode 100644 index 760431b1..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_card_dark.py +++ /dev/null @@ -1,55 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata - - -class PaymentMethodListItemPlatformBalancePaymentMethodIconsCardDark(UniversalBaseModel): - """ - The colorway for dark surfaces. - """ - - png1x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_1x"), - pydantic.Field(alias="png_1x", description="Raster fallback at the shape's native size."), - ] - """ - Raster fallback at the shape's native size. - """ - - png2x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_2x"), - pydantic.Field(alias="png_2x", description="Raster fallback at double density."), - ] - """ - Raster fallback at double density. - """ - - png4x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_4x"), - pydantic.Field(alias="png_4x", description="Raster fallback at quadruple density."), - ] - """ - Raster fallback at quadruple density. - """ - - svg: str = pydantic.Field() - """ - The vector file. Prefer this everywhere SVG renders. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_card_light.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_card_light.py deleted file mode 100644 index e268d5d0..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_card_light.py +++ /dev/null @@ -1,55 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata - - -class PaymentMethodListItemPlatformBalancePaymentMethodIconsCardLight(UniversalBaseModel): - """ - The colorway for light surfaces. - """ - - png1x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_1x"), - pydantic.Field(alias="png_1x", description="Raster fallback at the shape's native size."), - ] - """ - Raster fallback at the shape's native size. - """ - - png2x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_2x"), - pydantic.Field(alias="png_2x", description="Raster fallback at double density."), - ] - """ - Raster fallback at double density. - """ - - png4x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_4x"), - pydantic.Field(alias="png_4x", description="Raster fallback at quadruple density."), - ] - """ - Raster fallback at quadruple density. - """ - - svg: str = pydantic.Field() - """ - The vector file. Prefer this everywhere SVG renders. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_square.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_square.py deleted file mode 100644 index 549b0895..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_square.py +++ /dev/null @@ -1,37 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_list_item_platform_balance_payment_method_icons_square_dark import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareDark, -) -from .payment_method_list_item_platform_balance_payment_method_icons_square_light import ( - PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareLight, -) - - -class PaymentMethodListItemPlatformBalancePaymentMethodIconsSquare(UniversalBaseModel): - """ - The square tile (32x32). - """ - - dark: PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareDark = pydantic.Field() - """ - The colorway for dark surfaces. - """ - - light: PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareLight = pydantic.Field() - """ - The colorway for light surfaces. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_square_dark.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_square_dark.py deleted file mode 100644 index 7cd1914c..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_square_dark.py +++ /dev/null @@ -1,55 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata - - -class PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareDark(UniversalBaseModel): - """ - The colorway for dark surfaces. - """ - - png1x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_1x"), - pydantic.Field(alias="png_1x", description="Raster fallback at the shape's native size."), - ] - """ - Raster fallback at the shape's native size. - """ - - png2x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_2x"), - pydantic.Field(alias="png_2x", description="Raster fallback at double density."), - ] - """ - Raster fallback at double density. - """ - - png4x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_4x"), - pydantic.Field(alias="png_4x", description="Raster fallback at quadruple density."), - ] - """ - Raster fallback at quadruple density. - """ - - svg: str = pydantic.Field() - """ - The vector file. Prefer this everywhere SVG renders. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_square_light.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_square_light.py deleted file mode 100644 index b946c920..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_icons_square_light.py +++ /dev/null @@ -1,55 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata - - -class PaymentMethodListItemPlatformBalancePaymentMethodIconsSquareLight(UniversalBaseModel): - """ - The colorway for light surfaces. - """ - - png1x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_1x"), - pydantic.Field(alias="png_1x", description="Raster fallback at the shape's native size."), - ] - """ - Raster fallback at the shape's native size. - """ - - png2x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_2x"), - pydantic.Field(alias="png_2x", description="Raster fallback at double density."), - ] - """ - Raster fallback at double density. - """ - - png4x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_4x"), - pydantic.Field(alias="png_4x", description="Raster fallback at quadruple density."), - ] - """ - Raster fallback at quadruple density. - """ - - svg: str = pydantic.Field() - """ - The vector file. Prefer this everywhere SVG renders. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance.py deleted file mode 100644 index 54cb3e7d..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance.py +++ /dev/null @@ -1,46 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_list_item_platform_balance_payment_method_platform_balance_account import ( - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccount, -) -from .payment_method_list_item_platform_balance_payment_method_platform_balance_balances_item import ( - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceBalancesItem, -) - - -class PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalance(UniversalBaseModel): - """ - What is available to spend, and whether the account may spend it. - """ - - account: typing.Optional[PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccount] = pydantic.Field( - default=None - ) - """ - The account whose wallet this is. Null for the buyer's own personal wallet. A buyer sees an account's balance here when they hold permission to spend it, so a list can hold several — their own and one per account they are on. - """ - - balances: typing.List[PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceBalancesItem] = ( - pydantic.Field() - ) - """ - Available amount per currency. Read from the balance cache, so it is indicative — the charge revalidates against settled funds and may still refuse. - """ - - spendable: bool = pydantic.Field() - """ - Whether this balance can pay right now, which here means only whether it holds funds — an account blocked from spending is not listed at all. A zero balance is still returned so a client can show it as an option the buyer could top up. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance_account.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance_account.py deleted file mode 100644 index 71531cc5..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance_account.py +++ /dev/null @@ -1,41 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_list_item_platform_balance_payment_method_platform_balance_account_logo import ( - PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccountLogo, -) - - -class PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccount(UniversalBaseModel): - """ - The account whose wallet this is. Null for the buyer's own personal wallet. A buyer sees an account's balance here when they hold permission to spend it, so a list can hold several — their own and one per account they are on. - """ - - id: str = pydantic.Field() - """ - The unique identifier for the company. - """ - - logo: typing.Optional[PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccountLogo] = pydantic.Field( - default=None - ) - """ - The company's logo. - """ - - title: str = pydantic.Field() - """ - The display name of the company shown to customers. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance_account_logo.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance_account_logo.py deleted file mode 100644 index f7e9ecc4..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance_account_logo.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceAccountLogo(UniversalBaseModel): - """ - The company's logo. - """ - - url: typing.Optional[str] = pydantic.Field(default=None) - """ - A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance_balances_item.py b/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance_balances_item.py deleted file mode 100644 index fb574800..00000000 --- a/src/whop_sdk/types/payment_method_list_item_platform_balance_payment_method_platform_balance_balances_item.py +++ /dev/null @@ -1,42 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .currencies import Currencies - - -class PaymentMethodListItemPlatformBalancePaymentMethodPlatformBalanceBalancesItem(UniversalBaseModel): - """ - An amount of money. Never a bare number, because a bare number cannot answer the two questions a client has to answer to render it: what currency is this, and how many digits do I write? The second is stated twice rather than derived, because the digits the amount CARRIES and the digits to SHOW differ in COP — charged in centavos, written in whole pesos. Formatting is deliberately left to the caller: the number belongs in the buyer's locale, and this API does not know it. - """ - - amount: str = pydantic.Field() - """ - The amount in major units, as an exact decimal string — `"10.00"` is ten dollars. A string so no float rounds it in transit. - """ - - currency: Currencies = pydantic.Field() - """ - Three-letter ISO 4217 currency code, lowercase. - """ - - decimals: int = pydantic.Field() - """ - How many decimal places the amount CARRIES — the precision the charge itself runs at. - """ - - display_decimals: int = pydantic.Field() - """ - How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method.py b/src/whop_sdk/types/payment_method_platform_balance_payment_method.py deleted file mode 100644 index 737e960d..00000000 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method.py +++ /dev/null @@ -1,52 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_platform_balance_payment_method_icons import PaymentMethodPlatformBalancePaymentMethodIcons -from .payment_method_platform_balance_payment_method_platform_balance import ( - PaymentMethodPlatformBalancePaymentMethodPlatformBalance, -) -from .payment_method_types import PaymentMethodTypes - - -class PaymentMethodPlatformBalancePaymentMethod(UniversalBaseModel): - """ - A Whop balance the buyer can pay with — their own, or an account's they hold permission to spend. Charged by naming its ledger id on a `saved` confirmation token — it is a live wallet, not a stored credential, so it cannot be vaulted or charged off-session. - """ - - created_at: dt.datetime = pydantic.Field() - """ - The time of the event in ISO 8601 UTC format with millisecond precision - """ - - icons: PaymentMethodPlatformBalancePaymentMethodIcons = pydantic.Field() - """ - Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art. - """ - - id: str = pydantic.Field() - """ - Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) input value will be accepted as an ID. - """ - - payment_method_type: PaymentMethodTypes = pydantic.Field() - """ - The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit). - """ - - platform_balance: PaymentMethodPlatformBalancePaymentMethodPlatformBalance = pydantic.Field() - """ - What is available to spend, and whether the account may spend it. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons.py b/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons.py deleted file mode 100644 index caa10743..00000000 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons.py +++ /dev/null @@ -1,37 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_platform_balance_payment_method_icons_card import ( - PaymentMethodPlatformBalancePaymentMethodIconsCard, -) -from .payment_method_platform_balance_payment_method_icons_square import ( - PaymentMethodPlatformBalancePaymentMethodIconsSquare, -) - - -class PaymentMethodPlatformBalancePaymentMethodIcons(UniversalBaseModel): - """ - Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art. - """ - - card: PaymentMethodPlatformBalancePaymentMethodIconsCard = pydantic.Field() - """ - The credit-card-proportioned tile (48x30). - """ - - square: PaymentMethodPlatformBalancePaymentMethodIconsSquare = pydantic.Field() - """ - The square tile (32x32). - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_card.py b/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_card.py deleted file mode 100644 index a639c651..00000000 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_card.py +++ /dev/null @@ -1,37 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_platform_balance_payment_method_icons_card_dark import ( - PaymentMethodPlatformBalancePaymentMethodIconsCardDark, -) -from .payment_method_platform_balance_payment_method_icons_card_light import ( - PaymentMethodPlatformBalancePaymentMethodIconsCardLight, -) - - -class PaymentMethodPlatformBalancePaymentMethodIconsCard(UniversalBaseModel): - """ - The credit-card-proportioned tile (48x30). - """ - - dark: PaymentMethodPlatformBalancePaymentMethodIconsCardDark = pydantic.Field() - """ - The colorway for dark surfaces. - """ - - light: PaymentMethodPlatformBalancePaymentMethodIconsCardLight = pydantic.Field() - """ - The colorway for light surfaces. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_card_dark.py b/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_card_dark.py deleted file mode 100644 index 517835c5..00000000 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_card_dark.py +++ /dev/null @@ -1,55 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata - - -class PaymentMethodPlatformBalancePaymentMethodIconsCardDark(UniversalBaseModel): - """ - The colorway for dark surfaces. - """ - - png1x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_1x"), - pydantic.Field(alias="png_1x", description="Raster fallback at the shape's native size."), - ] - """ - Raster fallback at the shape's native size. - """ - - png2x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_2x"), - pydantic.Field(alias="png_2x", description="Raster fallback at double density."), - ] - """ - Raster fallback at double density. - """ - - png4x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_4x"), - pydantic.Field(alias="png_4x", description="Raster fallback at quadruple density."), - ] - """ - Raster fallback at quadruple density. - """ - - svg: str = pydantic.Field() - """ - The vector file. Prefer this everywhere SVG renders. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_card_light.py b/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_card_light.py deleted file mode 100644 index 9868e4d1..00000000 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_card_light.py +++ /dev/null @@ -1,55 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata - - -class PaymentMethodPlatformBalancePaymentMethodIconsCardLight(UniversalBaseModel): - """ - The colorway for light surfaces. - """ - - png1x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_1x"), - pydantic.Field(alias="png_1x", description="Raster fallback at the shape's native size."), - ] - """ - Raster fallback at the shape's native size. - """ - - png2x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_2x"), - pydantic.Field(alias="png_2x", description="Raster fallback at double density."), - ] - """ - Raster fallback at double density. - """ - - png4x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_4x"), - pydantic.Field(alias="png_4x", description="Raster fallback at quadruple density."), - ] - """ - Raster fallback at quadruple density. - """ - - svg: str = pydantic.Field() - """ - The vector file. Prefer this everywhere SVG renders. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_square.py b/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_square.py deleted file mode 100644 index 2889ff3c..00000000 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_square.py +++ /dev/null @@ -1,37 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_platform_balance_payment_method_icons_square_dark import ( - PaymentMethodPlatformBalancePaymentMethodIconsSquareDark, -) -from .payment_method_platform_balance_payment_method_icons_square_light import ( - PaymentMethodPlatformBalancePaymentMethodIconsSquareLight, -) - - -class PaymentMethodPlatformBalancePaymentMethodIconsSquare(UniversalBaseModel): - """ - The square tile (32x32). - """ - - dark: PaymentMethodPlatformBalancePaymentMethodIconsSquareDark = pydantic.Field() - """ - The colorway for dark surfaces. - """ - - light: PaymentMethodPlatformBalancePaymentMethodIconsSquareLight = pydantic.Field() - """ - The colorway for light surfaces. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_square_dark.py b/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_square_dark.py deleted file mode 100644 index c8dff45b..00000000 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_square_dark.py +++ /dev/null @@ -1,55 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata - - -class PaymentMethodPlatformBalancePaymentMethodIconsSquareDark(UniversalBaseModel): - """ - The colorway for dark surfaces. - """ - - png1x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_1x"), - pydantic.Field(alias="png_1x", description="Raster fallback at the shape's native size."), - ] - """ - Raster fallback at the shape's native size. - """ - - png2x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_2x"), - pydantic.Field(alias="png_2x", description="Raster fallback at double density."), - ] - """ - Raster fallback at double density. - """ - - png4x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_4x"), - pydantic.Field(alias="png_4x", description="Raster fallback at quadruple density."), - ] - """ - Raster fallback at quadruple density. - """ - - svg: str = pydantic.Field() - """ - The vector file. Prefer this everywhere SVG renders. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_square_light.py b/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_square_light.py deleted file mode 100644 index 95f18706..00000000 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method_icons_square_light.py +++ /dev/null @@ -1,55 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata - - -class PaymentMethodPlatformBalancePaymentMethodIconsSquareLight(UniversalBaseModel): - """ - The colorway for light surfaces. - """ - - png1x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_1x"), - pydantic.Field(alias="png_1x", description="Raster fallback at the shape's native size."), - ] - """ - Raster fallback at the shape's native size. - """ - - png2x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_2x"), - pydantic.Field(alias="png_2x", description="Raster fallback at double density."), - ] - """ - Raster fallback at double density. - """ - - png4x: typing_extensions.Annotated[ - str, - FieldMetadata(alias="png_4x"), - pydantic.Field(alias="png_4x", description="Raster fallback at quadruple density."), - ] - """ - Raster fallback at quadruple density. - """ - - svg: str = pydantic.Field() - """ - The vector file. Prefer this everywhere SVG renders. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance.py b/src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance.py deleted file mode 100644 index 4eff52f8..00000000 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance.py +++ /dev/null @@ -1,44 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_platform_balance_payment_method_platform_balance_account import ( - PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccount, -) -from .payment_method_platform_balance_payment_method_platform_balance_balances_item import ( - PaymentMethodPlatformBalancePaymentMethodPlatformBalanceBalancesItem, -) - - -class PaymentMethodPlatformBalancePaymentMethodPlatformBalance(UniversalBaseModel): - """ - What is available to spend, and whether the account may spend it. - """ - - account: typing.Optional[PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccount] = pydantic.Field( - default=None - ) - """ - The account whose wallet this is. Null for the buyer's own personal wallet. A buyer sees an account's balance here when they hold permission to spend it, so a list can hold several — their own and one per account they are on. - """ - - balances: typing.List[PaymentMethodPlatformBalancePaymentMethodPlatformBalanceBalancesItem] = pydantic.Field() - """ - Available amount per currency. Read from the balance cache, so it is indicative — the charge revalidates against settled funds and may still refuse. - """ - - spendable: bool = pydantic.Field() - """ - Whether this balance can pay right now, which here means only whether it holds funds — an account blocked from spending is not listed at all. A zero balance is still returned so a client can show it as an option the buyer could top up. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance_account.py b/src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance_account.py deleted file mode 100644 index 0e29c888..00000000 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance_account.py +++ /dev/null @@ -1,41 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .payment_method_platform_balance_payment_method_platform_balance_account_logo import ( - PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccountLogo, -) - - -class PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccount(UniversalBaseModel): - """ - The account whose wallet this is. Null for the buyer's own personal wallet. A buyer sees an account's balance here when they hold permission to spend it, so a list can hold several — their own and one per account they are on. - """ - - id: str = pydantic.Field() - """ - The unique identifier for the company. - """ - - logo: typing.Optional[PaymentMethodPlatformBalancePaymentMethodPlatformBalanceAccountLogo] = pydantic.Field( - default=None - ) - """ - The company's logo. - """ - - title: str = pydantic.Field() - """ - The display name of the company shown to customers. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance_balances_item.py b/src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance_balances_item.py deleted file mode 100644 index a4fa4b0d..00000000 --- a/src/whop_sdk/types/payment_method_platform_balance_payment_method_platform_balance_balances_item.py +++ /dev/null @@ -1,42 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .currencies import Currencies - - -class PaymentMethodPlatformBalancePaymentMethodPlatformBalanceBalancesItem(UniversalBaseModel): - """ - An amount of money. Never a bare number, because a bare number cannot answer the two questions a client has to answer to render it: what currency is this, and how many digits do I write? The second is stated twice rather than derived, because the digits the amount CARRIES and the digits to SHOW differ in COP — charged in centavos, written in whole pesos. Formatting is deliberately left to the caller: the number belongs in the buyer's locale, and this API does not know it. - """ - - amount: str = pydantic.Field() - """ - The amount in major units, as an exact decimal string — `"10.00"` is ten dollars. A string so no float rounds it in transit. - """ - - currency: Currencies = pydantic.Field() - """ - Three-letter ISO 4217 currency code, lowercase. - """ - - decimals: int = pydantic.Field() - """ - How many decimal places the amount CARRIES — the precision the charge itself runs at. - """ - - display_decimals: int = pydantic.Field() - """ - How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/payout_account.py b/src/whop_sdk/types/payout_account.py index 0a3c5eb4..4d57af0b 100644 --- a/src/whop_sdk/types/payout_account.py +++ b/src/whop_sdk/types/payout_account.py @@ -52,7 +52,7 @@ class PayoutAccount(UniversalBaseModel): status: typing.Optional[PayoutAccountCalculatedStatuses] = pydantic.Field(default=None) """ - The granular calculated status of the payout account reflecting its current KYC and withdrawal readiness state. + The granular calculated status of the payout account reflecting its current KYC and payout readiness state. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/payout_error_codes.py b/src/whop_sdk/types/payout_error_codes.py deleted file mode 100644 index 12640f74..00000000 --- a/src/whop_sdk/types/payout_error_codes.py +++ /dev/null @@ -1,60 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PayoutErrorCodes = typing.Union[ - typing.Literal[ - "account_closed", - "account_does_not_exist", - "account_information_invalid", - "account_number_invalid_region", - "account_frozen", - "account_lookup_failed", - "account_not_found", - "amount_out_of_bounds", - "attributes_not_validated", - "b2b_payments_prohibited", - "bank_statement_required", - "compliance_review", - "currency_not_supported", - "deposit_canceled", - "deposit_failed", - "deposit_rejected", - "destination_unavailable", - "exceeded_account_limit", - "expired_quote", - "generic_payout_error", - "junk_failure_reason", - "technical_problem", - "provider_temporarily_unavailable", - "provider_validation_failed", - "identification_number_invalid", - "invalid_account_number", - "invalid_bank_code", - "invalid_beneficiary", - "invalid_mailing_address", - "invalid_branch_number", - "invalid_branch_code", - "invalid_phone_number", - "invalid_routing_number", - "invalid_swift_code", - "invalid_company_details", - "manual_cancelation", - "misc_error", - "missing_city_and_country", - "missing_phone_number", - "missing_remittance_info", - "payee_name_invalid", - "beneficiary_name_mismatch", - "receiving_account_locked", - "rejected_by_compliance", - "rtp_not_supported", - "non_transaction_account", - "source_token_insufficient_funds", - "ssn_invalid", - "wallet_screenshot_required", - "unsupported_region", - "payout_provider_timeout", - ], - typing.Any, -] diff --git a/src/whop_sdk/types/user_balance.py b/src/whop_sdk/types/user_balance.py index 592c8b3f..b41ea9a1 100644 --- a/src/whop_sdk/types/user_balance.py +++ b/src/whop_sdk/types/user_balance.py @@ -40,7 +40,7 @@ class UserBalance(UniversalBaseModel): treasury_pending_usd: str = pydantic.Field() """ - Balance-to-wallet USDT0 withdrawals still in flight, in USD. + Balance-to-wallet USDT0 payouts still in flight, in USD. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/webhook_event.py b/src/whop_sdk/types/webhook_event.py index 60984de9..8ee7d8dd 100644 --- a/src/whop_sdk/types/webhook_event.py +++ b/src/whop_sdk/types/webhook_event.py @@ -31,6 +31,9 @@ "withdrawal.created", "withdrawal.updated", "withdrawal.reversed", + "payout.created", + "payout.updated", + "payout.reversed", "card_transaction.created", "card_transaction.updated", "card_transaction.completed", diff --git a/src/whop_sdk/types/webhook_events_item.py b/src/whop_sdk/types/webhook_events_item.py index eefcf6e9..4c0561b0 100644 --- a/src/whop_sdk/types/webhook_events_item.py +++ b/src/whop_sdk/types/webhook_events_item.py @@ -31,6 +31,9 @@ "withdrawal.created", "withdrawal.updated", "withdrawal.reversed", + "payout.created", + "payout.updated", + "payout.reversed", "card_transaction.created", "card_transaction.updated", "card_transaction.completed", diff --git a/src/whop_sdk/types/webhook_list_item_events_item.py b/src/whop_sdk/types/webhook_list_item_events_item.py index d98aff77..2d8be9c7 100644 --- a/src/whop_sdk/types/webhook_list_item_events_item.py +++ b/src/whop_sdk/types/webhook_list_item_events_item.py @@ -31,6 +31,9 @@ "withdrawal.created", "withdrawal.updated", "withdrawal.reversed", + "payout.created", + "payout.updated", + "payout.reversed", "card_transaction.created", "card_transaction.updated", "card_transaction.completed", diff --git a/src/whop_sdk/types/webhook_testable_events_item.py b/src/whop_sdk/types/webhook_testable_events_item.py index fa93aabc..214fa2aa 100644 --- a/src/whop_sdk/types/webhook_testable_events_item.py +++ b/src/whop_sdk/types/webhook_testable_events_item.py @@ -31,6 +31,9 @@ "withdrawal.created", "withdrawal.updated", "withdrawal.reversed", + "payout.created", + "payout.updated", + "payout.reversed", "card_transaction.created", "card_transaction.updated", "card_transaction.completed", diff --git a/src/whop_sdk/types/withdrawal.py b/src/whop_sdk/types/withdrawal.py deleted file mode 100644 index 84bf8ac1..00000000 --- a/src/whop_sdk/types/withdrawal.py +++ /dev/null @@ -1,109 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .currencies import Currencies -from .payout_error_codes import PayoutErrorCodes -from .withdrawal_fee_types import WithdrawalFeeTypes -from .withdrawal_ledger_account import WithdrawalLedgerAccount -from .withdrawal_payout_token import WithdrawalPayoutToken -from .withdrawal_speeds import WithdrawalSpeeds -from .withdrawal_status import WithdrawalStatus - - -class Withdrawal(UniversalBaseModel): - """ - A withdrawal represents a request to transfer funds from a ledger account to an external payout method. - """ - - amount: float = pydantic.Field() - """ - The withdrawal amount as a decimal number in the specified currency (e.g., 100.00 for $100.00 USD). - """ - - created_at: dt.datetime = pydantic.Field() - """ - The datetime the withdrawal was created. - """ - - currency: Currencies = pydantic.Field() - """ - The three-letter ISO currency code for this withdrawal (e.g., 'usd', 'eur'). - """ - - error_code: typing.Optional[PayoutErrorCodes] = pydantic.Field(default=None) - """ - A machine-readable error code describing why the payout failed. Null if no error occurred. - """ - - error_message: typing.Optional[str] = pydantic.Field(default=None) - """ - A human-readable message describing why the payout failed. Null if no error occurred. - """ - - estimated_availability: typing.Optional[dt.datetime] = pydantic.Field(default=None) - """ - The estimated time at which the funds become available in the destination account. Null if no estimate is available. As a Unix timestamp. - """ - - fee_amount: float = pydantic.Field() - """ - The fee charged for processing this withdrawal, in the same currency as the withdrawal amount. - """ - - fee_type: typing.Optional[WithdrawalFeeTypes] = pydantic.Field(default=None) - """ - How the fee was applied to the withdrawal. 'exclusive' means the fee was added on top (user receives the full requested amount). 'inclusive' means the fee was deducted from the withdrawal (user receives less than requested). Null if no fee was charged. - """ - - id: str = pydantic.Field() - """ - The unique identifier for the withdrawal. - """ - - ledger_account: WithdrawalLedgerAccount = pydantic.Field() - """ - The ledger account from which the withdrawal funds are sourced. - """ - - markup_fee: float = pydantic.Field() - """ - An additional markup fee charged for the withdrawal, in the same currency as the withdrawal amount. Only applies to platform accounts using Whop Rails. - """ - - payout_request_id: typing.Optional[str] = pydantic.Field(default=None) - """ - The id of the payout request (returned by POST /payouts) that this withdrawal settles. Null unless the withdrawal originated from a stablecoin payout. - """ - - payout_token: typing.Optional[WithdrawalPayoutToken] = pydantic.Field(default=None) - """ - The saved payout destination used for this withdrawal (e.g., a bank account or PayPal address). Null if no payout token was used. - """ - - speed: WithdrawalSpeeds = pydantic.Field() - """ - The processing speed selected for this withdrawal ('standard' or 'instant'). - """ - - status: WithdrawalStatus = pydantic.Field() - """ - The computed lifecycle status of the withdrawal, accounting for the state of associated payouts (e.g., 'requested', 'in_transit', 'completed', 'failed'). - """ - - trace_code: typing.Optional[str] = pydantic.Field(default=None) - """ - The ACH trace number for tracking the payout through the banking network. Null if not available or not an ACH transaction. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/withdrawal_fee_types.py b/src/whop_sdk/types/withdrawal_fee_types.py deleted file mode 100644 index 426da2b4..00000000 --- a/src/whop_sdk/types/withdrawal_fee_types.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -WithdrawalFeeTypes = typing.Union[typing.Literal["exclusive", "inclusive"], typing.Any] diff --git a/src/whop_sdk/types/withdrawal_ledger_account.py b/src/whop_sdk/types/withdrawal_ledger_account.py deleted file mode 100644 index 847d427d..00000000 --- a/src/whop_sdk/types/withdrawal_ledger_account.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class WithdrawalLedgerAccount(UniversalBaseModel): - """ - The ledger account from which the withdrawal funds are sourced. - """ - - company_id: typing.Optional[str] = pydantic.Field(default=None) - """ - Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) input value will be accepted as an ID. - """ - - id: str = pydantic.Field() - """ - The unique identifier for the ledger account. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/withdrawal_list_item.py b/src/whop_sdk/types/withdrawal_list_item.py deleted file mode 100644 index 4d1bbcf1..00000000 --- a/src/whop_sdk/types/withdrawal_list_item.py +++ /dev/null @@ -1,76 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .currencies import Currencies -from .withdrawal_fee_types import WithdrawalFeeTypes -from .withdrawal_speeds import WithdrawalSpeeds -from .withdrawal_status import WithdrawalStatus - - -class WithdrawalListItem(UniversalBaseModel): - """ - A withdrawal represents a request to transfer funds from a ledger account to an external payout method. - """ - - amount: float = pydantic.Field() - """ - The withdrawal amount as a decimal number in the specified currency (e.g., 100.00 for $100.00 USD). - """ - - created_at: dt.datetime = pydantic.Field() - """ - The datetime the withdrawal was created. - """ - - currency: Currencies = pydantic.Field() - """ - The three-letter ISO currency code for this withdrawal (e.g., 'usd', 'eur'). - """ - - fee_amount: float = pydantic.Field() - """ - The fee charged for processing this withdrawal, in the same currency as the withdrawal amount. - """ - - fee_type: typing.Optional[WithdrawalFeeTypes] = pydantic.Field(default=None) - """ - How the fee was applied to the withdrawal. 'exclusive' means the fee was added on top (user receives the full requested amount). 'inclusive' means the fee was deducted from the withdrawal (user receives less than requested). Null if no fee was charged. - """ - - id: str = pydantic.Field() - """ - The unique identifier for the withdrawal. - """ - - markup_fee: float = pydantic.Field() - """ - An additional markup fee charged for the withdrawal, in the same currency as the withdrawal amount. Only applies to platform accounts using Whop Rails. - """ - - payout_request_id: typing.Optional[str] = pydantic.Field(default=None) - """ - The id of the payout request (returned by POST /payouts) that this withdrawal settles. Null unless the withdrawal originated from a stablecoin payout. - """ - - speed: WithdrawalSpeeds = pydantic.Field() - """ - The processing speed selected for this withdrawal ('standard' or 'instant'). - """ - - status: WithdrawalStatus = pydantic.Field() - """ - The computed lifecycle status of the withdrawal, accounting for the state of associated payouts (e.g., 'requested', 'in_transit', 'completed', 'failed'). - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/withdrawal_payout_token.py b/src/whop_sdk/types/withdrawal_payout_token.py deleted file mode 100644 index 10d446f0..00000000 --- a/src/whop_sdk/types/withdrawal_payout_token.py +++ /dev/null @@ -1,47 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class WithdrawalPayoutToken(UniversalBaseModel): - """ - The saved payout destination used for this withdrawal (e.g., a bank account or PayPal address). Null if no payout token was used. - """ - - created_at: dt.datetime = pydantic.Field() - """ - The datetime the payout token was created. - """ - - destination_currency_code: str = pydantic.Field() - """ - The three-letter ISO currency code that payouts are delivered in for this destination. - """ - - id: str = pydantic.Field() - """ - The unique identifier for the payout token. - """ - - nickname: typing.Optional[str] = pydantic.Field(default=None) - """ - A user-defined label to help identify this payout destination. Not sent to the provider. Null if no nickname has been set. - """ - - payer_name: typing.Optional[str] = pydantic.Field(default=None) - """ - The legal name of the account holder receiving payouts. Null if not provided. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/withdrawal_speeds.py b/src/whop_sdk/types/withdrawal_speeds.py deleted file mode 100644 index 73a5e264..00000000 --- a/src/whop_sdk/types/withdrawal_speeds.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -WithdrawalSpeeds = typing.Union[typing.Literal["standard", "instant"], typing.Any] diff --git a/src/whop_sdk/types/withdrawal_status.py b/src/whop_sdk/types/withdrawal_status.py deleted file mode 100644 index 81f46a70..00000000 --- a/src/whop_sdk/types/withdrawal_status.py +++ /dev/null @@ -1,8 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -WithdrawalStatus = typing.Union[ - typing.Literal["requested", "awaiting_payment", "in_transit", "completed", "failed", "canceled", "denied"], - typing.Any, -] diff --git a/src/whop_sdk/users/client.py b/src/whop_sdk/users/client.py index 8e3357b6..96841734 100644 --- a/src/whop_sdk/users/client.py +++ b/src/whop_sdk/users/client.py @@ -89,7 +89,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -151,7 +151,7 @@ def me( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -210,7 +210,7 @@ def update_me( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -278,7 +278,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -344,7 +344,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -391,7 +391,7 @@ def check_access( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -427,7 +427,7 @@ def recommend_actions( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -527,7 +527,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -598,7 +598,7 @@ async def me( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -665,7 +665,7 @@ async def update_me( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -741,7 +741,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -815,7 +815,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -870,7 +870,7 @@ async def check_access( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -914,7 +914,7 @@ async def recommend_actions( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/oauth_grants/client.py b/src/whop_sdk/users/oauth_grants/client.py index c40e69e0..cb79f829 100644 --- a/src/whop_sdk/users/oauth_grants/client.py +++ b/src/whop_sdk/users/oauth_grants/client.py @@ -83,7 +83,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -168,7 +168,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -264,7 +264,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -358,7 +358,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/passkeys/client.py b/src/whop_sdk/users/passkeys/client.py index b687ae07..d11425d8 100644 --- a/src/whop_sdk/users/passkeys/client.py +++ b/src/whop_sdk/users/passkeys/client.py @@ -80,7 +80,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -140,7 +140,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -191,7 +191,7 @@ def challenge( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -243,7 +243,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -328,7 +328,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -397,7 +397,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -456,7 +456,7 @@ async def challenge( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -516,7 +516,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/preferences/client.py b/src/whop_sdk/users/preferences/client.py index bf325806..3ccc95c8 100644 --- a/src/whop_sdk/users/preferences/client.py +++ b/src/whop_sdk/users/preferences/client.py @@ -51,7 +51,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -95,7 +95,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -156,7 +156,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -208,7 +208,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/preferences/notifications/client.py b/src/whop_sdk/users/preferences/notifications/client.py index 1df74535..9055697c 100644 --- a/src/whop_sdk/users/preferences/notifications/client.py +++ b/src/whop_sdk/users/preferences/notifications/client.py @@ -72,7 +72,7 @@ def set( ) client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -161,7 +161,7 @@ async def set( ) client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/preferences/notifications/experiences/client.py b/src/whop_sdk/users/preferences/notifications/experiences/client.py index 512337d6..bc43c138 100644 --- a/src/whop_sdk/users/preferences/notifications/experiences/client.py +++ b/src/whop_sdk/users/preferences/notifications/experiences/client.py @@ -56,7 +56,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -118,7 +118,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/preferences/notifications/topics/client.py b/src/whop_sdk/users/preferences/notifications/topics/client.py index c05137b0..d9e687e0 100644 --- a/src/whop_sdk/users/preferences/notifications/topics/client.py +++ b/src/whop_sdk/users/preferences/notifications/topics/client.py @@ -77,7 +77,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -168,7 +168,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/verifications/client.py b/src/whop_sdk/verifications/client.py index 807ce2dc..9418b426 100644 --- a/src/whop_sdk/verifications/client.py +++ b/src/whop_sdk/verifications/client.py @@ -68,7 +68,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -112,7 +112,7 @@ def create( from whop_sdk.verifications import CreateVerificationsRequestBody_Individual client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -148,7 +148,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -190,7 +190,7 @@ def update( from whop_sdk.verifications import UpdateVerificationsRequestBodyPersonalAddress client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -255,7 +255,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -307,7 +307,7 @@ async def create( from whop_sdk.verifications import CreateVerificationsRequestBody_Individual client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -353,7 +353,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -403,7 +403,7 @@ async def update( from whop_sdk.verifications import UpdateVerificationsRequestBodyPersonalAddress client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/webhooks/client.py b/src/whop_sdk/webhooks/client.py index 50cee2f1..2b0966dc 100644 --- a/src/whop_sdk/webhooks/client.py +++ b/src/whop_sdk/webhooks/client.py @@ -94,7 +94,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -166,7 +166,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -207,7 +207,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -240,7 +240,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -298,7 +298,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -352,7 +352,7 @@ def list_deliveries( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -402,7 +402,7 @@ def replay_delivery( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -463,7 +463,7 @@ def replay( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -510,7 +510,7 @@ def test( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -568,7 +568,7 @@ def deliveries_webhook( from whop_sdk import Whop client = Whop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -660,7 +660,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -741,7 +741,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -790,7 +790,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -833,7 +833,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -899,7 +899,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -961,7 +961,7 @@ async def list_deliveries( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1020,7 +1020,7 @@ async def replay_delivery( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1089,7 +1089,7 @@ async def replay( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1144,7 +1144,7 @@ async def test( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1210,7 +1210,7 @@ async def deliveries_webhook( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21-1", + "2026-08-25-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/webhooks/types/create_webhooks_request_events_item.py b/src/whop_sdk/webhooks/types/create_webhooks_request_events_item.py index 231981b4..069b8427 100644 --- a/src/whop_sdk/webhooks/types/create_webhooks_request_events_item.py +++ b/src/whop_sdk/webhooks/types/create_webhooks_request_events_item.py @@ -28,9 +28,9 @@ "transfer.created", "transfer.completed", "transfer.failed", - "withdrawal.created", - "withdrawal.updated", - "withdrawal.reversed", + "payout.created", + "payout.updated", + "payout.reversed", "card_transaction.created", "card_transaction.updated", "card_transaction.completed", diff --git a/src/whop_sdk/webhooks/types/update_webhooks_request_events_item.py b/src/whop_sdk/webhooks/types/update_webhooks_request_events_item.py index 0e7334fb..35fa693f 100644 --- a/src/whop_sdk/webhooks/types/update_webhooks_request_events_item.py +++ b/src/whop_sdk/webhooks/types/update_webhooks_request_events_item.py @@ -28,9 +28,9 @@ "transfer.created", "transfer.completed", "transfer.failed", - "withdrawal.created", - "withdrawal.updated", - "withdrawal.reversed", + "payout.created", + "payout.updated", + "payout.reversed", "card_transaction.created", "card_transaction.updated", "card_transaction.completed", diff --git a/src/whop_sdk/withdrawals/__init__.py b/src/whop_sdk/withdrawals/__init__.py deleted file mode 100644 index e1765b0a..00000000 --- a/src/whop_sdk/withdrawals/__init__.py +++ /dev/null @@ -1,37 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - -import typing -from importlib import import_module - -if typing.TYPE_CHECKING: - from .types import GeneratePdfWithdrawalsResponse, ListWithdrawalsResponse -_dynamic_imports: typing.Dict[str, str] = { - "GeneratePdfWithdrawalsResponse": ".types", - "ListWithdrawalsResponse": ".types", -} - - -def __getattr__(attr_name: str) -> typing.Any: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") - try: - module = import_module(module_name, __package__) - if module_name == f".{attr_name}": - return module - else: - return getattr(module, attr_name) - except ImportError as e: - raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e - except AttributeError as e: - raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e - - -def __dir__(): - lazy_attrs = list(_dynamic_imports.keys()) - return sorted(lazy_attrs) - - -__all__ = ["GeneratePdfWithdrawalsResponse", "ListWithdrawalsResponse"] diff --git a/src/whop_sdk/withdrawals/client.py b/src/whop_sdk/withdrawals/client.py deleted file mode 100644 index 83deeac3..00000000 --- a/src/whop_sdk/withdrawals/client.py +++ /dev/null @@ -1,591 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.pagination import AsyncPager, SyncPager -from ..core.request_options import RequestOptions -from ..types.currencies import Currencies -from ..types.direction import Direction -from ..types.withdrawal import Withdrawal -from ..types.withdrawal_list_item import WithdrawalListItem -from ..types.withdrawal_speeds import WithdrawalSpeeds -from .raw_client import AsyncRawWithdrawalsClient, RawWithdrawalsClient -from .types.generate_pdf_withdrawals_response import GeneratePdfWithdrawalsResponse -from .types.list_withdrawals_response import ListWithdrawalsResponse - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class WithdrawalsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawWithdrawalsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawWithdrawalsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawWithdrawalsClient - """ - return self._raw_client - - def list( - self, - *, - company_id: str, - after: typing.Optional[str] = None, - before: typing.Optional[str] = None, - first: typing.Optional[int] = None, - last: typing.Optional[int] = None, - direction: typing.Optional[Direction] = None, - created_before: typing.Optional[dt.datetime] = None, - created_after: typing.Optional[dt.datetime] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> SyncPager[WithdrawalListItem, ListWithdrawalsResponse]: - """ - Returns a paginated list of withdrawals for a company, with optional sorting and date filtering. - - Required permissions: - - `payout:withdrawal:read` - - Parameters - ---------- - company_id : str - The unique identifier of the company to list withdrawals for. - - after : typing.Optional[str] - Returns the elements in the list that come after the specified cursor. - - before : typing.Optional[str] - Returns the elements in the list that come before the specified cursor. - - first : typing.Optional[int] - Returns the first _n_ elements from the list. - - last : typing.Optional[int] - Returns the last _n_ elements from the list. - - direction : typing.Optional[Direction] - - created_before : typing.Optional[dt.datetime] - Only return withdrawals created before this timestamp. - - created_after : typing.Optional[dt.datetime] - Only return withdrawals created after this timestamp. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - SyncPager[WithdrawalListItem, ListWithdrawalsResponse] - A successful response - - Examples - -------- - import datetime - - from whop_sdk import Whop - - client = Whop( - "2026-08-21-1", - idempotency_key="YOUR_IDEMPOTENCY_KEY", - token="YOUR_TOKEN", - ) - response = client.withdrawals.list( - first=42, - last=42, - company_id="biz_xxxxxxxxxxxxxx", - created_before=datetime.datetime.fromisoformat( - "2023-12-01 05:00:00+00:00", - ), - created_after=datetime.datetime.fromisoformat( - "2023-12-01 05:00:00+00:00", - ), - ) - for item in response: - yield item - # alternatively, you can paginate page-by-page - for page in response.iter_pages(): - yield page - """ - return self._raw_client.list( - company_id=company_id, - after=after, - before=before, - first=first, - last=last, - direction=direction, - created_before=created_before, - created_after=created_after, - request_options=request_options, - ) - - def create( - self, - *, - amount: float, - company_id: str, - currency: Currencies, - acknowledge_bank_warning: typing.Optional[bool] = OMIT, - idempotency_key: typing.Optional[str] = OMIT, - payout_method_id: typing.Optional[str] = OMIT, - platform_covers_fees: typing.Optional[bool] = OMIT, - speed: typing.Optional[WithdrawalSpeeds] = OMIT, - statement_descriptor: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> Withdrawal: - """ - Creates a withdrawal request for a ledger account - - Required permissions: - - `payout:withdraw_funds` - - `payout:destination:read` - - Parameters - ---------- - amount : float - The amount to withdraw in the specified currency - - company_id : str - The ID of the company to withdraw from. - - currency : Currencies - The currency that is being withdrawn. - - acknowledge_bank_warning : typing.Optional[bool] - Set to true to continue when the bank could not confirm the account holder's name, or false to be refused in that case so the creator can fix the account or link their bank first. Omitting the argument skips the warning gate — a client that cannot show the warning keeps its pre-gate behavior. - - idempotency_key : typing.Optional[str] - A client-generated key that makes retries safe. Retrying with the same key returns the original withdrawal instead of creating a second one. - - payout_method_id : typing.Optional[str] - The ID of the payout method to use for the withdrawal. - - platform_covers_fees : typing.Optional[bool] - Whether the platform covers the payout fees. - - speed : typing.Optional[WithdrawalSpeeds] - The processing speed for the withdrawal. Either standard or instant. - - statement_descriptor : typing.Optional[str] - Custom statement descriptor for the withdrawal. Must be between 5 and 22 characters and contain only alphanumeric characters. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - Withdrawal - A successful response - - Examples - -------- - from whop_sdk import Whop - - client = Whop( - "2026-08-21-1", - idempotency_key="YOUR_IDEMPOTENCY_KEY", - token="YOUR_TOKEN", - ) - client.withdrawals.create( - amount=6.9, - company_id="biz_xxxxxxxxxxxxxx", - currency="usd", - ) - """ - _response = self._raw_client.create( - amount=amount, - company_id=company_id, - currency=currency, - acknowledge_bank_warning=acknowledge_bank_warning, - idempotency_key=idempotency_key, - payout_method_id=payout_method_id, - platform_covers_fees=platform_covers_fees, - speed=speed, - statement_descriptor=statement_descriptor, - request_options=request_options, - ) - return _response.data - - def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Withdrawal: - """ - Retrieves the details of an existing withdrawal. - - Required permissions: - - `payout:withdrawal:read` - - `payout:destination:read` - - Parameters - ---------- - id : str - The unique identifier of the withdrawal to retrieve. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - Withdrawal - A successful response - - Examples - -------- - from whop_sdk import Whop - - client = Whop( - "2026-08-21-1", - idempotency_key="YOUR_IDEMPOTENCY_KEY", - token="YOUR_TOKEN", - ) - client.withdrawals.retrieve( - id="wdrl_xxxxxxxxxxxxx", - ) - """ - _response = self._raw_client.retrieve(id, request_options=request_options) - return _response.data - - def generate_pdf( - self, id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> GeneratePdfWithdrawalsResponse: - """ - Generates a withdrawal PDF invoice and returns a temporary download URL. - - Required permissions: - - `payout:withdrawal:read` - - Parameters - ---------- - id : str - The unique identifier of the withdrawal to generate a PDF for. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GeneratePdfWithdrawalsResponse - A successful response - - Examples - -------- - from whop_sdk import Whop - - client = Whop( - "2026-08-21-1", - idempotency_key="YOUR_IDEMPOTENCY_KEY", - token="YOUR_TOKEN", - ) - client.withdrawals.generate_pdf( - id="wdrl_xxxxxxxxxxxxx", - ) - """ - _response = self._raw_client.generate_pdf(id, request_options=request_options) - return _response.data - - -class AsyncWithdrawalsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawWithdrawalsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawWithdrawalsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawWithdrawalsClient - """ - return self._raw_client - - async def list( - self, - *, - company_id: str, - after: typing.Optional[str] = None, - before: typing.Optional[str] = None, - first: typing.Optional[int] = None, - last: typing.Optional[int] = None, - direction: typing.Optional[Direction] = None, - created_before: typing.Optional[dt.datetime] = None, - created_after: typing.Optional[dt.datetime] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncPager[WithdrawalListItem, ListWithdrawalsResponse]: - """ - Returns a paginated list of withdrawals for a company, with optional sorting and date filtering. - - Required permissions: - - `payout:withdrawal:read` - - Parameters - ---------- - company_id : str - The unique identifier of the company to list withdrawals for. - - after : typing.Optional[str] - Returns the elements in the list that come after the specified cursor. - - before : typing.Optional[str] - Returns the elements in the list that come before the specified cursor. - - first : typing.Optional[int] - Returns the first _n_ elements from the list. - - last : typing.Optional[int] - Returns the last _n_ elements from the list. - - direction : typing.Optional[Direction] - - created_before : typing.Optional[dt.datetime] - Only return withdrawals created before this timestamp. - - created_after : typing.Optional[dt.datetime] - Only return withdrawals created after this timestamp. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncPager[WithdrawalListItem, ListWithdrawalsResponse] - A successful response - - Examples - -------- - import asyncio - import datetime - - from whop_sdk import AsyncWhop - - client = AsyncWhop( - "2026-08-21-1", - idempotency_key="YOUR_IDEMPOTENCY_KEY", - token="YOUR_TOKEN", - ) - - - async def main() -> None: - response = await client.withdrawals.list( - first=42, - last=42, - company_id="biz_xxxxxxxxxxxxxx", - created_before=datetime.datetime.fromisoformat( - "2023-12-01 05:00:00+00:00", - ), - created_after=datetime.datetime.fromisoformat( - "2023-12-01 05:00:00+00:00", - ), - ) - async for item in response: - yield item - - # alternatively, you can paginate page-by-page - async for page in response.iter_pages(): - yield page - - - asyncio.run(main()) - """ - return await self._raw_client.list( - company_id=company_id, - after=after, - before=before, - first=first, - last=last, - direction=direction, - created_before=created_before, - created_after=created_after, - request_options=request_options, - ) - - async def create( - self, - *, - amount: float, - company_id: str, - currency: Currencies, - acknowledge_bank_warning: typing.Optional[bool] = OMIT, - idempotency_key: typing.Optional[str] = OMIT, - payout_method_id: typing.Optional[str] = OMIT, - platform_covers_fees: typing.Optional[bool] = OMIT, - speed: typing.Optional[WithdrawalSpeeds] = OMIT, - statement_descriptor: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> Withdrawal: - """ - Creates a withdrawal request for a ledger account - - Required permissions: - - `payout:withdraw_funds` - - `payout:destination:read` - - Parameters - ---------- - amount : float - The amount to withdraw in the specified currency - - company_id : str - The ID of the company to withdraw from. - - currency : Currencies - The currency that is being withdrawn. - - acknowledge_bank_warning : typing.Optional[bool] - Set to true to continue when the bank could not confirm the account holder's name, or false to be refused in that case so the creator can fix the account or link their bank first. Omitting the argument skips the warning gate — a client that cannot show the warning keeps its pre-gate behavior. - - idempotency_key : typing.Optional[str] - A client-generated key that makes retries safe. Retrying with the same key returns the original withdrawal instead of creating a second one. - - payout_method_id : typing.Optional[str] - The ID of the payout method to use for the withdrawal. - - platform_covers_fees : typing.Optional[bool] - Whether the platform covers the payout fees. - - speed : typing.Optional[WithdrawalSpeeds] - The processing speed for the withdrawal. Either standard or instant. - - statement_descriptor : typing.Optional[str] - Custom statement descriptor for the withdrawal. Must be between 5 and 22 characters and contain only alphanumeric characters. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - Withdrawal - A successful response - - Examples - -------- - import asyncio - - from whop_sdk import AsyncWhop - - client = AsyncWhop( - "2026-08-21-1", - idempotency_key="YOUR_IDEMPOTENCY_KEY", - token="YOUR_TOKEN", - ) - - - async def main() -> None: - await client.withdrawals.create( - amount=6.9, - company_id="biz_xxxxxxxxxxxxxx", - currency="usd", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create( - amount=amount, - company_id=company_id, - currency=currency, - acknowledge_bank_warning=acknowledge_bank_warning, - idempotency_key=idempotency_key, - payout_method_id=payout_method_id, - platform_covers_fees=platform_covers_fees, - speed=speed, - statement_descriptor=statement_descriptor, - request_options=request_options, - ) - return _response.data - - async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Withdrawal: - """ - Retrieves the details of an existing withdrawal. - - Required permissions: - - `payout:withdrawal:read` - - `payout:destination:read` - - Parameters - ---------- - id : str - The unique identifier of the withdrawal to retrieve. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - Withdrawal - A successful response - - Examples - -------- - import asyncio - - from whop_sdk import AsyncWhop - - client = AsyncWhop( - "2026-08-21-1", - idempotency_key="YOUR_IDEMPOTENCY_KEY", - token="YOUR_TOKEN", - ) - - - async def main() -> None: - await client.withdrawals.retrieve( - id="wdrl_xxxxxxxxxxxxx", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.retrieve(id, request_options=request_options) - return _response.data - - async def generate_pdf( - self, id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> GeneratePdfWithdrawalsResponse: - """ - Generates a withdrawal PDF invoice and returns a temporary download URL. - - Required permissions: - - `payout:withdrawal:read` - - Parameters - ---------- - id : str - The unique identifier of the withdrawal to generate a PDF for. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - GeneratePdfWithdrawalsResponse - A successful response - - Examples - -------- - import asyncio - - from whop_sdk import AsyncWhop - - client = AsyncWhop( - "2026-08-21-1", - idempotency_key="YOUR_IDEMPOTENCY_KEY", - token="YOUR_TOKEN", - ) - - - async def main() -> None: - await client.withdrawals.generate_pdf( - id="wdrl_xxxxxxxxxxxxx", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.generate_pdf(id, request_options=request_options) - return _response.data diff --git a/src/whop_sdk/withdrawals/raw_client.py b/src/whop_sdk/withdrawals/raw_client.py deleted file mode 100644 index 97f0f49f..00000000 --- a/src/whop_sdk/withdrawals/raw_client.py +++ /dev/null @@ -1,1246 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.datetime_utils import serialize_datetime -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import encode_path_param -from ..core.pagination import AsyncPager, SyncPager -from ..core.parse_error import ParsingError -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.bad_request_error import BadRequestError -from ..errors.forbidden_error import ForbiddenError -from ..errors.internal_server_error import InternalServerError -from ..errors.not_found_error import NotFoundError -from ..errors.too_many_requests_error import TooManyRequestsError -from ..errors.unauthorized_error import UnauthorizedError -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.currencies import Currencies -from ..types.direction import Direction -from ..types.withdrawal import Withdrawal -from ..types.withdrawal_list_item import WithdrawalListItem -from ..types.withdrawal_speeds import WithdrawalSpeeds -from .types.generate_pdf_withdrawals_response import GeneratePdfWithdrawalsResponse -from .types.list_withdrawals_response import ListWithdrawalsResponse -from pydantic import ValidationError - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawWithdrawalsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def list( - self, - *, - company_id: str, - after: typing.Optional[str] = None, - before: typing.Optional[str] = None, - first: typing.Optional[int] = None, - last: typing.Optional[int] = None, - direction: typing.Optional[Direction] = None, - created_before: typing.Optional[dt.datetime] = None, - created_after: typing.Optional[dt.datetime] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> SyncPager[WithdrawalListItem, ListWithdrawalsResponse]: - """ - Returns a paginated list of withdrawals for a company, with optional sorting and date filtering. - - Required permissions: - - `payout:withdrawal:read` - - Parameters - ---------- - company_id : str - The unique identifier of the company to list withdrawals for. - - after : typing.Optional[str] - Returns the elements in the list that come after the specified cursor. - - before : typing.Optional[str] - Returns the elements in the list that come before the specified cursor. - - first : typing.Optional[int] - Returns the first _n_ elements from the list. - - last : typing.Optional[int] - Returns the last _n_ elements from the list. - - direction : typing.Optional[Direction] - - created_before : typing.Optional[dt.datetime] - Only return withdrawals created before this timestamp. - - created_after : typing.Optional[dt.datetime] - Only return withdrawals created after this timestamp. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - SyncPager[WithdrawalListItem, ListWithdrawalsResponse] - A successful response - """ - _response = self._client_wrapper.httpx_client.request( - "withdrawals", - method="GET", - params={ - "after": after, - "before": before, - "first": first, - "last": last, - "company_id": company_id, - "direction": direction, - "created_before": serialize_datetime(created_before) if created_before is not None else None, - "created_after": serialize_datetime(created_after) if created_after is not None else None, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _parsed_response = typing.cast( - ListWithdrawalsResponse, - parse_obj_as( - type_=ListWithdrawalsResponse, # type: ignore - object_=_response.json(), - ), - ) - _items = _parsed_response.data - _has_next = False - _get_next = None - if _parsed_response.page_info is not None: - _parsed_next = _parsed_response.page_info.end_cursor - _has_next = _parsed_next is not None and _parsed_next != "" - _get_next = lambda: self.list( - company_id=company_id, - after=_parsed_next, - before=before, - first=first, - last=last, - direction=direction, - created_before=created_before, - created_after=created_after, - request_options=request_options, - ) - return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - except ValidationError as e: - raise ParsingError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - def create( - self, - *, - amount: float, - company_id: str, - currency: Currencies, - acknowledge_bank_warning: typing.Optional[bool] = OMIT, - idempotency_key: typing.Optional[str] = OMIT, - payout_method_id: typing.Optional[str] = OMIT, - platform_covers_fees: typing.Optional[bool] = OMIT, - speed: typing.Optional[WithdrawalSpeeds] = OMIT, - statement_descriptor: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[Withdrawal]: - """ - Creates a withdrawal request for a ledger account - - Required permissions: - - `payout:withdraw_funds` - - `payout:destination:read` - - Parameters - ---------- - amount : float - The amount to withdraw in the specified currency - - company_id : str - The ID of the company to withdraw from. - - currency : Currencies - The currency that is being withdrawn. - - acknowledge_bank_warning : typing.Optional[bool] - Set to true to continue when the bank could not confirm the account holder's name, or false to be refused in that case so the creator can fix the account or link their bank first. Omitting the argument skips the warning gate — a client that cannot show the warning keeps its pre-gate behavior. - - idempotency_key : typing.Optional[str] - A client-generated key that makes retries safe. Retrying with the same key returns the original withdrawal instead of creating a second one. - - payout_method_id : typing.Optional[str] - The ID of the payout method to use for the withdrawal. - - platform_covers_fees : typing.Optional[bool] - Whether the platform covers the payout fees. - - speed : typing.Optional[WithdrawalSpeeds] - The processing speed for the withdrawal. Either standard or instant. - - statement_descriptor : typing.Optional[str] - Custom statement descriptor for the withdrawal. Must be between 5 and 22 characters and contain only alphanumeric characters. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[Withdrawal] - A successful response - """ - _response = self._client_wrapper.httpx_client.request( - "withdrawals", - method="POST", - json={ - "acknowledge_bank_warning": acknowledge_bank_warning, - "amount": amount, - "company_id": company_id, - "currency": currency, - "idempotency_key": idempotency_key, - "payout_method_id": payout_method_id, - "platform_covers_fees": platform_covers_fees, - "speed": speed, - "statement_descriptor": statement_descriptor, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - Withdrawal, - parse_obj_as( - type_=Withdrawal, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - except ValidationError as e: - raise ParsingError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Withdrawal]: - """ - Retrieves the details of an existing withdrawal. - - Required permissions: - - `payout:withdrawal:read` - - `payout:destination:read` - - Parameters - ---------- - id : str - The unique identifier of the withdrawal to retrieve. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[Withdrawal] - A successful response - """ - _response = self._client_wrapper.httpx_client.request( - f"withdrawals/{encode_path_param(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - Withdrawal, - parse_obj_as( - type_=Withdrawal, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - except ValidationError as e: - raise ParsingError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - def generate_pdf( - self, id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[GeneratePdfWithdrawalsResponse]: - """ - Generates a withdrawal PDF invoice and returns a temporary download URL. - - Required permissions: - - `payout:withdrawal:read` - - Parameters - ---------- - id : str - The unique identifier of the withdrawal to generate a PDF for. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[GeneratePdfWithdrawalsResponse] - A successful response - """ - _response = self._client_wrapper.httpx_client.request( - f"withdrawals/{encode_path_param(id)}/generate_pdf", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GeneratePdfWithdrawalsResponse, - parse_obj_as( - type_=GeneratePdfWithdrawalsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - except ValidationError as e: - raise ParsingError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - -class AsyncRawWithdrawalsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( - self, - *, - company_id: str, - after: typing.Optional[str] = None, - before: typing.Optional[str] = None, - first: typing.Optional[int] = None, - last: typing.Optional[int] = None, - direction: typing.Optional[Direction] = None, - created_before: typing.Optional[dt.datetime] = None, - created_after: typing.Optional[dt.datetime] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncPager[WithdrawalListItem, ListWithdrawalsResponse]: - """ - Returns a paginated list of withdrawals for a company, with optional sorting and date filtering. - - Required permissions: - - `payout:withdrawal:read` - - Parameters - ---------- - company_id : str - The unique identifier of the company to list withdrawals for. - - after : typing.Optional[str] - Returns the elements in the list that come after the specified cursor. - - before : typing.Optional[str] - Returns the elements in the list that come before the specified cursor. - - first : typing.Optional[int] - Returns the first _n_ elements from the list. - - last : typing.Optional[int] - Returns the last _n_ elements from the list. - - direction : typing.Optional[Direction] - - created_before : typing.Optional[dt.datetime] - Only return withdrawals created before this timestamp. - - created_after : typing.Optional[dt.datetime] - Only return withdrawals created after this timestamp. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncPager[WithdrawalListItem, ListWithdrawalsResponse] - A successful response - """ - _response = await self._client_wrapper.httpx_client.request( - "withdrawals", - method="GET", - params={ - "after": after, - "before": before, - "first": first, - "last": last, - "company_id": company_id, - "direction": direction, - "created_before": serialize_datetime(created_before) if created_before is not None else None, - "created_after": serialize_datetime(created_after) if created_after is not None else None, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _parsed_response = typing.cast( - ListWithdrawalsResponse, - parse_obj_as( - type_=ListWithdrawalsResponse, # type: ignore - object_=_response.json(), - ), - ) - _items = _parsed_response.data - _has_next = False - _get_next = None - if _parsed_response.page_info is not None: - _parsed_next = _parsed_response.page_info.end_cursor - _has_next = _parsed_next is not None and _parsed_next != "" - - async def _get_next(): - return await self.list( - company_id=company_id, - after=_parsed_next, - before=before, - first=first, - last=last, - direction=direction, - created_before=created_before, - created_after=created_after, - request_options=request_options, - ) - - return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - except ValidationError as e: - raise ParsingError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def create( - self, - *, - amount: float, - company_id: str, - currency: Currencies, - acknowledge_bank_warning: typing.Optional[bool] = OMIT, - idempotency_key: typing.Optional[str] = OMIT, - payout_method_id: typing.Optional[str] = OMIT, - platform_covers_fees: typing.Optional[bool] = OMIT, - speed: typing.Optional[WithdrawalSpeeds] = OMIT, - statement_descriptor: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[Withdrawal]: - """ - Creates a withdrawal request for a ledger account - - Required permissions: - - `payout:withdraw_funds` - - `payout:destination:read` - - Parameters - ---------- - amount : float - The amount to withdraw in the specified currency - - company_id : str - The ID of the company to withdraw from. - - currency : Currencies - The currency that is being withdrawn. - - acknowledge_bank_warning : typing.Optional[bool] - Set to true to continue when the bank could not confirm the account holder's name, or false to be refused in that case so the creator can fix the account or link their bank first. Omitting the argument skips the warning gate — a client that cannot show the warning keeps its pre-gate behavior. - - idempotency_key : typing.Optional[str] - A client-generated key that makes retries safe. Retrying with the same key returns the original withdrawal instead of creating a second one. - - payout_method_id : typing.Optional[str] - The ID of the payout method to use for the withdrawal. - - platform_covers_fees : typing.Optional[bool] - Whether the platform covers the payout fees. - - speed : typing.Optional[WithdrawalSpeeds] - The processing speed for the withdrawal. Either standard or instant. - - statement_descriptor : typing.Optional[str] - Custom statement descriptor for the withdrawal. Must be between 5 and 22 characters and contain only alphanumeric characters. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[Withdrawal] - A successful response - """ - _response = await self._client_wrapper.httpx_client.request( - "withdrawals", - method="POST", - json={ - "acknowledge_bank_warning": acknowledge_bank_warning, - "amount": amount, - "company_id": company_id, - "currency": currency, - "idempotency_key": idempotency_key, - "payout_method_id": payout_method_id, - "platform_covers_fees": platform_covers_fees, - "speed": speed, - "statement_descriptor": statement_descriptor, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - Withdrawal, - parse_obj_as( - type_=Withdrawal, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - except ValidationError as e: - raise ParsingError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def retrieve( - self, id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[Withdrawal]: - """ - Retrieves the details of an existing withdrawal. - - Required permissions: - - `payout:withdrawal:read` - - `payout:destination:read` - - Parameters - ---------- - id : str - The unique identifier of the withdrawal to retrieve. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[Withdrawal] - A successful response - """ - _response = await self._client_wrapper.httpx_client.request( - f"withdrawals/{encode_path_param(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - Withdrawal, - parse_obj_as( - type_=Withdrawal, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - except ValidationError as e: - raise ParsingError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - - async def generate_pdf( - self, id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[GeneratePdfWithdrawalsResponse]: - """ - Generates a withdrawal PDF invoice and returns a temporary download URL. - - Required permissions: - - `payout:withdrawal:read` - - Parameters - ---------- - id : str - The unique identifier of the withdrawal to generate a PDF for. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[GeneratePdfWithdrawalsResponse] - A successful response - """ - _response = await self._client_wrapper.httpx_client.request( - f"withdrawals/{encode_path_param(id)}/generate_pdf", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GeneratePdfWithdrawalsResponse, - parse_obj_as( - type_=GeneratePdfWithdrawalsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) - except ValidationError as e: - raise ParsingError( - status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e - ) - raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/whop_sdk/withdrawals/types/__init__.py b/src/whop_sdk/withdrawals/types/__init__.py deleted file mode 100644 index e1c4f6e3..00000000 --- a/src/whop_sdk/withdrawals/types/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - -import typing -from importlib import import_module - -if typing.TYPE_CHECKING: - from .generate_pdf_withdrawals_response import GeneratePdfWithdrawalsResponse - from .list_withdrawals_response import ListWithdrawalsResponse -_dynamic_imports: typing.Dict[str, str] = { - "GeneratePdfWithdrawalsResponse": ".generate_pdf_withdrawals_response", - "ListWithdrawalsResponse": ".list_withdrawals_response", -} - - -def __getattr__(attr_name: str) -> typing.Any: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") - try: - module = import_module(module_name, __package__) - if module_name == f".{attr_name}": - return module - else: - return getattr(module, attr_name) - except ImportError as e: - raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e - except AttributeError as e: - raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e - - -def __dir__(): - lazy_attrs = list(_dynamic_imports.keys()) - return sorted(lazy_attrs) - - -__all__ = ["GeneratePdfWithdrawalsResponse", "ListWithdrawalsResponse"] diff --git a/src/whop_sdk/withdrawals/types/list_withdrawals_response.py b/src/whop_sdk/withdrawals/types/list_withdrawals_response.py deleted file mode 100644 index b0b3a0d7..00000000 --- a/src/whop_sdk/withdrawals/types/list_withdrawals_response.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ...types.page_info import PageInfo -from ...types.withdrawal_list_item import WithdrawalListItem - - -class ListWithdrawalsResponse(UniversalBaseModel): - """ - The connection type for PublicWithdrawal. - """ - - data: typing.List[WithdrawalListItem] = pydantic.Field() - """ - A list of nodes. - """ - - page_info: PageInfo = pydantic.Field() - """ - Information to aid in pagination. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow