From 2b154b841db5ab62e02fc84c2ae1c7fdd66f10df Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 25 Aug 2026 01:56:36 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 5.28.0 --- .fern/metadata.json | 11 +- .fern/replay.lock | 10 + .fernignore | 3 + .gitattributes | 1 + README.md | 35 +- reference.md | 401 +++++++++++++++++- src/whop_sdk/__init__.py | 316 ++++++++++++-- src/whop_sdk/access_tokens/client.py | 4 +- src/whop_sdk/account_links/client.py | 4 +- src/whop_sdk/accounts/client.py | 28 +- src/whop_sdk/accounts/preferences/client.py | 8 +- src/whop_sdk/accounts/reserves/client.py | 4 +- src/whop_sdk/ad_campaigns/client.py | 36 +- src/whop_sdk/ad_groups/__init__.py | 3 + src/whop_sdk/ad_groups/client.py | 63 ++- src/whop_sdk/ad_groups/raw_client.py | 23 + src/whop_sdk/ad_groups/types/__init__.py | 5 + ...oups_request_special_ad_categories_item.py | 7 + src/whop_sdk/ad_reports/client.py | 4 +- src/whop_sdk/ads/client.py | 32 +- src/whop_sdk/affiliates/client.py | 20 +- src/whop_sdk/affiliates/overrides/client.py | 20 +- src/whop_sdk/ai_chats/client.py | 20 +- src/whop_sdk/api_keys/client.py | 28 +- ...reate_api_keys_request_api_version_date.py | 1 + ...pdate_api_keys_request_api_version_date.py | 1 + src/whop_sdk/app_builds/client.py | 16 +- src/whop_sdk/apps/client.py | 46 +- src/whop_sdk/apps/raw_client.py | 12 + src/whop_sdk/audiences/client.py | 20 +- src/whop_sdk/authorized_users/client.py | 16 +- src/whop_sdk/bounties/client.py | 20 +- src/whop_sdk/bounties/submissions/client.py | 8 +- src/whop_sdk/bounty_submissions/client.py | 20 +- src/whop_sdk/card_transactions/client.py | 8 +- src/whop_sdk/cards/client.py | 16 +- src/whop_sdk/chat_channels/client.py | 12 +- .../checkout_configurations/client.py | 16 +- src/whop_sdk/checkout_sessions/__init__.py | 37 ++ src/whop_sdk/checkout_sessions/client.py | 261 ++++++++++++ src/whop_sdk/checkout_sessions/raw_client.py | 339 +++++++++++++++ .../checkout_sessions/types/__init__.py | 38 ++ ...te_checkout_sessions_request_items_item.py | 27 ++ .../create_checkout_sessions_request_mode.py | 5 + src/whop_sdk/client.py | 27 +- src/whop_sdk/companies/client.py | 20 +- .../company_token_transactions/client.py | 12 +- src/whop_sdk/core/client_wrapper.py | 2 +- src/whop_sdk/course_chapters/client.py | 20 +- .../course_lesson_interactions/client.py | 8 +- src/whop_sdk/course_lessons/client.py | 32 +- src/whop_sdk/course_students/client.py | 8 +- src/whop_sdk/courses/client.py | 20 +- src/whop_sdk/deposits/client.py | 4 +- src/whop_sdk/dispute_alerts/client.py | 8 +- src/whop_sdk/disputes/client.py | 36 +- src/whop_sdk/disputes/raw_client.py | 4 +- src/whop_sdk/dm_channels/client.py | 20 +- src/whop_sdk/dm_members/client.py | 20 +- src/whop_sdk/entries/client.py | 16 +- src/whop_sdk/events/client.py | 16 +- src/whop_sdk/experiences/client.py | 32 +- src/whop_sdk/exports/client.py | 16 +- src/whop_sdk/exports/raw_client.py | 4 +- .../types/create_exports_request_resource.py | 4 +- .../types/list_exports_request_resource.py | 4 +- src/whop_sdk/fee_markups/client.py | 12 +- src/whop_sdk/files/__init__.py | 9 +- src/whop_sdk/files/client.py | 220 ++++++++-- src/whop_sdk/files/raw_client.py | 379 +++++++++-------- src/whop_sdk/files/types/__init__.py | 10 +- ...lete_files_request_multipart_parts_item.py | 27 ++ .../types/create_files_request_visibility.py | 5 + .../files/types/create_files_response.py | 68 --- src/whop_sdk/financial_activity/client.py | 4 +- ...ancial_activity_request_line_types_item.py | 2 + src/whop_sdk/forum_posts/client.py | 16 +- src/whop_sdk/forums/client.py | 12 +- src/whop_sdk/identity_profiles/client.py | 16 +- src/whop_sdk/invoices/client.py | 40 +- src/whop_sdk/invoices/raw_client.py | 4 +- .../types/create_invoices_request_product.py | 2 +- .../create_invoices_request_product_id.py | 2 +- ...ices_request_product_id_line_items_item.py | 2 +- ...nvoices_request_product_line_items_item.py | 2 +- ...update_invoices_request_line_items_item.py | 2 +- src/whop_sdk/leads/client.py | 16 +- src/whop_sdk/ledger_accounts/client.py | 4 +- src/whop_sdk/ledgers/client.py | 4 +- ...report_response_rows_item_line_category.py | 2 + src/whop_sdk/media/client.py | 8 +- src/whop_sdk/members/client.py | 8 +- src/whop_sdk/members/logs/client.py | 4 +- src/whop_sdk/memberships/client.py | 48 +-- src/whop_sdk/messages/client.py | 20 +- src/whop_sdk/notifications/client.py | 20 +- src/whop_sdk/notifications/topics/client.py | 4 +- src/whop_sdk/partners/businesses/client.py | 8 +- .../partners/businesses/earnings/client.py | 4 +- src/whop_sdk/partners/client.py | 12 +- src/whop_sdk/payment_method_domains/client.py | 20 +- src/whop_sdk/payment_methods/client.py | 12 +- src/whop_sdk/payments/client.py | 36 +- src/whop_sdk/payout_accounts/client.py | 4 +- src/whop_sdk/payout_methods/client.py | 8 +- src/whop_sdk/payouts/client.py | 12 +- src/whop_sdk/payouts/methods/client.py | 16 +- ...e_supported_payout_method_delivery_type.py | 4 +- ...m_supported_payout_method_delivery_type.py | 4 +- ...e_supported_payout_method_delivery_type.py | 4 +- .../payouts/supported_methods/client.py | 4 +- ...ethods_response_data_item_delivery_type.py | 10 +- ...d_supported_payout_method_delivery_type.py | 4 +- ...d_supported_payout_method_delivery_type.py | 4 +- ...a_supported_payout_method_delivery_type.py | 4 +- ...d_supported_payout_method_delivery_type.py | 4 +- ...d_supported_payout_method_delivery_type.py | 4 +- ...d_supported_payout_method_delivery_type.py | 4 +- ...d_supported_payout_method_delivery_type.py | 4 +- src/whop_sdk/people/client.py | 8 +- src/whop_sdk/permissions/client.py | 4 +- src/whop_sdk/plans/client.py | 50 ++- src/whop_sdk/plans/raw_client.py | 24 +- src/whop_sdk/products/__init__.py | 3 + src/whop_sdk/products/client.py | 137 ++++-- src/whop_sdk/products/raw_client.py | 121 +++++- src/whop_sdk/products/types/__init__.py | 3 + .../list_products_request_plan_types_item.py | 5 + src/whop_sdk/promo_codes/client.py | 24 +- src/whop_sdk/reactions/client.py | 16 +- src/whop_sdk/recommended_actions/client.py | 16 +- src/whop_sdk/refunds/client.py | 8 +- .../resolution_center_cases/client.py | 44 +- src/whop_sdk/reviews/client.py | 8 +- src/whop_sdk/setup_intents/client.py | 20 +- src/whop_sdk/shipments/client.py | 16 +- src/whop_sdk/social_accounts/client.py | 24 +- src/whop_sdk/stats/client.py | 20 +- src/whop_sdk/support_channels/client.py | 12 +- src/whop_sdk/swaps/client.py | 16 +- src/whop_sdk/team_members/client.py | 20 +- src/whop_sdk/topups/client.py | 4 +- src/whop_sdk/transfers/client.py | 16 +- src/whop_sdk/types/__init__.py | 296 +++++++++++-- src/whop_sdk/types/account.py | 21 + src/whop_sdk/types/ad_group.py | 2 +- .../types/ad_group_geo_locations_body.py | 2 +- ..._group_geo_locations_body_zips_item_key.py | 2 +- .../types/api_key_api_version_date.py | 1 + src/whop_sdk/types/app.py | 2 + src/whop_sdk/types/app_elements_used_item.py | 44 ++ src/whop_sdk/types/bounty.py | 12 + ...ny.py => bounty_active_livestream_feed.py} | 15 +- src/whop_sdk/types/checkout_session.py | 245 +++++++++++ .../checkout_session_authenticate_action.py | 22 + .../checkout_session_await_claim_action.py | 28 ++ ...eckout_session_await_claim_action_state.py | 5 + .../types/checkout_session_branding.py | 74 ++++ .../checkout_session_branding_border_style.py | 5 + .../checkout_session_branding_font_family.py | 5 + .../types/checkout_session_breakdown.py | 50 +++ .../checkout_session_breakdown_adjustment.py | 51 +++ ...ut_session_breakdown_adjustment_applied.py | 5 + ...ckout_session_breakdown_adjustment_kind.py | 5 + ...out_session_breakdown_adjustment_status.py | 5 + .../checkout_session_breakdown_currency.py | 99 +++++ .../checkout_session_breakdown_display.py | 29 ++ ...kout_session_breakdown_display_headline.py | 51 +++ ...session_breakdown_display_headline_kind.py | 5 + .../checkout_session_breakdown_display_row.py | 51 +++ ...ut_session_breakdown_display_row_detail.py | 89 ++++ ...on_breakdown_display_row_detail_applied.py | 5 + ...kout_session_breakdown_display_row_kind.py | 32 ++ ...ut_session_breakdown_display_row_status.py | 5 + ...kout_session_breakdown_display_sections.py | 23 + .../types/checkout_session_breakdown_line.py | 44 ++ .../checkout_session_breakdown_line_kind.py | 5 + .../checkout_session_breakdown_upcoming.py | 87 ++++ ...session_breakdown_upcoming_installments.py | 53 +++ ...ut_session_breakdown_upcoming_one_time.py} | 19 +- ...ut_session_breakdown_upcoming_recurring.py | 48 +++ .../types/checkout_session_buyer_identity.py | 5 + .../checkout_session_buyer_identity_method.py | 10 + .../types/checkout_session_complete_action.py | 33 ++ .../checkout_session_complete_action_kind.py | 5 + .../types/checkout_session_confirm_error.py | 28 ++ .../checkout_session_confirm_error_code.py | 39 ++ .../types/checkout_session_cta_label.py | 7 + .../types/checkout_session_custom_field.py | 48 +++ ...heckout_session_custom_field_field_type.py | 5 + ...checkout_session_custom_field_response.py} | 17 +- src/whop_sdk/types/checkout_session_entry.py | 28 ++ .../types/checkout_session_entry_status.py | 7 + src/whop_sdk/types/checkout_session_item.py | 52 +++ src/whop_sdk/types/checkout_session_mode.py | 5 + .../types/checkout_session_next_action.py | 162 +++++++ .../types/checkout_session_payment.py | 28 ++ .../types/checkout_session_payment_status.py | 7 + src/whop_sdk/types/checkout_session_promo.py | 50 +++ .../types/checkout_session_promo_currency.py | 99 +++++ .../types/checkout_session_promo_duration.py | 5 + .../checkout_session_promo_promo_type.py | 5 + src/whop_sdk/types/checkout_session_quote.py | 58 +++ .../types/checkout_session_redirect_action.py | 27 ++ .../types/checkout_session_requirement.py | 25 ++ .../checkout_session_requirement_type.py | 7 + src/whop_sdk/types/checkout_session_seller.py | 48 +++ .../types/checkout_session_seller_terms.py | 42 ++ .../checkout_session_shipping_address.py | 52 +++ src/whop_sdk/types/checkout_session_status.py | 5 + .../types/checkout_session_tax_behavior.py | 5 + src/whop_sdk/types/checkout_session_tax_id.py | 28 ++ .../types/checkout_session_tax_id_type.py | 122 ++++++ .../types/checkout_session_three_ds_level.py | 5 + .../types/checkout_session_transfer.py | 32 ++ ...t_session_upgrade_authentication_action.py | 40 ++ ...de_authentication_action_sign_in_intent.py | 5 + ...> checkout_session_verify_phone_action.py} | 20 +- ...heckout_session_wait_for_payment_action.py | 27 ++ .../types/dispute_evidence_document.py | 55 ++- ...dispute_evidence_document_upload_status.py | 7 + .../dispute_evidence_document_visibility.py | 5 + src/whop_sdk/types/export_resource.py | 4 +- src/whop_sdk/types/file.py | 52 ++- .../{transfer.py => file_multipart_url.py} | 15 +- src/whop_sdk/types/file_upload_status.py | 5 + src/whop_sdk/types/forum_experience.py | 5 + .../types/forum_list_item_experience.py | 5 + src/whop_sdk/types/invoice_line_items_item.py | 2 +- .../invoice_list_item_line_items_item.py | 2 +- src/whop_sdk/types/ledger_activity.py | 6 + .../types/ledger_activity_line_type.py | 2 + src/whop_sdk/types/ledger_activity_payment.py | 56 +++ .../types/ledger_activity_payment_object.py | 5 + src/whop_sdk/types/ledger_activity_source.py | 21 + src/whop_sdk/types/product.py | 8 +- src/whop_sdk/types/product_list_item.py | 16 + src/whop_sdk/types/product_public_plan.py | 65 +++ .../types/product_public_plan_plan_type.py | 5 + .../types/product_public_plan_visibility.py | 5 + src/whop_sdk/types/transfer_destination.py | 46 -- src/whop_sdk/types/transfer_origin.py | 46 -- src/whop_sdk/users/client.py | 28 +- src/whop_sdk/users/oauth_grants/client.py | 8 +- src/whop_sdk/users/passkeys/client.py | 16 +- src/whop_sdk/users/preferences/client.py | 8 +- .../users/preferences/notifications/client.py | 4 +- .../notifications/experiences/client.py | 4 +- .../notifications/topics/client.py | 4 +- src/whop_sdk/verifications/client.py | 16 +- src/whop_sdk/webhooks/client.py | 40 +- src/whop_sdk/withdrawals/client.py | 16 +- 252 files changed, 5974 insertions(+), 1458 deletions(-) create mode 100644 .fern/replay.lock create mode 100644 .gitattributes create mode 100644 src/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_special_ad_categories_item.py create mode 100644 src/whop_sdk/checkout_sessions/__init__.py create mode 100644 src/whop_sdk/checkout_sessions/client.py create mode 100644 src/whop_sdk/checkout_sessions/raw_client.py create mode 100644 src/whop_sdk/checkout_sessions/types/__init__.py create mode 100644 src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_items_item.py create mode 100644 src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_mode.py create mode 100644 src/whop_sdk/files/types/complete_files_request_multipart_parts_item.py create mode 100644 src/whop_sdk/files/types/create_files_request_visibility.py delete mode 100644 src/whop_sdk/files/types/create_files_response.py create mode 100644 src/whop_sdk/products/types/list_products_request_plan_types_item.py create mode 100644 src/whop_sdk/types/app_elements_used_item.py rename src/whop_sdk/types/{transfer_destination_company.py => bounty_active_livestream_feed.py} (62%) create mode 100644 src/whop_sdk/types/checkout_session.py create mode 100644 src/whop_sdk/types/checkout_session_authenticate_action.py create mode 100644 src/whop_sdk/types/checkout_session_await_claim_action.py create mode 100644 src/whop_sdk/types/checkout_session_await_claim_action_state.py create mode 100644 src/whop_sdk/types/checkout_session_branding.py create mode 100644 src/whop_sdk/types/checkout_session_branding_border_style.py create mode 100644 src/whop_sdk/types/checkout_session_branding_font_family.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_adjustment.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_adjustment_applied.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_adjustment_kind.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_adjustment_status.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_currency.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_display.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_display_headline.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_display_headline_kind.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_display_row.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_display_row_detail.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_display_row_detail_applied.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_display_row_kind.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_display_row_status.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_display_sections.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_line.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_line_kind.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_upcoming.py create mode 100644 src/whop_sdk/types/checkout_session_breakdown_upcoming_installments.py rename src/whop_sdk/types/{transfer_origin_user.py => checkout_session_breakdown_upcoming_one_time.py} (57%) create mode 100644 src/whop_sdk/types/checkout_session_breakdown_upcoming_recurring.py create mode 100644 src/whop_sdk/types/checkout_session_buyer_identity.py create mode 100644 src/whop_sdk/types/checkout_session_buyer_identity_method.py create mode 100644 src/whop_sdk/types/checkout_session_complete_action.py create mode 100644 src/whop_sdk/types/checkout_session_complete_action_kind.py create mode 100644 src/whop_sdk/types/checkout_session_confirm_error.py create mode 100644 src/whop_sdk/types/checkout_session_confirm_error_code.py create mode 100644 src/whop_sdk/types/checkout_session_cta_label.py create mode 100644 src/whop_sdk/types/checkout_session_custom_field.py create mode 100644 src/whop_sdk/types/checkout_session_custom_field_field_type.py rename src/whop_sdk/types/{transfer_origin_company.py => checkout_session_custom_field_response.py} (62%) create mode 100644 src/whop_sdk/types/checkout_session_entry.py create mode 100644 src/whop_sdk/types/checkout_session_entry_status.py create mode 100644 src/whop_sdk/types/checkout_session_item.py create mode 100644 src/whop_sdk/types/checkout_session_mode.py create mode 100644 src/whop_sdk/types/checkout_session_next_action.py create mode 100644 src/whop_sdk/types/checkout_session_payment.py create mode 100644 src/whop_sdk/types/checkout_session_payment_status.py create mode 100644 src/whop_sdk/types/checkout_session_promo.py create mode 100644 src/whop_sdk/types/checkout_session_promo_currency.py create mode 100644 src/whop_sdk/types/checkout_session_promo_duration.py create mode 100644 src/whop_sdk/types/checkout_session_promo_promo_type.py create mode 100644 src/whop_sdk/types/checkout_session_quote.py create mode 100644 src/whop_sdk/types/checkout_session_redirect_action.py create mode 100644 src/whop_sdk/types/checkout_session_requirement.py create mode 100644 src/whop_sdk/types/checkout_session_requirement_type.py create mode 100644 src/whop_sdk/types/checkout_session_seller.py create mode 100644 src/whop_sdk/types/checkout_session_seller_terms.py create mode 100644 src/whop_sdk/types/checkout_session_shipping_address.py create mode 100644 src/whop_sdk/types/checkout_session_status.py create mode 100644 src/whop_sdk/types/checkout_session_tax_behavior.py create mode 100644 src/whop_sdk/types/checkout_session_tax_id.py create mode 100644 src/whop_sdk/types/checkout_session_tax_id_type.py create mode 100644 src/whop_sdk/types/checkout_session_three_ds_level.py create mode 100644 src/whop_sdk/types/checkout_session_transfer.py create mode 100644 src/whop_sdk/types/checkout_session_upgrade_authentication_action.py create mode 100644 src/whop_sdk/types/checkout_session_upgrade_authentication_action_sign_in_intent.py rename src/whop_sdk/types/{transfer_destination_user.py => checkout_session_verify_phone_action.py} (52%) create mode 100644 src/whop_sdk/types/checkout_session_wait_for_payment_action.py create mode 100644 src/whop_sdk/types/dispute_evidence_document_upload_status.py create mode 100644 src/whop_sdk/types/dispute_evidence_document_visibility.py rename src/whop_sdk/types/{transfer.py => file_multipart_url.py} (63%) create mode 100644 src/whop_sdk/types/file_upload_status.py create mode 100644 src/whop_sdk/types/ledger_activity_payment.py create mode 100644 src/whop_sdk/types/ledger_activity_payment_object.py create mode 100644 src/whop_sdk/types/product_public_plan.py create mode 100644 src/whop_sdk/types/product_public_plan_plan_type.py create mode 100644 src/whop_sdk/types/product_public_plan_visibility.py delete mode 100644 src/whop_sdk/types/transfer_destination.py delete mode 100644 src/whop_sdk/types/transfer_origin.py diff --git a/.fern/metadata.json b/.fern/metadata.json index c3457793..f17b5184 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -10,12 +10,15 @@ }, "mypy_exclude": [ "src/whop_sdk/lib" - ] + ], + "extra_dependencies": { + "standardwebhooks": ">=1.0.1,<2" + } }, - "originGitCommit": "a26a97d2d8ee29f78819a299712fb3b4086d634e", + "originGitCommit": "ece201e2cfe67e8b10dd9627bd5e151dad29f1c5", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "0.0.41", + "requestedVersion": "1.0.13", "ciProvider": "unknown", - "sdkVersion": "0.0.41" + "sdkVersion": "1.0.13" } \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock new file mode 100644 index 00000000..006e7b56 --- /dev/null +++ b/.fern/replay.lock @@ -0,0 +1,10 @@ +# DO NOT EDIT MANUALLY - Managed by Fern Replay +version: "1.0" +generations: + - commit_sha: 77fdba62dce5d28c1b6d5afcd8663ad48a95bd91 + tree_hash: 634b88b9e4f6ef042a31e4ee97dc7531531486de + timestamp: 2026-08-25T01:56:33.113Z + cli_version: unknown + generator_versions: {} +current_generation: 77fdba62dce5d28c1b6d5afcd8663ad48a95bd91 +patches: [] diff --git a/.fernignore b/.fernignore index 8aa8afdc..2be0c841 100644 --- a/.fernignore +++ b/.fernignore @@ -45,3 +45,6 @@ .github/workflows/publish-main.yml src/whop_sdk/lib tests/custom +.fern/replay.lock +.fern/replay.yml +.gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..74928d6a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.fern/replay.lock linguist-generated=true diff --git a/README.md b/README.md index 816c370f..36074e65 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,32 @@ # Whop Python Library -[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Whop%2FPython) +[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fwhopio%2Fwhopsdk-python) [![pypi](https://img.shields.io/pypi/v/whop_sdk)](https://pypi.python.org/pypi/whop_sdk) The Whop SDK gives you typed access to the Whop API. Pass your API key to the client explicitly — the SDK reads no environment variables, so a client built without a key sends unauthenticated requests and the API answers 401. + ## Table of Contents - [Documentation](#documentation) - [Installation](#installation) - [Reference](#reference) - [Usage](#usage) -- [Migrating from 0.0.41 and earlier](#migrating-from-0041-and-earlier) - - [There is no environment-variable fallback](#there-is-no-environment-variable-fallback) -- [A first request](#a-first-request) +- [Migrating From 0 0 41 and Earlier](#migrating-from-0-0-41-and-earlier) +- [A First Request](#a-first-request) - [Environments](#environments) - [Async Client](#async-client) -- [Using aiohttp](#using-aiohttp) +- [Using Aiohttp](#using-aiohttp) - [Exception Handling](#exception-handling) - [Pagination](#pagination) - - [What a pager exposes](#what-a-pager-exposes) -- [Verifying user tokens](#verifying-user-tokens) +- [Verifying User Tokens](#verifying-user-tokens) - [Advanced](#advanced) - [Access Raw Response Data](#access-raw-response-data) - [Retries](#retries) - [Timeouts](#timeouts) - [Custom Client](#custom-client) - [Requirements](#requirements) -- [Determining the installed version](#determining-the-installed-version) +- [Determining The Installed Version](#determining-the-installed-version) - [Contributing](#contributing) ## Documentation @@ -226,26 +225,6 @@ for page in pager.iter_pages(): print(item) ``` -### What a pager exposes - -The pager is not the response body. It carries `items` (this page only), `has_next`, -`next_page()`, and `iter_pages()`, and iterating the pager itself walks every page. The -decoded response — `data` and `page_info` — is on `pager.response`: - -```python -from whop_sdk import Whop - -client = Whop(token="") -pager = client.products.list(account_id="biz_xxxxxxxxxxxxxx") - -print(pager.response.page_info.has_next_page) -print(pager.response.data) # this page's items, as returned by the API -print(pager.items) # the same items, off the pager -``` - -`SyncPager` and `AsyncPager` live in `whop_sdk.core.pagination`; they are not exported -from the package root. - ## Verifying user tokens `verify_user_token` checks the `x-whop-user-token` JWT that Whop sends to an embedded diff --git a/reference.md b/reference.md index 57a552be..b859ad3c 100644 --- a/reference.md +++ b/reference.md @@ -2974,6 +2974,14 @@ client.ad_groups.search_targeting_options(
+**special_ad_categories:** `typing.Optional[typing.Union[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, typing.Sequence[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem]]]` — The campaign's declared special ad categories. Under `housing`, `employment`, or `financial_products` the ad platform allows interests only, drawn from a short approved list, so results are narrowed to what such a campaign can launch with and other kinds return nothing. Blank `query` browses that approved list instead of the usual fixed lists. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -6926,6 +6934,14 @@ client.apps.list()
+**recommended:** `typing.Optional[bool]` — Only return apps Whop recommends (or, with `false`, only those it does not). The community blueprints gallery is the recommended slice of the public website list. + +
+
+ +
+
+ **query:** `typing.Optional[str]` — A search string matched against app names.
@@ -11401,6 +11417,182 @@ client.checkout_configurations.delete(
+ +
+ + +## Checkout Sessions +
client.checkout_sessions.create(...) -> CheckoutSession +
+
+ +#### 📝 Description + +
+
+ +
+
+ +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. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.DEFAULT, +) + +client.checkout_sessions.create() + +``` +
+
+
+
+ +#### ⚙️ 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.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. + +
+
+ +
+
+ +**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. + +
+
+
+
+ +
@@ -15648,7 +15840,7 @@ client.disputes.update_evidence_dispute(
-Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Send the files as multipart file parts to upload and attach in one call, or reference files already stored by `id`/`direct_upload_id`. Send every document the packet should carry — up to 10, 10MB each and 25MB in total; an empty list removes them all. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected. +Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Upload files through `POST /files` and reference them by `id`, or send the files as multipart file parts to upload and attach in one call. Send every document the packet should carry — up to 10, 10MB each and 25MB in total; an empty list removes them all. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected.
@@ -18625,7 +18817,7 @@ client.exports.create(
-**filters:** `typing.Optional[typing.Dict[str, typing.Any]]` — Resource-specific filters. For native REST resources (`payouts`, `transfers`, `memberships`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters. +**filters:** `typing.Optional[typing.Dict[str, typing.Any]]` — Resource-specific filters. For native REST resources (`payouts`, `transfers`, `products`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters.
@@ -19031,7 +19223,7 @@ client.fee_markups.delete( ## Files -
client.files.create(...) -> CreateFilesResponse +
client.files.create(...) -> File
@@ -19043,7 +19235,7 @@ client.fee_markups.delete(
-Create a new file record and receive a presigned URL for uploading content to S3. +Creates a file and returns a presigned destination to upload its bytes to. PUT the bytes to `upload_url` (single-part), or to each of `multipart_upload_urls` and then call Complete File Multipart Upload. Once the bytes land the file becomes `ready`, and its ID can be attached wherever a file is accepted — account legal documents, dispute evidence documents.
@@ -19067,7 +19259,7 @@ client = Whop( ) client.files.create( - filename="filename", + filename="terms.pdf", ) ``` @@ -19084,7 +19276,7 @@ client.files.create(
-**filename:** `str` — The name of the file including its extension (e.g., "photo.png" or "document.pdf"). +**filename:** `str` — The name of the file including its extension, e.g. `terms.pdf`.
@@ -19092,7 +19284,23 @@ client.files.create(
-**visibility:** `typing.Optional[FileVisibility]` — Controls whether the file is publicly accessible via CDN or requires authentication. Defaults to private. +**byte_size:** `typing.Optional[int]` — The file's size in bytes. Required when `multipart` is `true`. Multipart uploads support at most 10,000 parts of 5MB each (about 50 GB). + +
+
+ +
+
+ +**multipart:** `typing.Optional[bool]` — Upload the file in 5MB parts. Required for files larger than 5GB; useful above ~100MB. The file must be larger than 5MB. + +
+
+ +
+
+ +**visibility:** `typing.Optional[CreateFilesRequestVisibility]` — `public` files are served via an unsigned CDN URL — use for assets anyone may see. `private` files are served via a signed, expiring URL — use for sensitive documents. Defaults to `private`.
@@ -19124,7 +19332,7 @@ client.files.create(
-Retrieves the details of an existing file. +Retrieves a file you uploaded — poll it after uploading the bytes to see `upload_status` become `ready`. Only the creator can retrieve a file this way; a file attached to another resource is read through that resource.
@@ -19148,7 +19356,7 @@ client = Whop( ) client.files.retrieve( - id="file_xxxxxxxxxxxxx", + id="id", ) ``` @@ -19165,7 +19373,104 @@ client.files.retrieve(
-**id:** `str` — The unique identifier of the file to retrieve. +**id:** `str` — The unique identifier of the file, prefixed `file_`. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+ +
+ + + + +
+ +
client.files.complete(...) -> File +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Assembles the parts of a multipart upload after every part has been PUT to its presigned URL. Pass the `multipart_upload_id` from Create File and each part's `ETag` response header. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment +from whop_sdk.files import CompleteFilesRequestMultipartPartsItem + +client = Whop( + token="", + environment=WhopEnvironment.DEFAULT, +) + +client.files.complete( + id="id", + multipart_parts=[ + CompleteFilesRequestMultipartPartsItem( + etag="etag-1", + part_number=1, + ) + ], + multipart_upload_id="upload-id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The unique identifier of the file, prefixed `file_`. + +
+
+ +
+
+ +**multipart_parts:** `typing.List[CompleteFilesRequestMultipartPartsItem]` — Every uploaded part, in order. + +
+
+ +
+
+ +**multipart_upload_id:** `str` — The ID of the multipart upload, returned by Create File.
@@ -21230,7 +21535,7 @@ client.invoices.update(
-**line_items:** `typing.Optional[typing.List[UpdateInvoicesRequestLineItemsItem]]` — Line items that break down the invoice total. +**line_items:** `typing.Optional[typing.List[UpdateInvoicesRequestLineItemsItem]]` — Line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. Individual items may be negative to represent a credit, as long as the sum is not negative and clears the currency's minimum charge. Pass an empty list to remove the breakdown.
@@ -27643,7 +27948,7 @@ client.permissions.list(
-Returns a paginated list of plans belonging to an account, with optional filtering by visibility, type, release method, and product. +Returns a paginated list of plans. Omit `account_id` and pass `product_ids` to list a product's public buyable plans.
@@ -27667,7 +27972,6 @@ client = Whop( ) client.plans.list( - account_id="account_id", release_methods=[ "buy_now" ], @@ -27696,7 +28000,7 @@ client.plans.list(
-**account_id:** `str` — The unique identifier of the account to list plans for. +**account_id:** `typing.Optional[str]` — The unique identifier of the account to list plans for. Required unless `product_ids` is provided for a public product-plan read.
@@ -27744,7 +28048,7 @@ client.plans.list(
-**product_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter to only plans belonging to these product identifiers. +**product_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter to only plans belonging to these product identifiers. When `account_id` is omitted, this is required and the response is publicly readable: only visible, non-invoice plans are returned.
@@ -28617,7 +28921,7 @@ client.plans.calculate_tax(
-Returns a paginated list of products belonging to an account. +Returns a paginated list of products. Omit `account_id` to search the public marketplace.
@@ -28641,7 +28945,6 @@ client = Whop( ) client.products.list( - account_id="account_id", visibilities=[ "visible" ], @@ -28664,7 +28967,47 @@ client.products.list(
-**account_id:** `str` — The unique identifier of the account to list products for. +**account_id:** `typing.Optional[str]` — The unique identifier of the account to list products for. Omit to search the public marketplace. + +
+
+ +
+
+ +**query:** `typing.Optional[str]` — Ranked search against product title and headline. Omit to browse by recency. + +
+
+ +
+
+ +**marketplace_category_route:** `typing.Optional[str]` — Only return marketplace products assigned to this category route, such as `trading`. + +
+
+ +
+
+ +**plan_types:** `typing.Optional[typing.Union[ListProductsRequestPlanTypesItem, typing.Sequence[ListProductsRequestPlanTypesItem]]]` — Filter to products with a buyable plan of these billing models, such as `one_time` or `renewal`. + +
+
+ +
+
+ +**price_minimum:** `typing.Optional[float]` — Only return products whose advertised buyable plan has a displayed price of at least this amount. Recurring plans use renewal price. + +
+
+ +
+
+ +**price_maximum:** `typing.Optional[float]` — Only return products whose advertised buyable plan has a displayed price of at most this amount. Recurring plans use renewal price.
@@ -28672,7 +29015,7 @@ client.products.list(
-**visibilities:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter to only products matching these visibility states. +**visibilities:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter to only products matching these visibility states. Ignored on the public marketplace list, which only returns visible products.
@@ -28704,7 +29047,7 @@ client.products.list(
-**order:** `typing.Optional[str]` — The field to sort results by. Defaults to created_at. +**order:** `typing.Optional[str]` — The field to sort results by. Account lists default to `created_at`. Marketplace lists default to `discoverable_at` and accept `created_at` or `discoverable_at`. Cannot be combined with `query`.
@@ -28744,6 +29087,22 @@ client.products.list(
+**created_after:** `typing.Optional[str]` — Only return products created after this ISO 8601 timestamp. + +
+
+ +
+
+ +**created_before:** `typing.Optional[str]` — Only return products created before this ISO 8601 timestamp. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -28985,7 +29344,7 @@ client.products.create(
-Retrieves the details of an existing product. This endpoint is publicly accessible. +Retrieves a product. Public — no credentials.
diff --git a/src/whop_sdk/__init__.py b/src/whop_sdk/__init__.py index 0799c72f..7655a0ff 100644 --- a/src/whop_sdk/__init__.py +++ b/src/whop_sdk/__init__.py @@ -210,6 +210,7 @@ AppDeployment, AppDeploymentPhase, AppDeploymentStatus, + AppElementsUsedItem, AppIcon, AppListItem, AppListItemAppType, @@ -248,6 +249,7 @@ BillingReasons, Bounty, BountyAcceptedDeliverableTypesItem, + BountyActiveLivestreamFeed, BountyBusinessGoalType, BountyCaptureClip, BountyCaptureClipStatus, @@ -299,7 +301,83 @@ 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, @@ -395,6 +473,8 @@ DisputeEvidenceDocument, DisputeEvidenceDocumentContentType, DisputeEvidenceDocumentDocumentType, + DisputeEvidenceDocumentUploadStatus, + DisputeEvidenceDocumentVisibility, DisputeEvidenceLockedReason, DisputeIssuerComment, DisputeListItem, @@ -452,6 +532,8 @@ FeeMarkupListItem, FeeMarkupTypes, File, + FileMultipartUrl, + FileUploadStatus, FileVisibility, ForbiddenErrorBody, ForbiddenErrorBodyError, @@ -535,6 +617,8 @@ LedgerActivityCurrency, LedgerActivityLineType, LedgerActivityObject, + LedgerActivityPayment, + LedgerActivityPaymentObject, LedgerActivityResource, LedgerActivityResourceAccountReference, LedgerActivityResourceAccountReferenceObject, @@ -916,6 +1000,9 @@ ProductListItem, ProductMarketplaceStatus, ProductMemberAffiliateStatus, + ProductPublicPlan, + ProductPublicPlanPlanType, + ProductPublicPlanVisibility, ProductTaxCodeProductTypes, PromoCode, PromoCodeCurrency, @@ -1059,17 +1146,6 @@ TooManyRequestsErrorBody, TooManyRequestsErrorBodyError, Topup, - Transfer, - TransferDestination, - TransferDestinationCompany, - TransferDestinationUser, - TransferDestination_Company, - TransferDestination_User, - TransferOrigin, - TransferOriginCompany, - TransferOriginUser, - TransferOrigin_Company, - TransferOrigin_User, UnauthorizedErrorBody, UnauthorizedErrorBodyError, UnprocessableEntityErrorBody, @@ -1159,6 +1235,7 @@ cards, chat_channels, checkout_configurations, + checkout_sessions, companies, company_token_transactions, course_chapters, @@ -1309,6 +1386,7 @@ RetrieveAdGroupsRequestAttributionModel, SearchTargetingOptionsAdGroupsRequestLocationTypesItem, SearchTargetingOptionsAdGroupsRequestPlatform, + SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, SearchTargetingOptionsAdGroupsRequestTypesItem, SearchTargetingOptionsAdGroupsResponse, UpdateAdGroupsRequestBidType, @@ -1641,6 +1719,7 @@ RetrieveCheckoutConfigurationsResponsePlanVisibility, RetrieveCheckoutConfigurationsResponseThreeDsLevel, ) + from .checkout_sessions import CreateCheckoutSessionsRequestItemsItem, CreateCheckoutSessionsRequestMode from .client import AsyncWhop, Whop from .companies import ( CreateApiKeyCompaniesRequestPermissionsItem, @@ -1822,7 +1901,7 @@ PostExportFailedPayloadType, ) from .fee_markups import ListFeeMarkupsResponse - from .files import CreateFilesResponse + from .files import CompleteFilesRequestMultipartPartsItem, CreateFilesRequestVisibility from .financial_activity import ( ListFinancialActivityRequestLineTypesItem, ListFinancialActivityResponse, @@ -2195,6 +2274,7 @@ CreateProductsRequestMemberAffiliateStatus, DeleteProductsResponse, ListProductsRequestDirection, + ListProductsRequestPlanTypesItem, ListProductsResponse, ListProductsResponsePageInfo, PostProductCreatedPayload, @@ -2806,6 +2886,7 @@ "AppDeployment": ".types", "AppDeploymentPhase": ".types", "AppDeploymentStatus": ".types", + "AppElementsUsedItem": ".types", "AppIcon": ".types", "AppListItem": ".types", "AppListItemAppType": ".types", @@ -2849,6 +2930,7 @@ "BillingReasons": ".types", "Bounty": ".types", "BountyAcceptedDeliverableTypesItem": ".types", + "BountyActiveLivestreamFeed": ".types", "BountyBusinessGoalType": ".types", "BountyCaptureClip": ".types", "BountyCaptureClipStatus": ".types", @@ -2908,7 +2990,83 @@ "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", @@ -2927,6 +3085,7 @@ "CompanyTokenTransactionMember": ".types", "CompanyTokenTransactionTypes": ".types", "CompanyTokenTransactionUser": ".types", + "CompleteFilesRequestMultipartPartsItem": ".files", "ConflictError": ".errors", "ConnectSocialAccountsRequestPlatform": ".social_accounts", "ConnectSocialAccountsRequestScopesItem": ".social_accounts", @@ -3066,6 +3225,8 @@ "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", @@ -3098,7 +3259,7 @@ "CreateEventsResponse": ".events", "CreateExperiencesRequestLogo": ".experiences", "CreateExportsRequestResource": ".exports", - "CreateFilesResponse": ".files", + "CreateFilesRequestVisibility": ".files", "CreateForumPostsRequestAttachmentsItem": ".forum_posts", "CreateForumPostsRequestPoll": ".forum_posts", "CreateForumPostsRequestPollOptionsItem": ".forum_posts", @@ -3280,6 +3441,8 @@ "DisputeEvidenceDocument": ".types", "DisputeEvidenceDocumentContentType": ".types", "DisputeEvidenceDocumentDocumentType": ".types", + "DisputeEvidenceDocumentUploadStatus": ".types", + "DisputeEvidenceDocumentVisibility": ".types", "DisputeEvidenceLockedReason": ".types", "DisputeIssuerComment": ".types", "DisputeListItem": ".types", @@ -3343,6 +3506,8 @@ "FeeMarkupListItem": ".types", "FeeMarkupTypes": ".types", "File": ".types", + "FileMultipartUrl": ".types", + "FileUploadStatus": ".types", "FileVisibility": ".types", "ForbiddenError": ".errors", "ForbiddenErrorBody": ".types", @@ -3461,6 +3626,8 @@ "LedgerActivityCurrency": ".types", "LedgerActivityLineType": ".types", "LedgerActivityObject": ".types", + "LedgerActivityPayment": ".types", + "LedgerActivityPaymentObject": ".types", "LedgerActivityResource": ".types", "LedgerActivityResourceAccountReference": ".types", "LedgerActivityResourceAccountReferenceObject": ".types", @@ -3706,6 +3873,7 @@ "ListPlansResponse": ".plans", "ListPlansResponsePageInfo": ".plans", "ListProductsRequestDirection": ".products", + "ListProductsRequestPlanTypesItem": ".products", "ListProductsResponse": ".products", "ListProductsResponsePageInfo": ".products", "ListPromoCodesRequestDirection": ".promo_codes", @@ -4504,6 +4672,9 @@ "ProductListItem": ".types", "ProductMarketplaceStatus": ".types", "ProductMemberAffiliateStatus": ".types", + "ProductPublicPlan": ".types", + "ProductPublicPlanPlanType": ".types", + "ProductPublicPlanVisibility": ".types", "ProductTaxCodeProductTypes": ".types", "PromoCode": ".types", "PromoCodeCurrency": ".types", @@ -4697,6 +4868,7 @@ "ScheduleFrequencies": ".types", "SearchTargetingOptionsAdGroupsRequestLocationTypesItem": ".ad_groups", "SearchTargetingOptionsAdGroupsRequestPlatform": ".ad_groups", + "SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem": ".ad_groups", "SearchTargetingOptionsAdGroupsRequestTypesItem": ".ad_groups", "SearchTargetingOptionsAdGroupsResponse": ".ad_groups", "ServiceUnavailableError": ".errors", @@ -4790,18 +4962,7 @@ "TooManyRequestsErrorBody": ".types", "TooManyRequestsErrorBodyError": ".types", "Topup": ".types", - "Transfer": ".types", - "TransferDestination": ".types", - "TransferDestinationCompany": ".types", - "TransferDestinationUser": ".types", - "TransferDestination_Company": ".types", - "TransferDestination_User": ".types", "TransferMembershipsResponse": ".memberships", - "TransferOrigin": ".types", - "TransferOriginCompany": ".types", - "TransferOriginUser": ".types", - "TransferOrigin_Company": ".types", - "TransferOrigin_User": ".types", "TransferOwnershipAccountsResponse": ".accounts", "UnauthorizedError": ".errors", "UnauthorizedErrorBody": ".types", @@ -5026,6 +5187,7 @@ "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", @@ -5316,6 +5478,7 @@ def __dir__(): "AppDeployment", "AppDeploymentPhase", "AppDeploymentStatus", + "AppElementsUsedItem", "AppIcon", "AppListItem", "AppListItemAppType", @@ -5359,6 +5522,7 @@ def __dir__(): "BillingReasons", "Bounty", "BountyAcceptedDeliverableTypesItem", + "BountyActiveLivestreamFeed", "BountyBusinessGoalType", "BountyCaptureClip", "BountyCaptureClipStatus", @@ -5418,7 +5582,83 @@ 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", @@ -5437,6 +5677,7 @@ def __dir__(): "CompanyTokenTransactionMember", "CompanyTokenTransactionTypes", "CompanyTokenTransactionUser", + "CompleteFilesRequestMultipartPartsItem", "ConflictError", "ConnectSocialAccountsRequestPlatform", "ConnectSocialAccountsRequestScopesItem", @@ -5576,6 +5817,8 @@ def __dir__(): "CreateCheckoutConfigurationsResponsePlanThreeDsLevel", "CreateCheckoutConfigurationsResponsePlanVisibility", "CreateCheckoutConfigurationsResponseThreeDsLevel", + "CreateCheckoutSessionsRequestItemsItem", + "CreateCheckoutSessionsRequestMode", "CreateCompaniesRequestLogo", "CreateCompanyTokenTransactionsRequest", "CreateCompanyTokenTransactionsRequestAdd", @@ -5608,7 +5851,7 @@ def __dir__(): "CreateEventsResponse", "CreateExperiencesRequestLogo", "CreateExportsRequestResource", - "CreateFilesResponse", + "CreateFilesRequestVisibility", "CreateForumPostsRequestAttachmentsItem", "CreateForumPostsRequestPoll", "CreateForumPostsRequestPollOptionsItem", @@ -5790,6 +6033,8 @@ def __dir__(): "DisputeEvidenceDocument", "DisputeEvidenceDocumentContentType", "DisputeEvidenceDocumentDocumentType", + "DisputeEvidenceDocumentUploadStatus", + "DisputeEvidenceDocumentVisibility", "DisputeEvidenceLockedReason", "DisputeIssuerComment", "DisputeListItem", @@ -5853,6 +6098,8 @@ def __dir__(): "FeeMarkupListItem", "FeeMarkupTypes", "File", + "FileMultipartUrl", + "FileUploadStatus", "FileVisibility", "ForbiddenError", "ForbiddenErrorBody", @@ -5971,6 +6218,8 @@ def __dir__(): "LedgerActivityCurrency", "LedgerActivityLineType", "LedgerActivityObject", + "LedgerActivityPayment", + "LedgerActivityPaymentObject", "LedgerActivityResource", "LedgerActivityResourceAccountReference", "LedgerActivityResourceAccountReferenceObject", @@ -6216,6 +6465,7 @@ def __dir__(): "ListPlansResponse", "ListPlansResponsePageInfo", "ListProductsRequestDirection", + "ListProductsRequestPlanTypesItem", "ListProductsResponse", "ListProductsResponsePageInfo", "ListPromoCodesRequestDirection", @@ -7014,6 +7264,9 @@ def __dir__(): "ProductListItem", "ProductMarketplaceStatus", "ProductMemberAffiliateStatus", + "ProductPublicPlan", + "ProductPublicPlanPlanType", + "ProductPublicPlanVisibility", "ProductTaxCodeProductTypes", "PromoCode", "PromoCodeCurrency", @@ -7207,6 +7460,7 @@ def __dir__(): "ScheduleFrequencies", "SearchTargetingOptionsAdGroupsRequestLocationTypesItem", "SearchTargetingOptionsAdGroupsRequestPlatform", + "SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem", "SearchTargetingOptionsAdGroupsRequestTypesItem", "SearchTargetingOptionsAdGroupsResponse", "ServiceUnavailableError", @@ -7300,18 +7554,7 @@ def __dir__(): "TooManyRequestsErrorBody", "TooManyRequestsErrorBodyError", "Topup", - "Transfer", - "TransferDestination", - "TransferDestinationCompany", - "TransferDestinationUser", - "TransferDestination_Company", - "TransferDestination_User", "TransferMembershipsResponse", - "TransferOrigin", - "TransferOriginCompany", - "TransferOriginUser", - "TransferOrigin_Company", - "TransferOrigin_User", "TransferOwnershipAccountsResponse", "UnauthorizedError", "UnauthorizedErrorBody", @@ -7536,6 +7779,7 @@ def __dir__(): "cards", "chat_channels", "checkout_configurations", + "checkout_sessions", "companies", "company_token_transactions", "course_chapters", diff --git a/src/whop_sdk/access_tokens/client.py b/src/whop_sdk/access_tokens/client.py index 0aee6f33..d2c99005 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", + "2026-08-21-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", + "2026-08-21-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 fdf90c73..865c56c1 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", + "2026-08-21-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", + "2026-08-21-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 2bfe35d3..8c5a20f3 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -610,7 +610,7 @@ def form_company( ) client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1354,7 +1354,7 @@ async def form_company( ) client = AsyncWhop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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 8e54229c..7e9c2bd8 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 0b3e494a..7477bcde 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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ad_campaigns/client.py b/src/whop_sdk/ad_campaigns/client.py index c63fb112..6006097f 100644 --- a/src/whop_sdk/ad_campaigns/client.py +++ b/src/whop_sdk/ad_campaigns/client.py @@ -132,7 +132,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -233,7 +233,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -303,7 +303,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -343,7 +343,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -413,7 +413,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -470,7 +470,7 @@ def duplicate( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -505,7 +505,7 @@ def pause(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -538,7 +538,7 @@ def retry_payment(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -571,7 +571,7 @@ def unpause(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -683,7 +683,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -793,7 +793,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -871,7 +871,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -921,7 +921,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -999,7 +999,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1064,7 +1064,7 @@ async def duplicate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1107,7 +1107,7 @@ async def pause(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1148,7 +1148,7 @@ async def retry_payment(self, id: str, *, request_options: typing.Optional[Reque from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1189,7 +1189,7 @@ async def unpause(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ad_groups/__init__.py b/src/whop_sdk/ad_groups/__init__.py index 0e56d572..ffb0a4f1 100644 --- a/src/whop_sdk/ad_groups/__init__.py +++ b/src/whop_sdk/ad_groups/__init__.py @@ -30,6 +30,7 @@ RetrieveAdGroupsRequestAttributionModel, SearchTargetingOptionsAdGroupsRequestLocationTypesItem, SearchTargetingOptionsAdGroupsRequestPlatform, + SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, SearchTargetingOptionsAdGroupsRequestTypesItem, SearchTargetingOptionsAdGroupsResponse, UpdateAdGroupsRequestBidType, @@ -68,6 +69,7 @@ "RetrieveAdGroupsRequestAttributionModel": ".types", "SearchTargetingOptionsAdGroupsRequestLocationTypesItem": ".types", "SearchTargetingOptionsAdGroupsRequestPlatform": ".types", + "SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem": ".types", "SearchTargetingOptionsAdGroupsRequestTypesItem": ".types", "SearchTargetingOptionsAdGroupsResponse": ".types", "UpdateAdGroupsRequestBidType": ".types", @@ -129,6 +131,7 @@ def __dir__(): "RetrieveAdGroupsRequestAttributionModel", "SearchTargetingOptionsAdGroupsRequestLocationTypesItem", "SearchTargetingOptionsAdGroupsRequestPlatform", + "SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem", "SearchTargetingOptionsAdGroupsRequestTypesItem", "SearchTargetingOptionsAdGroupsResponse", "UpdateAdGroupsRequestBidType", diff --git a/src/whop_sdk/ad_groups/client.py b/src/whop_sdk/ad_groups/client.py index 63737cb7..96335943 100644 --- a/src/whop_sdk/ad_groups/client.py +++ b/src/whop_sdk/ad_groups/client.py @@ -35,6 +35,9 @@ SearchTargetingOptionsAdGroupsRequestLocationTypesItem, ) from .types.search_targeting_options_ad_groups_request_platform import SearchTargetingOptionsAdGroupsRequestPlatform +from .types.search_targeting_options_ad_groups_request_special_ad_categories_item import ( + SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, +) from .types.search_targeting_options_ad_groups_request_types_item import SearchTargetingOptionsAdGroupsRequestTypesItem from .types.search_targeting_options_ad_groups_response import SearchTargetingOptionsAdGroupsResponse from .types.update_ad_groups_request_bid_type import UpdateAdGroupsRequestBidType @@ -156,7 +159,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -313,7 +316,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -404,7 +407,7 @@ def estimate_reach( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -445,6 +448,12 @@ def search_targeting_options( ] = None, country: typing.Optional[str] = None, limit: typing.Optional[int] = None, + special_ad_categories: typing.Optional[ + typing.Union[ + SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, + typing.Sequence[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem], + ] + ] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SearchTargetingOptionsAdGroupsResponse: """ @@ -473,6 +482,9 @@ def search_targeting_options( limit : typing.Optional[int] Maximum number of results per requested type. + special_ad_categories : typing.Optional[typing.Union[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, typing.Sequence[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem]]] + The campaign's declared special ad categories. Under `housing`, `employment`, or `financial_products` the ad platform allows interests only, drawn from a short approved list, so results are narrowed to what such a campaign can launch with and other kinds return nothing. Blank `query` browses that approved list instead of the usual fixed lists. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -486,7 +498,7 @@ def search_targeting_options( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -502,6 +514,7 @@ def search_targeting_options( location_types=location_types, country=country, limit=limit, + special_ad_categories=special_ad_categories, request_options=request_options, ) return _response.data @@ -549,7 +562,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -589,7 +602,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -719,7 +732,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -793,7 +806,7 @@ def duplicate( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -832,7 +845,7 @@ def pause(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -865,7 +878,7 @@ def unpause(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -985,7 +998,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1151,7 +1164,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1250,7 +1263,7 @@ async def estimate_reach( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1297,6 +1310,12 @@ async def search_targeting_options( ] = None, country: typing.Optional[str] = None, limit: typing.Optional[int] = None, + special_ad_categories: typing.Optional[ + typing.Union[ + SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, + typing.Sequence[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem], + ] + ] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SearchTargetingOptionsAdGroupsResponse: """ @@ -1325,6 +1344,9 @@ async def search_targeting_options( limit : typing.Optional[int] Maximum number of results per requested type. + special_ad_categories : typing.Optional[typing.Union[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, typing.Sequence[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem]]] + The campaign's declared special ad categories. Under `housing`, `employment`, or `financial_products` the ad platform allows interests only, drawn from a short approved list, so results are narrowed to what such a campaign can launch with and other kinds return nothing. Blank `query` browses that approved list instead of the usual fixed lists. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1340,7 +1362,7 @@ async def search_targeting_options( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1362,6 +1384,7 @@ async def main() -> None: location_types=location_types, country=country, limit=limit, + special_ad_categories=special_ad_categories, request_options=request_options, ) return _response.data @@ -1411,7 +1434,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1461,7 +1484,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1599,7 +1622,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1681,7 +1704,7 @@ async def duplicate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1728,7 +1751,7 @@ async def pause(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1769,7 +1792,7 @@ async def unpause(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ad_groups/raw_client.py b/src/whop_sdk/ad_groups/raw_client.py index ca3fd5db..d9121843 100644 --- a/src/whop_sdk/ad_groups/raw_client.py +++ b/src/whop_sdk/ad_groups/raw_client.py @@ -47,6 +47,9 @@ SearchTargetingOptionsAdGroupsRequestLocationTypesItem, ) from .types.search_targeting_options_ad_groups_request_platform import SearchTargetingOptionsAdGroupsRequestPlatform +from .types.search_targeting_options_ad_groups_request_special_ad_categories_item import ( + SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, +) from .types.search_targeting_options_ad_groups_request_types_item import SearchTargetingOptionsAdGroupsRequestTypesItem from .types.search_targeting_options_ad_groups_response import SearchTargetingOptionsAdGroupsResponse from .types.update_ad_groups_request_bid_type import UpdateAdGroupsRequestBidType @@ -593,6 +596,12 @@ def search_targeting_options( ] = None, country: typing.Optional[str] = None, limit: typing.Optional[int] = None, + special_ad_categories: typing.Optional[ + typing.Union[ + SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, + typing.Sequence[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem], + ] + ] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[SearchTargetingOptionsAdGroupsResponse]: """ @@ -621,6 +630,9 @@ def search_targeting_options( limit : typing.Optional[int] Maximum number of results per requested type. + special_ad_categories : typing.Optional[typing.Union[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, typing.Sequence[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem]]] + The campaign's declared special ad categories. Under `housing`, `employment`, or `financial_products` the ad platform allows interests only, drawn from a short approved list, so results are narrowed to what such a campaign can launch with and other kinds return nothing. Blank `query` browses that approved list instead of the usual fixed lists. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -640,6 +652,7 @@ def search_targeting_options( "location_types": location_types, "country": country, "limit": limit, + "special_ad_categories": special_ad_categories, }, request_options=request_options, ) @@ -1747,6 +1760,12 @@ async def search_targeting_options( ] = None, country: typing.Optional[str] = None, limit: typing.Optional[int] = None, + special_ad_categories: typing.Optional[ + typing.Union[ + SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, + typing.Sequence[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem], + ] + ] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[SearchTargetingOptionsAdGroupsResponse]: """ @@ -1775,6 +1794,9 @@ async def search_targeting_options( limit : typing.Optional[int] Maximum number of results per requested type. + special_ad_categories : typing.Optional[typing.Union[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, typing.Sequence[SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem]]] + The campaign's declared special ad categories. Under `housing`, `employment`, or `financial_products` the ad platform allows interests only, drawn from a short approved list, so results are narrowed to what such a campaign can launch with and other kinds return nothing. Blank `query` browses that approved list instead of the usual fixed lists. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1794,6 +1816,7 @@ async def search_targeting_options( "location_types": location_types, "country": country, "limit": limit, + "special_ad_categories": special_ad_categories, }, request_options=request_options, ) diff --git a/src/whop_sdk/ad_groups/types/__init__.py b/src/whop_sdk/ad_groups/types/__init__.py index a55f0280..ca93c55c 100644 --- a/src/whop_sdk/ad_groups/types/__init__.py +++ b/src/whop_sdk/ad_groups/types/__init__.py @@ -31,6 +31,9 @@ SearchTargetingOptionsAdGroupsRequestLocationTypesItem, ) from .search_targeting_options_ad_groups_request_platform import SearchTargetingOptionsAdGroupsRequestPlatform + from .search_targeting_options_ad_groups_request_special_ad_categories_item import ( + SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, + ) from .search_targeting_options_ad_groups_request_types_item import SearchTargetingOptionsAdGroupsRequestTypesItem from .search_targeting_options_ad_groups_response import SearchTargetingOptionsAdGroupsResponse from .update_ad_groups_request_bid_type import UpdateAdGroupsRequestBidType @@ -68,6 +71,7 @@ "RetrieveAdGroupsRequestAttributionModel": ".retrieve_ad_groups_request_attribution_model", "SearchTargetingOptionsAdGroupsRequestLocationTypesItem": ".search_targeting_options_ad_groups_request_location_types_item", "SearchTargetingOptionsAdGroupsRequestPlatform": ".search_targeting_options_ad_groups_request_platform", + "SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem": ".search_targeting_options_ad_groups_request_special_ad_categories_item", "SearchTargetingOptionsAdGroupsRequestTypesItem": ".search_targeting_options_ad_groups_request_types_item", "SearchTargetingOptionsAdGroupsResponse": ".search_targeting_options_ad_groups_response", "UpdateAdGroupsRequestBidType": ".update_ad_groups_request_bid_type", @@ -129,6 +133,7 @@ def __dir__(): "RetrieveAdGroupsRequestAttributionModel", "SearchTargetingOptionsAdGroupsRequestLocationTypesItem", "SearchTargetingOptionsAdGroupsRequestPlatform", + "SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem", "SearchTargetingOptionsAdGroupsRequestTypesItem", "SearchTargetingOptionsAdGroupsResponse", "UpdateAdGroupsRequestBidType", diff --git a/src/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_special_ad_categories_item.py b/src/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_special_ad_categories_item.py new file mode 100644 index 00000000..f67829d7 --- /dev/null +++ b/src/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_special_ad_categories_item.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem = typing.Union[ + typing.Literal["housing", "employment", "financial_products", "politics"], typing.Any +] diff --git a/src/whop_sdk/ad_reports/client.py b/src/whop_sdk/ad_reports/client.py index 1f1e4207..a2250782 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", + "2026-08-21-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", + "2026-08-21-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 a007fdd0..ab3d18bb 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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -345,7 +345,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -483,7 +483,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -551,7 +551,7 @@ def duplicate( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -888,7 +888,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -967,7 +967,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1121,7 +1121,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1197,7 +1197,7 @@ async def duplicate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/affiliates/client.py b/src/whop_sdk/affiliates/client.py index 156a681c..54f6094c 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 61fe4022..2f7c2995 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 fb3bdd32..cbd15353 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 e0986df6..24677b79 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 8b1ffef6..45f46725 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 @@ -29,6 +29,7 @@ "2026-08-13", "2026-08-14", "2026-08-21", + "2026-08-21-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 a29b9f7c..d89f33b3 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 @@ -29,6 +29,7 @@ "2026-08-13", "2026-08-14", "2026-08-21", + "2026-08-21-1", ], typing.Any, ] diff --git a/src/whop_sdk/app_builds/client.py b/src/whop_sdk/app_builds/client.py index f431e5f0..d55edd74 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 89fad882..1770ee3c 100644 --- a/src/whop_sdk/apps/client.py +++ b/src/whop_sdk/apps/client.py @@ -58,6 +58,7 @@ def list( app_type: typing.Optional[ListAppsRequestAppType] = None, view_type: typing.Optional[ListAppsRequestViewType] = None, verified_apps_only: typing.Optional[bool] = None, + recommended: typing.Optional[bool] = None, query: typing.Optional[str] = None, order: typing.Optional[ListAppsRequestOrder] = None, direction: typing.Optional[ListAppsRequestDirection] = None, @@ -84,6 +85,9 @@ def list( verified_apps_only : typing.Optional[bool] Whether to only return apps verified by Whop. Verified website templates — websites with a published web build — are included, even though websites are otherwise left out of app lists. + recommended : typing.Optional[bool] + Only return apps Whop recommends (or, with `false`, only those it does not). The community blueprints gallery is the recommended slice of the public website list. + query : typing.Optional[str] A search string matched against app names. @@ -118,7 +122,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -134,6 +138,7 @@ def list( app_type=app_type, view_type=view_type, verified_apps_only=verified_apps_only, + recommended=recommended, query=query, order=order, direction=direction, @@ -195,7 +200,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -250,7 +255,7 @@ def update_permissions_app( from whop_sdk.apps import UpdatePermissionsAppRequestRequestedPermissionsItem client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -292,7 +297,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -325,7 +330,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -443,7 +448,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -504,7 +509,7 @@ def deploy( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -574,7 +579,7 @@ def logs( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -632,7 +637,7 @@ def update_permissions( from whop_sdk.apps import UpdatePermissionsAppsRequestRequestedPermissionsItem client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -675,6 +680,7 @@ async def list( app_type: typing.Optional[ListAppsRequestAppType] = None, view_type: typing.Optional[ListAppsRequestViewType] = None, verified_apps_only: typing.Optional[bool] = None, + recommended: typing.Optional[bool] = None, query: typing.Optional[str] = None, order: typing.Optional[ListAppsRequestOrder] = None, direction: typing.Optional[ListAppsRequestDirection] = None, @@ -701,6 +707,9 @@ async def list( verified_apps_only : typing.Optional[bool] Whether to only return apps verified by Whop. Verified website templates — websites with a published web build — are included, even though websites are otherwise left out of app lists. + recommended : typing.Optional[bool] + Only return apps Whop recommends (or, with `false`, only those it does not). The community blueprints gallery is the recommended slice of the public website list. + query : typing.Optional[str] A search string matched against app names. @@ -737,7 +746,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -760,6 +769,7 @@ async def main() -> None: app_type=app_type, view_type=view_type, verified_apps_only=verified_apps_only, + recommended=recommended, query=query, order=order, direction=direction, @@ -823,7 +833,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -886,7 +896,7 @@ async def update_permissions_app( from whop_sdk.apps import UpdatePermissionsAppRequestRequestedPermissionsItem client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -936,7 +946,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -977,7 +987,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1103,7 +1113,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1172,7 +1182,7 @@ async def deploy( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1250,7 +1260,7 @@ async def logs( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1317,7 +1327,7 @@ async def update_permissions( from whop_sdk.apps import UpdatePermissionsAppsRequestRequestedPermissionsItem client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/apps/raw_client.py b/src/whop_sdk/apps/raw_client.py index fcbad8a9..c11077c7 100644 --- a/src/whop_sdk/apps/raw_client.py +++ b/src/whop_sdk/apps/raw_client.py @@ -64,6 +64,7 @@ def list( app_type: typing.Optional[ListAppsRequestAppType] = None, view_type: typing.Optional[ListAppsRequestViewType] = None, verified_apps_only: typing.Optional[bool] = None, + recommended: typing.Optional[bool] = None, query: typing.Optional[str] = None, order: typing.Optional[ListAppsRequestOrder] = None, direction: typing.Optional[ListAppsRequestDirection] = None, @@ -90,6 +91,9 @@ def list( verified_apps_only : typing.Optional[bool] Whether to only return apps verified by Whop. Verified website templates — websites with a published web build — are included, even though websites are otherwise left out of app lists. + recommended : typing.Optional[bool] + Only return apps Whop recommends (or, with `false`, only those it does not). The community blueprints gallery is the recommended slice of the public website list. + query : typing.Optional[str] A search string matched against app names. @@ -127,6 +131,7 @@ def list( "app_type": app_type, "view_type": view_type, "verified_apps_only": verified_apps_only, + "recommended": recommended, "query": query, "order": order, "direction": direction, @@ -157,6 +162,7 @@ def list( app_type=app_type, view_type=view_type, verified_apps_only=verified_apps_only, + recommended=recommended, query=query, order=order, direction=direction, @@ -1136,6 +1142,7 @@ async def list( app_type: typing.Optional[ListAppsRequestAppType] = None, view_type: typing.Optional[ListAppsRequestViewType] = None, verified_apps_only: typing.Optional[bool] = None, + recommended: typing.Optional[bool] = None, query: typing.Optional[str] = None, order: typing.Optional[ListAppsRequestOrder] = None, direction: typing.Optional[ListAppsRequestDirection] = None, @@ -1162,6 +1169,9 @@ async def list( verified_apps_only : typing.Optional[bool] Whether to only return apps verified by Whop. Verified website templates — websites with a published web build — are included, even though websites are otherwise left out of app lists. + recommended : typing.Optional[bool] + Only return apps Whop recommends (or, with `false`, only those it does not). The community blueprints gallery is the recommended slice of the public website list. + query : typing.Optional[str] A search string matched against app names. @@ -1199,6 +1209,7 @@ async def list( "app_type": app_type, "view_type": view_type, "verified_apps_only": verified_apps_only, + "recommended": recommended, "query": query, "order": order, "direction": direction, @@ -1231,6 +1242,7 @@ async def _get_next(): app_type=app_type, view_type=view_type, verified_apps_only=verified_apps_only, + recommended=recommended, query=query, order=order, direction=direction, diff --git a/src/whop_sdk/audiences/client.py b/src/whop_sdk/audiences/client.py index 9ff56251..e96f83c1 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 b0e4e713..546f86a5 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 7c3186b8..9500b365 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 dcd2112a..8288468a 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 a784505f..96ec5b6e 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 d23c4966..f1fb17d1 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 41d83e41..c07af159 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 3906bb39..c2a0187d 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 4ededf1f..90476b0a 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 new file mode 100644 index 00000000..1870573e --- /dev/null +++ b/src/whop_sdk/checkout_sessions/__init__.py @@ -0,0 +1,37 @@ +# 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 new file mode 100644 index 00000000..8789f5ae --- /dev/null +++ b/src/whop_sdk/checkout_sessions/client.py @@ -0,0 +1,261 @@ +# 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 new file mode 100644 index 00000000..38a3b067 --- /dev/null +++ b/src/whop_sdk/checkout_sessions/raw_client.py @@ -0,0 +1,339 @@ +# 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 new file mode 100644 index 00000000..16578c24 --- /dev/null +++ b/src/whop_sdk/checkout_sessions/types/__init__.py @@ -0,0 +1,38 @@ +# 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_items_item.py b/src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_items_item.py new file mode 100644 index 00000000..fd5e930e --- /dev/null +++ b/src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_items_item.py @@ -0,0 +1,27 @@ +# 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 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. + """ + + 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/checkout_sessions/types/create_checkout_sessions_request_mode.py b/src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_mode.py new file mode 100644 index 00000000..e621eb86 --- /dev/null +++ b/src/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_mode.py @@ -0,0 +1,5 @@ +# 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 c7bd9b14..d7ea4461 100644 --- a/src/whop_sdk/client.py +++ b/src/whop_sdk/client.py @@ -30,6 +30,7 @@ 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 @@ -143,7 +144,7 @@ class Whop: from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -154,7 +155,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: WhopEnvironment = WhopEnvironment.DEFAULT, - api_version_date: typing.Optional[str] = "2026-08-21", + api_version_date: typing.Optional[str] = "2026-08-21-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, @@ -205,6 +206,7 @@ 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 @@ -427,6 +429,14 @@ 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: @@ -987,7 +997,7 @@ class AsyncWhop: from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -998,7 +1008,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: WhopEnvironment = WhopEnvironment.DEFAULT, - api_version_date: typing.Optional[str] = "2026-08-21", + api_version_date: typing.Optional[str] = "2026-08-21-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, @@ -1049,6 +1059,7 @@ 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 @@ -1271,6 +1282,14 @@ 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: diff --git a/src/whop_sdk/companies/client.py b/src/whop_sdk/companies/client.py index f7750549..a173f648 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 563db44e..c72c9329 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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -144,7 +144,7 @@ def create( ) client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -338,7 +338,7 @@ async def create( ) client = AsyncWhop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/core/client_wrapper.py b/src/whop_sdk/core/client_wrapper.py index 322ea578..4f50e61f 100644 --- a/src/whop_sdk/core/client_wrapper.py +++ b/src/whop_sdk/core/client_wrapper.py @@ -41,7 +41,7 @@ def get_headers(self) -> typing.Dict[str, str]: "X-Fern-Runtime": f"python/{platform.python_version()}", "X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}", "X-Fern-SDK-Name": "whop_sdk", - "X-Fern-SDK-Version": "0.0.41", + "X-Fern-SDK-Version": "1.0.13", **(self.get_custom_headers() or {}), } if self._api_version_date is not None: diff --git a/src/whop_sdk/course_chapters/client.py b/src/whop_sdk/course_chapters/client.py index e2a48382..67eae1f8 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 ffcddfa4..56a14e8d 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 1b9de118..815e1a57 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -490,7 +490,7 @@ def submit_assessment( ) client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1029,7 +1029,7 @@ async def submit_assessment( ) client = AsyncWhop( - "2026-08-21", + "2026-08-21-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 e605d877..0edd32b2 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 aae6cc50..e35ecbe9 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 1a7eacc8..65166447 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", + "2026-08-21-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", + "2026-08-21-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 790efbb7..87f18484 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 946ea408..bc1112ed 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -495,7 +495,7 @@ def upload_evidence( request_options: typing.Optional[RequestOptions] = None, ) -> Dispute: """ - Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Send the files as multipart file parts to upload and attach in one call, or reference files already stored by `id`/`direct_upload_id`. Send every document the packet should carry — up to 10, 10MB each and 25MB in total; an empty list removes them all. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected. + Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Upload files through `POST /files` and reference them by `id`, or send the files as multipart file parts to upload and attach in one call. Send every document the packet should carry — up to 10, 10MB each and 25MB in total; an empty list removes them all. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected. Parameters ---------- @@ -519,7 +519,7 @@ def upload_evidence( from whop_sdk.disputes import UploadEvidenceDisputesRequestDocumentsItem client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1057,7 +1057,7 @@ async def upload_evidence( request_options: typing.Optional[RequestOptions] = None, ) -> Dispute: """ - Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Send the files as multipart file parts to upload and attach in one call, or reference files already stored by `id`/`direct_upload_id`. Send every document the packet should carry — up to 10, 10MB each and 25MB in total; an empty list removes them all. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected. + Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Upload files through `POST /files` and reference them by `id`, or send the files as multipart file parts to upload and attach in one call. Send every document the packet should carry — up to 10, 10MB each and 25MB in total; an empty list removes them all. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected. Parameters ---------- @@ -1083,7 +1083,7 @@ async def upload_evidence( from whop_sdk.disputes import UploadEvidenceDisputesRequestDocumentsItem client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/disputes/raw_client.py b/src/whop_sdk/disputes/raw_client.py index 0b6ff1bc..b2082a97 100644 --- a/src/whop_sdk/disputes/raw_client.py +++ b/src/whop_sdk/disputes/raw_client.py @@ -914,7 +914,7 @@ def upload_evidence( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[Dispute]: """ - Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Send the files as multipart file parts to upload and attach in one call, or reference files already stored by `id`/`direct_upload_id`. Send every document the packet should carry — up to 10, 10MB each and 25MB in total; an empty list removes them all. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected. + Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Upload files through `POST /files` and reference them by `id`, or send the files as multipart file parts to upload and attach in one call. Send every document the packet should carry — up to 10, 10MB each and 25MB in total; an empty list removes them all. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected. Parameters ---------- @@ -1884,7 +1884,7 @@ async def upload_evidence( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[Dispute]: """ - Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Send the files as multipart file parts to upload and attach in one call, or reference files already stored by `id`/`direct_upload_id`. Send every document the packet should carry — up to 10, 10MB each and 25MB in total; an empty list removes them all. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected. + Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Upload files through `POST /files` and reference them by `id`, or send the files as multipart file parts to upload and attach in one call. Send every document the packet should carry — up to 10, 10MB each and 25MB in total; an empty list removes them all. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected. Parameters ---------- diff --git a/src/whop_sdk/dm_channels/client.py b/src/whop_sdk/dm_channels/client.py index 419aab5d..45e00d4e 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 5d9f7f4d..58a378ad 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 1417ac6f..4b0fdf75 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 d82a9394..cae81c3c 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 33735843..4997b52d 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 350f18ba..6ef2fc25 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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -126,7 +126,7 @@ def create( Column keys to include. Empty means all columns for the resource. filters : typing.Optional[typing.Dict[str, typing.Any]] - Resource-specific filters. For native REST resources (`payouts`, `transfers`, `memberships`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters. + Resource-specific filters. For native REST resources (`payouts`, `transfers`, `products`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters. timezone : typing.Optional[str] IANA timezone for date columns, e.g. `America/New_York`. Defaults to `UTC`. @@ -144,7 +144,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -313,7 +313,7 @@ async def create( Column keys to include. Empty means all columns for the resource. filters : typing.Optional[typing.Dict[str, typing.Any]] - Resource-specific filters. For native REST resources (`payouts`, `transfers`, `memberships`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters. + Resource-specific filters. For native REST resources (`payouts`, `transfers`, `products`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters. timezone : typing.Optional[str] IANA timezone for date columns, e.g. `America/New_York`. Defaults to `UTC`. @@ -333,7 +333,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/exports/raw_client.py b/src/whop_sdk/exports/raw_client.py index 696af8b8..3a5bb834 100644 --- a/src/whop_sdk/exports/raw_client.py +++ b/src/whop_sdk/exports/raw_client.py @@ -170,7 +170,7 @@ def create( Column keys to include. Empty means all columns for the resource. filters : typing.Optional[typing.Dict[str, typing.Any]] - Resource-specific filters. For native REST resources (`payouts`, `transfers`, `memberships`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters. + Resource-specific filters. For native REST resources (`payouts`, `transfers`, `products`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters. timezone : typing.Optional[str] IANA timezone for date columns, e.g. `America/New_York`. Defaults to `UTC`. @@ -478,7 +478,7 @@ async def create( Column keys to include. Empty means all columns for the resource. filters : typing.Optional[typing.Dict[str, typing.Any]] - Resource-specific filters. For native REST resources (`payouts`, `transfers`, `memberships`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters. + Resource-specific filters. For native REST resources (`payouts`, `transfers`, `products`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters. timezone : typing.Optional[str] IANA timezone for date columns, e.g. `America/New_York`. Defaults to `UTC`. diff --git a/src/whop_sdk/exports/types/create_exports_request_resource.py b/src/whop_sdk/exports/types/create_exports_request_resource.py index 6feeff5a..c59384c7 100644 --- a/src/whop_sdk/exports/types/create_exports_request_resource.py +++ b/src/whop_sdk/exports/types/create_exports_request_resource.py @@ -16,8 +16,6 @@ "disputes", "events", "financial-activity", - "members", - "memberships", "payout_methods", "payouts", "people", @@ -29,8 +27,10 @@ "team_members", "transfers", "webhooks", + "members", "receipts", "unclaimed_memberships", + "memberships", "tracking_links", "promo_codes", "resolutions", diff --git a/src/whop_sdk/exports/types/list_exports_request_resource.py b/src/whop_sdk/exports/types/list_exports_request_resource.py index f60da96c..5bdcbdef 100644 --- a/src/whop_sdk/exports/types/list_exports_request_resource.py +++ b/src/whop_sdk/exports/types/list_exports_request_resource.py @@ -16,8 +16,6 @@ "disputes", "events", "financial-activity", - "members", - "memberships", "payout_methods", "payouts", "people", @@ -29,8 +27,10 @@ "team_members", "transfers", "webhooks", + "members", "receipts", "unclaimed_memberships", + "memberships", "tracking_links", "promo_codes", "resolutions", diff --git a/src/whop_sdk/fee_markups/client.py b/src/whop_sdk/fee_markups/client.py index 87aabac9..94a4a796 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 000156af..96e511f1 100644 --- a/src/whop_sdk/files/__init__.py +++ b/src/whop_sdk/files/__init__.py @@ -6,8 +6,11 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import CreateFilesResponse -_dynamic_imports: typing.Dict[str, str] = {"CreateFilesResponse": ".types"} + from .types import CompleteFilesRequestMultipartPartsItem, CreateFilesRequestVisibility +_dynamic_imports: typing.Dict[str, str] = { + "CompleteFilesRequestMultipartPartsItem": ".types", + "CreateFilesRequestVisibility": ".types", +} def __getattr__(attr_name: str) -> typing.Any: @@ -31,4 +34,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["CreateFilesResponse"] +__all__ = ["CompleteFilesRequestMultipartPartsItem", "CreateFilesRequestVisibility"] diff --git a/src/whop_sdk/files/client.py b/src/whop_sdk/files/client.py index 9eabfb96..81196281 100644 --- a/src/whop_sdk/files/client.py +++ b/src/whop_sdk/files/client.py @@ -5,9 +5,9 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.file import File -from ..types.file_visibility import FileVisibility from .raw_client import AsyncRawFilesClient, RawFilesClient -from .types.create_files_response import CreateFilesResponse +from .types.complete_files_request_multipart_parts_item import CompleteFilesRequestMultipartPartsItem +from .types.create_files_request_visibility import CreateFilesRequestVisibility # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -32,52 +32,66 @@ def create( self, *, filename: str, - visibility: typing.Optional[FileVisibility] = OMIT, + byte_size: typing.Optional[int] = OMIT, + multipart: typing.Optional[bool] = OMIT, + visibility: typing.Optional[CreateFilesRequestVisibility] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> CreateFilesResponse: + ) -> File: """ - Create a new file record and receive a presigned URL for uploading content to S3. + Creates a file and returns a presigned destination to upload its bytes to. PUT the bytes to `upload_url` (single-part), or to each of `multipart_upload_urls` and then call Complete File Multipart Upload. Once the bytes land the file becomes `ready`, and its ID can be attached wherever a file is accepted — account legal documents, dispute evidence documents. Parameters ---------- filename : str - The name of the file including its extension (e.g., "photo.png" or "document.pdf"). + The name of the file including its extension, e.g. `terms.pdf`. - visibility : typing.Optional[FileVisibility] - Controls whether the file is publicly accessible via CDN or requires authentication. Defaults to private. + byte_size : typing.Optional[int] + The file's size in bytes. Required when `multipart` is `true`. Multipart uploads support at most 10,000 parts of 5MB each (about 50 GB). + + multipart : typing.Optional[bool] + Upload the file in 5MB parts. Required for files larger than 5GB; useful above ~100MB. The file must be larger than 5MB. + + visibility : typing.Optional[CreateFilesRequestVisibility] + `public` files are served via an unsigned CDN URL — use for assets anyone may see. `private` files are served via a signed, expiring URL — use for sensitive documents. Defaults to `private`. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - CreateFilesResponse - A successful response + File + file created with a single-part upload destination Examples -------- from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) client.files.create( - filename="filename", + filename="terms.pdf", ) """ - _response = self._raw_client.create(filename=filename, visibility=visibility, request_options=request_options) + _response = self._raw_client.create( + filename=filename, + byte_size=byte_size, + multipart=multipart, + visibility=visibility, + request_options=request_options, + ) return _response.data def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> File: """ - Retrieves the details of an existing file. + Retrieves a file you uploaded — poll it after uploading the bytes to see `upload_status` become `ready`. Only the creator can retrieve a file this way; a file attached to another resource is read through that resource. Parameters ---------- id : str - The unique identifier of the file to retrieve. + The unique identifier of the file, prefixed `file_`. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -85,24 +99,83 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] Returns ------- File - A successful response + file retrieved Examples -------- from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) client.files.retrieve( - id="file_xxxxxxxxxxxxx", + id="id", ) """ _response = self._raw_client.retrieve(id, request_options=request_options) return _response.data + def complete( + self, + id: str, + *, + multipart_parts: typing.Sequence[CompleteFilesRequestMultipartPartsItem], + multipart_upload_id: str, + request_options: typing.Optional[RequestOptions] = None, + ) -> File: + """ + Assembles the parts of a multipart upload after every part has been PUT to its presigned URL. Pass the `multipart_upload_id` from Create File and each part's `ETag` response header. + + Parameters + ---------- + id : str + The unique identifier of the file, prefixed `file_`. + + multipart_parts : typing.Sequence[CompleteFilesRequestMultipartPartsItem] + Every uploaded part, in order. + + multipart_upload_id : str + The ID of the multipart upload, returned by Create File. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + File + multipart upload completed + + Examples + -------- + from whop_sdk import Whop + from whop_sdk.files import CompleteFilesRequestMultipartPartsItem + + client = Whop( + "2026-08-21-1", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.files.complete( + id="id", + multipart_parts=[ + CompleteFilesRequestMultipartPartsItem( + etag="etag-1", + part_number=1, + ) + ], + multipart_upload_id="upload-id", + ) + """ + _response = self._raw_client.complete( + id, + multipart_parts=multipart_parts, + multipart_upload_id=multipart_upload_id, + request_options=request_options, + ) + return _response.data + class AsyncFilesClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -123,27 +196,35 @@ async def create( self, *, filename: str, - visibility: typing.Optional[FileVisibility] = OMIT, + byte_size: typing.Optional[int] = OMIT, + multipart: typing.Optional[bool] = OMIT, + visibility: typing.Optional[CreateFilesRequestVisibility] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> CreateFilesResponse: + ) -> File: """ - Create a new file record and receive a presigned URL for uploading content to S3. + Creates a file and returns a presigned destination to upload its bytes to. PUT the bytes to `upload_url` (single-part), or to each of `multipart_upload_urls` and then call Complete File Multipart Upload. Once the bytes land the file becomes `ready`, and its ID can be attached wherever a file is accepted — account legal documents, dispute evidence documents. Parameters ---------- filename : str - The name of the file including its extension (e.g., "photo.png" or "document.pdf"). + The name of the file including its extension, e.g. `terms.pdf`. - visibility : typing.Optional[FileVisibility] - Controls whether the file is publicly accessible via CDN or requires authentication. Defaults to private. + byte_size : typing.Optional[int] + The file's size in bytes. Required when `multipart` is `true`. Multipart uploads support at most 10,000 parts of 5MB each (about 50 GB). + + multipart : typing.Optional[bool] + Upload the file in 5MB parts. Required for files larger than 5GB; useful above ~100MB. The file must be larger than 5MB. + + visibility : typing.Optional[CreateFilesRequestVisibility] + `public` files are served via an unsigned CDN URL — use for assets anyone may see. `private` files are served via a signed, expiring URL — use for sensitive documents. Defaults to `private`. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - CreateFilesResponse - A successful response + File + file created with a single-part upload destination Examples -------- @@ -152,7 +233,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -160,25 +241,29 @@ async def create( async def main() -> None: await client.files.create( - filename="filename", + filename="terms.pdf", ) asyncio.run(main()) """ _response = await self._raw_client.create( - filename=filename, visibility=visibility, request_options=request_options + filename=filename, + byte_size=byte_size, + multipart=multipart, + visibility=visibility, + request_options=request_options, ) return _response.data async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> File: """ - Retrieves the details of an existing file. + Retrieves a file you uploaded — poll it after uploading the bytes to see `upload_status` become `ready`. Only the creator can retrieve a file this way; a file attached to another resource is read through that resource. Parameters ---------- id : str - The unique identifier of the file to retrieve. + The unique identifier of the file, prefixed `file_`. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -186,7 +271,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt Returns ------- File - A successful response + file retrieved Examples -------- @@ -195,7 +280,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -203,7 +288,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt async def main() -> None: await client.files.retrieve( - id="file_xxxxxxxxxxxxx", + id="id", ) @@ -211,3 +296,70 @@ async def main() -> None: """ _response = await self._raw_client.retrieve(id, request_options=request_options) return _response.data + + async def complete( + self, + id: str, + *, + multipart_parts: typing.Sequence[CompleteFilesRequestMultipartPartsItem], + multipart_upload_id: str, + request_options: typing.Optional[RequestOptions] = None, + ) -> File: + """ + Assembles the parts of a multipart upload after every part has been PUT to its presigned URL. Pass the `multipart_upload_id` from Create File and each part's `ETag` response header. + + Parameters + ---------- + id : str + The unique identifier of the file, prefixed `file_`. + + multipart_parts : typing.Sequence[CompleteFilesRequestMultipartPartsItem] + Every uploaded part, in order. + + multipart_upload_id : str + The ID of the multipart upload, returned by Create File. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + File + multipart upload completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + from whop_sdk.files import CompleteFilesRequestMultipartPartsItem + + client = AsyncWhop( + "2026-08-21-1", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.files.complete( + id="id", + multipart_parts=[ + CompleteFilesRequestMultipartPartsItem( + etag="etag-1", + part_number=1, + ) + ], + multipart_upload_id="upload-id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.complete( + id, + multipart_parts=multipart_parts, + multipart_upload_id=multipart_upload_id, + request_options=request_options, + ) + return _response.data diff --git a/src/whop_sdk/files/raw_client.py b/src/whop_sdk/files/raw_client.py index f83d65cf..4b3d2b6d 100644 --- a/src/whop_sdk/files/raw_client.py +++ b/src/whop_sdk/files/raw_client.py @@ -10,16 +10,15 @@ 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.forbidden_error import ForbiddenError -from ..errors.internal_server_error import InternalServerError +from ..errors.conflict_error import ConflictError 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.file import File -from ..types.file_visibility import FileVisibility -from .types.create_files_response import CreateFilesResponse +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 pydantic import ValidationError # this is used as the default value for optional parameters @@ -34,33 +33,43 @@ def create( self, *, filename: str, - visibility: typing.Optional[FileVisibility] = OMIT, + byte_size: typing.Optional[int] = OMIT, + multipart: typing.Optional[bool] = OMIT, + visibility: typing.Optional[CreateFilesRequestVisibility] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[CreateFilesResponse]: + ) -> HttpResponse[File]: """ - Create a new file record and receive a presigned URL for uploading content to S3. + Creates a file and returns a presigned destination to upload its bytes to. PUT the bytes to `upload_url` (single-part), or to each of `multipart_upload_urls` and then call Complete File Multipart Upload. Once the bytes land the file becomes `ready`, and its ID can be attached wherever a file is accepted — account legal documents, dispute evidence documents. Parameters ---------- filename : str - The name of the file including its extension (e.g., "photo.png" or "document.pdf"). + The name of the file including its extension, e.g. `terms.pdf`. - visibility : typing.Optional[FileVisibility] - Controls whether the file is publicly accessible via CDN or requires authentication. Defaults to private. + byte_size : typing.Optional[int] + The file's size in bytes. Required when `multipart` is `true`. Multipart uploads support at most 10,000 parts of 5MB each (about 50 GB). + + multipart : typing.Optional[bool] + Upload the file in 5MB parts. Required for files larger than 5GB; useful above ~100MB. The file must be larger than 5MB. + + visibility : typing.Optional[CreateFilesRequestVisibility] + `public` files are served via an unsigned CDN URL — use for assets anyone may see. `private` files are served via a signed, expiring URL — use for sensitive documents. Defaults to `private`. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - HttpResponse[CreateFilesResponse] - A successful response + HttpResponse[File] + file created with a single-part upload destination """ _response = self._client_wrapper.httpx_client.request( "files", method="POST", json={ + "byte_size": byte_size, "filename": filename, + "multipart": multipart, "visibility": visibility, }, headers={ @@ -72,9 +81,9 @@ def create( try: if 200 <= _response.status_code < 300: _data = typing.cast( - CreateFilesResponse, + File, parse_obj_as( - type_=CreateFilesResponse, # type: ignore + type_=File, # type: ignore object_=_response.json(), ), ) @@ -101,41 +110,60 @@ def create( ), ), ) - 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( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + V1ErrorResponse, parse_obj_as( - type_=typing.Any, # type: ignore + type_=V1ErrorResponse, # 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(), - ), + _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[File]: + """ + Retrieves a file you uploaded — poll it after uploading the bytes to see `upload_status` become `ready`. Only the creator can retrieve a file this way; a file attached to another resource is read through that resource. + + Parameters + ---------- + id : str + The unique identifier of the file, prefixed `file_`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[File] + file retrieved + """ + _response = self._client_wrapper.httpx_client.request( + f"files/{encode_path_param(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + File, + parse_obj_as( + type_=File, # type: ignore + object_=_response.json(), ), ) - if _response.status_code == 429: - raise TooManyRequestsError( + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -145,8 +173,8 @@ def create( ), ), ) - if _response.status_code == 500: - raise InternalServerError( + if _response.status_code == 404: + raise NotFoundError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -165,14 +193,27 @@ def create( ) 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[File]: + def complete( + self, + id: str, + *, + multipart_parts: typing.Sequence[CompleteFilesRequestMultipartPartsItem], + multipart_upload_id: str, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[File]: """ - Retrieves the details of an existing file. + Assembles the parts of a multipart upload after every part has been PUT to its presigned URL. Pass the `multipart_upload_id` from Create File and each part's `ETag` response header. Parameters ---------- id : str - The unique identifier of the file to retrieve. + The unique identifier of the file, prefixed `file_`. + + multipart_parts : typing.Sequence[CompleteFilesRequestMultipartPartsItem] + Every uploaded part, in order. + + multipart_upload_id : str + The ID of the multipart upload, returned by Create File. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -180,12 +221,24 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] Returns ------- HttpResponse[File] - A successful response + multipart upload completed """ _response = self._client_wrapper.httpx_client.request( - f"files/{encode_path_param(id)}", - method="GET", + f"files/{encode_path_param(id)}/complete", + method="POST", + json={ + "multipart_parts": convert_and_respect_annotation_metadata( + object_=multipart_parts, + annotation=typing.Sequence[CompleteFilesRequestMultipartPartsItem], + direction="write", + ), + "multipart_upload_id": multipart_upload_id, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -219,17 +272,6 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] ), ), ) - 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), @@ -241,35 +283,13 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] ), ), ) - if _response.status_code == 422: - raise UnprocessableEntityError( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + V1ErrorResponse, 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 + type_=V1ErrorResponse, # type: ignore object_=_response.json(), ), ), @@ -292,33 +312,43 @@ async def create( self, *, filename: str, - visibility: typing.Optional[FileVisibility] = OMIT, + byte_size: typing.Optional[int] = OMIT, + multipart: typing.Optional[bool] = OMIT, + visibility: typing.Optional[CreateFilesRequestVisibility] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[CreateFilesResponse]: + ) -> AsyncHttpResponse[File]: """ - Create a new file record and receive a presigned URL for uploading content to S3. + Creates a file and returns a presigned destination to upload its bytes to. PUT the bytes to `upload_url` (single-part), or to each of `multipart_upload_urls` and then call Complete File Multipart Upload. Once the bytes land the file becomes `ready`, and its ID can be attached wherever a file is accepted — account legal documents, dispute evidence documents. Parameters ---------- filename : str - The name of the file including its extension (e.g., "photo.png" or "document.pdf"). + The name of the file including its extension, e.g. `terms.pdf`. + + byte_size : typing.Optional[int] + The file's size in bytes. Required when `multipart` is `true`. Multipart uploads support at most 10,000 parts of 5MB each (about 50 GB). - visibility : typing.Optional[FileVisibility] - Controls whether the file is publicly accessible via CDN or requires authentication. Defaults to private. + multipart : typing.Optional[bool] + Upload the file in 5MB parts. Required for files larger than 5GB; useful above ~100MB. The file must be larger than 5MB. + + visibility : typing.Optional[CreateFilesRequestVisibility] + `public` files are served via an unsigned CDN URL — use for assets anyone may see. `private` files are served via a signed, expiring URL — use for sensitive documents. Defaults to `private`. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AsyncHttpResponse[CreateFilesResponse] - A successful response + AsyncHttpResponse[File] + file created with a single-part upload destination """ _response = await self._client_wrapper.httpx_client.request( "files", method="POST", json={ + "byte_size": byte_size, "filename": filename, + "multipart": multipart, "visibility": visibility, }, headers={ @@ -330,9 +360,9 @@ async def create( try: if 200 <= _response.status_code < 300: _data = typing.cast( - CreateFilesResponse, + File, parse_obj_as( - type_=CreateFilesResponse, # type: ignore + type_=File, # type: ignore object_=_response.json(), ), ) @@ -359,41 +389,62 @@ async def create( ), ), ) - 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( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + V1ErrorResponse, parse_obj_as( - type_=typing.Any, # type: ignore + type_=V1ErrorResponse, # 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(), - ), + _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[File]: + """ + Retrieves a file you uploaded — poll it after uploading the bytes to see `upload_status` become `ready`. Only the creator can retrieve a file this way; a file attached to another resource is read through that resource. + + Parameters + ---------- + id : str + The unique identifier of the file, prefixed `file_`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[File] + file retrieved + """ + _response = await self._client_wrapper.httpx_client.request( + f"files/{encode_path_param(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + File, + parse_obj_as( + type_=File, # type: ignore + object_=_response.json(), ), ) - if _response.status_code == 429: - raise TooManyRequestsError( + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -403,8 +454,8 @@ async def create( ), ), ) - if _response.status_code == 500: - raise InternalServerError( + if _response.status_code == 404: + raise NotFoundError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -423,16 +474,27 @@ async def create( ) 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 + async def complete( + self, + id: str, + *, + multipart_parts: typing.Sequence[CompleteFilesRequestMultipartPartsItem], + multipart_upload_id: str, + request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[File]: """ - Retrieves the details of an existing file. + Assembles the parts of a multipart upload after every part has been PUT to its presigned URL. Pass the `multipart_upload_id` from Create File and each part's `ETag` response header. Parameters ---------- id : str - The unique identifier of the file to retrieve. + The unique identifier of the file, prefixed `file_`. + + multipart_parts : typing.Sequence[CompleteFilesRequestMultipartPartsItem] + Every uploaded part, in order. + + multipart_upload_id : str + The ID of the multipart upload, returned by Create File. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -440,12 +502,24 @@ async def retrieve( Returns ------- AsyncHttpResponse[File] - A successful response + multipart upload completed """ _response = await self._client_wrapper.httpx_client.request( - f"files/{encode_path_param(id)}", - method="GET", + f"files/{encode_path_param(id)}/complete", + method="POST", + json={ + "multipart_parts": convert_and_respect_annotation_metadata( + object_=multipart_parts, + annotation=typing.Sequence[CompleteFilesRequestMultipartPartsItem], + direction="write", + ), + "multipart_upload_id": multipart_upload_id, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -479,17 +553,6 @@ async def retrieve( ), ), ) - 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), @@ -501,35 +564,13 @@ async def retrieve( ), ), ) - if _response.status_code == 422: - raise UnprocessableEntityError( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + V1ErrorResponse, 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 + type_=V1ErrorResponse, # type: ignore object_=_response.json(), ), ), diff --git a/src/whop_sdk/files/types/__init__.py b/src/whop_sdk/files/types/__init__.py index d7b17bb6..60f1ea59 100644 --- a/src/whop_sdk/files/types/__init__.py +++ b/src/whop_sdk/files/types/__init__.py @@ -6,8 +6,12 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .create_files_response import CreateFilesResponse -_dynamic_imports: typing.Dict[str, str] = {"CreateFilesResponse": ".create_files_response"} + from .complete_files_request_multipart_parts_item import CompleteFilesRequestMultipartPartsItem + from .create_files_request_visibility import CreateFilesRequestVisibility +_dynamic_imports: typing.Dict[str, str] = { + "CompleteFilesRequestMultipartPartsItem": ".complete_files_request_multipart_parts_item", + "CreateFilesRequestVisibility": ".create_files_request_visibility", +} def __getattr__(attr_name: str) -> typing.Any: @@ -31,4 +35,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["CreateFilesResponse"] +__all__ = ["CompleteFilesRequestMultipartPartsItem", "CreateFilesRequestVisibility"] diff --git a/src/whop_sdk/files/types/complete_files_request_multipart_parts_item.py b/src/whop_sdk/files/types/complete_files_request_multipart_parts_item.py new file mode 100644 index 00000000..f9724943 --- /dev/null +++ b/src/whop_sdk/files/types/complete_files_request_multipart_parts_item.py @@ -0,0 +1,27 @@ +# 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 CompleteFilesRequestMultipartPartsItem(UniversalBaseModel): + etag: str = pydantic.Field() + """ + The `ETag` response header from the part's upload. + """ + + part_number: int = pydantic.Field() + """ + The 1-based index of the part. + """ + + 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/files/types/create_files_request_visibility.py b/src/whop_sdk/files/types/create_files_request_visibility.py new file mode 100644 index 00000000..607ad228 --- /dev/null +++ b/src/whop_sdk/files/types/create_files_request_visibility.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateFilesRequestVisibility = typing.Union[typing.Literal["public", "private"], typing.Any] diff --git a/src/whop_sdk/files/types/create_files_response.py b/src/whop_sdk/files/types/create_files_response.py deleted file mode 100644 index dc6324e0..00000000 --- a/src/whop_sdk/files/types/create_files_response.py +++ /dev/null @@ -1,68 +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.file_visibility import FileVisibility -from ...types.upload_statuses import UploadStatuses - - -class CreateFilesResponse(UniversalBaseModel): - """ - A file that has been uploaded or is pending upload. - """ - - content_type: typing.Optional[str] = pydantic.Field(default=None) - """ - The MIME type of the uploaded file (e.g., image/jpeg, video/mp4, audio/mpeg). - """ - - filename: typing.Optional[str] = pydantic.Field(default=None) - """ - The original filename of the uploaded file, including its file extension. - """ - - id: str = pydantic.Field() - """ - The unique identifier for the file. - """ - - size: typing.Optional[str] = pydantic.Field(default=None) - """ - The file size in bytes. Null if the file has not finished uploading. - """ - - upload_headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) - """ - Headers to include in the upload request. Only present in the response from the create mutation. - """ - - upload_status: UploadStatuses = pydantic.Field() - """ - The current upload status of the file (e.g., pending, ready). - """ - - upload_url: typing.Optional[str] = pydantic.Field(default=None) - """ - The presigned URL to upload the file contents to. Only present in the response from the create mutation. - """ - - url: typing.Optional[str] = pydantic.Field(default=None) - """ - The URL for accessing the file. For public files, this is a permanent CDN URL. For private files, this is a signed URL that expires. Null if the file has not finished uploading. - """ - - visibility: FileVisibility = pydantic.Field() - """ - Whether the file is publicly accessible or requires authentication. - """ - - 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/financial_activity/client.py b/src/whop_sdk/financial_activity/client.py index 136fa97b..376a71f4 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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/financial_activity/types/list_financial_activity_request_line_types_item.py b/src/whop_sdk/financial_activity/types/list_financial_activity_request_line_types_item.py index 85bef80e..5e4e1150 100644 --- a/src/whop_sdk/financial_activity/types/list_financial_activity_request_line_types_item.py +++ b/src/whop_sdk/financial_activity/types/list_financial_activity_request_line_types_item.py @@ -17,6 +17,8 @@ "airdrop_reversal", "application_fee", "application_fee_payout", + "balance_reservation", + "balance_reservation_reversal", "bank_transfer", "billing_percentage_fee", "buyer_fee", diff --git a/src/whop_sdk/forum_posts/client.py b/src/whop_sdk/forum_posts/client.py index 6042336b..14077465 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 dcd1af78..165900f9 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 135afbd8..cf589661 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 416fee7f..21b1b9c6 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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -185,7 +185,7 @@ def create( ) client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -334,7 +334,7 @@ def update( The email address of the customer. line_items : typing.Optional[typing.Sequence[UpdateInvoicesRequestLineItemsItem]] - Line items that break down the invoice total. + Line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. Individual items may be negative to represent a credit, as long as the sum is not negative and clears the currency's minimum charge. Pass an empty list to remove the breakdown. mailing_address_id : typing.Optional[str] The unique identifier of an existing mailing address to attach. @@ -367,7 +367,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -712,7 +712,7 @@ async def create( ) client = AsyncWhop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -883,7 +883,7 @@ async def update( The email address of the customer. line_items : typing.Optional[typing.Sequence[UpdateInvoicesRequestLineItemsItem]] - Line items that break down the invoice total. + Line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. Individual items may be negative to represent a credit, as long as the sum is not negative and clears the currency's minimum charge. Pass an empty list to remove the breakdown. mailing_address_id : typing.Optional[str] The unique identifier of an existing mailing address to attach. @@ -918,7 +918,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/invoices/raw_client.py b/src/whop_sdk/invoices/raw_client.py index 51a63ac5..21cc36d6 100644 --- a/src/whop_sdk/invoices/raw_client.py +++ b/src/whop_sdk/invoices/raw_client.py @@ -680,7 +680,7 @@ def update( The email address of the customer. line_items : typing.Optional[typing.Sequence[UpdateInvoicesRequestLineItemsItem]] - Line items that break down the invoice total. + Line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. Individual items may be negative to represent a credit, as long as the sum is not negative and clears the currency's minimum charge. Pass an empty list to remove the breakdown. mailing_address_id : typing.Optional[str] The unique identifier of an existing mailing address to attach. @@ -1975,7 +1975,7 @@ async def update( The email address of the customer. line_items : typing.Optional[typing.Sequence[UpdateInvoicesRequestLineItemsItem]] - Line items that break down the invoice total. + Line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. Individual items may be negative to represent a credit, as long as the sum is not negative and clears the currency's minimum charge. Pass an empty list to remove the breakdown. mailing_address_id : typing.Optional[str] The unique identifier of an existing mailing address to attach. diff --git a/src/whop_sdk/invoices/types/create_invoices_request_product.py b/src/whop_sdk/invoices/types/create_invoices_request_product.py index 47df1372..db4966f5 100644 --- a/src/whop_sdk/invoices/types/create_invoices_request_product.py +++ b/src/whop_sdk/invoices/types/create_invoices_request_product.py @@ -59,7 +59,7 @@ class CreateInvoicesRequestProduct(UniversalBaseModel): line_items: typing.Optional[typing.List[CreateInvoicesRequestProductLineItemsItem]] = pydantic.Field(default=None) """ - Optional line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. + Optional line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. Individual items may be negative to represent a credit, as long as the sum is not negative and clears the currency's minimum charge. """ mailing_address_id: typing.Optional[str] = pydantic.Field(default=None) diff --git a/src/whop_sdk/invoices/types/create_invoices_request_product_id.py b/src/whop_sdk/invoices/types/create_invoices_request_product_id.py index dc10fbfa..25e7d622 100644 --- a/src/whop_sdk/invoices/types/create_invoices_request_product_id.py +++ b/src/whop_sdk/invoices/types/create_invoices_request_product_id.py @@ -58,7 +58,7 @@ class CreateInvoicesRequestProductId(UniversalBaseModel): line_items: typing.Optional[typing.List[CreateInvoicesRequestProductIdLineItemsItem]] = pydantic.Field(default=None) """ - Optional line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. + Optional line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. Individual items may be negative to represent a credit, as long as the sum is not negative and clears the currency's minimum charge. """ mailing_address_id: typing.Optional[str] = pydantic.Field(default=None) diff --git a/src/whop_sdk/invoices/types/create_invoices_request_product_id_line_items_item.py b/src/whop_sdk/invoices/types/create_invoices_request_product_id_line_items_item.py index 9aab9578..a4a0ebae 100644 --- a/src/whop_sdk/invoices/types/create_invoices_request_product_id_line_items_item.py +++ b/src/whop_sdk/invoices/types/create_invoices_request_product_id_line_items_item.py @@ -23,7 +23,7 @@ class CreateInvoicesRequestProductIdLineItemsItem(UniversalBaseModel): unit_price: float = pydantic.Field() """ - The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43 + The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43. Negative values represent a credit or deduction, as long as the line items still total a chargeable amount. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/invoices/types/create_invoices_request_product_line_items_item.py b/src/whop_sdk/invoices/types/create_invoices_request_product_line_items_item.py index 83340093..9bd62a2f 100644 --- a/src/whop_sdk/invoices/types/create_invoices_request_product_line_items_item.py +++ b/src/whop_sdk/invoices/types/create_invoices_request_product_line_items_item.py @@ -23,7 +23,7 @@ class CreateInvoicesRequestProductLineItemsItem(UniversalBaseModel): unit_price: float = pydantic.Field() """ - The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43 + The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43. Negative values represent a credit or deduction, as long as the line items still total a chargeable amount. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/invoices/types/update_invoices_request_line_items_item.py b/src/whop_sdk/invoices/types/update_invoices_request_line_items_item.py index 0173e007..79850d09 100644 --- a/src/whop_sdk/invoices/types/update_invoices_request_line_items_item.py +++ b/src/whop_sdk/invoices/types/update_invoices_request_line_items_item.py @@ -23,7 +23,7 @@ class UpdateInvoicesRequestLineItemsItem(UniversalBaseModel): unit_price: float = pydantic.Field() """ - The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43 + The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43. Negative values represent a credit or deduction, as long as the line items still total a chargeable amount. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/leads/client.py b/src/whop_sdk/leads/client.py index c1da7f93..45e8de74 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 5beff36d..84bde225 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", + "2026-08-21-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", + "2026-08-21-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 21a75f17..b0e003bd 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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ledgers/types/get_financial_report_response_rows_item_line_category.py b/src/whop_sdk/ledgers/types/get_financial_report_response_rows_item_line_category.py index a5771d4b..62a5360f 100644 --- a/src/whop_sdk/ledgers/types/get_financial_report_response_rows_item_line_category.py +++ b/src/whop_sdk/ledgers/types/get_financial_report_response_rows_item_line_category.py @@ -4,6 +4,7 @@ GetFinancialReportResponseRowsItemLineCategory = typing.Union[ typing.Literal[ + "accelerated_settlement_fee", "account_settlement", "ad_balance_funding_receipt", "ad_budget_release", @@ -169,6 +170,7 @@ "platform_earning_settlement", "platform_earning_unreconciled_clearing", "promo_reversal", + "psp_accelerated_settlement_fee", "psp_account_updater_fee", "psp_adjusted_processing_fee", "psp_authentication_fee", diff --git a/src/whop_sdk/media/client.py b/src/whop_sdk/media/client.py index 7eda3873..47b99532 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 4f4a8534..7211eecb 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 c0884731..9bbeec03 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", + "2026-08-21-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", + "2026-08-21-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 9a3061f6..85a31015 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 c7807b2e..c47919d6 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 97156d2e..5863623e 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 195db3aa..9faa7420 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", + "2026-08-21-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", + "2026-08-21-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 f5566771..912b0090 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 95ca804b..e0ac628a 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", + "2026-08-21-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", + "2026-08-21-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 828b5d75..f5e0ee0e 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 9b43c699..82a00361 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 b3916a02..255e0e0e 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 8a2a8946..8a54eb9a 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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -250,7 +250,7 @@ def create( ) client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -831,7 +831,7 @@ async def create( ) client = AsyncWhop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 100e17f5..e7365b1e 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", + "2026-08-21-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", + "2026-08-21-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 e6d09f96..073602ca 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payouts/client.py b/src/whop_sdk/payouts/client.py index 5f877772..fb183af9 100644 --- a/src/whop_sdk/payouts/client.py +++ b/src/whop_sdk/payouts/client.py @@ -113,7 +113,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -209,7 +209,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -330,7 +330,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -389,7 +389,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -443,7 +443,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payouts/methods/client.py b/src/whop_sdk/payouts/methods/client.py index 450170fb..a382495f 100644 --- a/src/whop_sdk/payouts/methods/client.py +++ b/src/whop_sdk/payouts/methods/client.py @@ -95,7 +95,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -171,7 +171,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -344,7 +344,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -429,7 +429,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payouts/methods/types/create_methods_response_supported_payout_method_delivery_type.py b/src/whop_sdk/payouts/methods/types/create_methods_response_supported_payout_method_delivery_type.py index b64d2612..fdb230a9 100644 --- a/src/whop_sdk/payouts/methods/types/create_methods_response_supported_payout_method_delivery_type.py +++ b/src/whop_sdk/payouts/methods/types/create_methods_response_supported_payout_method_delivery_type.py @@ -8,8 +8,8 @@ "bank_deposit", "home_delivery", "mobile_wallet", - "masspay_card", - "paper_check", + "card", + "check", "bill", "cryptocurrency", "unknown", diff --git a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_supported_payout_method_delivery_type.py b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_supported_payout_method_delivery_type.py index 6c178482..16435214 100644 --- a/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_supported_payout_method_delivery_type.py +++ b/src/whop_sdk/payouts/methods/types/list_methods_response_data_item_supported_payout_method_delivery_type.py @@ -8,8 +8,8 @@ "bank_deposit", "home_delivery", "mobile_wallet", - "masspay_card", - "paper_check", + "card", + "check", "bill", "cryptocurrency", "unknown", diff --git a/src/whop_sdk/payouts/methods/types/update_methods_response_supported_payout_method_delivery_type.py b/src/whop_sdk/payouts/methods/types/update_methods_response_supported_payout_method_delivery_type.py index f9e86e73..13b460f5 100644 --- a/src/whop_sdk/payouts/methods/types/update_methods_response_supported_payout_method_delivery_type.py +++ b/src/whop_sdk/payouts/methods/types/update_methods_response_supported_payout_method_delivery_type.py @@ -8,8 +8,8 @@ "bank_deposit", "home_delivery", "mobile_wallet", - "masspay_card", - "paper_check", + "card", + "check", "bill", "cryptocurrency", "unknown", diff --git a/src/whop_sdk/payouts/supported_methods/client.py b/src/whop_sdk/payouts/supported_methods/client.py index 1e60120c..02924490 100644 --- a/src/whop_sdk/payouts/supported_methods/client.py +++ b/src/whop_sdk/payouts/supported_methods/client.py @@ -92,7 +92,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -203,7 +203,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_delivery_type.py b/src/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_delivery_type.py index b38ee4f5..6913f0c6 100644 --- a/src/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_delivery_type.py +++ b/src/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_delivery_type.py @@ -4,15 +4,7 @@ ListSupportedMethodsResponseDataItemDeliveryType = typing.Union[ typing.Literal[ - "cash_pickup", - "bank_deposit", - "home_delivery", - "mobile_wallet", - "masspay_card", - "paper_check", - "bill", - "cryptocurrency", - "unknown", + "cash_pickup", "bank_deposit", "home_delivery", "mobile_wallet", "card", "check", "bill", "cryptocurrency" ], typing.Any, ] diff --git a/src/whop_sdk/payouts/types/create_payouts_response_payout_method_supported_payout_method_delivery_type.py b/src/whop_sdk/payouts/types/create_payouts_response_payout_method_supported_payout_method_delivery_type.py index c2b14c24..1fedcb5d 100644 --- a/src/whop_sdk/payouts/types/create_payouts_response_payout_method_supported_payout_method_delivery_type.py +++ b/src/whop_sdk/payouts/types/create_payouts_response_payout_method_supported_payout_method_delivery_type.py @@ -8,8 +8,8 @@ "bank_deposit", "home_delivery", "mobile_wallet", - "masspay_card", - "paper_check", + "card", + "check", "bill", "cryptocurrency", "unknown", diff --git a/src/whop_sdk/payouts/types/list_payouts_response_data_item_payout_method_supported_payout_method_delivery_type.py b/src/whop_sdk/payouts/types/list_payouts_response_data_item_payout_method_supported_payout_method_delivery_type.py index aab28cd2..ddb2cc34 100644 --- a/src/whop_sdk/payouts/types/list_payouts_response_data_item_payout_method_supported_payout_method_delivery_type.py +++ b/src/whop_sdk/payouts/types/list_payouts_response_data_item_payout_method_supported_payout_method_delivery_type.py @@ -8,8 +8,8 @@ "bank_deposit", "home_delivery", "mobile_wallet", - "masspay_card", - "paper_check", + "card", + "check", "bill", "cryptocurrency", "unknown", diff --git a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_supported_payout_method_delivery_type.py b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_supported_payout_method_delivery_type.py index ef45f07a..78839686 100644 --- a/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_supported_payout_method_delivery_type.py +++ b/src/whop_sdk/payouts/types/post_payout_method_created_payload_data_supported_payout_method_delivery_type.py @@ -8,8 +8,8 @@ "bank_deposit", "home_delivery", "mobile_wallet", - "masspay_card", - "paper_check", + "card", + "check", "bill", "cryptocurrency", "unknown", 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_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type.py index 48812cf4..d68f13ff 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_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type.py @@ -8,8 +8,8 @@ "bank_deposit", "home_delivery", "mobile_wallet", - "masspay_card", - "paper_check", + "card", + "check", "bill", "cryptocurrency", "unknown", 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_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type.py index d16a3a54..4085e693 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_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type.py @@ -8,8 +8,8 @@ "bank_deposit", "home_delivery", "mobile_wallet", - "masspay_card", - "paper_check", + "card", + "check", "bill", "cryptocurrency", "unknown", 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/post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type.py index 1ddcb607..2d91281d 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/post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type.py @@ -8,8 +8,8 @@ "bank_deposit", "home_delivery", "mobile_wallet", - "masspay_card", - "paper_check", + "card", + "check", "bill", "cryptocurrency", "unknown", diff --git a/src/whop_sdk/payouts/types/retrieve_payouts_response_payout_method_supported_payout_method_delivery_type.py b/src/whop_sdk/payouts/types/retrieve_payouts_response_payout_method_supported_payout_method_delivery_type.py index 93bc50d6..cdcd2732 100644 --- a/src/whop_sdk/payouts/types/retrieve_payouts_response_payout_method_supported_payout_method_delivery_type.py +++ b/src/whop_sdk/payouts/types/retrieve_payouts_response_payout_method_supported_payout_method_delivery_type.py @@ -8,8 +8,8 @@ "bank_deposit", "home_delivery", "mobile_wallet", - "masspay_card", - "paper_check", + "card", + "check", "bill", "cryptocurrency", "unknown", diff --git a/src/whop_sdk/people/client.py b/src/whop_sdk/people/client.py index c7dc4d74..eeddf2e3 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 26850078..cca439b9 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", + "2026-08-21-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", + "2026-08-21-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 4ec088f8..359c7edb 100644 --- a/src/whop_sdk/plans/client.py +++ b/src/whop_sdk/plans/client.py @@ -46,7 +46,7 @@ def with_raw_response(self) -> RawPlansClient: def list( self, *, - account_id: str, + account_id: typing.Optional[str] = None, direction: typing.Optional[ListPlansRequestDirection] = None, order: typing.Optional[ListPlansRequestOrder] = None, release_methods: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, @@ -62,12 +62,12 @@ def list( request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[PlanListItem, ListPlansResponse]: """ - Returns a paginated list of plans belonging to an account, with optional filtering by visibility, type, release method, and product. + Returns a paginated list of plans. Omit `account_id` and pass `product_ids` to list a product's public buyable plans. Parameters ---------- - account_id : str - The unique identifier of the account to list plans for. + account_id : typing.Optional[str] + The unique identifier of the account to list plans for. Required unless `product_ids` is provided for a public product-plan read. direction : typing.Optional[ListPlansRequestDirection] The sort direction for results. Defaults to descending. @@ -85,7 +85,7 @@ def list( Filter to only plans matching these billing types. product_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filter to only plans belonging to these product identifiers. + Filter to only plans belonging to these product identifiers. When `account_id` is omitted, this is required and the response is publicly readable: only visible, non-invoice plans are returned. created_before : typing.Optional[str] Only return plans created before this timestamp. @@ -111,19 +111,18 @@ def list( Returns ------- SyncPager[PlanListItem, ListPlansResponse] - plans listed + visible plans listed by product without authentication Examples -------- from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) response = client.plans.list( - account_id="account_id", release_methods=["buy_now"], visibilities=["visible"], plan_types=["renewal"], @@ -275,7 +274,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -333,7 +332,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -366,7 +365,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -508,7 +507,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -588,7 +587,7 @@ def calculate_tax( from whop_sdk.plans import CalculateTaxPlansRequestAddress client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -624,7 +623,7 @@ def with_raw_response(self) -> AsyncRawPlansClient: async def list( self, *, - account_id: str, + account_id: typing.Optional[str] = None, direction: typing.Optional[ListPlansRequestDirection] = None, order: typing.Optional[ListPlansRequestOrder] = None, release_methods: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, @@ -640,12 +639,12 @@ async def list( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[PlanListItem, ListPlansResponse]: """ - Returns a paginated list of plans belonging to an account, with optional filtering by visibility, type, release method, and product. + Returns a paginated list of plans. Omit `account_id` and pass `product_ids` to list a product's public buyable plans. Parameters ---------- - account_id : str - The unique identifier of the account to list plans for. + account_id : typing.Optional[str] + The unique identifier of the account to list plans for. Required unless `product_ids` is provided for a public product-plan read. direction : typing.Optional[ListPlansRequestDirection] The sort direction for results. Defaults to descending. @@ -663,7 +662,7 @@ async def list( Filter to only plans matching these billing types. product_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filter to only plans belonging to these product identifiers. + Filter to only plans belonging to these product identifiers. When `account_id` is omitted, this is required and the response is publicly readable: only visible, non-invoice plans are returned. created_before : typing.Optional[str] Only return plans created before this timestamp. @@ -689,7 +688,7 @@ async def list( Returns ------- AsyncPager[PlanListItem, ListPlansResponse] - plans listed + visible plans listed by product without authentication Examples -------- @@ -698,7 +697,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -706,7 +705,6 @@ async def list( async def main() -> None: response = await client.plans.list( - account_id="account_id", release_methods=["buy_now"], visibilities=["visible"], plan_types=["renewal"], @@ -864,7 +862,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -930,7 +928,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -971,7 +969,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1121,7 +1119,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1209,7 +1207,7 @@ async def calculate_tax( from whop_sdk.plans import CalculateTaxPlansRequestAddress client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/plans/raw_client.py b/src/whop_sdk/plans/raw_client.py index f6f274bf..871575e6 100644 --- a/src/whop_sdk/plans/raw_client.py +++ b/src/whop_sdk/plans/raw_client.py @@ -48,7 +48,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, - account_id: str, + account_id: typing.Optional[str] = None, direction: typing.Optional[ListPlansRequestDirection] = None, order: typing.Optional[ListPlansRequestOrder] = None, release_methods: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, @@ -64,12 +64,12 @@ def list( request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[PlanListItem, ListPlansResponse]: """ - Returns a paginated list of plans belonging to an account, with optional filtering by visibility, type, release method, and product. + Returns a paginated list of plans. Omit `account_id` and pass `product_ids` to list a product's public buyable plans. Parameters ---------- - account_id : str - The unique identifier of the account to list plans for. + account_id : typing.Optional[str] + The unique identifier of the account to list plans for. Required unless `product_ids` is provided for a public product-plan read. direction : typing.Optional[ListPlansRequestDirection] The sort direction for results. Defaults to descending. @@ -87,7 +87,7 @@ def list( Filter to only plans matching these billing types. product_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filter to only plans belonging to these product identifiers. + Filter to only plans belonging to these product identifiers. When `account_id` is omitted, this is required and the response is publicly readable: only visible, non-invoice plans are returned. created_before : typing.Optional[str] Only return plans created before this timestamp. @@ -113,7 +113,7 @@ def list( Returns ------- SyncPager[PlanListItem, ListPlansResponse] - plans listed + visible plans listed by product without authentication """ _response = self._client_wrapper.httpx_client.request( "plans", @@ -859,7 +859,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, - account_id: str, + account_id: typing.Optional[str] = None, direction: typing.Optional[ListPlansRequestDirection] = None, order: typing.Optional[ListPlansRequestOrder] = None, release_methods: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, @@ -875,12 +875,12 @@ async def list( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[PlanListItem, ListPlansResponse]: """ - Returns a paginated list of plans belonging to an account, with optional filtering by visibility, type, release method, and product. + Returns a paginated list of plans. Omit `account_id` and pass `product_ids` to list a product's public buyable plans. Parameters ---------- - account_id : str - The unique identifier of the account to list plans for. + account_id : typing.Optional[str] + The unique identifier of the account to list plans for. Required unless `product_ids` is provided for a public product-plan read. direction : typing.Optional[ListPlansRequestDirection] The sort direction for results. Defaults to descending. @@ -898,7 +898,7 @@ async def list( Filter to only plans matching these billing types. product_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filter to only plans belonging to these product identifiers. + Filter to only plans belonging to these product identifiers. When `account_id` is omitted, this is required and the response is publicly readable: only visible, non-invoice plans are returned. created_before : typing.Optional[str] Only return plans created before this timestamp. @@ -924,7 +924,7 @@ async def list( Returns ------- AsyncPager[PlanListItem, ListPlansResponse] - plans listed + visible plans listed by product without authentication """ _response = await self._client_wrapper.httpx_client.request( "plans", diff --git a/src/whop_sdk/products/__init__.py b/src/whop_sdk/products/__init__.py index 494ade43..ccdd9b21 100644 --- a/src/whop_sdk/products/__init__.py +++ b/src/whop_sdk/products/__init__.py @@ -12,6 +12,7 @@ CreateProductsRequestMemberAffiliateStatus, DeleteProductsResponse, ListProductsRequestDirection, + ListProductsRequestPlanTypesItem, ListProductsResponse, ListProductsResponsePageInfo, PostProductCreatedPayload, @@ -37,6 +38,7 @@ "CreateProductsRequestMemberAffiliateStatus": ".types", "DeleteProductsResponse": ".types", "ListProductsRequestDirection": ".types", + "ListProductsRequestPlanTypesItem": ".types", "ListProductsResponse": ".types", "ListProductsResponsePageInfo": ".types", "PostProductCreatedPayload": ".types", @@ -85,6 +87,7 @@ def __dir__(): "CreateProductsRequestMemberAffiliateStatus", "DeleteProductsResponse", "ListProductsRequestDirection", + "ListProductsRequestPlanTypesItem", "ListProductsResponse", "ListProductsResponsePageInfo", "PostProductCreatedPayload", diff --git a/src/whop_sdk/products/client.py b/src/whop_sdk/products/client.py index 589bcd56..3dcae5d9 100644 --- a/src/whop_sdk/products/client.py +++ b/src/whop_sdk/products/client.py @@ -13,6 +13,7 @@ from .types.create_products_request_member_affiliate_status import CreateProductsRequestMemberAffiliateStatus from .types.delete_products_response import DeleteProductsResponse from .types.list_products_request_direction import ListProductsRequestDirection +from .types.list_products_request_plan_types_item import ListProductsRequestPlanTypesItem from .types.list_products_response import ListProductsResponse from .types.update_products_request_banner_image import UpdateProductsRequestBannerImage @@ -38,7 +39,14 @@ def with_raw_response(self) -> RawProductsClient: def list( self, *, - account_id: str, + account_id: typing.Optional[str] = None, + query: typing.Optional[str] = None, + marketplace_category_route: typing.Optional[str] = None, + plan_types: typing.Optional[ + typing.Union[ListProductsRequestPlanTypesItem, typing.Sequence[ListProductsRequestPlanTypesItem]] + ] = None, + price_minimum: typing.Optional[float] = None, + price_maximum: typing.Optional[float] = None, visibilities: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, access_pass_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, labels: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, @@ -48,18 +56,35 @@ def list( after: typing.Optional[str] = None, last: typing.Optional[int] = None, before: typing.Optional[str] = None, + created_after: typing.Optional[str] = None, + created_before: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ProductListItem, ListProductsResponse]: """ - Returns a paginated list of products belonging to an account. + Returns a paginated list of products. Omit `account_id` to search the public marketplace. Parameters ---------- - account_id : str - The unique identifier of the account to list products for. + account_id : typing.Optional[str] + The unique identifier of the account to list products for. Omit to search the public marketplace. + + query : typing.Optional[str] + Ranked search against product title and headline. Omit to browse by recency. + + marketplace_category_route : typing.Optional[str] + Only return marketplace products assigned to this category route, such as `trading`. + + plan_types : typing.Optional[typing.Union[ListProductsRequestPlanTypesItem, typing.Sequence[ListProductsRequestPlanTypesItem]]] + Filter to products with a buyable plan of these billing models, such as `one_time` or `renewal`. + + price_minimum : typing.Optional[float] + Only return products whose advertised buyable plan has a displayed price of at least this amount. Recurring plans use renewal price. + + price_maximum : typing.Optional[float] + Only return products whose advertised buyable plan has a displayed price of at most this amount. Recurring plans use renewal price. visibilities : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filter to only products matching these visibility states. + Filter to only products matching these visibility states. Ignored on the public marketplace list, which only returns visible products. access_pass_types : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter to only products matching these types. @@ -71,7 +96,7 @@ def list( The sort direction for results. Defaults to descending. order : typing.Optional[str] - The field to sort results by. Defaults to created_at. + The field to sort results by. Account lists default to `created_at`. Marketplace lists default to `discoverable_at` and accept `created_at` or `discoverable_at`. Cannot be combined with `query`. first : typing.Optional[int] The number of products to return (default and max 100). @@ -85,25 +110,30 @@ def list( before : typing.Optional[str] A cursor; returns products before this position. + created_after : typing.Optional[str] + Only return products created after this ISO 8601 timestamp. + + created_before : typing.Optional[str] + Only return products created before this ISO 8601 timestamp. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- SyncPager[ProductListItem, ListProductsResponse] - products filtered by label + marketplace products listed without an account Examples -------- from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) response = client.products.list( - account_id="account_id", visibilities=["visible"], access_pass_types=["regular"], ) @@ -115,6 +145,11 @@ def list( """ return self._raw_client.list( account_id=account_id, + query=query, + marketplace_category_route=marketplace_category_route, + plan_types=plan_types, + price_minimum=price_minimum, + price_maximum=price_maximum, visibilities=visibilities, access_pass_types=access_pass_types, labels=labels, @@ -124,6 +159,8 @@ def list( after=after, last=last, before=before, + created_after=created_after, + created_before=created_before, request_options=request_options, ) @@ -226,7 +263,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -260,7 +297,7 @@ def create( def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Product: """ - Retrieves the details of an existing product. This endpoint is publicly accessible. + Retrieves a product. Public — no credentials. Parameters ---------- @@ -280,7 +317,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -313,7 +350,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -387,7 +424,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -432,7 +469,7 @@ def publish(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -465,7 +502,7 @@ def unpublish(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -495,7 +532,14 @@ def with_raw_response(self) -> AsyncRawProductsClient: async def list( self, *, - account_id: str, + account_id: typing.Optional[str] = None, + query: typing.Optional[str] = None, + marketplace_category_route: typing.Optional[str] = None, + plan_types: typing.Optional[ + typing.Union[ListProductsRequestPlanTypesItem, typing.Sequence[ListProductsRequestPlanTypesItem]] + ] = None, + price_minimum: typing.Optional[float] = None, + price_maximum: typing.Optional[float] = None, visibilities: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, access_pass_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, labels: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, @@ -505,18 +549,35 @@ async def list( after: typing.Optional[str] = None, last: typing.Optional[int] = None, before: typing.Optional[str] = None, + created_after: typing.Optional[str] = None, + created_before: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ProductListItem, ListProductsResponse]: """ - Returns a paginated list of products belonging to an account. + Returns a paginated list of products. Omit `account_id` to search the public marketplace. Parameters ---------- - account_id : str - The unique identifier of the account to list products for. + account_id : typing.Optional[str] + The unique identifier of the account to list products for. Omit to search the public marketplace. + + query : typing.Optional[str] + Ranked search against product title and headline. Omit to browse by recency. + + marketplace_category_route : typing.Optional[str] + Only return marketplace products assigned to this category route, such as `trading`. + + plan_types : typing.Optional[typing.Union[ListProductsRequestPlanTypesItem, typing.Sequence[ListProductsRequestPlanTypesItem]]] + Filter to products with a buyable plan of these billing models, such as `one_time` or `renewal`. + + price_minimum : typing.Optional[float] + Only return products whose advertised buyable plan has a displayed price of at least this amount. Recurring plans use renewal price. + + price_maximum : typing.Optional[float] + Only return products whose advertised buyable plan has a displayed price of at most this amount. Recurring plans use renewal price. visibilities : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filter to only products matching these visibility states. + Filter to only products matching these visibility states. Ignored on the public marketplace list, which only returns visible products. access_pass_types : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter to only products matching these types. @@ -528,7 +589,7 @@ async def list( The sort direction for results. Defaults to descending. order : typing.Optional[str] - The field to sort results by. Defaults to created_at. + The field to sort results by. Account lists default to `created_at`. Marketplace lists default to `discoverable_at` and accept `created_at` or `discoverable_at`. Cannot be combined with `query`. first : typing.Optional[int] The number of products to return (default and max 100). @@ -542,13 +603,19 @@ async def list( before : typing.Optional[str] A cursor; returns products before this position. + created_after : typing.Optional[str] + Only return products created after this ISO 8601 timestamp. + + created_before : typing.Optional[str] + Only return products created before this ISO 8601 timestamp. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- AsyncPager[ProductListItem, ListProductsResponse] - products filtered by label + marketplace products listed without an account Examples -------- @@ -557,7 +624,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -565,7 +632,6 @@ async def list( async def main() -> None: response = await client.products.list( - account_id="account_id", visibilities=["visible"], access_pass_types=["regular"], ) @@ -581,6 +647,11 @@ async def main() -> None: """ return await self._raw_client.list( account_id=account_id, + query=query, + marketplace_category_route=marketplace_category_route, + plan_types=plan_types, + price_minimum=price_minimum, + price_maximum=price_maximum, visibilities=visibilities, access_pass_types=access_pass_types, labels=labels, @@ -590,6 +661,8 @@ async def main() -> None: after=after, last=last, before=before, + created_after=created_after, + created_before=created_before, request_options=request_options, ) @@ -694,7 +767,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -734,7 +807,7 @@ async def main() -> None: async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Product: """ - Retrieves the details of an existing product. This endpoint is publicly accessible. + Retrieves a product. Public — no credentials. Parameters ---------- @@ -756,7 +829,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -799,7 +872,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -881,7 +954,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -934,7 +1007,7 @@ async def publish(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -975,7 +1048,7 @@ async def unpublish(self, id: str, *, request_options: typing.Optional[RequestOp from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/products/raw_client.py b/src/whop_sdk/products/raw_client.py index 663ad6d7..b66d97a0 100644 --- a/src/whop_sdk/products/raw_client.py +++ b/src/whop_sdk/products/raw_client.py @@ -24,6 +24,7 @@ from .types.create_products_request_member_affiliate_status import CreateProductsRequestMemberAffiliateStatus from .types.delete_products_response import DeleteProductsResponse from .types.list_products_request_direction import ListProductsRequestDirection +from .types.list_products_request_plan_types_item import ListProductsRequestPlanTypesItem from .types.list_products_response import ListProductsResponse from .types.update_products_request_banner_image import UpdateProductsRequestBannerImage from pydantic import ValidationError @@ -39,7 +40,14 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, - account_id: str, + account_id: typing.Optional[str] = None, + query: typing.Optional[str] = None, + marketplace_category_route: typing.Optional[str] = None, + plan_types: typing.Optional[ + typing.Union[ListProductsRequestPlanTypesItem, typing.Sequence[ListProductsRequestPlanTypesItem]] + ] = None, + price_minimum: typing.Optional[float] = None, + price_maximum: typing.Optional[float] = None, visibilities: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, access_pass_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, labels: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, @@ -49,18 +57,35 @@ def list( after: typing.Optional[str] = None, last: typing.Optional[int] = None, before: typing.Optional[str] = None, + created_after: typing.Optional[str] = None, + created_before: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ProductListItem, ListProductsResponse]: """ - Returns a paginated list of products belonging to an account. + Returns a paginated list of products. Omit `account_id` to search the public marketplace. Parameters ---------- - account_id : str - The unique identifier of the account to list products for. + account_id : typing.Optional[str] + The unique identifier of the account to list products for. Omit to search the public marketplace. + + query : typing.Optional[str] + Ranked search against product title and headline. Omit to browse by recency. + + marketplace_category_route : typing.Optional[str] + Only return marketplace products assigned to this category route, such as `trading`. + + plan_types : typing.Optional[typing.Union[ListProductsRequestPlanTypesItem, typing.Sequence[ListProductsRequestPlanTypesItem]]] + Filter to products with a buyable plan of these billing models, such as `one_time` or `renewal`. + + price_minimum : typing.Optional[float] + Only return products whose advertised buyable plan has a displayed price of at least this amount. Recurring plans use renewal price. + + price_maximum : typing.Optional[float] + Only return products whose advertised buyable plan has a displayed price of at most this amount. Recurring plans use renewal price. visibilities : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filter to only products matching these visibility states. + Filter to only products matching these visibility states. Ignored on the public marketplace list, which only returns visible products. access_pass_types : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter to only products matching these types. @@ -72,7 +97,7 @@ def list( The sort direction for results. Defaults to descending. order : typing.Optional[str] - The field to sort results by. Defaults to created_at. + The field to sort results by. Account lists default to `created_at`. Marketplace lists default to `discoverable_at` and accept `created_at` or `discoverable_at`. Cannot be combined with `query`. first : typing.Optional[int] The number of products to return (default and max 100). @@ -86,19 +111,30 @@ def list( before : typing.Optional[str] A cursor; returns products before this position. + created_after : typing.Optional[str] + Only return products created after this ISO 8601 timestamp. + + created_before : typing.Optional[str] + Only return products created before this ISO 8601 timestamp. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- SyncPager[ProductListItem, ListProductsResponse] - products filtered by label + marketplace products listed without an account """ _response = self._client_wrapper.httpx_client.request( "products", method="GET", params={ "account_id": account_id, + "query": query, + "marketplace_category_route": marketplace_category_route, + "plan_types": plan_types, + "price_minimum": price_minimum, + "price_maximum": price_maximum, "visibilities": visibilities, "access_pass_types": access_pass_types, "labels": labels, @@ -108,6 +144,8 @@ def list( "after": after, "last": last, "before": before, + "created_after": created_after, + "created_before": created_before, }, request_options=request_options, ) @@ -128,6 +166,11 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( account_id=account_id, + query=query, + marketplace_category_route=marketplace_category_route, + plan_types=plan_types, + price_minimum=price_minimum, + price_maximum=price_maximum, visibilities=visibilities, access_pass_types=access_pass_types, labels=labels, @@ -137,6 +180,8 @@ def list( after=_parsed_next, last=last, before=before, + created_after=created_after, + created_before=created_before, request_options=request_options, ) return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) @@ -338,7 +383,7 @@ def create( def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Product]: """ - Retrieves the details of an existing product. This endpoint is publicly accessible. + Retrieves a product. Public — no credentials. Parameters ---------- @@ -732,7 +777,14 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, - account_id: str, + account_id: typing.Optional[str] = None, + query: typing.Optional[str] = None, + marketplace_category_route: typing.Optional[str] = None, + plan_types: typing.Optional[ + typing.Union[ListProductsRequestPlanTypesItem, typing.Sequence[ListProductsRequestPlanTypesItem]] + ] = None, + price_minimum: typing.Optional[float] = None, + price_maximum: typing.Optional[float] = None, visibilities: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, access_pass_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, labels: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, @@ -742,18 +794,35 @@ async def list( after: typing.Optional[str] = None, last: typing.Optional[int] = None, before: typing.Optional[str] = None, + created_after: typing.Optional[str] = None, + created_before: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ProductListItem, ListProductsResponse]: """ - Returns a paginated list of products belonging to an account. + Returns a paginated list of products. Omit `account_id` to search the public marketplace. Parameters ---------- - account_id : str - The unique identifier of the account to list products for. + account_id : typing.Optional[str] + The unique identifier of the account to list products for. Omit to search the public marketplace. + + query : typing.Optional[str] + Ranked search against product title and headline. Omit to browse by recency. + + marketplace_category_route : typing.Optional[str] + Only return marketplace products assigned to this category route, such as `trading`. + + plan_types : typing.Optional[typing.Union[ListProductsRequestPlanTypesItem, typing.Sequence[ListProductsRequestPlanTypesItem]]] + Filter to products with a buyable plan of these billing models, such as `one_time` or `renewal`. + + price_minimum : typing.Optional[float] + Only return products whose advertised buyable plan has a displayed price of at least this amount. Recurring plans use renewal price. + + price_maximum : typing.Optional[float] + Only return products whose advertised buyable plan has a displayed price of at most this amount. Recurring plans use renewal price. visibilities : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filter to only products matching these visibility states. + Filter to only products matching these visibility states. Ignored on the public marketplace list, which only returns visible products. access_pass_types : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter to only products matching these types. @@ -765,7 +834,7 @@ async def list( The sort direction for results. Defaults to descending. order : typing.Optional[str] - The field to sort results by. Defaults to created_at. + The field to sort results by. Account lists default to `created_at`. Marketplace lists default to `discoverable_at` and accept `created_at` or `discoverable_at`. Cannot be combined with `query`. first : typing.Optional[int] The number of products to return (default and max 100). @@ -779,19 +848,30 @@ async def list( before : typing.Optional[str] A cursor; returns products before this position. + created_after : typing.Optional[str] + Only return products created after this ISO 8601 timestamp. + + created_before : typing.Optional[str] + Only return products created before this ISO 8601 timestamp. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- AsyncPager[ProductListItem, ListProductsResponse] - products filtered by label + marketplace products listed without an account """ _response = await self._client_wrapper.httpx_client.request( "products", method="GET", params={ "account_id": account_id, + "query": query, + "marketplace_category_route": marketplace_category_route, + "plan_types": plan_types, + "price_minimum": price_minimum, + "price_maximum": price_maximum, "visibilities": visibilities, "access_pass_types": access_pass_types, "labels": labels, @@ -801,6 +881,8 @@ async def list( "after": after, "last": last, "before": before, + "created_after": created_after, + "created_before": created_before, }, request_options=request_options, ) @@ -823,6 +905,11 @@ async def list( async def _get_next(): return await self.list( account_id=account_id, + query=query, + marketplace_category_route=marketplace_category_route, + plan_types=plan_types, + price_minimum=price_minimum, + price_maximum=price_maximum, visibilities=visibilities, access_pass_types=access_pass_types, labels=labels, @@ -832,6 +919,8 @@ async def _get_next(): after=_parsed_next, last=last, before=before, + created_after=created_after, + created_before=created_before, request_options=request_options, ) @@ -1036,7 +1125,7 @@ async def retrieve( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[Product]: """ - Retrieves the details of an existing product. This endpoint is publicly accessible. + Retrieves a product. Public — no credentials. Parameters ---------- diff --git a/src/whop_sdk/products/types/__init__.py b/src/whop_sdk/products/types/__init__.py index ccd163ba..d75d04d4 100644 --- a/src/whop_sdk/products/types/__init__.py +++ b/src/whop_sdk/products/types/__init__.py @@ -11,6 +11,7 @@ from .create_products_request_member_affiliate_status import CreateProductsRequestMemberAffiliateStatus from .delete_products_response import DeleteProductsResponse from .list_products_request_direction import ListProductsRequestDirection + from .list_products_request_plan_types_item import ListProductsRequestPlanTypesItem from .list_products_response import ListProductsResponse from .list_products_response_page_info import ListProductsResponsePageInfo from .post_product_created_payload import PostProductCreatedPayload @@ -35,6 +36,7 @@ "CreateProductsRequestMemberAffiliateStatus": ".create_products_request_member_affiliate_status", "DeleteProductsResponse": ".delete_products_response", "ListProductsRequestDirection": ".list_products_request_direction", + "ListProductsRequestPlanTypesItem": ".list_products_request_plan_types_item", "ListProductsResponse": ".list_products_response", "ListProductsResponsePageInfo": ".list_products_response_page_info", "PostProductCreatedPayload": ".post_product_created_payload", @@ -83,6 +85,7 @@ def __dir__(): "CreateProductsRequestMemberAffiliateStatus", "DeleteProductsResponse", "ListProductsRequestDirection", + "ListProductsRequestPlanTypesItem", "ListProductsResponse", "ListProductsResponsePageInfo", "PostProductCreatedPayload", diff --git a/src/whop_sdk/products/types/list_products_request_plan_types_item.py b/src/whop_sdk/products/types/list_products_request_plan_types_item.py new file mode 100644 index 00000000..fa9cc34f --- /dev/null +++ b/src/whop_sdk/products/types/list_products_request_plan_types_item.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListProductsRequestPlanTypesItem = typing.Union[typing.Literal["renewal", "one_time"], typing.Any] diff --git a/src/whop_sdk/promo_codes/client.py b/src/whop_sdk/promo_codes/client.py index 47f38ccd..3bc9e779 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 ecad13e4..ca87d24d 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 c12b7a54..818eadaa 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 247c4760..ebfa0ace 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 f9319500..35198670 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 c39040a9..ac44757e 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 659dd89b..ddf355a0 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 3b22deaf..96b6cdb7 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 7459e93b..252d1657 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 4220c89a..1972fc00 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 2380a11d..00fbc86f 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 ead6d882..1f458599 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 705f59da..de3c2820 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 f3eddf3c..9e6b826e 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", + "2026-08-21-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", + "2026-08-21-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 2efe84cb..172f37fb 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 b13a2148..e9d0d94d 100644 --- a/src/whop_sdk/types/__init__.py +++ b/src/whop_sdk/types/__init__.py @@ -217,6 +217,7 @@ from .app_deployment import AppDeployment from .app_deployment_phase import AppDeploymentPhase from .app_deployment_status import AppDeploymentStatus + from .app_elements_used_item import AppElementsUsedItem from .app_icon import AppIcon from .app_list_item import AppListItem from .app_list_item_app_type import AppListItemAppType @@ -255,6 +256,7 @@ from .billing_reasons import BillingReasons from .bounty import Bounty from .bounty_accepted_deliverable_types_item import BountyAcceptedDeliverableTypesItem + from .bounty_active_livestream_feed import BountyActiveLivestreamFeed from .bounty_business_goal_type import BountyBusinessGoalType from .bounty_capture_clip import BountyCaptureClip from .bounty_capture_clip_status import BountyCaptureClipStatus @@ -308,7 +310,89 @@ 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 @@ -408,6 +492,8 @@ from .dispute_evidence_document import DisputeEvidenceDocument from .dispute_evidence_document_content_type import DisputeEvidenceDocumentContentType from .dispute_evidence_document_document_type import DisputeEvidenceDocumentDocumentType + from .dispute_evidence_document_upload_status import DisputeEvidenceDocumentUploadStatus + from .dispute_evidence_document_visibility import DisputeEvidenceDocumentVisibility from .dispute_evidence_locked_reason import DisputeEvidenceLockedReason from .dispute_issuer_comment import DisputeIssuerComment from .dispute_list_item import DisputeListItem @@ -471,6 +557,8 @@ from .fee_markup_list_item import FeeMarkupListItem from .fee_markup_types import FeeMarkupTypes from .file import File + from .file_multipart_url import FileMultipartUrl + from .file_upload_status import FileUploadStatus from .file_visibility import FileVisibility from .forbidden_error_body import ForbiddenErrorBody from .forbidden_error_body_error import ForbiddenErrorBodyError @@ -558,6 +646,8 @@ from .ledger_activity_currency import LedgerActivityCurrency from .ledger_activity_line_type import LedgerActivityLineType from .ledger_activity_object import LedgerActivityObject + from .ledger_activity_payment import LedgerActivityPayment + from .ledger_activity_payment_object import LedgerActivityPaymentObject from .ledger_activity_resource import LedgerActivityResource from .ledger_activity_resource_account_reference import LedgerActivityResourceAccountReference from .ledger_activity_resource_account_reference_object import LedgerActivityResourceAccountReferenceObject @@ -1097,6 +1187,9 @@ from .product_list_item import ProductListItem from .product_marketplace_status import ProductMarketplaceStatus from .product_member_affiliate_status import ProductMemberAffiliateStatus + from .product_public_plan import ProductPublicPlan + from .product_public_plan_plan_type import ProductPublicPlanPlanType + from .product_public_plan_visibility import ProductPublicPlanVisibility from .product_tax_code_product_types import ProductTaxCodeProductTypes from .promo_code import PromoCode from .promo_code_currency import PromoCodeCurrency @@ -1242,13 +1335,6 @@ from .too_many_requests_error_body import TooManyRequestsErrorBody from .too_many_requests_error_body_error import TooManyRequestsErrorBodyError from .topup import Topup - from .transfer import Transfer - from .transfer_destination import TransferDestination, TransferDestination_Company, TransferDestination_User - from .transfer_destination_company import TransferDestinationCompany - from .transfer_destination_user import TransferDestinationUser - from .transfer_origin import TransferOrigin, TransferOrigin_Company, TransferOrigin_User - from .transfer_origin_company import TransferOriginCompany - from .transfer_origin_user import TransferOriginUser from .unauthorized_error_body import UnauthorizedErrorBody from .unauthorized_error_body_error import UnauthorizedErrorBodyError from .unprocessable_entity_error_body import UnprocessableEntityErrorBody @@ -1508,6 +1594,7 @@ "AppDeployment": ".app_deployment", "AppDeploymentPhase": ".app_deployment_phase", "AppDeploymentStatus": ".app_deployment_status", + "AppElementsUsedItem": ".app_elements_used_item", "AppIcon": ".app_icon", "AppListItem": ".app_list_item", "AppListItemAppType": ".app_list_item_app_type", @@ -1546,6 +1633,7 @@ "BillingReasons": ".billing_reasons", "Bounty": ".bounty", "BountyAcceptedDeliverableTypesItem": ".bounty_accepted_deliverable_types_item", + "BountyActiveLivestreamFeed": ".bounty_active_livestream_feed", "BountyBusinessGoalType": ".bounty_business_goal_type", "BountyCaptureClip": ".bounty_capture_clip", "BountyCaptureClipStatus": ".bounty_capture_clip_status", @@ -1597,7 +1685,83 @@ "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", @@ -1693,6 +1857,8 @@ "DisputeEvidenceDocument": ".dispute_evidence_document", "DisputeEvidenceDocumentContentType": ".dispute_evidence_document_content_type", "DisputeEvidenceDocumentDocumentType": ".dispute_evidence_document_document_type", + "DisputeEvidenceDocumentUploadStatus": ".dispute_evidence_document_upload_status", + "DisputeEvidenceDocumentVisibility": ".dispute_evidence_document_visibility", "DisputeEvidenceLockedReason": ".dispute_evidence_locked_reason", "DisputeIssuerComment": ".dispute_issuer_comment", "DisputeListItem": ".dispute_list_item", @@ -1750,6 +1916,8 @@ "FeeMarkupListItem": ".fee_markup_list_item", "FeeMarkupTypes": ".fee_markup_types", "File": ".file", + "FileMultipartUrl": ".file_multipart_url", + "FileUploadStatus": ".file_upload_status", "FileVisibility": ".file_visibility", "ForbiddenErrorBody": ".forbidden_error_body", "ForbiddenErrorBodyError": ".forbidden_error_body_error", @@ -1833,6 +2001,8 @@ "LedgerActivityCurrency": ".ledger_activity_currency", "LedgerActivityLineType": ".ledger_activity_line_type", "LedgerActivityObject": ".ledger_activity_object", + "LedgerActivityPayment": ".ledger_activity_payment", + "LedgerActivityPaymentObject": ".ledger_activity_payment_object", "LedgerActivityResource": ".ledger_activity_resource", "LedgerActivityResourceAccountReference": ".ledger_activity_resource_account_reference", "LedgerActivityResourceAccountReferenceObject": ".ledger_activity_resource_account_reference_object", @@ -2214,6 +2384,9 @@ "ProductListItem": ".product_list_item", "ProductMarketplaceStatus": ".product_marketplace_status", "ProductMemberAffiliateStatus": ".product_member_affiliate_status", + "ProductPublicPlan": ".product_public_plan", + "ProductPublicPlanPlanType": ".product_public_plan_plan_type", + "ProductPublicPlanVisibility": ".product_public_plan_visibility", "ProductTaxCodeProductTypes": ".product_tax_code_product_types", "PromoCode": ".promo_code", "PromoCodeCurrency": ".promo_code_currency", @@ -2357,17 +2530,6 @@ "TooManyRequestsErrorBody": ".too_many_requests_error_body", "TooManyRequestsErrorBodyError": ".too_many_requests_error_body_error", "Topup": ".topup", - "Transfer": ".transfer", - "TransferDestination": ".transfer_destination", - "TransferDestinationCompany": ".transfer_destination_company", - "TransferDestinationUser": ".transfer_destination_user", - "TransferDestination_Company": ".transfer_destination", - "TransferDestination_User": ".transfer_destination", - "TransferOrigin": ".transfer_origin", - "TransferOriginCompany": ".transfer_origin_company", - "TransferOriginUser": ".transfer_origin_user", - "TransferOrigin_Company": ".transfer_origin", - "TransferOrigin_User": ".transfer_origin", "UnauthorizedErrorBody": ".unauthorized_error_body", "UnauthorizedErrorBodyError": ".unauthorized_error_body_error", "UnprocessableEntityErrorBody": ".unprocessable_entity_error_body", @@ -2651,6 +2813,7 @@ def __dir__(): "AppDeployment", "AppDeploymentPhase", "AppDeploymentStatus", + "AppElementsUsedItem", "AppIcon", "AppListItem", "AppListItemAppType", @@ -2689,6 +2852,7 @@ def __dir__(): "BillingReasons", "Bounty", "BountyAcceptedDeliverableTypesItem", + "BountyActiveLivestreamFeed", "BountyBusinessGoalType", "BountyCaptureClip", "BountyCaptureClipStatus", @@ -2740,7 +2904,83 @@ 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", @@ -2836,6 +3076,8 @@ def __dir__(): "DisputeEvidenceDocument", "DisputeEvidenceDocumentContentType", "DisputeEvidenceDocumentDocumentType", + "DisputeEvidenceDocumentUploadStatus", + "DisputeEvidenceDocumentVisibility", "DisputeEvidenceLockedReason", "DisputeIssuerComment", "DisputeListItem", @@ -2893,6 +3135,8 @@ def __dir__(): "FeeMarkupListItem", "FeeMarkupTypes", "File", + "FileMultipartUrl", + "FileUploadStatus", "FileVisibility", "ForbiddenErrorBody", "ForbiddenErrorBodyError", @@ -2976,6 +3220,8 @@ def __dir__(): "LedgerActivityCurrency", "LedgerActivityLineType", "LedgerActivityObject", + "LedgerActivityPayment", + "LedgerActivityPaymentObject", "LedgerActivityResource", "LedgerActivityResourceAccountReference", "LedgerActivityResourceAccountReferenceObject", @@ -3357,6 +3603,9 @@ def __dir__(): "ProductListItem", "ProductMarketplaceStatus", "ProductMemberAffiliateStatus", + "ProductPublicPlan", + "ProductPublicPlanPlanType", + "ProductPublicPlanVisibility", "ProductTaxCodeProductTypes", "PromoCode", "PromoCodeCurrency", @@ -3500,17 +3749,6 @@ def __dir__(): "TooManyRequestsErrorBody", "TooManyRequestsErrorBodyError", "Topup", - "Transfer", - "TransferDestination", - "TransferDestinationCompany", - "TransferDestinationUser", - "TransferDestination_Company", - "TransferDestination_User", - "TransferOrigin", - "TransferOriginCompany", - "TransferOriginUser", - "TransferOrigin_Company", - "TransferOrigin_User", "UnauthorizedErrorBody", "UnauthorizedErrorBodyError", "UnprocessableEntityErrorBody", diff --git a/src/whop_sdk/types/account.py b/src/whop_sdk/types/account.py index 9a09bed2..31b0c9f2 100644 --- a/src/whop_sdk/types/account.py +++ b/src/whop_sdk/types/account.py @@ -26,6 +26,7 @@ from .account_tax_type import AccountTaxType from .account_three_ds_level import AccountThreeDsLevel from .account_wallet import AccountWallet +from .file import File from .user_summary import UserSummary @@ -96,6 +97,11 @@ class Account(UniversalBaseModel): Account owner email address. """ + eula: typing.Optional[File] = pydantic.Field(default=None) + """ + The account's end-user license agreement document, or `null` if they have not published one. + """ + home_preferences: typing.List[AccountHomePreferencesItem] id: str = pydantic.Field() """ @@ -167,6 +173,11 @@ class Account(UniversalBaseModel): Payment health controls currently applied to the account. Computed only on `retrieve` and `me` for callers with `company:balance:read` scope; `null` otherwise. """ + privacy_policy: typing.Optional[File] = pydantic.Field(default=None) + """ + The account's privacy policy document, or `null` if they have not published one. + """ + product_tax_code: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ Tax classification code applied by default to the account's products, with `id`, `name`, and `product_type`. `null` when no default is set. @@ -189,6 +200,11 @@ class Account(UniversalBaseModel): """ required_actions: typing.Optional[typing.List[AccountRequiredAction]] = None + return_policy: typing.Optional[File] = pydantic.Field(default=None) + """ + The account's return policy document, or `null` if they have not published one. + """ + route: str = pydantic.Field() """ Account public route identifier. @@ -252,6 +268,11 @@ class Account(UniversalBaseModel): How tax is applied to the account's prices: `inclusive` (tax included in the listed price) or `exclusive` (tax added on top). Defaults to `exclusive` when unset; `null` only when the account has no payment connection. """ + terms_of_service: typing.Optional[File] = pydantic.Field(default=None) + """ + The account's terms of service document, or `null` if they have not published one. + """ + three_ds_level: typing.Optional[AccountThreeDsLevel] = pydantic.Field(default=None) """ Account-level 3D Secure behavior. `mandate_challenge` requires cardholder verification on supported card payments; `null` uses the standard checkout flow. diff --git a/src/whop_sdk/types/ad_group.py b/src/whop_sdk/types/ad_group.py index 326f38f4..1e26af65 100644 --- a/src/whop_sdk/types/ad_group.py +++ b/src/whop_sdk/types/ad_group.py @@ -193,7 +193,7 @@ class AdGroup(UniversalBaseModel): detailed_targeting: AdGroupDetailedTargeting = pydantic.Field() """ - Interest, behavior, and demographic targeting, using categories from the ad platform's targeting taxonomy. Entries across interests, behaviors, and demographics are OR'd together (anyone matching any entry is reached), matching Ads Manager's detailed-targeting box. Can't be combined with automatic audience targeting, and unavailable to campaigns with special_ad_categories. + Interest, behavior, and demographic targeting, using categories from the ad platform's targeting taxonomy. Entries across interests, behaviors, and demographics are OR'd together (anyone matching any entry is reached), matching Ads Manager's detailed-targeting box. Can't be combined with automatic audience targeting. Special ad category campaigns are limited to approved interests. """ devices: AdGroupDevices = pydantic.Field() diff --git a/src/whop_sdk/types/ad_group_geo_locations_body.py b/src/whop_sdk/types/ad_group_geo_locations_body.py index 8edb30b9..922183f7 100644 --- a/src/whop_sdk/types/ad_group_geo_locations_body.py +++ b/src/whop_sdk/types/ad_group_geo_locations_body.py @@ -39,7 +39,7 @@ class AdGroupGeoLocationsBody(UniversalBaseModel): zips: typing.Optional[typing.List[AdGroupGeoLocationsBodyZipsItem]] = pydantic.Field(default=None) """ - ZIP and postal codes, as bare strings or objects with a key. + ZIP and postal codes, keyed by the ad platform's location taxonomy. Meta keys these `COUNTRY:CODE`, as `US:78756` — a bare code is ambiguous, because the same one exists in several countries. TikTok takes the bare code. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/ad_group_geo_locations_body_zips_item_key.py b/src/whop_sdk/types/ad_group_geo_locations_body_zips_item_key.py index e3a0ffa1..822ecbfc 100644 --- a/src/whop_sdk/types/ad_group_geo_locations_body_zips_item_key.py +++ b/src/whop_sdk/types/ad_group_geo_locations_body_zips_item_key.py @@ -9,7 +9,7 @@ class AdGroupGeoLocationsBodyZipsItemKey(UniversalBaseModel): key: str = pydantic.Field() """ - The ZIP or postal code. + The ad platform's key for the ZIP or postal code. """ if IS_PYDANTIC_V2: 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 0228e012..2ac27991 100644 --- a/src/whop_sdk/types/api_key_api_version_date.py +++ b/src/whop_sdk/types/api_key_api_version_date.py @@ -29,6 +29,7 @@ "2026-08-13", "2026-08-14", "2026-08-21", + "2026-08-21-1", ], typing.Any, ] diff --git a/src/whop_sdk/types/app.py b/src/whop_sdk/types/app.py index 0f925b13..c4489799 100644 --- a/src/whop_sdk/types/app.py +++ b/src/whop_sdk/types/app.py @@ -11,6 +11,7 @@ from .app_creator import AppCreator from .app_default_api_key import AppDefaultApiKey from .app_deployment import AppDeployment +from .app_elements_used_item import AppElementsUsedItem from .app_icon import AppIcon from .app_marketplace_status import AppMarketplaceStatus from .app_oauth_client_type import AppOauthClientType @@ -92,6 +93,7 @@ class App(UniversalBaseModel): Subdomain identifier for the app's proxied URL, forming https://{domain_id}.apps.whop.com. """ + elements_used: typing.List[AppElementsUsedItem] experience_path: typing.Optional[str] = pydantic.Field(default=None) """ URL path for the member-facing hub view, or `null` when not configured. diff --git a/src/whop_sdk/types/app_elements_used_item.py b/src/whop_sdk/types/app_elements_used_item.py new file mode 100644 index 00000000..4fd2c7af --- /dev/null +++ b/src/whop_sdk/types/app_elements_used_item.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AppElementsUsedItem = typing.Union[ + typing.Literal[ + "ads", + "ads.billing-setup", + "ads.campaign-creator", + "ads.reporting", + "ads.reporting.chart", + "ads.reporting.table", + "checkout", + "checkout.checkout", + "checkout.expressCheckout", + "payments", + "payments.address", + "payments.branding", + "payments.card", + "payments.cardFields", + "payments.cardFields.cardCvc", + "payments.cardFields.cardExpiry", + "payments.cardFields.cardNumber", + "payments.email", + "payments.payment", + "payments.taxId", + "tracking", + "tracking.events", + "tracking.people", + "wallet", + "wallet.activity", + "wallet.balances", + "wallet.balances.balance", + "wallet.balances.list", + "wallet.cards", + "wallet.deposit", + "wallet.send", + "wallet.withdraw", + "websites", + "websites.pixel-setup", + "websites.websites", + ], + typing.Any, +] diff --git a/src/whop_sdk/types/bounty.py b/src/whop_sdk/types/bounty.py index ab7346f6..790a1b67 100644 --- a/src/whop_sdk/types/bounty.py +++ b/src/whop_sdk/types/bounty.py @@ -6,6 +6,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .account_summary import AccountSummary from .bounty_accepted_deliverable_types_item import BountyAcceptedDeliverableTypesItem +from .bounty_active_livestream_feed import BountyActiveLivestreamFeed from .bounty_business_goal_type import BountyBusinessGoalType from .bounty_currency import BountyCurrency from .bounty_scheduled_frequency import BountyScheduledFrequency @@ -32,12 +33,18 @@ class Bounty(UniversalBaseModel): How many winner slots one worker can win. Defaults to `1`. Wins plus proofs awaiting review never exceed this number, and a worker runs one attempt at a time. Cannot exceed `accepted_submissions_limit`. """ + active_proof_livestream_feeds: typing.List[BountyActiveLivestreamFeed] affiliate_share_amount: float = pydantic.Field() """ What a referrer earns per accepted submission when the worker arrived through their affiliate link, in whole currency units, at the standard platform fee rate. Taken out of the worker's post-fee reward rather than added on top. `0` when the bounty pays no affiliate share, including bounties tied to no account, which cannot record a referral. """ allowed_country_codes: typing.List[str] + awaiting_review_submissions_count: int = pydantic.Field() + """ + Submissions delivered and waiting on review. A subset of `unresolved_submissions_count`, which also counts attempts still in progress. + """ + budget_amount: float = pydantic.Field() """ Total gross budget committed to the bounty: `gross_reward_amount` times `accepted_submissions_limit`. @@ -68,6 +75,11 @@ class Bounty(UniversalBaseModel): Currency for all amounts on the bounty, as a lowercase ISO 4217 code. """ + denied_submissions_count: int = pydantic.Field() + """ + Submissions reviewed and turned down. + """ + description: str = pydantic.Field() """ Full task instructions shown to workers. diff --git a/src/whop_sdk/types/transfer_destination_company.py b/src/whop_sdk/types/bounty_active_livestream_feed.py similarity index 62% rename from src/whop_sdk/types/transfer_destination_company.py rename to src/whop_sdk/types/bounty_active_livestream_feed.py index dc71f8d0..1169db6b 100644 --- a/src/whop_sdk/types/transfer_destination_company.py +++ b/src/whop_sdk/types/bounty_active_livestream_feed.py @@ -4,26 +4,23 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .user_summary import UserSummary -class TransferDestinationCompany(UniversalBaseModel): +class BountyActiveLivestreamFeed(UniversalBaseModel): + host: typing.Optional[UserSummary] = pydantic.Field(default=None) """ - A company on Whop. + User hosting the proof livestream — the worker streaming their attempt. `null` if the host account no longer exists. """ id: str = pydantic.Field() """ - The unique identifier for the company. - """ - - route: str = pydantic.Field() - """ - The URL slug for the company's store page. + Livestream feed ID. """ title: str = pydantic.Field() """ - The display name of the company shown to customers. + Display title for the proof livestream. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/checkout_session.py b/src/whop_sdk/types/checkout_session.py new file mode 100644 index 00000000..12a039d7 --- /dev/null +++ b/src/whop_sdk/types/checkout_session.py @@ -0,0 +1,245 @@ +# 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 new file mode 100644 index 00000000..f09d8b2f --- /dev/null +++ b/src/whop_sdk/types/checkout_session_authenticate_action.py @@ -0,0 +1,22 @@ +# 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 new file mode 100644 index 00000000..1f3faaa6 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_await_claim_action.py @@ -0,0 +1,28 @@ +# 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 new file mode 100644 index 00000000..8da8539b --- /dev/null +++ b/src/whop_sdk/types/checkout_session_await_claim_action_state.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..39805328 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_branding.py @@ -0,0 +1,74 @@ +# 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 new file mode 100644 index 00000000..0568adc0 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_branding_border_style.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..f61e5707 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_branding_font_family.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..fc90ab15 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown.py @@ -0,0 +1,50 @@ +# 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 new file mode 100644 index 00000000..d37d1593 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_adjustment.py @@ -0,0 +1,51 @@ +# 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 new file mode 100644 index 00000000..3c7217a8 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_adjustment_applied.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..877f6a86 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_adjustment_kind.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..4d0ac149 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_adjustment_status.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..0300105b --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_currency.py @@ -0,0 +1,99 @@ +# 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 new file mode 100644 index 00000000..fa82792e --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_display.py @@ -0,0 +1,29 @@ +# 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 new file mode 100644 index 00000000..510cbbdb --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_display_headline.py @@ -0,0 +1,51 @@ +# 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 new file mode 100644 index 00000000..3c5589ba --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_display_headline_kind.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..4b3b78ec --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_display_row.py @@ -0,0 +1,51 @@ +# 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 new file mode 100644 index 00000000..3efca7f8 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_display_row_detail.py @@ -0,0 +1,89 @@ +# 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 new file mode 100644 index 00000000..354007d1 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_display_row_detail_applied.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..3bdcb56a --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_display_row_kind.py @@ -0,0 +1,32 @@ +# 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 new file mode 100644 index 00000000..2933b3a6 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_display_row_status.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..d63898d0 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_display_sections.py @@ -0,0 +1,23 @@ +# 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 new file mode 100644 index 00000000..38818bcc --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_line.py @@ -0,0 +1,44 @@ +# 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 new file mode 100644 index 00000000..e3ae7676 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_line_kind.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..14a25630 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_upcoming.py @@ -0,0 +1,87 @@ +# 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 new file mode 100644 index 00000000..44f6bf44 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_upcoming_installments.py @@ -0,0 +1,53 @@ +# 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/transfer_origin_user.py b/src/whop_sdk/types/checkout_session_breakdown_upcoming_one_time.py similarity index 57% rename from src/whop_sdk/types/transfer_origin_user.py rename to src/whop_sdk/types/checkout_session_breakdown_upcoming_one_time.py index e2f3de81..76e7ce15 100644 --- a/src/whop_sdk/types/transfer_origin_user.py +++ b/src/whop_sdk/types/checkout_session_breakdown_upcoming_one_time.py @@ -4,26 +4,23 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .money import Money -class TransferOriginUser(UniversalBaseModel): +class CheckoutSessionBreakdownUpcomingOneTime(UniversalBaseModel): + amount: Money = pydantic.Field() """ - A user account on Whop. + What the charge takes. """ - id: str = pydantic.Field() + charge_at: str = pydantic.Field() """ - The unique identifier for the user. + When it is charged, as an ISO 8601 timestamp. """ - name: typing.Optional[str] = pydantic.Field(default=None) + description: str = pydantic.Field() """ - The user's display name shown on their public profile. - """ - - username: str = pydantic.Field() - """ - The user's unique username shown on their public profile. + What to show the buyer for this future charge. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/checkout_session_breakdown_upcoming_recurring.py b/src/whop_sdk/types/checkout_session_breakdown_upcoming_recurring.py new file mode 100644 index 00000000..aab679f7 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_breakdown_upcoming_recurring.py @@ -0,0 +1,48 @@ +# 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 new file mode 100644 index 00000000..e44fe6af --- /dev/null +++ b/src/whop_sdk/types/checkout_session_buyer_identity.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..7701d713 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_buyer_identity_method.py @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 00000000..c67ddedf --- /dev/null +++ b/src/whop_sdk/types/checkout_session_complete_action.py @@ -0,0 +1,33 @@ +# 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 new file mode 100644 index 00000000..24cc67f6 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_complete_action_kind.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..af39d60a --- /dev/null +++ b/src/whop_sdk/types/checkout_session_confirm_error.py @@ -0,0 +1,28 @@ +# 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 new file mode 100644 index 00000000..f48ecc07 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_confirm_error_code.py @@ -0,0 +1,39 @@ +# 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 new file mode 100644 index 00000000..8ed8f81b --- /dev/null +++ b/src/whop_sdk/types/checkout_session_cta_label.py @@ -0,0 +1,7 @@ +# 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 new file mode 100644 index 00000000..dfeeb9c2 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_custom_field.py @@ -0,0 +1,48 @@ +# 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 new file mode 100644 index 00000000..dd001e73 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_custom_field_field_type.py @@ -0,0 +1,5 @@ +# 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/transfer_origin_company.py b/src/whop_sdk/types/checkout_session_custom_field_response.py similarity index 62% rename from src/whop_sdk/types/transfer_origin_company.py rename to src/whop_sdk/types/checkout_session_custom_field_response.py index fcbc2b23..4291f1a6 100644 --- a/src/whop_sdk/types/transfer_origin_company.py +++ b/src/whop_sdk/types/checkout_session_custom_field_response.py @@ -6,24 +6,15 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class TransferOriginCompany(UniversalBaseModel): - """ - A company on Whop. - """ - +class CheckoutSessionCustomFieldResponse(UniversalBaseModel): id: str = pydantic.Field() """ - The unique identifier for the company. - """ - - route: str = pydantic.Field() - """ - The URL slug for the company's store page. + The plan custom field this answers, prefixed `field_` — the `id` of the matching entry published by the `custom_fields` requirement. """ - title: str = pydantic.Field() + value: str = pydantic.Field() """ - The display name of the company shown to customers. + The buyer's answer, as typed. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/checkout_session_entry.py b/src/whop_sdk/types/checkout_session_entry.py new file mode 100644 index 00000000..292fc485 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_entry.py @@ -0,0 +1,28 @@ +# 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 new file mode 100644 index 00000000..45490026 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_entry_status.py @@ -0,0 +1,7 @@ +# 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 new file mode 100644 index 00000000..381c5e7f --- /dev/null +++ b/src/whop_sdk/types/checkout_session_item.py @@ -0,0 +1,52 @@ +# 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 new file mode 100644 index 00000000..535702c5 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_mode.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..85ae787c --- /dev/null +++ b/src/whop_sdk/types/checkout_session_next_action.py @@ -0,0 +1,162 @@ +# 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 new file mode 100644 index 00000000..9c9799bc --- /dev/null +++ b/src/whop_sdk/types/checkout_session_payment.py @@ -0,0 +1,28 @@ +# 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 new file mode 100644 index 00000000..a4ff911c --- /dev/null +++ b/src/whop_sdk/types/checkout_session_payment_status.py @@ -0,0 +1,7 @@ +# 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 new file mode 100644 index 00000000..d2a26f6a --- /dev/null +++ b/src/whop_sdk/types/checkout_session_promo.py @@ -0,0 +1,50 @@ +# 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 new file mode 100644 index 00000000..5324c9f5 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_promo_currency.py @@ -0,0 +1,99 @@ +# 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 new file mode 100644 index 00000000..57c3639a --- /dev/null +++ b/src/whop_sdk/types/checkout_session_promo_duration.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..98efba39 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_promo_promo_type.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..55b8a0b4 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_quote.py @@ -0,0 +1,58 @@ +# 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 new file mode 100644 index 00000000..7bad2248 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_redirect_action.py @@ -0,0 +1,27 @@ +# 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 new file mode 100644 index 00000000..94159ade --- /dev/null +++ b/src/whop_sdk/types/checkout_session_requirement.py @@ -0,0 +1,25 @@ +# 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 new file mode 100644 index 00000000..f0b09b88 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_requirement_type.py @@ -0,0 +1,7 @@ +# 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 new file mode 100644 index 00000000..490849fa --- /dev/null +++ b/src/whop_sdk/types/checkout_session_seller.py @@ -0,0 +1,48 @@ +# 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 new file mode 100644 index 00000000..3131f503 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_seller_terms.py @@ -0,0 +1,42 @@ +# 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 new file mode 100644 index 00000000..17a58381 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_shipping_address.py @@ -0,0 +1,52 @@ +# 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 new file mode 100644 index 00000000..666f5518 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_status.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..7aa9f6d5 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_tax_behavior.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..2850f887 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_tax_id.py @@ -0,0 +1,28 @@ +# 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 new file mode 100644 index 00000000..91ac66a3 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_tax_id_type.py @@ -0,0 +1,122 @@ +# 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 new file mode 100644 index 00000000..df851238 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_three_ds_level.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..d2d5e353 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_transfer.py @@ -0,0 +1,32 @@ +# 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 new file mode 100644 index 00000000..a4db1cf8 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_upgrade_authentication_action.py @@ -0,0 +1,40 @@ +# 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 new file mode 100644 index 00000000..8eadbc02 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_upgrade_authentication_action_sign_in_intent.py @@ -0,0 +1,5 @@ +# 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/transfer_destination_user.py b/src/whop_sdk/types/checkout_session_verify_phone_action.py similarity index 52% rename from src/whop_sdk/types/transfer_destination_user.py rename to src/whop_sdk/types/checkout_session_verify_phone_action.py index 997a6477..5141792e 100644 --- a/src/whop_sdk/types/transfer_destination_user.py +++ b/src/whop_sdk/types/checkout_session_verify_phone_action.py @@ -6,24 +6,10 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class TransferDestinationUser(UniversalBaseModel): +class CheckoutSessionVerifyPhoneAction(UniversalBaseModel): + blocking: bool = pydantic.Field() """ - A user account on Whop. - """ - - id: str = pydantic.Field() - """ - The unique identifier for the user. - """ - - name: typing.Optional[str] = pydantic.Field(default=None) - """ - The user's display name shown on their public profile. - """ - - username: str = pydantic.Field() - """ - The user's unique username shown on their public profile. + 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: 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 new file mode 100644 index 00000000..3f941141 --- /dev/null +++ b/src/whop_sdk/types/checkout_session_wait_for_payment_action.py @@ -0,0 +1,27 @@ +# 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/dispute_evidence_document.py b/src/whop_sdk/types/dispute_evidence_document.py index 066cdeaf..91c9f6f9 100644 --- a/src/whop_sdk/types/dispute_evidence_document.py +++ b/src/whop_sdk/types/dispute_evidence_document.py @@ -6,6 +6,9 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .dispute_evidence_document_content_type import DisputeEvidenceDocumentContentType from .dispute_evidence_document_document_type import DisputeEvidenceDocumentDocumentType +from .dispute_evidence_document_upload_status import DisputeEvidenceDocumentUploadStatus +from .dispute_evidence_document_visibility import DisputeEvidenceDocumentVisibility +from .file_multipart_url import FileMultipartUrl class DisputeEvidenceDocument(UniversalBaseModel): @@ -14,6 +17,11 @@ class DisputeEvidenceDocument(UniversalBaseModel): The uploaded file's MIME type. Uploads are restricted to the types the processor accepts. """ + created_at: str = pydantic.Field() + """ + When the file was created, as an ISO 8601 timestamp. + """ + document_type: DisputeEvidenceDocumentDocumentType = pydantic.Field() """ What kind of evidence the document is. @@ -21,17 +29,58 @@ class DisputeEvidenceDocument(UniversalBaseModel): filename: typing.Optional[str] = pydantic.Field(default=None) """ - The uploaded file's name. + The original filename, including its extension. """ id: str = pydantic.Field() """ - The attachment's ID, prefixed `file_`. + The file's ID, prefixed `file_`. + """ + + multipart_chunk_size: typing.Optional[int] = pydantic.Field(default=None) + """ + The byte size each part (except the last) must be. Present only on create, and only for multipart uploads. + """ + + multipart_upload_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The ID of the multipart upload, passed back to `complete`. Present only on create, and only for multipart uploads. + """ + + multipart_upload_urls: typing.Optional[typing.List[FileMultipartUrl]] = None + object: str = pydantic.Field() + """ + The type of this object, always `file`. + """ + + size: typing.Optional[int] = pydantic.Field(default=None) + """ + The file size in bytes. `null` until the upload has finished. + """ + + upload_headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Headers to send with the upload PUT. Present only on create. + """ + + upload_status: DisputeEvidenceDocumentUploadStatus = pydantic.Field() + """ + Where the file is in its upload lifecycle. + """ + + upload_url: typing.Optional[str] = pydantic.Field(default=None) + """ + Presigned URL to PUT the file's bytes to. Present only on create, and only for single-part uploads. """ url: typing.Optional[str] = pydantic.Field(default=None) """ - A URL to download the document. + A URL to download the file: a permanent CDN URL for public files, a signed expiring URL for private ones. `null` until the upload has finished. + """ + + visibility: DisputeEvidenceDocumentVisibility = pydantic.Field() + """ + `public` files are served via an unsigned CDN URL; `private` files via a signed, expiring URL. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/dispute_evidence_document_upload_status.py b/src/whop_sdk/types/dispute_evidence_document_upload_status.py new file mode 100644 index 00000000..48327f3e --- /dev/null +++ b/src/whop_sdk/types/dispute_evidence_document_upload_status.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DisputeEvidenceDocumentUploadStatus = typing.Union[ + typing.Literal["pending", "processing", "ready", "failed"], typing.Any +] diff --git a/src/whop_sdk/types/dispute_evidence_document_visibility.py b/src/whop_sdk/types/dispute_evidence_document_visibility.py new file mode 100644 index 00000000..f6e3b395 --- /dev/null +++ b/src/whop_sdk/types/dispute_evidence_document_visibility.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DisputeEvidenceDocumentVisibility = typing.Union[typing.Literal["public", "private"], typing.Any] diff --git a/src/whop_sdk/types/export_resource.py b/src/whop_sdk/types/export_resource.py index 905940c2..66cfde06 100644 --- a/src/whop_sdk/types/export_resource.py +++ b/src/whop_sdk/types/export_resource.py @@ -16,8 +16,6 @@ "disputes", "events", "financial-activity", - "members", - "memberships", "payout_methods", "payouts", "people", @@ -29,8 +27,10 @@ "team_members", "transfers", "webhooks", + "members", "receipts", "unclaimed_memberships", + "memberships", "tracking_links", "promo_codes", "resolutions", diff --git a/src/whop_sdk/types/file.py b/src/whop_sdk/types/file.py index f84a8c5d..7717ceac 100644 --- a/src/whop_sdk/types/file.py +++ b/src/whop_sdk/types/file.py @@ -4,48 +4,76 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .file_multipart_url import FileMultipartUrl +from .file_upload_status import FileUploadStatus from .file_visibility import FileVisibility -from .upload_statuses import UploadStatuses class File(UniversalBaseModel): + content_type: typing.Optional[str] = pydantic.Field(default=None) """ - A file that has been uploaded or is pending upload. + The file's MIME type, e.g. `application/pdf`. """ - content_type: typing.Optional[str] = pydantic.Field(default=None) + created_at: str = pydantic.Field() """ - The MIME type of the uploaded file (e.g., image/jpeg, video/mp4, audio/mpeg). + When the file was created, as an ISO 8601 timestamp. """ filename: typing.Optional[str] = pydantic.Field(default=None) """ - The original filename of the uploaded file, including its file extension. + The original filename, including its extension. """ id: str = pydantic.Field() """ - The unique identifier for the file. + The file's ID, prefixed `file_`. + """ + + multipart_chunk_size: typing.Optional[int] = pydantic.Field(default=None) + """ + The byte size each part (except the last) must be. Present only on create, and only for multipart uploads. + """ + + multipart_upload_id: typing.Optional[str] = pydantic.Field(default=None) + """ + The ID of the multipart upload, passed back to `complete`. Present only on create, and only for multipart uploads. + """ + + multipart_upload_urls: typing.Optional[typing.List[FileMultipartUrl]] = None + object: str = pydantic.Field() + """ + The type of this object, always `file`. + """ + + size: typing.Optional[int] = pydantic.Field(default=None) + """ + The file size in bytes. `null` until the upload has finished. + """ + + upload_headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Headers to send with the upload PUT. Present only on create. """ - size: typing.Optional[str] = pydantic.Field(default=None) + upload_status: FileUploadStatus = pydantic.Field() """ - The file size in bytes. Null if the file has not finished uploading. + Where the file is in its upload lifecycle. """ - upload_status: UploadStatuses = pydantic.Field() + upload_url: typing.Optional[str] = pydantic.Field(default=None) """ - The current upload status of the file (e.g., pending, ready). + Presigned URL to PUT the file's bytes to. Present only on create, and only for single-part uploads. """ url: typing.Optional[str] = pydantic.Field(default=None) """ - The URL for accessing the file. For public files, this is a permanent CDN URL. For private files, this is a signed URL that expires. Null if the file has not finished uploading. + A URL to download the file: a permanent CDN URL for public files, a signed expiring URL for private ones. `null` until the upload has finished. """ visibility: FileVisibility = pydantic.Field() """ - Whether the file is publicly accessible or requires authentication. + `public` files are served via an unsigned CDN URL; `private` files via a signed, expiring URL. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/transfer.py b/src/whop_sdk/types/file_multipart_url.py similarity index 63% rename from src/whop_sdk/types/transfer.py rename to src/whop_sdk/types/file_multipart_url.py index 3a0545b6..fc113e2a 100644 --- a/src/whop_sdk/types/transfer.py +++ b/src/whop_sdk/types/file_multipart_url.py @@ -4,13 +4,18 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .transfer_destination import TransferDestination -from .transfer_origin import TransferOrigin -class Transfer(UniversalBaseModel): - origin: typing.Optional[TransferOrigin] = None - destination: typing.Optional[TransferDestination] = None +class FileMultipartUrl(UniversalBaseModel): + part_number: int = pydantic.Field() + """ + The 1-based index of this part within the multipart upload. + """ + + url: str = pydantic.Field() + """ + The presigned URL to PUT this part's bytes to. + """ 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/types/file_upload_status.py b/src/whop_sdk/types/file_upload_status.py new file mode 100644 index 00000000..5b70913f --- /dev/null +++ b/src/whop_sdk/types/file_upload_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FileUploadStatus = typing.Union[typing.Literal["pending", "processing", "ready", "failed"], typing.Any] diff --git a/src/whop_sdk/types/forum_experience.py b/src/whop_sdk/types/forum_experience.py index 8ba6669f..f87ccbb2 100644 --- a/src/whop_sdk/types/forum_experience.py +++ b/src/whop_sdk/types/forum_experience.py @@ -16,6 +16,11 @@ class ForumExperience(UniversalBaseModel): The unique identifier for the experience. """ + is_public: bool = pydantic.Field() + """ + Whether this experience is publicly visible to all users, including those without a membership. + """ + name: str = pydantic.Field() """ The display name of this experience shown to users in the product navigation. Maximum 255 characters. diff --git a/src/whop_sdk/types/forum_list_item_experience.py b/src/whop_sdk/types/forum_list_item_experience.py index 95e3cc7a..220e805b 100644 --- a/src/whop_sdk/types/forum_list_item_experience.py +++ b/src/whop_sdk/types/forum_list_item_experience.py @@ -16,6 +16,11 @@ class ForumListItemExperience(UniversalBaseModel): The unique identifier for the experience. """ + is_public: bool = pydantic.Field() + """ + Whether this experience is publicly visible to all users, including those without a membership. + """ + name: str = pydantic.Field() """ The display name of this experience shown to users in the product navigation. Maximum 255 characters. diff --git a/src/whop_sdk/types/invoice_line_items_item.py b/src/whop_sdk/types/invoice_line_items_item.py index 98b8f7cf..2f8cf4f4 100644 --- a/src/whop_sdk/types/invoice_line_items_item.py +++ b/src/whop_sdk/types/invoice_line_items_item.py @@ -33,7 +33,7 @@ class InvoiceLineItemsItem(UniversalBaseModel): unit_price: float = pydantic.Field() """ - The unit price for this line item. + The unit price for this line item. Negative for a credit or deduction. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/invoice_list_item_line_items_item.py b/src/whop_sdk/types/invoice_list_item_line_items_item.py index 1dc534a1..f9d74598 100644 --- a/src/whop_sdk/types/invoice_list_item_line_items_item.py +++ b/src/whop_sdk/types/invoice_list_item_line_items_item.py @@ -33,7 +33,7 @@ class InvoiceListItemLineItemsItem(UniversalBaseModel): unit_price: float = pydantic.Field() """ - The unit price for this line item. + The unit price for this line item. Negative for a credit or deduction. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/types/ledger_activity.py b/src/whop_sdk/types/ledger_activity.py index 1c0cd992..d4021d8a 100644 --- a/src/whop_sdk/types/ledger_activity.py +++ b/src/whop_sdk/types/ledger_activity.py @@ -9,6 +9,7 @@ from .ledger_activity_currency import LedgerActivityCurrency from .ledger_activity_line_type import LedgerActivityLineType from .ledger_activity_object import LedgerActivityObject +from .ledger_activity_payment import LedgerActivityPayment from .ledger_activity_resource import LedgerActivityResource from .ledger_activity_source import LedgerActivitySource @@ -55,6 +56,11 @@ class LedgerActivity(UniversalBaseModel): """ object: LedgerActivityObject + payment: typing.Optional[LedgerActivityPayment] = pydantic.Field(default=None) + """ + Payment related to this ledger activity. Included when rich resource hydration is enabled and the movement is tied to a payment. + """ + posted_at: dt.datetime = pydantic.Field() """ When the activity posted to the ledger. diff --git a/src/whop_sdk/types/ledger_activity_line_type.py b/src/whop_sdk/types/ledger_activity_line_type.py index 62b01fee..5ad1ec03 100644 --- a/src/whop_sdk/types/ledger_activity_line_type.py +++ b/src/whop_sdk/types/ledger_activity_line_type.py @@ -17,6 +17,8 @@ "airdrop_reversal", "application_fee", "application_fee_payout", + "balance_reservation", + "balance_reservation_reversal", "bank_transfer", "billing_percentage_fee", "buyer_fee", diff --git a/src/whop_sdk/types/ledger_activity_payment.py b/src/whop_sdk/types/ledger_activity_payment.py new file mode 100644 index 00000000..1daeae45 --- /dev/null +++ b/src/whop_sdk/types/ledger_activity_payment.py @@ -0,0 +1,56 @@ +# 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 .ledger_activity_payment_object import LedgerActivityPaymentObject +from .money import Money + + +class LedgerActivityPayment(UniversalBaseModel): + amount: typing.Optional[Money] = pydantic.Field(default=None) + """ + Total charged by the payment. + """ + + card_brand: typing.Optional[str] = pydantic.Field(default=None) + """ + Card brand, when the customer paid by card. + """ + + card_last4: typing.Optional[str] = pydantic.Field(default=None) + """ + Last four digits of the card, when the customer paid by card. + """ + + created_at: dt.datetime = pydantic.Field() + """ + When the payment was created. + """ + + id: str = pydantic.Field() + """ + Payment ID, prefixed `pay_`. + """ + + object: LedgerActivityPaymentObject + payment_method_type: typing.Optional[str] = pydantic.Field(default=None) + """ + How the customer paid, such as `card` or `paypal`. + """ + + payment_processor: typing.Optional[str] = pydantic.Field(default=None) + """ + Processor that handled the payment, such as `stripe`. + """ + + 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_activity_payment_object.py b/src/whop_sdk/types/ledger_activity_payment_object.py new file mode 100644 index 00000000..c884ff55 --- /dev/null +++ b/src/whop_sdk/types/ledger_activity_payment_object.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LedgerActivityPaymentObject = typing.Union[typing.Literal["payment"], typing.Any] diff --git a/src/whop_sdk/types/ledger_activity_source.py b/src/whop_sdk/types/ledger_activity_source.py index 4d087498..3bc85ac5 100644 --- a/src/whop_sdk/types/ledger_activity_source.py +++ b/src/whop_sdk/types/ledger_activity_source.py @@ -6,6 +6,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .ledger_activity_source_payout_destination import LedgerActivitySourcePayoutDestination +from .money import Money class LedgerActivitySource(UniversalBaseModel): @@ -18,6 +19,11 @@ class LedgerActivitySource(UniversalBaseModel): Withdrawal amount as a decimal number in the destination currency (withdrawal sources only; requires payout:withdrawal:read). """ + card_brand: typing.Optional[str] = pydantic.Field(default=None) + """ + Card brand used by the payment source. + """ + chain: typing.Optional[str] = pydantic.Field(default=None) """ Chain the deposit landed on, for example plasma (onchain_transaction sources only). @@ -55,6 +61,21 @@ class LedgerActivitySource(UniversalBaseModel): Name of the entity processing the payout (withdrawal sources only; requires payout:withdrawal:read). """ + payment_amount: typing.Optional[Money] = pydantic.Field(default=None) + """ + Total charged by the payment source. + """ + + payment_method_type: typing.Optional[str] = pydantic.Field(default=None) + """ + Payment method used by the payment source. + """ + + payment_processor: typing.Optional[str] = pydantic.Field(default=None) + """ + Processor used by the payment source. + """ + payout_destination: typing.Optional[LedgerActivitySourcePayoutDestination] = pydantic.Field(default=None) """ Payout destination display info (withdrawal sources only). diff --git a/src/whop_sdk/types/product.py b/src/whop_sdk/types/product.py index 4d94820f..81f1485c 100644 --- a/src/whop_sdk/types/product.py +++ b/src/whop_sdk/types/product.py @@ -9,6 +9,7 @@ from .product_global_affiliate_status import ProductGlobalAffiliateStatus from .product_marketplace_status import ProductMarketplaceStatus from .product_member_affiliate_status import ProductMemberAffiliateStatus +from .product_public_plan import ProductPublicPlan class Product(UniversalBaseModel): @@ -37,9 +38,14 @@ class Product(UniversalBaseModel): Custom text label on customer's bank statement. """ + default_plan: typing.Optional[ProductPublicPlan] = pydantic.Field(default=None) + """ + Buyable plan to show and check out with. The configured default when that plan is buyable, otherwise the first buyable plan in product-page order. `null` when none is buyable. + """ + description: typing.Optional[str] = pydantic.Field(default=None) """ - Written description displayed on product page. + Written description displayed on the product page. `null` if none is set. """ external_identifier: typing.Optional[str] = pydantic.Field(default=None) diff --git a/src/whop_sdk/types/product_list_item.py b/src/whop_sdk/types/product_list_item.py index 0fae8198..80e7db83 100644 --- a/src/whop_sdk/types/product_list_item.py +++ b/src/whop_sdk/types/product_list_item.py @@ -5,14 +5,30 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .product_gallery_image import ProductGalleryImage +from .product_public_plan import ProductPublicPlan class ProductListItem(UniversalBaseModel): + account: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Account that sells this product. + """ + created_at: str = pydantic.Field() """ When the product was created, as an ISO 8601 timestamp. """ + default_plan: typing.Optional[ProductPublicPlan] = pydantic.Field(default=None) + """ + Buyable plan to show and check out with. The configured default when that plan is buyable, otherwise the first buyable plan in product-page order. `null` when none is buyable. + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + Written description displayed on the product page. `null` if none is set. + """ + external_identifier: typing.Optional[str] = pydantic.Field(default=None) """ External identifier stored on the product for your own reference. diff --git a/src/whop_sdk/types/product_public_plan.py b/src/whop_sdk/types/product_public_plan.py new file mode 100644 index 00000000..a2df7f33 --- /dev/null +++ b/src/whop_sdk/types/product_public_plan.py @@ -0,0 +1,65 @@ +# 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 +from .product_public_plan_plan_type import ProductPublicPlanPlanType +from .product_public_plan_visibility import ProductPublicPlanVisibility + + +class ProductPublicPlan(UniversalBaseModel): + billing_period: typing.Optional[float] = pydantic.Field(default=None) + """ + Number of days between recurring charges, such as 30 for monthly or 365 for annual. `null` for one-time plans. + """ + + expiration_days: typing.Optional[float] = pydantic.Field(default=None) + """ + Access duration in days for expiration-based plans. `null` for plans without an expiration. + """ + + id: str = pydantic.Field() + """ + Plan ID, prefixed `plan_`. + """ + + initial_price: Money = pydantic.Field() + """ + What checkout charges up front. `amount` is `"0.00"` when the first charge is free, such as a trial. + """ + + plan_type: ProductPublicPlanPlanType = pydantic.Field() + """ + Billing model for this plan: `one_time` or `renewal`. + """ + + renewal_price: Money = pydantic.Field() + """ + The recurring charge every `billing_period` days. `amount` is `"0.00"` for one-time plans. + """ + + title: typing.Optional[str] = pydantic.Field(default=None) + """ + Plan display name shown to customers. `null` if no title has been set. + """ + + unlimited_stock: bool = pydantic.Field() + """ + Whether the plan has unlimited stock. + """ + + visibility: ProductPublicPlanVisibility = pydantic.Field() + """ + Where this plan can be seen. `visible` plans appear on the product page. + """ + + 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/product_public_plan_plan_type.py b/src/whop_sdk/types/product_public_plan_plan_type.py new file mode 100644 index 00000000..9eac80ff --- /dev/null +++ b/src/whop_sdk/types/product_public_plan_plan_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProductPublicPlanPlanType = typing.Union[typing.Literal["renewal", "one_time"], typing.Any] diff --git a/src/whop_sdk/types/product_public_plan_visibility.py b/src/whop_sdk/types/product_public_plan_visibility.py new file mode 100644 index 00000000..51247b11 --- /dev/null +++ b/src/whop_sdk/types/product_public_plan_visibility.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProductPublicPlanVisibility = typing.Union[typing.Literal["visible", "hidden", "archived", "quick_link"], typing.Any] diff --git a/src/whop_sdk/types/transfer_destination.py b/src/whop_sdk/types/transfer_destination.py deleted file mode 100644 index 6c485132..00000000 --- a/src/whop_sdk/types/transfer_destination.py +++ /dev/null @@ -1,46 +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 - - -class TransferDestination_User(UniversalBaseModel): - typename: typing.Literal["User"] = "User" - id: str - name: typing.Optional[str] = None - username: 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 TransferDestination_Company(UniversalBaseModel): - typename: typing.Literal["Company"] = "Company" - id: str - route: str - title: 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 - - -TransferDestination = typing_extensions.Annotated[ - typing.Union[TransferDestination_User, TransferDestination_Company], pydantic.Field(discriminator="typename") -] diff --git a/src/whop_sdk/types/transfer_origin.py b/src/whop_sdk/types/transfer_origin.py deleted file mode 100644 index 1010fbe7..00000000 --- a/src/whop_sdk/types/transfer_origin.py +++ /dev/null @@ -1,46 +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 - - -class TransferOrigin_User(UniversalBaseModel): - typename: typing.Literal["User"] = "User" - id: str - name: typing.Optional[str] = None - username: 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 TransferOrigin_Company(UniversalBaseModel): - typename: typing.Literal["Company"] = "Company" - id: str - route: str - title: 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 - - -TransferOrigin = typing_extensions.Annotated[ - typing.Union[TransferOrigin_User, TransferOrigin_Company], pydantic.Field(discriminator="typename") -] diff --git a/src/whop_sdk/users/client.py b/src/whop_sdk/users/client.py index dc894ced..8e3357b6 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 6e139d57..c40e69e0 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 8031b152..b687ae07 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 118ada14..bf325806 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 f9ac592d..1df74535 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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -161,7 +161,7 @@ async def set( ) client = AsyncWhop( - "2026-08-21", + "2026-08-21-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 40441604..512337d6 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", + "2026-08-21-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", + "2026-08-21-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 ce12f9ac..c05137b0 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", + "2026-08-21-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", + "2026-08-21-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 044fb572..807ce2dc 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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 dcfa8952..50cee2f1 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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/withdrawals/client.py b/src/whop_sdk/withdrawals/client.py index ad0a1dbb..83deeac3 100644 --- a/src/whop_sdk/withdrawals/client.py +++ b/src/whop_sdk/withdrawals/client.py @@ -93,7 +93,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -239,7 +239,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -277,7 +277,7 @@ def generate_pdf( from whop_sdk import Whop client = Whop( - "2026-08-21", + "2026-08-21-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", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -469,7 +469,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -527,7 +527,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -573,7 +573,7 @@ async def generate_pdf( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-08-21", + "2026-08-21-1", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) From 8c2fef0b901aab5349046445895644ede321af35 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 25 Aug 2026 01:56:36 +0000 Subject: [PATCH 2/2] [fern-replay] advance lockfile --- .fern/replay.lock | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.fern/replay.lock b/.fern/replay.lock index 006e7b56..1d7db625 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -6,5 +6,11 @@ generations: timestamp: 2026-08-25T01:56:33.113Z cli_version: unknown generator_versions: {} -current_generation: 77fdba62dce5d28c1b6d5afcd8663ad48a95bd91 + - commit_sha: 5514b202ffe6d0dfd7b2d5f75dbf9891480b583c + tree_hash: e5d85b457704ffae6b6c0f61276ef984d7455959 + timestamp: 2026-08-25T01:56:34.017Z + cli_version: unknown + generator_versions: + fernapi/fern-python-sdk: 5.28.0 +current_generation: 5514b202ffe6d0dfd7b2d5f75dbf9891480b583c patches: []