From 8c77421f671763602d9441e98d77a0c7c942bc8a 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:58:14 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-ruby-sdk: 1.23.2 --- .fern/metadata.json | 12 +- .fern/replay.lock | 10 + .fernignore | 3 + .gitattributes | 1 + lib/whop_sdk.rb | 102 ++++- lib/whop_sdk/ad_groups/client.rb | 2 + ...rch_targeting_options_ad_groups_request.rb | 2 + ...oups_request_special_ad_categories_item.rb | 16 + ...reate_api_keys_request_api_version_date.rb | 1 + ...pdate_api_keys_request_api_version_date.rb | 1 + lib/whop_sdk/apps/client.rb | 2 + lib/whop_sdk/apps/types/list_apps_request.rb | 2 + lib/whop_sdk/checkout_sessions/client.rb | 52 +++ .../types/create_checkout_sessions_request.rb | 37 ++ ...te_checkout_sessions_request_items_item.rb | 13 + .../create_checkout_sessions_request_mode.rb | 14 + lib/whop_sdk/client.rb | 7 +- lib/whop_sdk/disputes/client.rb | 6 +- .../types/create_exports_request_resource.rb | 4 +- .../types/list_exports_request_resource.rb | 4 +- lib/whop_sdk/files/client.rb | 66 ++- .../files/types/complete_files_request.rb | 15 + ...lete_files_request_multipart_parts_item.rb | 13 + .../files/types/create_files_request.rb | 6 +- .../types/create_files_request_visibility.rb | 14 + .../files/types/create_files_response.rb | 28 -- ...ancial_activity_request_line_types_item.rb | 2 + ...report_response_rows_item_line_category.rb | 2 + ...e_supported_payout_method_delivery_type.rb | 4 +- ...m_supported_payout_method_delivery_type.rb | 4 +- ...e_supported_payout_method_delivery_type.rb | 4 +- ...ethods_response_data_item_delivery_type.rb | 5 +- ...d_supported_payout_method_delivery_type.rb | 4 +- ...d_supported_payout_method_delivery_type.rb | 4 +- ...a_supported_payout_method_delivery_type.rb | 4 +- ...d_supported_payout_method_delivery_type.rb | 4 +- ...d_supported_payout_method_delivery_type.rb | 4 +- ...d_supported_payout_method_delivery_type.rb | 4 +- ...d_supported_payout_method_delivery_type.rb | 4 +- lib/whop_sdk/plans/client.rb | 7 +- .../plans/types/list_plans_request.rb | 2 +- lib/whop_sdk/products/client.rb | 21 +- .../products/types/list_products_request.rb | 16 +- .../list_products_request_plan_types_item.rb | 14 + lib/whop_sdk/types/account.rb | 8 + .../types/api_key_api_version_date.rb | 1 + lib/whop_sdk/types/app.rb | 2 + lib/whop_sdk/types/app_elements_used_item.rb | 45 +++ lib/whop_sdk/types/bounty.rb | 6 + ...ny.rb => bounty_active_livestream_feed.rb} | 7 +- lib/whop_sdk/types/checkout_session.rb | 95 +++++ .../checkout_session_authenticate_action.rb | 9 + .../checkout_session_await_claim_action.rb | 11 + ...eckout_session_await_claim_action_state.rb | 12 + .../types/checkout_session_branding.rb | 29 ++ .../checkout_session_branding_border_style.rb | 13 + .../checkout_session_branding_font_family.rb | 13 + .../types/checkout_session_breakdown.rb | 21 + .../checkout_session_breakdown_adjustment.rb | 19 + ...ut_session_breakdown_adjustment_applied.rb | 12 + ...ckout_session_breakdown_adjustment_kind.rb | 13 + ...out_session_breakdown_adjustment_status.rb | 11 + .../checkout_session_breakdown_currency.rb | 100 +++++ .../checkout_session_breakdown_display.rb | 11 + ...kout_session_breakdown_display_headline.rb | 21 + ...session_breakdown_display_headline_kind.rb | 13 + .../checkout_session_breakdown_display_row.rb | 19 + ...ut_session_breakdown_display_row_detail.rb | 35 ++ ...on_breakdown_display_row_detail_applied.rb | 12 + ...kout_session_breakdown_display_row_kind.rb | 33 ++ ...ut_session_breakdown_display_row_status.rb | 11 + ...kout_session_breakdown_display_sections.rb | 15 + .../types/checkout_session_breakdown_line.rb | 17 + .../checkout_session_breakdown_line_kind.rb | 11 + .../checkout_session_breakdown_upcoming.rb | 20 + ...session_breakdown_upcoming_installments.rb | 21 + ...out_session_breakdown_upcoming_one_time.rb | 13 + ...ut_session_breakdown_upcoming_recurring.rb | 19 + .../types/checkout_session_buyer_identity.rb | 12 + .../checkout_session_buyer_identity_method.rb | 15 + .../types/checkout_session_complete_action.rb | 13 + .../checkout_session_complete_action_kind.rb | 12 + .../types/checkout_session_confirm_error.rb | 11 + .../checkout_session_confirm_error_code.rb | 40 ++ .../types/checkout_session_cta_label.rb | 16 + .../types/checkout_session_custom_field.rb | 19 + ...heckout_session_custom_field_field_type.rb | 11 + .../checkout_session_custom_field_response.rb | 11 + lib/whop_sdk/types/checkout_session_entry.rb | 11 + .../types/checkout_session_entry_status.rb | 14 + lib/whop_sdk/types/checkout_session_item.rb | 21 + lib/whop_sdk/types/checkout_session_mode.rb | 12 + .../types/checkout_session_next_action.rb | 28 ++ .../types/checkout_session_payment.rb | 11 + .../types/checkout_session_payment_status.rb | 14 + lib/whop_sdk/types/checkout_session_promo.rb | 19 + .../types/checkout_session_promo_currency.rb | 100 +++++ .../types/checkout_session_promo_duration.rb | 13 + .../checkout_session_promo_promo_type.rb | 12 + lib/whop_sdk/types/checkout_session_quote.rb | 23 ++ .../types/checkout_session_redirect_action.rb | 11 + .../types/checkout_session_requirement.rb | 11 + .../checkout_session_requirement_type.rb | 16 + lib/whop_sdk/types/checkout_session_seller.rb | 19 + .../types/checkout_session_seller_terms.rb | 17 + .../checkout_session_shipping_address.rb | 21 + lib/whop_sdk/types/checkout_session_status.rb | 13 + .../types/checkout_session_tax_behavior.rb | 12 + lib/whop_sdk/types/checkout_session_tax_id.rb | 11 + .../types/checkout_session_tax_id_type.rb | 123 ++++++ .../types/checkout_session_three_ds_level.rb | 12 + .../types/checkout_session_transfer.rb | 13 + ...t_session_upgrade_authentication_action.rb | 15 + ...de_authentication_action_sign_in_intent.rb | 11 + .../checkout_session_verify_phone_action.rb | 9 + ...heckout_session_wait_for_payment_action.rb | 11 + .../types/dispute_evidence_document.rb | 20 + ...dispute_evidence_document_upload_status.rb | 14 + .../dispute_evidence_document_visibility.rb | 12 + lib/whop_sdk/types/export_resource.rb | 4 +- lib/whop_sdk/types/file.rb | 19 +- lib/whop_sdk/types/file_multipart_url.rb | 11 + lib/whop_sdk/types/file_upload_status.rb | 14 + lib/whop_sdk/types/forum_experience.rb | 2 + .../types/forum_list_item_experience.rb | 2 + lib/whop_sdk/types/ledger_activity.rb | 2 + .../types/ledger_activity_line_type.rb | 2 + lib/whop_sdk/types/ledger_activity_payment.rb | 23 ++ .../types/ledger_activity_payment_object.rb | 11 + lib/whop_sdk/types/ledger_activity_source.rb | 8 + lib/whop_sdk/types/product.rb | 2 + lib/whop_sdk/types/product_list_item.rb | 6 + lib/whop_sdk/types/product_public_plan.rb | 25 ++ .../types/product_public_plan_plan_type.rb | 12 + .../types/product_public_plan_visibility.rb | 14 + lib/whop_sdk/types/transfer.rb | 11 - lib/whop_sdk/types/transfer_destination.rb | 15 - .../types/transfer_destination_company.rb | 14 - .../types/transfer_destination_user.rb | 14 - lib/whop_sdk/types/transfer_origin.rb | 15 - lib/whop_sdk/types/transfer_origin_user.rb | 14 - reference.md | 380 +++++++++++++++++- 142 files changed, 2463 insertions(+), 206 deletions(-) create mode 100644 .fern/replay.lock create mode 100644 .gitattributes create mode 100644 lib/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_special_ad_categories_item.rb create mode 100644 lib/whop_sdk/checkout_sessions/client.rb create mode 100644 lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request.rb create mode 100644 lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_items_item.rb create mode 100644 lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_mode.rb create mode 100644 lib/whop_sdk/files/types/complete_files_request.rb create mode 100644 lib/whop_sdk/files/types/complete_files_request_multipart_parts_item.rb create mode 100644 lib/whop_sdk/files/types/create_files_request_visibility.rb delete mode 100644 lib/whop_sdk/files/types/create_files_response.rb create mode 100644 lib/whop_sdk/products/types/list_products_request_plan_types_item.rb create mode 100644 lib/whop_sdk/types/app_elements_used_item.rb rename lib/whop_sdk/types/{transfer_origin_company.rb => bounty_active_livestream_feed.rb} (58%) create mode 100644 lib/whop_sdk/types/checkout_session.rb create mode 100644 lib/whop_sdk/types/checkout_session_authenticate_action.rb create mode 100644 lib/whop_sdk/types/checkout_session_await_claim_action.rb create mode 100644 lib/whop_sdk/types/checkout_session_await_claim_action_state.rb create mode 100644 lib/whop_sdk/types/checkout_session_branding.rb create mode 100644 lib/whop_sdk/types/checkout_session_branding_border_style.rb create mode 100644 lib/whop_sdk/types/checkout_session_branding_font_family.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_adjustment.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_adjustment_applied.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_adjustment_kind.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_adjustment_status.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_currency.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_display.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_display_headline.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_display_headline_kind.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_display_row.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_display_row_detail.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_display_row_detail_applied.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_display_row_kind.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_display_row_status.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_display_sections.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_line.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_line_kind.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_upcoming.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_upcoming_installments.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_upcoming_one_time.rb create mode 100644 lib/whop_sdk/types/checkout_session_breakdown_upcoming_recurring.rb create mode 100644 lib/whop_sdk/types/checkout_session_buyer_identity.rb create mode 100644 lib/whop_sdk/types/checkout_session_buyer_identity_method.rb create mode 100644 lib/whop_sdk/types/checkout_session_complete_action.rb create mode 100644 lib/whop_sdk/types/checkout_session_complete_action_kind.rb create mode 100644 lib/whop_sdk/types/checkout_session_confirm_error.rb create mode 100644 lib/whop_sdk/types/checkout_session_confirm_error_code.rb create mode 100644 lib/whop_sdk/types/checkout_session_cta_label.rb create mode 100644 lib/whop_sdk/types/checkout_session_custom_field.rb create mode 100644 lib/whop_sdk/types/checkout_session_custom_field_field_type.rb create mode 100644 lib/whop_sdk/types/checkout_session_custom_field_response.rb create mode 100644 lib/whop_sdk/types/checkout_session_entry.rb create mode 100644 lib/whop_sdk/types/checkout_session_entry_status.rb create mode 100644 lib/whop_sdk/types/checkout_session_item.rb create mode 100644 lib/whop_sdk/types/checkout_session_mode.rb create mode 100644 lib/whop_sdk/types/checkout_session_next_action.rb create mode 100644 lib/whop_sdk/types/checkout_session_payment.rb create mode 100644 lib/whop_sdk/types/checkout_session_payment_status.rb create mode 100644 lib/whop_sdk/types/checkout_session_promo.rb create mode 100644 lib/whop_sdk/types/checkout_session_promo_currency.rb create mode 100644 lib/whop_sdk/types/checkout_session_promo_duration.rb create mode 100644 lib/whop_sdk/types/checkout_session_promo_promo_type.rb create mode 100644 lib/whop_sdk/types/checkout_session_quote.rb create mode 100644 lib/whop_sdk/types/checkout_session_redirect_action.rb create mode 100644 lib/whop_sdk/types/checkout_session_requirement.rb create mode 100644 lib/whop_sdk/types/checkout_session_requirement_type.rb create mode 100644 lib/whop_sdk/types/checkout_session_seller.rb create mode 100644 lib/whop_sdk/types/checkout_session_seller_terms.rb create mode 100644 lib/whop_sdk/types/checkout_session_shipping_address.rb create mode 100644 lib/whop_sdk/types/checkout_session_status.rb create mode 100644 lib/whop_sdk/types/checkout_session_tax_behavior.rb create mode 100644 lib/whop_sdk/types/checkout_session_tax_id.rb create mode 100644 lib/whop_sdk/types/checkout_session_tax_id_type.rb create mode 100644 lib/whop_sdk/types/checkout_session_three_ds_level.rb create mode 100644 lib/whop_sdk/types/checkout_session_transfer.rb create mode 100644 lib/whop_sdk/types/checkout_session_upgrade_authentication_action.rb create mode 100644 lib/whop_sdk/types/checkout_session_upgrade_authentication_action_sign_in_intent.rb create mode 100644 lib/whop_sdk/types/checkout_session_verify_phone_action.rb create mode 100644 lib/whop_sdk/types/checkout_session_wait_for_payment_action.rb create mode 100644 lib/whop_sdk/types/dispute_evidence_document_upload_status.rb create mode 100644 lib/whop_sdk/types/dispute_evidence_document_visibility.rb create mode 100644 lib/whop_sdk/types/file_multipart_url.rb create mode 100644 lib/whop_sdk/types/file_upload_status.rb create mode 100644 lib/whop_sdk/types/ledger_activity_payment.rb create mode 100644 lib/whop_sdk/types/ledger_activity_payment_object.rb create mode 100644 lib/whop_sdk/types/product_public_plan.rb create mode 100644 lib/whop_sdk/types/product_public_plan_plan_type.rb create mode 100644 lib/whop_sdk/types/product_public_plan_visibility.rb delete mode 100644 lib/whop_sdk/types/transfer.rb delete mode 100644 lib/whop_sdk/types/transfer_destination.rb delete mode 100644 lib/whop_sdk/types/transfer_destination_company.rb delete mode 100644 lib/whop_sdk/types/transfer_destination_user.rb delete mode 100644 lib/whop_sdk/types/transfer_origin.rb delete mode 100644 lib/whop_sdk/types/transfer_origin_user.rb diff --git a/.fern/metadata.json b/.fern/metadata.json index 81eefb3c..79970b05 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -5,16 +5,18 @@ "generatorConfig": { "moduleName": "whop_sdk", "requirePaths": [ - "helpers/verify_user_token" + "helpers/verify_user_token", + "helpers/verify_webhook" ], "extraDependencies": { - "jwt": ">= 2.7" + "jwt": ">= 2.7", + "standardwebhooks": ">= 1.0" } }, - "originGitCommit": "f7d6f47c548e5487717569990f2526aea7971636", + "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..4cf01c7f --- /dev/null +++ b/.fern/replay.lock @@ -0,0 +1,10 @@ +# DO NOT EDIT MANUALLY - Managed by Fern Replay +version: "1.0" +generations: + - commit_sha: 69f1d3729468eecb5637baa85e2b6303f1b80c0d + tree_hash: f4270f856ef00655a7d2965019c135bb4e42e380 + timestamp: 2026-08-25T01:58:11.784Z + cli_version: unknown + generator_versions: {} +current_generation: 69f1d3729468eecb5637baa85e2b6303f1b80c0d +patches: [] diff --git a/.fernignore b/.fernignore index 313293a8..b91f3476 100644 --- a/.fernignore +++ b/.fernignore @@ -81,3 +81,6 @@ lib/whop_sdk/helpers lib/whop_sdk/internal/iterators/cursor_page_iterator.rb lib/whop_sdk/internal/types/utils.rb test/unit/helpers +.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/lib/whop_sdk.rb b/lib/whop_sdk.rb index 95696445..137c0829 100644 --- a/lib/whop_sdk.rb +++ b/lib/whop_sdk.rb @@ -94,6 +94,10 @@ require_relative "whop_sdk/types/account_tax_identifier" require_relative "whop_sdk/types/account_wallet_network" require_relative "whop_sdk/types/account_wallet" +require_relative "whop_sdk/types/file_upload_status" +require_relative "whop_sdk/types/file_visibility" +require_relative "whop_sdk/types/file_multipart_url" +require_relative "whop_sdk/types/file" require_relative "whop_sdk/types/user_profile_picture" require_relative "whop_sdk/types/user_summary" require_relative "whop_sdk/types/account" @@ -218,6 +222,7 @@ require_relative "whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_platform" require_relative "whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_types_item" require_relative "whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_location_types_item" +require_relative "whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_special_ad_categories_item" require_relative "whop_sdk/types/detailed_targeting_option_behavior_type" require_relative "whop_sdk/types/detailed_targeting_option" require_relative "whop_sdk/types/language_targeting_option" @@ -618,6 +623,8 @@ require_relative "whop_sdk/checkout_configurations/types/retrieve_checkout_configurations_response_three_ds_level" require_relative "whop_sdk/checkout_configurations/types/retrieve_checkout_configurations_response" require_relative "whop_sdk/checkout_configurations/types/delete_checkout_configurations_response" +require_relative "whop_sdk/checkout_sessions/types/create_checkout_sessions_request_items_item" +require_relative "whop_sdk/checkout_sessions/types/create_checkout_sessions_request_mode" require_relative "whop_sdk/types/company_list_item_logo" require_relative "whop_sdk/types/company_list_item_owner_user" require_relative "whop_sdk/types/company_list_item" @@ -710,6 +717,9 @@ require_relative "whop_sdk/types/ledger_activity_currency" require_relative "whop_sdk/types/ledger_activity_line_type" require_relative "whop_sdk/types/ledger_activity_object" +require_relative "whop_sdk/types/ledger_activity_payment_object" +require_relative "whop_sdk/types/money" +require_relative "whop_sdk/types/ledger_activity_payment" require_relative "whop_sdk/types/ledger_activity_resource_logo_url_object" require_relative "whop_sdk/types/ledger_activity_resource_logo_url" require_relative "whop_sdk/types/ledger_activity_resource_name_object" @@ -758,6 +768,8 @@ require_relative "whop_sdk/types/dispute_buyer" require_relative "whop_sdk/types/dispute_evidence_document_content_type" require_relative "whop_sdk/types/dispute_evidence_document_document_type" +require_relative "whop_sdk/types/dispute_evidence_document_upload_status" +require_relative "whop_sdk/types/dispute_evidence_document_visibility" require_relative "whop_sdk/types/dispute_evidence_document" require_relative "whop_sdk/types/dispute_evidence" require_relative "whop_sdk/types/dispute_issuer_comment" @@ -881,9 +893,8 @@ require_relative "whop_sdk/types/fee_markup_types" require_relative "whop_sdk/types/fee_markup_list_item" require_relative "whop_sdk/fee_markups/types/list_fee_markups_response" -require_relative "whop_sdk/types/file_visibility" -require_relative "whop_sdk/types/upload_statuses" -require_relative "whop_sdk/files/types/create_files_response" +require_relative "whop_sdk/files/types/create_files_request_visibility" +require_relative "whop_sdk/files/types/complete_files_request_multipart_parts_item" require_relative "whop_sdk/financial_activity/types/list_financial_activity_request_line_types_item" require_relative "whop_sdk/financial_activity/types/list_financial_activity_response_page_info" require_relative "whop_sdk/financial_activity/types/list_financial_activity_response" @@ -1467,9 +1478,13 @@ require_relative "whop_sdk/plans/types/post_plan_updated_payload_api_version" require_relative "whop_sdk/plans/types/post_plan_updated_payload_type" require_relative "whop_sdk/plans/types/post_plan_updated_payload" +require_relative "whop_sdk/products/types/list_products_request_plan_types_item" require_relative "whop_sdk/products/types/list_products_request_direction" require_relative "whop_sdk/products/types/list_products_response_page_info" require_relative "whop_sdk/types/product_gallery_image" +require_relative "whop_sdk/types/product_public_plan_plan_type" +require_relative "whop_sdk/types/product_public_plan_visibility" +require_relative "whop_sdk/types/product_public_plan" require_relative "whop_sdk/types/product_list_item" require_relative "whop_sdk/products/types/list_products_response" require_relative "whop_sdk/products/types/create_products_request_custom_cta" @@ -2203,6 +2218,7 @@ require_relative "whop_sdk/types/ai_chat_message_source_types" require_relative "whop_sdk/types/api_version" require_relative "whop_sdk/types/app_app_type" +require_relative "whop_sdk/types/app_elements_used_item" require_relative "whop_sdk/types/app_marketplace_status" require_relative "whop_sdk/types/app_oauth_client_type" require_relative "whop_sdk/types/app_required_scopes_item" @@ -2235,6 +2251,7 @@ require_relative "whop_sdk/types/bounty_currency" require_relative "whop_sdk/types/bounty_scheduled_frequency" require_relative "whop_sdk/types/bounty_status" +require_relative "whop_sdk/types/bounty_active_livestream_feed" require_relative "whop_sdk/types/capture_spec_imu" require_relative "whop_sdk/types/capture_spec_video_stabilization_mode" require_relative "whop_sdk/types/capture_spec_video" @@ -2264,6 +2281,72 @@ require_relative "whop_sdk/types/checkout_modes" require_relative "whop_sdk/types/checkout_configuration_list_item" require_relative "whop_sdk/types/checkout_fonts" +require_relative "whop_sdk/types/checkout_session_buyer_identity" +require_relative "whop_sdk/types/checkout_session_buyer_identity_method" +require_relative "whop_sdk/types/checkout_session_cta_label" +require_relative "whop_sdk/types/checkout_session_mode" +require_relative "whop_sdk/types/checkout_session_status" +require_relative "whop_sdk/types/checkout_session_tax_behavior" +require_relative "whop_sdk/types/checkout_session_three_ds_level" +require_relative "whop_sdk/types/checkout_session_authenticate_action" +require_relative "whop_sdk/types/checkout_session_await_claim_action_state" +require_relative "whop_sdk/types/checkout_session_await_claim_action" +require_relative "whop_sdk/types/checkout_session_branding_border_style" +require_relative "whop_sdk/types/checkout_session_branding_font_family" +require_relative "whop_sdk/types/checkout_session_branding" +require_relative "whop_sdk/types/checkout_session_breakdown_currency" +require_relative "whop_sdk/types/checkout_session_breakdown_adjustment_applied" +require_relative "whop_sdk/types/checkout_session_breakdown_adjustment_kind" +require_relative "whop_sdk/types/checkout_session_breakdown_adjustment_status" +require_relative "whop_sdk/types/checkout_session_breakdown_adjustment" +require_relative "whop_sdk/types/checkout_session_breakdown_display_headline_kind" +require_relative "whop_sdk/types/checkout_session_breakdown_display_row_kind" +require_relative "whop_sdk/types/checkout_session_breakdown_display_row_status" +require_relative "whop_sdk/types/checkout_session_breakdown_display_row_detail_applied" +require_relative "whop_sdk/types/checkout_session_breakdown_display_row_detail" +require_relative "whop_sdk/types/checkout_session_breakdown_display_row" +require_relative "whop_sdk/types/checkout_session_breakdown_display_headline" +require_relative "whop_sdk/types/checkout_session_breakdown_display_sections" +require_relative "whop_sdk/types/checkout_session_breakdown_display" +require_relative "whop_sdk/types/checkout_session_breakdown_line_kind" +require_relative "whop_sdk/types/checkout_session_breakdown_line" +require_relative "whop_sdk/types/checkout_session_breakdown_upcoming_installments" +require_relative "whop_sdk/types/checkout_session_breakdown_upcoming_one_time" +require_relative "whop_sdk/types/checkout_session_breakdown_upcoming_recurring" +require_relative "whop_sdk/types/checkout_session_breakdown_upcoming" +require_relative "whop_sdk/types/checkout_session_breakdown" +require_relative "whop_sdk/types/checkout_session_complete_action_kind" +require_relative "whop_sdk/types/checkout_session_complete_action" +require_relative "whop_sdk/types/checkout_session_confirm_error_code" +require_relative "whop_sdk/types/checkout_session_confirm_error" +require_relative "whop_sdk/types/checkout_session_custom_field_field_type" +require_relative "whop_sdk/types/checkout_session_custom_field" +require_relative "whop_sdk/types/checkout_session_custom_field_response" +require_relative "whop_sdk/types/checkout_session_entry_status" +require_relative "whop_sdk/types/checkout_session_entry" +require_relative "whop_sdk/types/checkout_session_item" +require_relative "whop_sdk/types/checkout_session_redirect_action" +require_relative "whop_sdk/types/checkout_session_upgrade_authentication_action_sign_in_intent" +require_relative "whop_sdk/types/checkout_session_upgrade_authentication_action" +require_relative "whop_sdk/types/checkout_session_verify_phone_action" +require_relative "whop_sdk/types/checkout_session_wait_for_payment_action" +require_relative "whop_sdk/types/checkout_session_next_action" +require_relative "whop_sdk/types/checkout_session_payment_status" +require_relative "whop_sdk/types/checkout_session_payment" +require_relative "whop_sdk/types/checkout_session_promo_currency" +require_relative "whop_sdk/types/checkout_session_promo_duration" +require_relative "whop_sdk/types/checkout_session_promo_promo_type" +require_relative "whop_sdk/types/checkout_session_promo" +require_relative "whop_sdk/types/checkout_session_quote" +require_relative "whop_sdk/types/checkout_session_requirement_type" +require_relative "whop_sdk/types/checkout_session_requirement" +require_relative "whop_sdk/types/checkout_session_seller_terms" +require_relative "whop_sdk/types/checkout_session_seller" +require_relative "whop_sdk/types/checkout_session_shipping_address" +require_relative "whop_sdk/types/checkout_session_tax_id_type" +require_relative "whop_sdk/types/checkout_session_tax_id" +require_relative "whop_sdk/types/checkout_session_transfer" +require_relative "whop_sdk/types/checkout_session" require_relative "whop_sdk/types/checkout_shapes" require_relative "whop_sdk/types/company_featured_affiliate_product" require_relative "whop_sdk/types/company_logo" @@ -2325,7 +2408,6 @@ require_relative "whop_sdk/types/experience" require_relative "whop_sdk/types/experience_access_levels" require_relative "whop_sdk/types/fee_markup" -require_relative "whop_sdk/types/file" require_relative "whop_sdk/types/forum_experience" require_relative "whop_sdk/types/forum" require_relative "whop_sdk/types/forum_post_attachments_item" @@ -2368,7 +2450,6 @@ require_relative "whop_sdk/types/membership_list_item" require_relative "whop_sdk/types/memberships_sortable_columns" require_relative "whop_sdk/types/message_channel_order" -require_relative "whop_sdk/types/money" require_relative "whop_sdk/types/pagination" require_relative "whop_sdk/types/payment_bank_transfer" require_relative "whop_sdk/types/payment_bank_transfer_instructions" @@ -2497,6 +2578,7 @@ require_relative "whop_sdk/types/support_channel_view" require_relative "whop_sdk/types/tax_types" require_relative "whop_sdk/types/topup" +require_relative "whop_sdk/types/upload_statuses" require_relative "whop_sdk/types/user_preferences" require_relative "whop_sdk/types/v1error_response_error" require_relative "whop_sdk/types/v1error_response" @@ -2513,13 +2595,6 @@ require_relative "whop_sdk/types/withdrawal" require_relative "whop_sdk/types/workforce_bounty" require_relative "whop_sdk/types/workforce_bounty_list_item" -require_relative "whop_sdk/types/transfer_origin_user" -require_relative "whop_sdk/types/transfer_origin_company" -require_relative "whop_sdk/types/transfer_destination_user" -require_relative "whop_sdk/types/transfer_destination_company" -require_relative "whop_sdk/types/transfer_origin" -require_relative "whop_sdk/types/transfer_destination" -require_relative "whop_sdk/types/transfer" require_relative "whop_sdk/client" require_relative "whop_sdk/access_tokens/client" require_relative "whop_sdk/access_tokens/types/create_access_tokens_request" @@ -2638,6 +2713,8 @@ require_relative "whop_sdk/checkout_configurations/types/create_checkout_configurations_request" require_relative "whop_sdk/checkout_configurations/types/retrieve_checkout_configurations_request" require_relative "whop_sdk/checkout_configurations/types/delete_checkout_configurations_request" +require_relative "whop_sdk/checkout_sessions/client" +require_relative "whop_sdk/checkout_sessions/types/create_checkout_sessions_request" require_relative "whop_sdk/companies/client" require_relative "whop_sdk/companies/types/list_companies_request" require_relative "whop_sdk/companies/types/create_companies_request" @@ -2730,6 +2807,7 @@ require_relative "whop_sdk/files/client" require_relative "whop_sdk/files/types/create_files_request" require_relative "whop_sdk/files/types/retrieve_files_request" +require_relative "whop_sdk/files/types/complete_files_request" require_relative "whop_sdk/financial_activity/client" require_relative "whop_sdk/financial_activity/types/list_financial_activity_request" require_relative "whop_sdk/ledgers/client" diff --git a/lib/whop_sdk/ad_groups/client.rb b/lib/whop_sdk/ad_groups/client.rb index fbab3ec9..5e7ffdea 100644 --- a/lib/whop_sdk/ad_groups/client.rb +++ b/lib/whop_sdk/ad_groups/client.rb @@ -186,6 +186,7 @@ def estimate_reach(request_options: {}, **params) # @option params [Whop_sdk::AdGroups::Types::SearchTargetingOptionsAdGroupsRequestLocationTypesItem, nil] :location_types # @option params [String, nil] :country # @option params [Integer, nil] :limit + # @option params [Whop_sdk::AdGroups::Types::SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem, nil] :special_ad_categories # # @example # client.ad_groups.search_targeting_options(platform: "meta") @@ -201,6 +202,7 @@ def search_targeting_options(request_options: {}, **params) query_params["location_types"] = params[:location_types] if params.key?(:location_types) query_params["country"] = params[:country] if params.key?(:country) query_params["limit"] = params[:limit] if params.key?(:limit) + query_params["special_ad_categories"] = params[:special_ad_categories] if params.key?(:special_ad_categories) request = Whop_sdk::Internal::JSON::Request.new( base_url: request_options[:base_url], diff --git a/lib/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request.rb b/lib/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request.rb index 4da364f2..096bb116 100644 --- a/lib/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request.rb +++ b/lib/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request.rb @@ -17,6 +17,8 @@ class SearchTargetingOptionsAdGroupsRequest < Internal::Types::Model field :country, -> { String }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false + + field :special_ad_categories, -> { Whop_sdk::AdGroups::Types::SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem }, optional: true, nullable: false end end end diff --git a/lib/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_special_ad_categories_item.rb b/lib/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_special_ad_categories_item.rb new file mode 100644 index 00000000..35021a36 --- /dev/null +++ b/lib/whop_sdk/ad_groups/types/search_targeting_options_ad_groups_request_special_ad_categories_item.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Whop_sdk + module AdGroups + module Types + module SearchTargetingOptionsAdGroupsRequestSpecialAdCategoriesItem + extend Whop_sdk::Internal::Types::Enum + + HOUSING = "housing" + EMPLOYMENT = "employment" + FINANCIAL_PRODUCTS = "financial_products" + POLITICS = "politics" + end + end + end +end diff --git a/lib/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.rb b/lib/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.rb index 962d2ee2..9a354755 100644 --- a/lib/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.rb +++ b/lib/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.rb @@ -31,6 +31,7 @@ module CreateAPIKeysRequestAPIVersionDate TWO_THOUSAND_TWENTY_SIX0813 = "2026-08-13" TWO_THOUSAND_TWENTY_SIX0814 = "2026-08-14" TWO_THOUSAND_TWENTY_SIX0821 = "2026-08-21" + TWO_THOUSAND_TWENTY_SIX08211 = "2026-08-21-1" end end end diff --git a/lib/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.rb b/lib/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.rb index 13b88ffc..aba20195 100644 --- a/lib/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.rb +++ b/lib/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.rb @@ -31,6 +31,7 @@ module UpdateAPIKeysRequestAPIVersionDate TWO_THOUSAND_TWENTY_SIX0813 = "2026-08-13" TWO_THOUSAND_TWENTY_SIX0814 = "2026-08-14" TWO_THOUSAND_TWENTY_SIX0821 = "2026-08-21" + TWO_THOUSAND_TWENTY_SIX08211 = "2026-08-21-1" end end end diff --git a/lib/whop_sdk/apps/client.rb b/lib/whop_sdk/apps/client.rb index 8dd64fae..f31d2c5d 100644 --- a/lib/whop_sdk/apps/client.rb +++ b/lib/whop_sdk/apps/client.rb @@ -26,6 +26,7 @@ def initialize(client:) # @option params [Whop_sdk::Apps::Types::ListAppsRequestAppType, nil] :app_type # @option params [Whop_sdk::Apps::Types::ListAppsRequestViewType, nil] :view_type # @option params [Boolean, nil] :verified_apps_only + # @option params [Boolean, nil] :recommended # @option params [String, nil] :query # @option params [Whop_sdk::Apps::Types::ListAppsRequestOrder, nil] :order # @option params [Whop_sdk::Apps::Types::ListAppsRequestDirection, nil] :direction @@ -45,6 +46,7 @@ def list(request_options: {}, **params) query_params["app_type"] = params[:app_type] if params.key?(:app_type) query_params["view_type"] = params[:view_type] if params.key?(:view_type) query_params["verified_apps_only"] = params[:verified_apps_only] if params.key?(:verified_apps_only) + query_params["recommended"] = params[:recommended] if params.key?(:recommended) query_params["query"] = params[:query] if params.key?(:query) query_params["order"] = params[:order] if params.key?(:order) query_params["direction"] = params[:direction] if params.key?(:direction) diff --git a/lib/whop_sdk/apps/types/list_apps_request.rb b/lib/whop_sdk/apps/types/list_apps_request.rb index cb2682f1..5f11c092 100644 --- a/lib/whop_sdk/apps/types/list_apps_request.rb +++ b/lib/whop_sdk/apps/types/list_apps_request.rb @@ -12,6 +12,8 @@ class ListAppsRequest < Internal::Types::Model field :verified_apps_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :recommended, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :query, -> { String }, optional: true, nullable: false field :order, -> { Whop_sdk::Apps::Types::ListAppsRequestOrder }, optional: true, nullable: false diff --git a/lib/whop_sdk/checkout_sessions/client.rb b/lib/whop_sdk/checkout_sessions/client.rb new file mode 100644 index 00000000..9d907a24 --- /dev/null +++ b/lib/whop_sdk/checkout_sessions/client.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +module Whop_sdk + module CheckoutSessions + class Client + # @param client [Whop_sdk::Internal::Http::RawClient] + # + # @return [void] + def initialize(client:) + @client = client + end + + # 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. + # + # @param request_options [Hash] + # @param params [Whop_sdk::CheckoutSessions::Types::CreateCheckoutSessionsRequest] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @example + # client.checkout_sessions.create + # + # @return [Whop_sdk::Types::CheckoutSession] + def create(request_options: {}, **params) + params = Whop_sdk::Internal::Types::Utils.normalize_keys(params) + request = Whop_sdk::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "checkout_sessions", + body: Whop_sdk::CheckoutSessions::Types::CreateCheckoutSessionsRequest.new(params).to_h, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Whop_sdk::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Whop_sdk::Types::CheckoutSession.load(response.body) + else + error_class = Whop_sdk::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + end + end +end diff --git a/lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request.rb b/lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request.rb new file mode 100644 index 00000000..327ab0d1 --- /dev/null +++ b/lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +module Whop_sdk + module CheckoutSessions + module Types + class CreateCheckoutSessionsRequest < Internal::Types::Model + field :affiliate_code, -> { String }, optional: true, nullable: false + + field :attribution, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + + field :checkout_configuration, -> { String }, optional: true, nullable: false + + field :items, -> { Internal::Types::Array[Whop_sdk::CheckoutSessions::Types::CreateCheckoutSessionsRequestItemsItem] }, optional: true, nullable: false + + field :link, -> { String }, optional: true, nullable: false + + field :metadata, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + + field :mode, -> { Whop_sdk::CheckoutSessions::Types::CreateCheckoutSessionsRequestMode }, optional: true, nullable: false + + field :origin, -> { String }, optional: true, nullable: false + + field :page_route, -> { String }, optional: true, nullable: false + + field :password, -> { String }, optional: true, nullable: false + + field :promo_code, -> { String }, optional: true, nullable: false + + field :return_url, -> { String }, optional: true, nullable: false + + field :top_up_membership, -> { String }, optional: true, nullable: false + + field :tracking_link_ids_by_account, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + end + end + end +end diff --git a/lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_items_item.rb b/lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_items_item.rb new file mode 100644 index 00000000..64a58b76 --- /dev/null +++ b/lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_items_item.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Whop_sdk + module CheckoutSessions + module Types + class CreateCheckoutSessionsRequestItemsItem < Internal::Types::Model + field :plan, -> { String }, optional: false, nullable: false + + field :quantity, -> { Integer }, optional: true, nullable: false + end + end + end +end diff --git a/lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_mode.rb b/lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_mode.rb new file mode 100644 index 00000000..dffe1125 --- /dev/null +++ b/lib/whop_sdk/checkout_sessions/types/create_checkout_sessions_request_mode.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Whop_sdk + module CheckoutSessions + module Types + module CreateCheckoutSessionsRequestMode + extend Whop_sdk::Internal::Types::Enum + + PAYMENT = "payment" + SETUP = "setup" + end + end + end +end diff --git a/lib/whop_sdk/client.rb b/lib/whop_sdk/client.rb index a9ca8d65..797c9d55 100644 --- a/lib/whop_sdk/client.rb +++ b/lib/whop_sdk/client.rb @@ -9,7 +9,7 @@ class Client # @param max_retries [Integer] # # @return [void] - def initialize(token:, base_url: nil, api_version_date: "2026-08-21", idempotency_key: nil, max_retries: 2) + def initialize(token:, base_url: nil, api_version_date: "2026-08-21-1", idempotency_key: nil, max_retries: 2) headers = { "X-Fern-Language" => "Ruby", Authorization: "Bearer #{token}", @@ -124,6 +124,11 @@ def checkout_configurations @checkout_configurations ||= Whop_sdk::CheckoutConfigurations::Client.new(client: @raw_client) end + # @return [Whop_sdk::CheckoutSessions::Client] + def checkout_sessions + @checkout_sessions ||= Whop_sdk::CheckoutSessions::Client.new(client: @raw_client) + end + # @return [Whop_sdk::Companies::Client] def companies @companies ||= Whop_sdk::Companies::Client.new(client: @raw_client) diff --git a/lib/whop_sdk/disputes/client.rb b/lib/whop_sdk/disputes/client.rb index 894390e7..bfdccf6f 100644 --- a/lib/whop_sdk/disputes/client.rb +++ b/lib/whop_sdk/disputes/client.rb @@ -346,9 +346,9 @@ def update_evidence_dispute(request_options: {}, **params) end end - # 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 + # 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. # diff --git a/lib/whop_sdk/exports/types/create_exports_request_resource.rb b/lib/whop_sdk/exports/types/create_exports_request_resource.rb index 110f2bbd..c3041414 100644 --- a/lib/whop_sdk/exports/types/create_exports_request_resource.rb +++ b/lib/whop_sdk/exports/types/create_exports_request_resource.rb @@ -18,8 +18,6 @@ module CreateExportsRequestResource DISPUTES = "disputes" EVENTS = "events" FINANCIAL_ACTIVITY = "financial-activity" - MEMBERS = "members" - MEMBERSHIPS = "memberships" PAYOUT_METHODS = "payout_methods" PAYOUTS = "payouts" PEOPLE = "people" @@ -31,8 +29,10 @@ module CreateExportsRequestResource TEAM_MEMBERS = "team_members" TRANSFERS = "transfers" WEBHOOKS = "webhooks" + MEMBERS = "members" RECEIPTS = "receipts" UNCLAIMED_MEMBERSHIPS = "unclaimed_memberships" + MEMBERSHIPS = "memberships" TRACKING_LINKS = "tracking_links" PROMO_CODES = "promo_codes" RESOLUTIONS = "resolutions" diff --git a/lib/whop_sdk/exports/types/list_exports_request_resource.rb b/lib/whop_sdk/exports/types/list_exports_request_resource.rb index b3b95550..8aa7964e 100644 --- a/lib/whop_sdk/exports/types/list_exports_request_resource.rb +++ b/lib/whop_sdk/exports/types/list_exports_request_resource.rb @@ -18,8 +18,6 @@ module ListExportsRequestResource DISPUTES = "disputes" EVENTS = "events" FINANCIAL_ACTIVITY = "financial-activity" - MEMBERS = "members" - MEMBERSHIPS = "memberships" PAYOUT_METHODS = "payout_methods" PAYOUTS = "payouts" PEOPLE = "people" @@ -31,8 +29,10 @@ module ListExportsRequestResource TEAM_MEMBERS = "team_members" TRANSFERS = "transfers" WEBHOOKS = "webhooks" + MEMBERS = "members" RECEIPTS = "receipts" UNCLAIMED_MEMBERSHIPS = "unclaimed_memberships" + MEMBERSHIPS = "memberships" TRACKING_LINKS = "tracking_links" PROMO_CODES = "promo_codes" RESOLUTIONS = "resolutions" diff --git a/lib/whop_sdk/files/client.rb b/lib/whop_sdk/files/client.rb index 5d54071f..9801d261 100644 --- a/lib/whop_sdk/files/client.rb +++ b/lib/whop_sdk/files/client.rb @@ -10,7 +10,10 @@ def initialize(client:) @client = client end - # 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. # # @param request_options [Hash] # @param params [Whop_sdk::Files::Types::CreateFilesRequest] @@ -21,9 +24,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # # @example - # client.files.create(filename: "filename") + # client.files.create(filename: "terms.pdf") # - # @return [Whop_sdk::Files::Types::CreateFilesResponse] + # @return [Whop_sdk::Types::File] def create(request_options: {}, **params) params = Whop_sdk::Internal::Types::Utils.normalize_keys(params) request = Whop_sdk::Internal::JSON::Request.new( @@ -40,14 +43,15 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Whop_sdk::Files::Types::CreateFilesResponse.load(response.body) + Whop_sdk::Types::File.load(response.body) else error_class = Whop_sdk::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) end end - # 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. # # @param request_options [Hash] # @param params [Hash] @@ -59,7 +63,7 @@ def create(request_options: {}, **params) # @option params [String] :id # # @example - # client.files.retrieve(id: "file_xxxxxxxxxxxxx") + # client.files.retrieve(id: "id") # # @return [Whop_sdk::Types::File] def retrieve(request_options: {}, **params) @@ -83,6 +87,56 @@ def retrieve(request_options: {}, **params) raise error_class.new(response.body, code: code) end end + + # 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. + # + # @param request_options [Hash] + # @param params [Whop_sdk::Files::Types::CompleteFilesRequest] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String] :id + # + # @example + # client.files.complete( + # id: "id", + # multipart_parts: [{ + # etag: "etag-1", + # part_number: 1 + # }], + # multipart_upload_id: "upload-id" + # ) + # + # @return [Whop_sdk::Types::File] + def complete(request_options: {}, **params) + params = Whop_sdk::Internal::Types::Utils.normalize_keys(params) + request_data = Whop_sdk::Files::Types::CompleteFilesRequest.new(params).to_h + non_body_param_names = %w[id] + body = request_data.except(*non_body_param_names) + + request = Whop_sdk::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "files/#{URI.encode_uri_component(params[:id].to_s)}/complete", + body: body, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Whop_sdk::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Whop_sdk::Types::File.load(response.body) + else + error_class = Whop_sdk::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end end end end diff --git a/lib/whop_sdk/files/types/complete_files_request.rb b/lib/whop_sdk/files/types/complete_files_request.rb new file mode 100644 index 00000000..949d47eb --- /dev/null +++ b/lib/whop_sdk/files/types/complete_files_request.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Whop_sdk + module Files + module Types + class CompleteFilesRequest < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :multipart_parts, -> { Internal::Types::Array[Whop_sdk::Files::Types::CompleteFilesRequestMultipartPartsItem] }, optional: false, nullable: false + + field :multipart_upload_id, -> { String }, optional: false, nullable: false + end + end + end +end diff --git a/lib/whop_sdk/files/types/complete_files_request_multipart_parts_item.rb b/lib/whop_sdk/files/types/complete_files_request_multipart_parts_item.rb new file mode 100644 index 00000000..81cf13c6 --- /dev/null +++ b/lib/whop_sdk/files/types/complete_files_request_multipart_parts_item.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Whop_sdk + module Files + module Types + class CompleteFilesRequestMultipartPartsItem < Internal::Types::Model + field :etag, -> { String }, optional: false, nullable: false + + field :part_number, -> { Integer }, optional: false, nullable: false + end + end + end +end diff --git a/lib/whop_sdk/files/types/create_files_request.rb b/lib/whop_sdk/files/types/create_files_request.rb index 3084e191..8e6ada80 100644 --- a/lib/whop_sdk/files/types/create_files_request.rb +++ b/lib/whop_sdk/files/types/create_files_request.rb @@ -4,9 +4,13 @@ module Whop_sdk module Files module Types class CreateFilesRequest < Internal::Types::Model + field :byte_size, -> { Integer }, optional: true, nullable: false + field :filename, -> { String }, optional: false, nullable: false - field :visibility, -> { Whop_sdk::Types::FileVisibility }, optional: true, nullable: false + field :multipart, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :visibility, -> { Whop_sdk::Files::Types::CreateFilesRequestVisibility }, optional: true, nullable: false end end end diff --git a/lib/whop_sdk/files/types/create_files_request_visibility.rb b/lib/whop_sdk/files/types/create_files_request_visibility.rb new file mode 100644 index 00000000..bad804d0 --- /dev/null +++ b/lib/whop_sdk/files/types/create_files_request_visibility.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Whop_sdk + module Files + module Types + module CreateFilesRequestVisibility + extend Whop_sdk::Internal::Types::Enum + + PUBLIC = "public" + PRIVATE = "private" + end + end + end +end diff --git a/lib/whop_sdk/files/types/create_files_response.rb b/lib/whop_sdk/files/types/create_files_response.rb deleted file mode 100644 index ab766b4b..00000000 --- a/lib/whop_sdk/files/types/create_files_response.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -module Whop_sdk - module Files - module Types - # A file that has been uploaded or is pending upload. - class CreateFilesResponse < Internal::Types::Model - field :content_type, -> { String }, optional: false, nullable: true - - field :filename, -> { String }, optional: false, nullable: true - - field :id, -> { String }, optional: false, nullable: false - - field :size, -> { String }, optional: false, nullable: true - - field :upload_headers, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: true - - field :upload_status, -> { Whop_sdk::Types::UploadStatuses }, optional: false, nullable: false - - field :upload_url, -> { String }, optional: false, nullable: true - - field :url, -> { String }, optional: false, nullable: true - - field :visibility, -> { Whop_sdk::Types::FileVisibility }, optional: false, nullable: false - end - end - end -end diff --git a/lib/whop_sdk/financial_activity/types/list_financial_activity_request_line_types_item.rb b/lib/whop_sdk/financial_activity/types/list_financial_activity_request_line_types_item.rb index ac5da822..3e5dc4c4 100644 --- a/lib/whop_sdk/financial_activity/types/list_financial_activity_request_line_types_item.rb +++ b/lib/whop_sdk/financial_activity/types/list_financial_activity_request_line_types_item.rb @@ -19,6 +19,8 @@ module ListFinancialActivityRequestLineTypesItem AIRDROP_REVERSAL = "airdrop_reversal" APPLICATION_FEE = "application_fee" APPLICATION_FEE_PAYOUT = "application_fee_payout" + BALANCE_RESERVATION = "balance_reservation" + BALANCE_RESERVATION_REVERSAL = "balance_reservation_reversal" BANK_TRANSFER = "bank_transfer" BILLING_PERCENTAGE_FEE = "billing_percentage_fee" BUYER_FEE = "buyer_fee" diff --git a/lib/whop_sdk/ledgers/types/get_financial_report_response_rows_item_line_category.rb b/lib/whop_sdk/ledgers/types/get_financial_report_response_rows_item_line_category.rb index cfa4f9c3..fcf1e52d 100644 --- a/lib/whop_sdk/ledgers/types/get_financial_report_response_rows_item_line_category.rb +++ b/lib/whop_sdk/ledgers/types/get_financial_report_response_rows_item_line_category.rb @@ -6,6 +6,7 @@ module Types module GetFinancialReportResponseRowsItemLineCategory extend Whop_sdk::Internal::Types::Enum + ACCELERATED_SETTLEMENT_FEE = "accelerated_settlement_fee" ACCOUNT_SETTLEMENT = "account_settlement" AD_BALANCE_FUNDING_RECEIPT = "ad_balance_funding_receipt" AD_BUDGET_RELEASE = "ad_budget_release" @@ -171,6 +172,7 @@ module GetFinancialReportResponseRowsItemLineCategory PLATFORM_EARNING_SETTLEMENT = "platform_earning_settlement" PLATFORM_EARNING_UNRECONCILED_CLEARING = "platform_earning_unreconciled_clearing" PROMO_REVERSAL = "promo_reversal" + PSP_ACCELERATED_SETTLEMENT_FEE = "psp_accelerated_settlement_fee" PSP_ACCOUNT_UPDATER_FEE = "psp_account_updater_fee" PSP_ADJUSTED_PROCESSING_FEE = "psp_adjusted_processing_fee" PSP_AUTHENTICATION_FEE = "psp_authentication_fee" diff --git a/lib/whop_sdk/payouts/methods/types/create_methods_response_supported_payout_method_delivery_type.rb b/lib/whop_sdk/payouts/methods/types/create_methods_response_supported_payout_method_delivery_type.rb index 9ebc0483..78f08b5e 100644 --- a/lib/whop_sdk/payouts/methods/types/create_methods_response_supported_payout_method_delivery_type.rb +++ b/lib/whop_sdk/payouts/methods/types/create_methods_response_supported_payout_method_delivery_type.rb @@ -11,8 +11,8 @@ module CreateMethodsResponseSupportedPayoutMethodDeliveryType BANK_DEPOSIT = "bank_deposit" HOME_DELIVERY = "home_delivery" MOBILE_WALLET = "mobile_wallet" - MASSPAY_CARD = "masspay_card" - PAPER_CHECK = "paper_check" + CARD = "card" + CHECK = "check" BILL = "bill" CRYPTOCURRENCY = "cryptocurrency" UNKNOWN = "unknown" diff --git a/lib/whop_sdk/payouts/methods/types/list_methods_response_data_item_supported_payout_method_delivery_type.rb b/lib/whop_sdk/payouts/methods/types/list_methods_response_data_item_supported_payout_method_delivery_type.rb index 0eb683c9..23d7c541 100644 --- a/lib/whop_sdk/payouts/methods/types/list_methods_response_data_item_supported_payout_method_delivery_type.rb +++ b/lib/whop_sdk/payouts/methods/types/list_methods_response_data_item_supported_payout_method_delivery_type.rb @@ -11,8 +11,8 @@ module ListMethodsResponseDataItemSupportedPayoutMethodDeliveryType BANK_DEPOSIT = "bank_deposit" HOME_DELIVERY = "home_delivery" MOBILE_WALLET = "mobile_wallet" - MASSPAY_CARD = "masspay_card" - PAPER_CHECK = "paper_check" + CARD = "card" + CHECK = "check" BILL = "bill" CRYPTOCURRENCY = "cryptocurrency" UNKNOWN = "unknown" diff --git a/lib/whop_sdk/payouts/methods/types/update_methods_response_supported_payout_method_delivery_type.rb b/lib/whop_sdk/payouts/methods/types/update_methods_response_supported_payout_method_delivery_type.rb index 94b3e23a..c867568e 100644 --- a/lib/whop_sdk/payouts/methods/types/update_methods_response_supported_payout_method_delivery_type.rb +++ b/lib/whop_sdk/payouts/methods/types/update_methods_response_supported_payout_method_delivery_type.rb @@ -11,8 +11,8 @@ module UpdateMethodsResponseSupportedPayoutMethodDeliveryType BANK_DEPOSIT = "bank_deposit" HOME_DELIVERY = "home_delivery" MOBILE_WALLET = "mobile_wallet" - MASSPAY_CARD = "masspay_card" - PAPER_CHECK = "paper_check" + CARD = "card" + CHECK = "check" BILL = "bill" CRYPTOCURRENCY = "cryptocurrency" UNKNOWN = "unknown" diff --git a/lib/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_delivery_type.rb b/lib/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_delivery_type.rb index 906f1abe..2cad14a9 100644 --- a/lib/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_delivery_type.rb +++ b/lib/whop_sdk/payouts/supported_methods/types/list_supported_methods_response_data_item_delivery_type.rb @@ -11,11 +11,10 @@ module ListSupportedMethodsResponseDataItemDeliveryType BANK_DEPOSIT = "bank_deposit" HOME_DELIVERY = "home_delivery" MOBILE_WALLET = "mobile_wallet" - MASSPAY_CARD = "masspay_card" - PAPER_CHECK = "paper_check" + CARD = "card" + CHECK = "check" BILL = "bill" CRYPTOCURRENCY = "cryptocurrency" - UNKNOWN = "unknown" end end end diff --git a/lib/whop_sdk/payouts/types/create_payouts_response_payout_method_supported_payout_method_delivery_type.rb b/lib/whop_sdk/payouts/types/create_payouts_response_payout_method_supported_payout_method_delivery_type.rb index d0c145fb..22fd5b99 100644 --- a/lib/whop_sdk/payouts/types/create_payouts_response_payout_method_supported_payout_method_delivery_type.rb +++ b/lib/whop_sdk/payouts/types/create_payouts_response_payout_method_supported_payout_method_delivery_type.rb @@ -10,8 +10,8 @@ module CreatePayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType BANK_DEPOSIT = "bank_deposit" HOME_DELIVERY = "home_delivery" MOBILE_WALLET = "mobile_wallet" - MASSPAY_CARD = "masspay_card" - PAPER_CHECK = "paper_check" + CARD = "card" + CHECK = "check" BILL = "bill" CRYPTOCURRENCY = "cryptocurrency" UNKNOWN = "unknown" diff --git a/lib/whop_sdk/payouts/types/list_payouts_response_data_item_payout_method_supported_payout_method_delivery_type.rb b/lib/whop_sdk/payouts/types/list_payouts_response_data_item_payout_method_supported_payout_method_delivery_type.rb index ceeee38f..ccae9da4 100644 --- a/lib/whop_sdk/payouts/types/list_payouts_response_data_item_payout_method_supported_payout_method_delivery_type.rb +++ b/lib/whop_sdk/payouts/types/list_payouts_response_data_item_payout_method_supported_payout_method_delivery_type.rb @@ -10,8 +10,8 @@ module ListPayoutsResponseDataItemPayoutMethodSupportedPayoutMethodDeliveryType BANK_DEPOSIT = "bank_deposit" HOME_DELIVERY = "home_delivery" MOBILE_WALLET = "mobile_wallet" - MASSPAY_CARD = "masspay_card" - PAPER_CHECK = "paper_check" + CARD = "card" + CHECK = "check" BILL = "bill" CRYPTOCURRENCY = "cryptocurrency" UNKNOWN = "unknown" diff --git a/lib/whop_sdk/payouts/types/post_payout_method_created_payload_data_supported_payout_method_delivery_type.rb b/lib/whop_sdk/payouts/types/post_payout_method_created_payload_data_supported_payout_method_delivery_type.rb index 28e1baa3..1eb9fcb5 100644 --- a/lib/whop_sdk/payouts/types/post_payout_method_created_payload_data_supported_payout_method_delivery_type.rb +++ b/lib/whop_sdk/payouts/types/post_payout_method_created_payload_data_supported_payout_method_delivery_type.rb @@ -10,8 +10,8 @@ module PostPayoutMethodCreatedPayloadDataSupportedPayoutMethodDeliveryType BANK_DEPOSIT = "bank_deposit" HOME_DELIVERY = "home_delivery" MOBILE_WALLET = "mobile_wallet" - MASSPAY_CARD = "masspay_card" - PAPER_CHECK = "paper_check" + CARD = "card" + CHECK = "check" BILL = "bill" CRYPTOCURRENCY = "cryptocurrency" UNKNOWN = "unknown" diff --git a/lib/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type.rb b/lib/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type.rb index fc2258f5..0bb11159 100644 --- a/lib/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type.rb +++ b/lib/whop_sdk/payouts/types/post_withdrawal_created_payload_data_payout_method_supported_payout_method_delivery_type.rb @@ -10,8 +10,8 @@ module PostWithdrawalCreatedPayloadDataPayoutMethodSupportedPayoutMethodDelivery BANK_DEPOSIT = "bank_deposit" HOME_DELIVERY = "home_delivery" MOBILE_WALLET = "mobile_wallet" - MASSPAY_CARD = "masspay_card" - PAPER_CHECK = "paper_check" + CARD = "card" + CHECK = "check" BILL = "bill" CRYPTOCURRENCY = "cryptocurrency" UNKNOWN = "unknown" diff --git a/lib/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type.rb b/lib/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type.rb index 974c4337..adec4b29 100644 --- a/lib/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type.rb +++ b/lib/whop_sdk/payouts/types/post_withdrawal_reversed_payload_data_payout_method_supported_payout_method_delivery_type.rb @@ -10,8 +10,8 @@ module PostWithdrawalReversedPayloadDataPayoutMethodSupportedPayoutMethodDeliver BANK_DEPOSIT = "bank_deposit" HOME_DELIVERY = "home_delivery" MOBILE_WALLET = "mobile_wallet" - MASSPAY_CARD = "masspay_card" - PAPER_CHECK = "paper_check" + CARD = "card" + CHECK = "check" BILL = "bill" CRYPTOCURRENCY = "cryptocurrency" UNKNOWN = "unknown" diff --git a/lib/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type.rb b/lib/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type.rb index 886873c3..40b34a92 100644 --- a/lib/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type.rb +++ b/lib/whop_sdk/payouts/types/post_withdrawal_updated_payload_data_payout_method_supported_payout_method_delivery_type.rb @@ -10,8 +10,8 @@ module PostWithdrawalUpdatedPayloadDataPayoutMethodSupportedPayoutMethodDelivery BANK_DEPOSIT = "bank_deposit" HOME_DELIVERY = "home_delivery" MOBILE_WALLET = "mobile_wallet" - MASSPAY_CARD = "masspay_card" - PAPER_CHECK = "paper_check" + CARD = "card" + CHECK = "check" BILL = "bill" CRYPTOCURRENCY = "cryptocurrency" UNKNOWN = "unknown" diff --git a/lib/whop_sdk/payouts/types/retrieve_payouts_response_payout_method_supported_payout_method_delivery_type.rb b/lib/whop_sdk/payouts/types/retrieve_payouts_response_payout_method_supported_payout_method_delivery_type.rb index 73a677dd..744d82c3 100644 --- a/lib/whop_sdk/payouts/types/retrieve_payouts_response_payout_method_supported_payout_method_delivery_type.rb +++ b/lib/whop_sdk/payouts/types/retrieve_payouts_response_payout_method_supported_payout_method_delivery_type.rb @@ -10,8 +10,8 @@ module RetrievePayoutsResponsePayoutMethodSupportedPayoutMethodDeliveryType BANK_DEPOSIT = "bank_deposit" HOME_DELIVERY = "home_delivery" MOBILE_WALLET = "mobile_wallet" - MASSPAY_CARD = "masspay_card" - PAPER_CHECK = "paper_check" + CARD = "card" + CHECK = "check" BILL = "bill" CRYPTOCURRENCY = "cryptocurrency" UNKNOWN = "unknown" diff --git a/lib/whop_sdk/plans/client.rb b/lib/whop_sdk/plans/client.rb index a9e5a449..546d3196 100644 --- a/lib/whop_sdk/plans/client.rb +++ b/lib/whop_sdk/plans/client.rb @@ -10,8 +10,8 @@ def initialize(client:) @client = client end - # 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. # # @param request_options [Hash] # @param params [Hash] @@ -20,7 +20,7 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String] :account_id + # @option params [String, nil] :account_id # @option params [Whop_sdk::Plans::Types::ListPlansRequestDirection, nil] :direction # @option params [Whop_sdk::Plans::Types::ListPlansRequestOrder, nil] :order # @option params [String, nil] :release_methods @@ -36,7 +36,6 @@ def initialize(client:) # # @example # client.plans.list( - # account_id: "account_id", # release_methods: ["buy_now"], # visibilities: ["visible"], # plan_types: ["renewal"], diff --git a/lib/whop_sdk/plans/types/list_plans_request.rb b/lib/whop_sdk/plans/types/list_plans_request.rb index 4da8742d..1a5420d7 100644 --- a/lib/whop_sdk/plans/types/list_plans_request.rb +++ b/lib/whop_sdk/plans/types/list_plans_request.rb @@ -4,7 +4,7 @@ module Whop_sdk module Plans module Types class ListPlansRequest < Internal::Types::Model - field :account_id, -> { String }, optional: false, nullable: false + field :account_id, -> { String }, optional: true, nullable: false field :direction, -> { Whop_sdk::Plans::Types::ListPlansRequestDirection }, optional: true, nullable: false diff --git a/lib/whop_sdk/products/client.rb b/lib/whop_sdk/products/client.rb index 913a936a..6451628e 100644 --- a/lib/whop_sdk/products/client.rb +++ b/lib/whop_sdk/products/client.rb @@ -10,7 +10,7 @@ def initialize(client:) @client = client end - # Returns a paginated list of products belonging to an account. + # Returns a paginated list of products. Omit `account_id` to search the public marketplace. # # @param request_options [Hash] # @param params [Hash] @@ -19,7 +19,12 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String] :account_id + # @option params [String, nil] :account_id + # @option params [String, nil] :query + # @option params [String, nil] :marketplace_category_route + # @option params [Whop_sdk::Products::Types::ListProductsRequestPlanTypesItem, nil] :plan_types + # @option params [Integer, nil] :price_minimum + # @option params [Integer, nil] :price_maximum # @option params [String, nil] :visibilities # @option params [String, nil] :access_pass_types # @option params [String, nil] :labels @@ -29,10 +34,11 @@ def initialize(client:) # @option params [String, nil] :after # @option params [Integer, nil] :last # @option params [String, nil] :before + # @option params [String, nil] :created_after + # @option params [String, nil] :created_before # # @example # client.products.list( - # account_id: "account_id", # visibilities: ["visible"], # access_pass_types: ["regular"] # ) @@ -42,6 +48,11 @@ def list(request_options: {}, **params) params = Whop_sdk::Internal::Types::Utils.normalize_keys(params) query_params = {} query_params["account_id"] = params[:account_id] if params.key?(:account_id) + query_params["query"] = params[:query] if params.key?(:query) + query_params["marketplace_category_route"] = params[:marketplace_category_route] if params.key?(:marketplace_category_route) + query_params["plan_types"] = params[:plan_types] if params.key?(:plan_types) + query_params["price_minimum"] = params[:price_minimum] if params.key?(:price_minimum) + query_params["price_maximum"] = params[:price_maximum] if params.key?(:price_maximum) query_params["visibilities"] = params[:visibilities] if params.key?(:visibilities) query_params["access_pass_types"] = params[:access_pass_types] if params.key?(:access_pass_types) query_params["labels"] = params[:labels] if params.key?(:labels) @@ -51,6 +62,8 @@ def list(request_options: {}, **params) query_params["after"] = params[:after] if params.key?(:after) query_params["last"] = params[:last] if params.key?(:last) query_params["before"] = params[:before] if params.key?(:before) + query_params["created_after"] = params[:created_after] if params.key?(:created_after) + query_params["created_before"] = params[:created_before] if params.key?(:created_before) Whop_sdk::Internal::CursorItemIterator.new( cursor_field: :end_cursor, @@ -118,7 +131,7 @@ def create(request_options: {}, **params) end end - # Retrieves the details of an existing product. This endpoint is publicly accessible. + # Retrieves a product. Public — no credentials. # # @param request_options [Hash] # @param params [Hash] diff --git a/lib/whop_sdk/products/types/list_products_request.rb b/lib/whop_sdk/products/types/list_products_request.rb index a6a7c9b9..1a84912e 100644 --- a/lib/whop_sdk/products/types/list_products_request.rb +++ b/lib/whop_sdk/products/types/list_products_request.rb @@ -4,7 +4,17 @@ module Whop_sdk module Products module Types class ListProductsRequest < Internal::Types::Model - field :account_id, -> { String }, optional: false, nullable: false + field :account_id, -> { String }, optional: true, nullable: false + + field :query, -> { String }, optional: true, nullable: false + + field :marketplace_category_route, -> { String }, optional: true, nullable: false + + field :plan_types, -> { Whop_sdk::Products::Types::ListProductsRequestPlanTypesItem }, optional: true, nullable: false + + field :price_minimum, -> { Integer }, optional: true, nullable: false + + field :price_maximum, -> { Integer }, optional: true, nullable: false field :visibilities, -> { String }, optional: true, nullable: false @@ -23,6 +33,10 @@ class ListProductsRequest < Internal::Types::Model field :last, -> { Integer }, optional: true, nullable: false field :before, -> { String }, optional: true, nullable: false + + field :created_after, -> { String }, optional: true, nullable: false + + field :created_before, -> { String }, optional: true, nullable: false end end end diff --git a/lib/whop_sdk/products/types/list_products_request_plan_types_item.rb b/lib/whop_sdk/products/types/list_products_request_plan_types_item.rb new file mode 100644 index 00000000..02db743c --- /dev/null +++ b/lib/whop_sdk/products/types/list_products_request_plan_types_item.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Whop_sdk + module Products + module Types + module ListProductsRequestPlanTypesItem + extend Whop_sdk::Internal::Types::Enum + + RENEWAL = "renewal" + ONE_TIME = "one_time" + end + end + end +end diff --git a/lib/whop_sdk/types/account.rb b/lib/whop_sdk/types/account.rb index c54552f4..89b9c4c0 100644 --- a/lib/whop_sdk/types/account.rb +++ b/lib/whop_sdk/types/account.rb @@ -31,6 +31,8 @@ class Account < Internal::Types::Model field :email, -> { String }, optional: false, nullable: true + field :eula, -> { Whop_sdk::Types::File }, optional: false, nullable: true + field :home_preferences, -> { Internal::Types::Array[Whop_sdk::Types::AccountHomePreferencesItem] }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false @@ -61,6 +63,8 @@ class Account < Internal::Types::Model field :payment_controls, -> { Whop_sdk::Types::AccountPaymentControls }, optional: false, nullable: true + field :privacy_policy, -> { Whop_sdk::Types::File }, optional: false, nullable: true + field :product_tax_code, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: true field :recommended_actions, -> { Internal::Types::Array[Whop_sdk::Types::AccountRecommendedAction] }, optional: false, nullable: true @@ -69,6 +73,8 @@ class Account < Internal::Types::Model field :required_actions, -> { Internal::Types::Array[Whop_sdk::Types::AccountRequiredAction] }, optional: false, nullable: true + field :return_policy, -> { Whop_sdk::Types::File }, optional: false, nullable: true + field :route, -> { String }, optional: false, nullable: false field :send_customer_emails, -> { Internal::Types::Boolean }, optional: false, nullable: false @@ -99,6 +105,8 @@ class Account < Internal::Types::Model field :tax_type, -> { Whop_sdk::Types::AccountTaxType }, optional: false, nullable: true + field :terms_of_service, -> { Whop_sdk::Types::File }, optional: false, nullable: true + field :three_ds_level, -> { Whop_sdk::Types::AccountThreeDsLevel }, optional: false, nullable: true field :title, -> { String }, optional: false, nullable: false diff --git a/lib/whop_sdk/types/api_key_api_version_date.rb b/lib/whop_sdk/types/api_key_api_version_date.rb index 04ec4b3d..9883daf0 100644 --- a/lib/whop_sdk/types/api_key_api_version_date.rb +++ b/lib/whop_sdk/types/api_key_api_version_date.rb @@ -30,6 +30,7 @@ module APIKeyAPIVersionDate TWO_THOUSAND_TWENTY_SIX0813 = "2026-08-13" TWO_THOUSAND_TWENTY_SIX0814 = "2026-08-14" TWO_THOUSAND_TWENTY_SIX0821 = "2026-08-21" + TWO_THOUSAND_TWENTY_SIX08211 = "2026-08-21-1" end end end diff --git a/lib/whop_sdk/types/app.rb b/lib/whop_sdk/types/app.rb index e0a3864d..508b06cd 100644 --- a/lib/whop_sdk/types/app.rb +++ b/lib/whop_sdk/types/app.rb @@ -33,6 +33,8 @@ class App < Internal::Types::Model field :domain_id, -> { String }, optional: false, nullable: false + field :elements_used, -> { Internal::Types::Array[Whop_sdk::Types::AppElementsUsedItem] }, optional: false, nullable: false + field :experience_path, -> { String }, optional: false, nullable: true field :hosted_url, -> { String }, optional: false, nullable: true diff --git a/lib/whop_sdk/types/app_elements_used_item.rb b/lib/whop_sdk/types/app_elements_used_item.rb new file mode 100644 index 00000000..a13259fb --- /dev/null +++ b/lib/whop_sdk/types/app_elements_used_item.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module AppElementsUsedItem + extend Whop_sdk::Internal::Types::Enum + + ADS = "ads" + ADS_BILLING_SETUP = "ads.billing-setup" + ADS_CAMPAIGN_CREATOR = "ads.campaign-creator" + ADS_REPORTING = "ads.reporting" + ADS_REPORTING_CHART = "ads.reporting.chart" + ADS_REPORTING_TABLE = "ads.reporting.table" + CHECKOUT = "checkout" + CHECKOUT_CHECKOUT = "checkout.checkout" + CHECKOUT_EXPRESS_CHECKOUT = "checkout.expressCheckout" + PAYMENTS = "payments" + PAYMENTS_ADDRESS = "payments.address" + PAYMENTS_BRANDING = "payments.branding" + PAYMENTS_CARD = "payments.card" + PAYMENTS_CARD_FIELDS = "payments.cardFields" + PAYMENTS_CARD_FIELDS_CARD_CVC = "payments.cardFields.cardCvc" + PAYMENTS_CARD_FIELDS_CARD_EXPIRY = "payments.cardFields.cardExpiry" + PAYMENTS_CARD_FIELDS_CARD_NUMBER = "payments.cardFields.cardNumber" + PAYMENTS_EMAIL = "payments.email" + PAYMENTS_PAYMENT = "payments.payment" + PAYMENTS_TAX_ID = "payments.taxId" + TRACKING = "tracking" + TRACKING_EVENTS = "tracking.events" + TRACKING_PEOPLE = "tracking.people" + WALLET = "wallet" + WALLET_ACTIVITY = "wallet.activity" + WALLET_BALANCES = "wallet.balances" + WALLET_BALANCES_BALANCE = "wallet.balances.balance" + WALLET_BALANCES_LIST = "wallet.balances.list" + WALLET_CARDS = "wallet.cards" + WALLET_DEPOSIT = "wallet.deposit" + WALLET_SEND = "wallet.send" + WALLET_WITHDRAW = "wallet.withdraw" + WEBSITES = "websites" + WEBSITES_PIXEL_SETUP = "websites.pixel-setup" + WEBSITES_WEBSITES = "websites.websites" + end + end +end diff --git a/lib/whop_sdk/types/bounty.rb b/lib/whop_sdk/types/bounty.rb index 61973b26..df9c9ca6 100644 --- a/lib/whop_sdk/types/bounty.rb +++ b/lib/whop_sdk/types/bounty.rb @@ -11,10 +11,14 @@ class Bounty < Internal::Types::Model field :accepted_submissions_per_user_limit, -> { Integer }, optional: false, nullable: false + field :active_proof_livestream_feeds, -> { Internal::Types::Array[Whop_sdk::Types::BountyActiveLivestreamFeed] }, optional: false, nullable: false + field :affiliate_share_amount, -> { Integer }, optional: false, nullable: false field :allowed_country_codes, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :awaiting_review_submissions_count, -> { Integer }, optional: false, nullable: false + field :budget_amount, -> { Integer }, optional: false, nullable: false field :business_goal_type, -> { Whop_sdk::Types::BountyBusinessGoalType }, optional: false, nullable: true @@ -27,6 +31,8 @@ class Bounty < Internal::Types::Model field :currency, -> { Whop_sdk::Types::BountyCurrency }, optional: false, nullable: false + field :denied_submissions_count, -> { Integer }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false field :discussion_experience_id, -> { String }, optional: false, nullable: true diff --git a/lib/whop_sdk/types/transfer_origin_company.rb b/lib/whop_sdk/types/bounty_active_livestream_feed.rb similarity index 58% rename from lib/whop_sdk/types/transfer_origin_company.rb rename to lib/whop_sdk/types/bounty_active_livestream_feed.rb index cd04edff..438d3eab 100644 --- a/lib/whop_sdk/types/transfer_origin_company.rb +++ b/lib/whop_sdk/types/bounty_active_livestream_feed.rb @@ -2,11 +2,10 @@ module Whop_sdk module Types - # A company on Whop. - class TransferOriginCompany < Internal::Types::Model - field :id, -> { String }, optional: false, nullable: false + class BountyActiveLivestreamFeed < Internal::Types::Model + field :host, -> { Whop_sdk::Types::UserSummary }, optional: false, nullable: true - field :route, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false field :title, -> { String }, optional: false, nullable: false end diff --git a/lib/whop_sdk/types/checkout_session.rb b/lib/whop_sdk/types/checkout_session.rb new file mode 100644 index 00000000..33694d3f --- /dev/null +++ b/lib/whop_sdk/types/checkout_session.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSession < Internal::Types::Model + field :affiliate_code, -> { String }, optional: false, nullable: true + + field :available_currencies, -> { Internal::Types::Array[String] }, optional: false, nullable: false + + field :branding, -> { Whop_sdk::Types::CheckoutSessionBranding }, optional: false, nullable: true + + field :buyer_email, -> { String }, optional: false, nullable: true + + field :buyer_id, -> { String }, optional: false, nullable: true + + field :buyer_identity, -> { Whop_sdk::Types::CheckoutSessionBuyerIdentity }, optional: false, nullable: true + + field :buyer_identity_at, -> { String }, optional: false, nullable: true + + field :buyer_identity_method, -> { Whop_sdk::Types::CheckoutSessionBuyerIdentityMethod }, optional: false, nullable: true + + field :checkout_configuration, -> { String }, optional: false, nullable: true + + field :client_secret, -> { String }, optional: true, nullable: false + + field :collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :created_at, -> { String }, optional: false, nullable: false + + field :cta_label, -> { Whop_sdk::Types::CheckoutSessionCtaLabel }, optional: false, nullable: false + + field :custom_field_responses, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionCustomFieldResponse] }, optional: false, nullable: false + + field :display_currency, -> { String }, optional: false, nullable: false + + field :entry, -> { Whop_sdk::Types::CheckoutSessionEntry }, optional: false, nullable: true + + field :expires_at, -> { String }, optional: false, nullable: false + + field :id, -> { String }, optional: false, nullable: false + + field :invoice_due_at, -> { String }, optional: false, nullable: true + + field :items, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionItem] }, optional: false, nullable: false + + field :last_confirm_error, -> { Whop_sdk::Types::CheckoutSessionConfirmError }, optional: false, nullable: true + + field :metadata, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: true + + field :mode, -> { Whop_sdk::Types::CheckoutSessionMode }, optional: false, nullable: false + + field :next_action, -> { Whop_sdk::Types::CheckoutSessionNextAction }, optional: false, nullable: true + + field :object, -> { String }, optional: false, nullable: false + + field :payment, -> { Whop_sdk::Types::CheckoutSessionPayment }, optional: false, nullable: true + + field :payment_method_configuration, -> { Whop_sdk::Types::CheckoutSessionPaymentMethodConfiguration }, optional: false, nullable: true + + field :payment_method_required, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :phone_number, -> { String }, optional: false, nullable: true + + field :promo, -> { Whop_sdk::Types::CheckoutSessionPromo }, optional: false, nullable: true + + field :promo_code, -> { String }, optional: false, nullable: true + + field :quote, -> { Whop_sdk::Types::CheckoutSessionQuote }, optional: false, nullable: false + + field :redirect_url, -> { String }, optional: false, nullable: true + + field :requirements, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionRequirement] }, optional: false, nullable: false + + field :return_url, -> { String }, optional: false, nullable: true + + field :seller, -> { Whop_sdk::Types::CheckoutSessionSeller }, optional: false, nullable: false + + field :shipping_address, -> { Whop_sdk::Types::CheckoutSessionShippingAddress }, optional: false, nullable: true + + field :show_promo_code_input, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :status, -> { Whop_sdk::Types::CheckoutSessionStatus }, optional: false, nullable: false + + field :tax_behavior, -> { Whop_sdk::Types::CheckoutSessionTaxBehavior }, optional: false, nullable: true + + field :tax_id, -> { Whop_sdk::Types::CheckoutSessionTaxID }, optional: false, nullable: true + + field :three_ds_level, -> { Whop_sdk::Types::CheckoutSessionThreeDsLevel }, optional: false, nullable: true + + field :top_up_membership, -> { String }, optional: false, nullable: true + + field :transfer, -> { Whop_sdk::Types::CheckoutSessionTransfer }, optional: false, nullable: true + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_authenticate_action.rb b/lib/whop_sdk/types/checkout_session_authenticate_action.rb new file mode 100644 index 00000000..9bebfe52 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_authenticate_action.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionAuthenticateAction < Internal::Types::Model + field :blocking, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_await_claim_action.rb b/lib/whop_sdk/types/checkout_session_await_claim_action.rb new file mode 100644 index 00000000..dedd135d --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_await_claim_action.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionAwaitClaimAction < Internal::Types::Model + field :blocking, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :state, -> { Whop_sdk::Types::CheckoutSessionAwaitClaimActionState }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_await_claim_action_state.rb b/lib/whop_sdk/types/checkout_session_await_claim_action_state.rb new file mode 100644 index 00000000..3c881d1c --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_await_claim_action_state.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionAwaitClaimActionState + extend Whop_sdk::Internal::Types::Enum + + CHECK_EMAIL = "check_email" + HANDED_OFF = "handed_off" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_branding.rb b/lib/whop_sdk/types/checkout_session_branding.rb new file mode 100644 index 00000000..d48569f4 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_branding.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBranding < Internal::Types::Model + field :background_color, -> { String }, optional: false, nullable: true + + field :background_text_color, -> { String }, optional: false, nullable: true + + field :border_style, -> { Whop_sdk::Types::CheckoutSessionBrandingBorderStyle }, optional: false, nullable: true + + field :button_color, -> { String }, optional: false, nullable: true + + field :button_radius, -> { String }, optional: false, nullable: true + + field :button_text_color, -> { String }, optional: false, nullable: true + + field :container_radius, -> { String }, optional: false, nullable: true + + field :font_family, -> { Whop_sdk::Types::CheckoutSessionBrandingFontFamily }, optional: false, nullable: true + + field :font_url, -> { String }, optional: false, nullable: true + + field :input_radius, -> { String }, optional: false, nullable: true + + field :resolved_font_family, -> { String }, optional: false, nullable: true + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_branding_border_style.rb b/lib/whop_sdk/types/checkout_session_branding_border_style.rb new file mode 100644 index 00000000..16500940 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_branding_border_style.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBrandingBorderStyle + extend Whop_sdk::Internal::Types::Enum + + ROUNDED = "rounded" + PILL = "pill" + RECTANGULAR = "rectangular" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_branding_font_family.rb b/lib/whop_sdk/types/checkout_session_branding_font_family.rb new file mode 100644 index 00000000..7a47bcc0 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_branding_font_family.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBrandingFontFamily + extend Whop_sdk::Internal::Types::Enum + + SYSTEM = "system" + ROBOTO = "roboto" + OPEN_SANS = "open_sans" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown.rb b/lib/whop_sdk/types/checkout_session_breakdown.rb new file mode 100644 index 00000000..5ca32d16 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBreakdown < Internal::Types::Model + field :adjustments, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionBreakdownAdjustment] }, optional: false, nullable: false + + field :currency, -> { Whop_sdk::Types::CheckoutSessionBreakdownCurrency }, optional: false, nullable: false + + field :display, -> { Whop_sdk::Types::CheckoutSessionBreakdownDisplay }, optional: false, nullable: false + + field :lines, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionBreakdownLine] }, optional: false, nullable: false + + field :subtotal, -> { Whop_sdk::Types::Money }, optional: false, nullable: false + + field :total, -> { Whop_sdk::Types::Money }, optional: false, nullable: false + + field :upcoming, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionBreakdownUpcoming] }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_adjustment.rb b/lib/whop_sdk/types/checkout_session_breakdown_adjustment.rb new file mode 100644 index 00000000..a63b386a --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_adjustment.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBreakdownAdjustment < Internal::Types::Model + field :amount, -> { Whop_sdk::Types::Money }, optional: false, nullable: true + + field :applied, -> { Whop_sdk::Types::CheckoutSessionBreakdownAdjustmentApplied }, optional: false, nullable: false + + field :kind, -> { Whop_sdk::Types::CheckoutSessionBreakdownAdjustmentKind }, optional: false, nullable: false + + field :label, -> { String }, optional: false, nullable: false + + field :rate, -> { String }, optional: true, nullable: false + + field :status, -> { Whop_sdk::Types::CheckoutSessionBreakdownAdjustmentStatus }, optional: true, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_adjustment_applied.rb b/lib/whop_sdk/types/checkout_session_breakdown_adjustment_applied.rb new file mode 100644 index 00000000..3dff2d15 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_adjustment_applied.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBreakdownAdjustmentApplied + extend Whop_sdk::Internal::Types::Enum + + ADDED = "added" + INCLUDED = "included" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_adjustment_kind.rb b/lib/whop_sdk/types/checkout_session_breakdown_adjustment_kind.rb new file mode 100644 index 00000000..3e330870 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_adjustment_kind.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBreakdownAdjustmentKind + extend Whop_sdk::Internal::Types::Enum + + DISCOUNT = "discount" + BUYER_FEE = "buyer_fee" + TAX = "tax" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_adjustment_status.rb b/lib/whop_sdk/types/checkout_session_breakdown_adjustment_status.rb new file mode 100644 index 00000000..f252ebc8 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_adjustment_status.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBreakdownAdjustmentStatus + extend Whop_sdk::Internal::Types::Enum + + PENDING = "pending" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_currency.rb b/lib/whop_sdk/types/checkout_session_breakdown_currency.rb new file mode 100644 index 00000000..dc8561f2 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_currency.rb @@ -0,0 +1,100 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBreakdownCurrency + extend Whop_sdk::Internal::Types::Enum + + USD = "usd" + SGD = "sgd" + INR = "inr" + AUD = "aud" + BRL = "brl" + CAD = "cad" + DKK = "dkk" + EUR = "eur" + NOK = "nok" + GBP = "gbp" + SEK = "sek" + CHF = "chf" + HKD = "hkd" + HUF = "huf" + JPY = "jpy" + MXN = "mxn" + MYR = "myr" + PLN = "pln" + CZK = "czk" + NZD = "nzd" + AED = "aed" + ETH = "eth" + APE = "ape" + COP = "cop" + RON = "ron" + THB = "thb" + BGN = "bgn" + IDR = "idr" + DOP = "dop" + PHP = "php" + TRY = "try" + KRW = "krw" + TWD = "twd" + VND = "vnd" + PKR = "pkr" + CLP = "clp" + UYU = "uyu" + ARS = "ars" + ZAR = "zar" + DZD = "dzd" + TND = "tnd" + MAD = "mad" + KES = "kes" + KWD = "kwd" + JOD = "jod" + ALL = "all" + XCD = "xcd" + AMD = "amd" + BSD = "bsd" + BHD = "bhd" + BOB = "bob" + BAM = "bam" + KHR = "khr" + CRC = "crc" + XOF = "xof" + EGP = "egp" + ETB = "etb" + GMD = "gmd" + GHS = "ghs" + GTQ = "gtq" + GYD = "gyd" + ILS = "ils" + JMD = "jmd" + MOP = "mop" + MGA = "mga" + MUR = "mur" + MDL = "mdl" + MNT = "mnt" + NAD = "nad" + NGN = "ngn" + MKD = "mkd" + OMR = "omr" + PYG = "pyg" + PEN = "pen" + QAR = "qar" + RWF = "rwf" + SAR = "sar" + RSD = "rsd" + LKR = "lkr" + TZS = "tzs" + TTD = "ttd" + UZS = "uzs" + RUB = "rub" + BTC = "btc" + CNY = "cny" + USDT = "usdt" + KZT = "kzt" + AWG = "awg" + WHOP_USD = "whop_usd" + XAU = "xau" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_display.rb b/lib/whop_sdk/types/checkout_session_breakdown_display.rb new file mode 100644 index 00000000..abcf67d1 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_display.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBreakdownDisplay < Internal::Types::Model + field :headline, -> { Whop_sdk::Types::CheckoutSessionBreakdownDisplayHeadline }, optional: false, nullable: false + + field :sections, -> { Whop_sdk::Types::CheckoutSessionBreakdownDisplaySections }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_display_headline.rb b/lib/whop_sdk/types/checkout_session_breakdown_display_headline.rb new file mode 100644 index 00000000..8f718b56 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_display_headline.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBreakdownDisplayHeadline < Internal::Types::Model + field :amount, -> { Whop_sdk::Types::Money }, optional: false, nullable: true + + field :context, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionBreakdownDisplayRow] }, optional: false, nullable: false + + field :free_until, -> { String }, optional: false, nullable: true + + field :kind, -> { Whop_sdk::Types::CheckoutSessionBreakdownDisplayHeadlineKind }, optional: false, nullable: false + + field :original_amount, -> { Whop_sdk::Types::Money }, optional: false, nullable: true + + field :text, -> { String }, optional: false, nullable: false + + field :trial_days, -> { Integer }, optional: false, nullable: true + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_display_headline_kind.rb b/lib/whop_sdk/types/checkout_session_breakdown_display_headline_kind.rb new file mode 100644 index 00000000..0376d03a --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_display_headline_kind.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBreakdownDisplayHeadlineKind + extend Whop_sdk::Internal::Types::Enum + + AMOUNT = "amount" + TRIAL = "trial" + FREE = "free" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_display_row.rb b/lib/whop_sdk/types/checkout_session_breakdown_display_row.rb new file mode 100644 index 00000000..3a3aa318 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_display_row.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBreakdownDisplayRow < Internal::Types::Model + field :amount, -> { Whop_sdk::Types::Money }, optional: true, nullable: false + + field :detail, -> { Whop_sdk::Types::CheckoutSessionBreakdownDisplayRowDetail }, optional: true, nullable: false + + field :kind, -> { Whop_sdk::Types::CheckoutSessionBreakdownDisplayRowKind }, optional: false, nullable: false + + field :label, -> { String }, optional: true, nullable: false + + field :status, -> { Whop_sdk::Types::CheckoutSessionBreakdownDisplayRowStatus }, optional: true, nullable: false + + field :text, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_display_row_detail.rb b/lib/whop_sdk/types/checkout_session_breakdown_display_row_detail.rb new file mode 100644 index 00000000..3c73fe5c --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_display_row_detail.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBreakdownDisplayRowDetail < Internal::Types::Model + field :access_days, -> { Integer }, optional: true, nullable: false + + field :access_until, -> { String }, optional: true, nullable: false + + field :applied, -> { Whop_sdk::Types::CheckoutSessionBreakdownDisplayRowDetailApplied }, optional: true, nullable: false + + field :charge_at, -> { String }, optional: true, nullable: false + + field :code, -> { String }, optional: true, nullable: false + + field :initial_fee, -> { Whop_sdk::Types::Money }, optional: true, nullable: false + + field :interval_days, -> { Integer }, optional: true, nullable: false + + field :invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :paid_trial, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :rate, -> { String }, optional: true, nullable: false + + field :remaining_payments, -> { Integer }, optional: true, nullable: false + + field :total_payments, -> { Integer }, optional: true, nullable: false + + field :trial_days, -> { Integer }, optional: true, nullable: false + + field :without_tax, -> { Internal::Types::Boolean }, optional: true, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_display_row_detail_applied.rb b/lib/whop_sdk/types/checkout_session_breakdown_display_row_detail_applied.rb new file mode 100644 index 00000000..263dc9e3 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_display_row_detail_applied.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBreakdownDisplayRowDetailApplied + extend Whop_sdk::Internal::Types::Enum + + ADDED = "added" + INCLUDED = "included" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_display_row_kind.rb b/lib/whop_sdk/types/checkout_session_breakdown_display_row_kind.rb new file mode 100644 index 00000000..c1d4d1a9 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_display_row_kind.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBreakdownDisplayRowKind + extend Whop_sdk::Internal::Types::Enum + + THEN_STARTING = "then_starting" + THEN_AFTER_TRIAL = "then_after_trial" + DUE_TODAY = "due_today" + PERIOD = "period" + ONE_TIME_PAYMENT = "one_time_payment" + ACCESS_WINDOW = "access_window" + ACCESS_UNTIL = "access_until" + TRIAL_WINDOW = "trial_window" + WAITLIST_NOTICE = "waitlist_notice" + WAITLIST_TRIAL_NOTICE = "waitlist_trial_notice" + FREE_FOREVER = "free_forever" + TAX_INCLUDED = "tax_included" + PROMO_FREE_PERIOD = "promo_free_period" + INITIAL_FEE = "initial_fee" + RENEWAL_FEE = "renewal_fee" + TAX_TODAY = "tax_today" + TOTAL_DUE_TODAY = "total_due_today" + TOTAL_IF_ACCEPTED = "total_if_accepted" + TOTAL_DUE_STARTING = "total_due_starting" + TOTAL_AFTER_TRIAL = "total_after_trial" + POST_PROMO = "post_promo" + ITEM_SUBTOTAL = "item_subtotal" + SERVICE_FEE = "service_fee" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_display_row_status.rb b/lib/whop_sdk/types/checkout_session_breakdown_display_row_status.rb new file mode 100644 index 00000000..98c85438 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_display_row_status.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBreakdownDisplayRowStatus + extend Whop_sdk::Internal::Types::Enum + + PENDING = "pending" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_display_sections.rb b/lib/whop_sdk/types/checkout_session_breakdown_display_sections.rb new file mode 100644 index 00000000..b2d1f540 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_display_sections.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBreakdownDisplaySections < Internal::Types::Model + field :charges, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionBreakdownDisplayRow] }, optional: false, nullable: false + + field :fee_breakdown, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionBreakdownDisplayRow] }, optional: false, nullable: false + + field :line_items, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionBreakdownDisplayRow] }, optional: false, nullable: false + + field :totals, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionBreakdownDisplayRow] }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_line.rb b/lib/whop_sdk/types/checkout_session_breakdown_line.rb new file mode 100644 index 00000000..936d5e87 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_line.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBreakdownLine < Internal::Types::Model + field :amount, -> { Whop_sdk::Types::Money }, optional: false, nullable: false + + field :description, -> { String }, optional: false, nullable: false + + field :kind, -> { Whop_sdk::Types::CheckoutSessionBreakdownLineKind }, optional: false, nullable: false + + field :quantity, -> { Integer }, optional: false, nullable: false + + field :unit_amount, -> { Whop_sdk::Types::Money }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_line_kind.rb b/lib/whop_sdk/types/checkout_session_breakdown_line_kind.rb new file mode 100644 index 00000000..007ebbde --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_line_kind.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBreakdownLineKind + extend Whop_sdk::Internal::Types::Enum + + PLAN = "plan" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_upcoming.rb b/lib/whop_sdk/types/checkout_session_breakdown_upcoming.rb new file mode 100644 index 00000000..f16181b8 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_upcoming.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + # 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. + class CheckoutSessionBreakdownUpcoming < Internal::Types::Model + extend Whop_sdk::Internal::Types::Union + + discriminant :type + + member -> { Whop_sdk::Types::CheckoutSessionBreakdownUpcomingInstallments }, key: "INSTALLMENTS" + + member -> { Whop_sdk::Types::CheckoutSessionBreakdownUpcomingOneTime }, key: "ONE_TIME" + + member -> { Whop_sdk::Types::CheckoutSessionBreakdownUpcomingRecurring }, key: "RECURRING" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_upcoming_installments.rb b/lib/whop_sdk/types/checkout_session_breakdown_upcoming_installments.rb new file mode 100644 index 00000000..12f3af04 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_upcoming_installments.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBreakdownUpcomingInstallments < Internal::Types::Model + field :amount, -> { Whop_sdk::Types::Money }, optional: false, nullable: false + + field :charge_at, -> { String }, optional: false, nullable: false + + field :description, -> { String }, optional: false, nullable: false + + field :interval_days, -> { Integer }, optional: false, nullable: false + + field :post_promo_amount, -> { Whop_sdk::Types::Money }, optional: true, nullable: false + + field :remaining, -> { Integer }, optional: false, nullable: false + + field :trial_days, -> { Integer }, optional: true, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_upcoming_one_time.rb b/lib/whop_sdk/types/checkout_session_breakdown_upcoming_one_time.rb new file mode 100644 index 00000000..e04b79d4 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_upcoming_one_time.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBreakdownUpcomingOneTime < Internal::Types::Model + field :amount, -> { Whop_sdk::Types::Money }, optional: false, nullable: false + + field :charge_at, -> { String }, optional: false, nullable: false + + field :description, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_breakdown_upcoming_recurring.rb b/lib/whop_sdk/types/checkout_session_breakdown_upcoming_recurring.rb new file mode 100644 index 00000000..a1ba6f03 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_breakdown_upcoming_recurring.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionBreakdownUpcomingRecurring < Internal::Types::Model + field :amount, -> { Whop_sdk::Types::Money }, optional: false, nullable: false + + field :charge_at, -> { String }, optional: false, nullable: false + + field :description, -> { String }, optional: false, nullable: false + + field :interval_days, -> { Integer }, optional: false, nullable: false + + field :post_promo_amount, -> { Whop_sdk::Types::Money }, optional: true, nullable: false + + field :trial_days, -> { Integer }, optional: true, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_buyer_identity.rb b/lib/whop_sdk/types/checkout_session_buyer_identity.rb new file mode 100644 index 00000000..d1885ab5 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_buyer_identity.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBuyerIdentity + extend Whop_sdk::Internal::Types::Enum + + ATTRIBUTED = "attributed" + AUTHENTICATED = "authenticated" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_buyer_identity_method.rb b/lib/whop_sdk/types/checkout_session_buyer_identity_method.rb new file mode 100644 index 00000000..a4779bb6 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_buyer_identity_method.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionBuyerIdentityMethod + extend Whop_sdk::Internal::Types::Enum + + CONFIRMATION_TOKEN_EMAIL = "confirmation_token_email" + BUYER_EMAIL = "buyer_email" + SAVED_PAYMENT_METHOD = "saved_payment_method" + SESSION_INTENT = "session_intent" + POST_PURCHASE_CLAIM = "post_purchase_claim" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_complete_action.rb b/lib/whop_sdk/types/checkout_session_complete_action.rb new file mode 100644 index 00000000..4bed5886 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_complete_action.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionCompleteAction < Internal::Types::Model + field :blocking, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :client_secret, -> { String }, optional: false, nullable: false + + field :kind, -> { Whop_sdk::Types::CheckoutSessionCompleteActionKind }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_complete_action_kind.rb b/lib/whop_sdk/types/checkout_session_complete_action_kind.rb new file mode 100644 index 00000000..2d5251d8 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_complete_action_kind.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionCompleteActionKind + extend Whop_sdk::Internal::Types::Enum + + PAYMENT = "payment" + SETUP = "setup" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_confirm_error.rb b/lib/whop_sdk/types/checkout_session_confirm_error.rb new file mode 100644 index 00000000..ed8b0a90 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_confirm_error.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionConfirmError < Internal::Types::Model + field :code, -> { Whop_sdk::Types::CheckoutSessionConfirmErrorCode }, optional: false, nullable: false + + field :message, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_confirm_error_code.rb b/lib/whop_sdk/types/checkout_session_confirm_error_code.rb new file mode 100644 index 00000000..6deb391c --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_confirm_error_code.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionConfirmErrorCode + extend Whop_sdk::Internal::Types::Enum + + SESSION_EXPIRED = "session_expired" + SESSION_COMPLETED = "session_completed" + ATTESTATION_REQUIRED = "attestation_required" + QUOTE_EXPIRED = "quote_expired" + QUOTE_CHANGED = "quote_changed" + RATE_EXPIRED = "rate_expired" + TOKEN_INVALID = "token_invalid" + CONFIRM_IN_PROGRESS = "confirm_in_progress" + ENGINE_UNAVAILABLE = "engine_unavailable" + SELLER_UNAVAILABLE = "seller_unavailable" + PROMO_INVALID = "promo_invalid" + PAYMENT_METHOD_UNSUPPORTED = "payment_method_unsupported" + PAYMENT_METHOD_UNAVAILABLE = "payment_method_unavailable" + SHIPPING_ADDRESS_REQUIRED = "shipping_address_required" + CUSTOM_FIELD_INVALID = "custom_field_invalid" + PAYMENT_FAILED = "payment_failed" + WAITLIST_UNAVAILABLE = "waitlist_unavailable" + PURCHASES_DISABLED = "purchases_disabled" + PLAN_ARCHIVED = "plan_archived" + PRODUCT_ARCHIVED = "product_archived" + OUT_OF_STOCK = "out_of_stock" + CUSTOM_PASSWORD = "custom_password" + BLOCKED_COUNTRY = "blocked_country" + USER_SUSPENDED = "user_suspended" + USER_BANNED_FROM_WHOP = "user_banned_from_whop" + EMAIL_REQUIRED = "email_required" + FREE_PLAN_ALREADY_OWNED = "free_plan_already_owned" + WAITLIST_ENTRY_PENDING = "waitlist_entry_pending" + WAITLIST_ALREADY_MEMBER = "waitlist_already_member" + BUYER_INELIGIBLE = "buyer_ineligible" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_cta_label.rb b/lib/whop_sdk/types/checkout_session_cta_label.rb new file mode 100644 index 00000000..2c73f1db --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_cta_label.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionCtaLabel + extend Whop_sdk::Internal::Types::Enum + + ACCEPT_TRANSFER = "accept_transfer" + PAY = "pay" + CONTINUE = "continue" + START_TRIAL = "start_trial" + SUBSCRIBE = "subscribe" + JOIN_WAITLIST = "join_waitlist" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_custom_field.rb b/lib/whop_sdk/types/checkout_session_custom_field.rb new file mode 100644 index 00000000..4e6fc899 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_custom_field.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionCustomField < Internal::Types::Model + field :description, -> { String }, optional: false, nullable: true + + field :field_type, -> { Whop_sdk::Types::CheckoutSessionCustomFieldFieldType }, optional: false, nullable: false + + field :id, -> { String }, optional: false, nullable: false + + field :name, -> { String }, optional: false, nullable: false + + field :placeholder, -> { String }, optional: false, nullable: true + + field :required, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_custom_field_field_type.rb b/lib/whop_sdk/types/checkout_session_custom_field_field_type.rb new file mode 100644 index 00000000..81c5ad99 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_custom_field_field_type.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionCustomFieldFieldType + extend Whop_sdk::Internal::Types::Enum + + TEXT = "text" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_custom_field_response.rb b/lib/whop_sdk/types/checkout_session_custom_field_response.rb new file mode 100644 index 00000000..d3e78ba9 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_custom_field_response.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionCustomFieldResponse < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :value, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_entry.rb b/lib/whop_sdk/types/checkout_session_entry.rb new file mode 100644 index 00000000..8895f824 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_entry.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionEntry < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :status, -> { Whop_sdk::Types::CheckoutSessionEntryStatus }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_entry_status.rb b/lib/whop_sdk/types/checkout_session_entry_status.rb new file mode 100644 index 00000000..f3efa79c --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_entry_status.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionEntryStatus + extend Whop_sdk::Internal::Types::Enum + + REQUIRES_ACTION = "requires_action" + PROCESSING = "processing" + SUCCEEDED = "succeeded" + FAILED = "failed" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_item.rb b/lib/whop_sdk/types/checkout_session_item.rb new file mode 100644 index 00000000..bf570229 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_item.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionItem < Internal::Types::Model + field :description, -> { String }, optional: false, nullable: true + + field :expiration_days, -> { Integer }, optional: false, nullable: true + + field :headline, -> { String }, optional: false, nullable: true + + field :image_url, -> { String }, optional: false, nullable: true + + field :name, -> { String }, optional: false, nullable: false + + field :plan, -> { String }, optional: false, nullable: false + + field :quantity, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_mode.rb b/lib/whop_sdk/types/checkout_session_mode.rb new file mode 100644 index 00000000..186cee23 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_mode.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionMode + extend Whop_sdk::Internal::Types::Enum + + PAYMENT = "payment" + SETUP = "setup" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_next_action.rb b/lib/whop_sdk/types/checkout_session_next_action.rb new file mode 100644 index 00000000..7480a75d --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_next_action.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + # 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. + class CheckoutSessionNextAction < Internal::Types::Model + extend Whop_sdk::Internal::Types::Union + + discriminant :type + + member -> { Whop_sdk::Types::CheckoutSessionAuthenticateAction }, key: "AUTHENTICATE" + + member -> { Whop_sdk::Types::CheckoutSessionAwaitClaimAction }, key: "AWAIT_CLAIM" + + member -> { Whop_sdk::Types::CheckoutSessionCompleteAction }, key: "COMPLETE" + + member -> { Whop_sdk::Types::CheckoutSessionRedirectAction }, key: "REDIRECT" + + member -> { Whop_sdk::Types::CheckoutSessionUpgradeAuthenticationAction }, key: "UPGRADE_AUTHENTICATION" + + member -> { Whop_sdk::Types::CheckoutSessionVerifyPhoneAction }, key: "VERIFY_PHONE" + + member -> { Whop_sdk::Types::CheckoutSessionWaitForPaymentAction }, key: "WAIT_FOR_PAYMENT" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_payment.rb b/lib/whop_sdk/types/checkout_session_payment.rb new file mode 100644 index 00000000..07ddf512 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_payment.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionPayment < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :status, -> { Whop_sdk::Types::CheckoutSessionPaymentStatus }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_payment_status.rb b/lib/whop_sdk/types/checkout_session_payment_status.rb new file mode 100644 index 00000000..65a5fd15 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_payment_status.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionPaymentStatus + extend Whop_sdk::Internal::Types::Enum + + REQUIRES_ACTION = "requires_action" + PROCESSING = "processing" + SUCCEEDED = "succeeded" + FAILED = "failed" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_promo.rb b/lib/whop_sdk/types/checkout_session_promo.rb new file mode 100644 index 00000000..963ced11 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_promo.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionPromo < Internal::Types::Model + field :amount_off, -> { Integer }, optional: false, nullable: false + + field :code, -> { String }, optional: false, nullable: false + + field :currency, -> { Whop_sdk::Types::CheckoutSessionPromoCurrency }, optional: false, nullable: true + + field :duration, -> { Whop_sdk::Types::CheckoutSessionPromoDuration }, optional: false, nullable: false + + field :number_of_intervals, -> { Integer }, optional: false, nullable: true + + field :promo_type, -> { Whop_sdk::Types::CheckoutSessionPromoPromoType }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_promo_currency.rb b/lib/whop_sdk/types/checkout_session_promo_currency.rb new file mode 100644 index 00000000..adde8ad2 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_promo_currency.rb @@ -0,0 +1,100 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionPromoCurrency + extend Whop_sdk::Internal::Types::Enum + + USD = "usd" + SGD = "sgd" + INR = "inr" + AUD = "aud" + BRL = "brl" + CAD = "cad" + DKK = "dkk" + EUR = "eur" + NOK = "nok" + GBP = "gbp" + SEK = "sek" + CHF = "chf" + HKD = "hkd" + HUF = "huf" + JPY = "jpy" + MXN = "mxn" + MYR = "myr" + PLN = "pln" + CZK = "czk" + NZD = "nzd" + AED = "aed" + ETH = "eth" + APE = "ape" + COP = "cop" + RON = "ron" + THB = "thb" + BGN = "bgn" + IDR = "idr" + DOP = "dop" + PHP = "php" + TRY = "try" + KRW = "krw" + TWD = "twd" + VND = "vnd" + PKR = "pkr" + CLP = "clp" + UYU = "uyu" + ARS = "ars" + ZAR = "zar" + DZD = "dzd" + TND = "tnd" + MAD = "mad" + KES = "kes" + KWD = "kwd" + JOD = "jod" + ALL = "all" + XCD = "xcd" + AMD = "amd" + BSD = "bsd" + BHD = "bhd" + BOB = "bob" + BAM = "bam" + KHR = "khr" + CRC = "crc" + XOF = "xof" + EGP = "egp" + ETB = "etb" + GMD = "gmd" + GHS = "ghs" + GTQ = "gtq" + GYD = "gyd" + ILS = "ils" + JMD = "jmd" + MOP = "mop" + MGA = "mga" + MUR = "mur" + MDL = "mdl" + MNT = "mnt" + NAD = "nad" + NGN = "ngn" + MKD = "mkd" + OMR = "omr" + PYG = "pyg" + PEN = "pen" + QAR = "qar" + RWF = "rwf" + SAR = "sar" + RSD = "rsd" + LKR = "lkr" + TZS = "tzs" + TTD = "ttd" + UZS = "uzs" + RUB = "rub" + BTC = "btc" + CNY = "cny" + USDT = "usdt" + KZT = "kzt" + AWG = "awg" + WHOP_USD = "whop_usd" + XAU = "xau" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_promo_duration.rb b/lib/whop_sdk/types/checkout_session_promo_duration.rb new file mode 100644 index 00000000..43ddf7a2 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_promo_duration.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionPromoDuration + extend Whop_sdk::Internal::Types::Enum + + FOREVER = "forever" + ONCE = "once" + REPEATING = "repeating" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_promo_promo_type.rb b/lib/whop_sdk/types/checkout_session_promo_promo_type.rb new file mode 100644 index 00000000..50f8a5a1 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_promo_promo_type.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionPromoPromoType + extend Whop_sdk::Internal::Types::Enum + + PERCENTAGE = "percentage" + FLAT_AMOUNT = "flat_amount" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_quote.rb b/lib/whop_sdk/types/checkout_session_quote.rb new file mode 100644 index 00000000..2c330f9e --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_quote.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionQuote < Internal::Types::Model + field :base_amount, -> { Integer }, optional: false, nullable: false + + field :base_currency, -> { String }, optional: false, nullable: false + + field :breakdown, -> { Whop_sdk::Types::CheckoutSessionBreakdown }, optional: false, nullable: false + + field :currency, -> { String }, optional: false, nullable: false + + field :exchange_rate, -> { Integer }, optional: false, nullable: true + + field :expires_at, -> { String }, optional: false, nullable: false + + field :quoted_at, -> { String }, optional: false, nullable: false + + field :trial_skipped, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_redirect_action.rb b/lib/whop_sdk/types/checkout_session_redirect_action.rb new file mode 100644 index 00000000..61c14639 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_redirect_action.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionRedirectAction < Internal::Types::Model + field :blocking, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :destination_url, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_requirement.rb b/lib/whop_sdk/types/checkout_session_requirement.rb new file mode 100644 index 00000000..4581ebb3 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_requirement.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionRequirement < Internal::Types::Model + field :fields, -> { Internal::Types::Array[Whop_sdk::Types::CheckoutSessionCustomField] }, optional: false, nullable: true + + field :type, -> { Whop_sdk::Types::CheckoutSessionRequirementType }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_requirement_type.rb b/lib/whop_sdk/types/checkout_session_requirement_type.rb new file mode 100644 index 00000000..824cde37 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_requirement_type.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionRequirementType + extend Whop_sdk::Internal::Types::Enum + + CUSTOM_PASSWORD = "custom_password" + EMAIL = "email" + TERMS = "terms" + CUSTOM_FIELDS = "custom_fields" + SHIPPING_ADDRESS = "shipping_address" + PHONE_NUMBER = "phone_number" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_seller.rb b/lib/whop_sdk/types/checkout_session_seller.rb new file mode 100644 index 00000000..f128d621 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_seller.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionSeller < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :logo_url, -> { String }, optional: false, nullable: true + + field :redirect_purchase_url, -> { String }, optional: false, nullable: true + + field :route, -> { String }, optional: false, nullable: false + + field :terms, -> { Whop_sdk::Types::CheckoutSessionSellerTerms }, optional: false, nullable: false + + field :title, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_seller_terms.rb b/lib/whop_sdk/types/checkout_session_seller_terms.rb new file mode 100644 index 00000000..6d383e03 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_seller_terms.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionSellerTerms < Internal::Types::Model + field :eula_url, -> { String }, optional: false, nullable: true + + field :privacy_policy_url, -> { String }, optional: false, nullable: true + + field :required, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :return_policy_url, -> { String }, optional: false, nullable: true + + field :terms_url, -> { String }, optional: false, nullable: true + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_shipping_address.rb b/lib/whop_sdk/types/checkout_session_shipping_address.rb new file mode 100644 index 00000000..07a27430 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_shipping_address.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionShippingAddress < Internal::Types::Model + field :city, -> { String }, optional: true, nullable: false + + field :country, -> { String }, optional: true, nullable: false + + field :line1, -> { String }, optional: true, nullable: false + + field :line2, -> { String }, optional: true, nullable: false + + field :name, -> { String }, optional: true, nullable: false + + field :postal_code, -> { String }, optional: true, nullable: false + + field :state, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_status.rb b/lib/whop_sdk/types/checkout_session_status.rb new file mode 100644 index 00000000..5cc85e73 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_status.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionStatus + extend Whop_sdk::Internal::Types::Enum + + OPEN = "open" + COMPLETED = "completed" + EXPIRED = "expired" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_tax_behavior.rb b/lib/whop_sdk/types/checkout_session_tax_behavior.rb new file mode 100644 index 00000000..dc5a118c --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_tax_behavior.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionTaxBehavior + extend Whop_sdk::Internal::Types::Enum + + INCLUSIVE = "inclusive" + EXCLUSIVE = "exclusive" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_tax_id.rb b/lib/whop_sdk/types/checkout_session_tax_id.rb new file mode 100644 index 00000000..8f23bb72 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_tax_id.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionTaxID < Internal::Types::Model + field :type, -> { Whop_sdk::Types::CheckoutSessionTaxIDType }, optional: false, nullable: false + + field :value, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_tax_id_type.rb b/lib/whop_sdk/types/checkout_session_tax_id_type.rb new file mode 100644 index 00000000..cef281e8 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_tax_id_type.rb @@ -0,0 +1,123 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionTaxIDType + extend Whop_sdk::Internal::Types::Enum + + AD_NRT = "ad_nrt" + AO_TIN = "ao_tin" + AR_CUIT = "ar_cuit" + AL_TIN = "al_tin" + AM_TIN = "am_tin" + AW_TIN = "aw_tin" + AU_ABN = "au_abn" + AU_ARN = "au_arn" + EU_VAT = "eu_vat" + AZ_TIN = "az_tin" + BS_TIN = "bs_tin" + BH_VAT = "bh_vat" + BD_BIN = "bd_bin" + BB_TIN = "bb_tin" + BY_TIN = "by_tin" + BJ_IFU = "bj_ifu" + BO_TIN = "bo_tin" + BA_TIN = "ba_tin" + BR_CNPJ = "br_cnpj" + BR_CPF = "br_cpf" + BG_UIC = "bg_uic" + BF_IFU = "bf_ifu" + KH_TIN = "kh_tin" + CM_NIU = "cm_niu" + CA_BN = "ca_bn" + CA_GST_HST = "ca_gst_hst" + CA_PST_BC = "ca_pst_bc" + CA_PST_MB = "ca_pst_mb" + CA_PST_SK = "ca_pst_sk" + CA_QST = "ca_qst" + CV_NIF = "cv_nif" + CL_TIN = "cl_tin" + CN_TIN = "cn_tin" + CO_NIT = "co_nit" + CD_NIF = "cd_nif" + CR_TIN = "cr_tin" + HR_OIB = "hr_oib" + DO_RCN = "do_rcn" + EC_RUC = "ec_ruc" + EG_TIN = "eg_tin" + SV_NIT = "sv_nit" + ET_TIN = "et_tin" + EU_OSS_VAT = "eu_oss_vat" + GE_VAT = "ge_vat" + GH_TIN = "gh_tin" + DE_STN = "de_stn" + GB_VAT = "gb_vat" + GN_NIF = "gn_nif" + HK_BR = "hk_br" + HU_TIN = "hu_tin" + IS_VAT = "is_vat" + IN_GST = "in_gst" + ID_NPWP = "id_npwp" + IL_VAT = "il_vat" + JP_CN = "jp_cn" + JP_RN = "jp_rn" + JP_TRN = "jp_trn" + KZ_BIN = "kz_bin" + KE_PIN = "ke_pin" + KG_TIN = "kg_tin" + LA_TIN = "la_tin" + LI_UID = "li_uid" + LI_VAT = "li_vat" + MY_FRP = "my_frp" + MY_ITN = "my_itn" + MY_SST = "my_sst" + MR_NIF = "mr_nif" + MX_RFC = "mx_rfc" + MD_VAT = "md_vat" + ME_PIB = "me_pib" + MA_VAT = "ma_vat" + NP_PAN = "np_pan" + NZ_GST = "nz_gst" + NG_TIN = "ng_tin" + MK_VAT = "mk_vat" + NO_VAT = "no_vat" + NO_VOEC = "no_voec" + OM_VAT = "om_vat" + PE_RUC = "pe_ruc" + PH_TIN = "ph_tin" + PL_NIP = "pl_nip" + RO_TIN = "ro_tin" + RU_INN = "ru_inn" + RU_KPP = "ru_kpp" + SA_VAT = "sa_vat" + SN_NINEA = "sn_ninea" + RS_PIB = "rs_pib" + SG_GST = "sg_gst" + SG_UEN = "sg_uen" + SI_TIN = "si_tin" + ZA_VAT = "za_vat" + KR_BRN = "kr_brn" + ES_CIF = "es_cif" + CH_UID = "ch_uid" + CH_VAT = "ch_vat" + TW_VAT = "tw_vat" + TJ_TIN = "tj_tin" + TZ_VAT = "tz_vat" + TH_VAT = "th_vat" + TR_TIN = "tr_tin" + UG_TIN = "ug_tin" + UA_VAT = "ua_vat" + AE_TRN = "ae_trn" + US_EIN = "us_ein" + UY_RUC = "uy_ruc" + UZ_TIN = "uz_tin" + UZ_VAT = "uz_vat" + VE_RIF = "ve_rif" + VN_TIN = "vn_tin" + ZM_TIN = "zm_tin" + ZW_TIN = "zw_tin" + SR_FIN = "sr_fin" + XI_VAT = "xi_vat" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_three_ds_level.rb b/lib/whop_sdk/types/checkout_session_three_ds_level.rb new file mode 100644 index 00000000..a44cdabc --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_three_ds_level.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionThreeDsLevel + extend Whop_sdk::Internal::Types::Enum + + MANDATE_CHALLENGE = "mandate_challenge" + FRICTIONLESS = "frictionless" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_transfer.rb b/lib/whop_sdk/types/checkout_session_transfer.rb new file mode 100644 index 00000000..f229d028 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_transfer.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionTransfer < Internal::Types::Model + field :code, -> { String }, optional: false, nullable: false + + field :origin_expires_at, -> { String }, optional: false, nullable: true + + field :origin_renewal_period_end, -> { String }, optional: false, nullable: true + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_upgrade_authentication_action.rb b/lib/whop_sdk/types/checkout_session_upgrade_authentication_action.rb new file mode 100644 index 00000000..a0215d9f --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_upgrade_authentication_action.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionUpgradeAuthenticationAction < Internal::Types::Model + field :blocking, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :email, -> { String }, optional: false, nullable: false + + field :session_intent_id, -> { String }, optional: false, nullable: true + + field :sign_in_intent, -> { Whop_sdk::Types::CheckoutSessionUpgradeAuthenticationActionSignInIntent }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_upgrade_authentication_action_sign_in_intent.rb b/lib/whop_sdk/types/checkout_session_upgrade_authentication_action_sign_in_intent.rb new file mode 100644 index 00000000..5831e31b --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_upgrade_authentication_action_sign_in_intent.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module CheckoutSessionUpgradeAuthenticationActionSignInIntent + extend Whop_sdk::Internal::Types::Enum + + PAYMENT = "payment" + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_verify_phone_action.rb b/lib/whop_sdk/types/checkout_session_verify_phone_action.rb new file mode 100644 index 00000000..19214f79 --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_verify_phone_action.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionVerifyPhoneAction < Internal::Types::Model + field :blocking, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/checkout_session_wait_for_payment_action.rb b/lib/whop_sdk/types/checkout_session_wait_for_payment_action.rb new file mode 100644 index 00000000..7e29002d --- /dev/null +++ b/lib/whop_sdk/types/checkout_session_wait_for_payment_action.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class CheckoutSessionWaitForPaymentAction < Internal::Types::Model + field :blocking, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :poll_after_seconds, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/dispute_evidence_document.rb b/lib/whop_sdk/types/dispute_evidence_document.rb index 1f207083..a53c8599 100644 --- a/lib/whop_sdk/types/dispute_evidence_document.rb +++ b/lib/whop_sdk/types/dispute_evidence_document.rb @@ -5,13 +5,33 @@ module Types class DisputeEvidenceDocument < Internal::Types::Model field :content_type, -> { Whop_sdk::Types::DisputeEvidenceDocumentContentType }, optional: false, nullable: true + field :created_at, -> { String }, optional: false, nullable: false + field :document_type, -> { Whop_sdk::Types::DisputeEvidenceDocumentDocumentType }, optional: false, nullable: false field :filename, -> { String }, optional: false, nullable: true field :id, -> { String }, optional: false, nullable: false + field :multipart_chunk_size, -> { Integer }, optional: true, nullable: false + + field :multipart_upload_id, -> { String }, optional: true, nullable: false + + field :multipart_upload_urls, -> { Internal::Types::Array[Whop_sdk::Types::FileMultipartURL] }, optional: true, nullable: false + + field :object, -> { String }, optional: false, nullable: false + + field :size, -> { Integer }, optional: false, nullable: true + + field :upload_headers, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + + field :upload_status, -> { Whop_sdk::Types::DisputeEvidenceDocumentUploadStatus }, optional: false, nullable: false + + field :upload_url, -> { String }, optional: true, nullable: false + field :url, -> { String }, optional: false, nullable: true + + field :visibility, -> { Whop_sdk::Types::DisputeEvidenceDocumentVisibility }, optional: false, nullable: false end end end diff --git a/lib/whop_sdk/types/dispute_evidence_document_upload_status.rb b/lib/whop_sdk/types/dispute_evidence_document_upload_status.rb new file mode 100644 index 00000000..fdeab4e7 --- /dev/null +++ b/lib/whop_sdk/types/dispute_evidence_document_upload_status.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module DisputeEvidenceDocumentUploadStatus + extend Whop_sdk::Internal::Types::Enum + + PENDING = "pending" + PROCESSING = "processing" + READY = "ready" + FAILED = "failed" + end + end +end diff --git a/lib/whop_sdk/types/dispute_evidence_document_visibility.rb b/lib/whop_sdk/types/dispute_evidence_document_visibility.rb new file mode 100644 index 00000000..edfbd1fb --- /dev/null +++ b/lib/whop_sdk/types/dispute_evidence_document_visibility.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module DisputeEvidenceDocumentVisibility + extend Whop_sdk::Internal::Types::Enum + + PUBLIC = "public" + PRIVATE = "private" + end + end +end diff --git a/lib/whop_sdk/types/export_resource.rb b/lib/whop_sdk/types/export_resource.rb index 2aea2e3b..35662adc 100644 --- a/lib/whop_sdk/types/export_resource.rb +++ b/lib/whop_sdk/types/export_resource.rb @@ -17,8 +17,6 @@ module ExportResource DISPUTES = "disputes" EVENTS = "events" FINANCIAL_ACTIVITY = "financial-activity" - MEMBERS = "members" - MEMBERSHIPS = "memberships" PAYOUT_METHODS = "payout_methods" PAYOUTS = "payouts" PEOPLE = "people" @@ -30,8 +28,10 @@ module ExportResource TEAM_MEMBERS = "team_members" TRANSFERS = "transfers" WEBHOOKS = "webhooks" + MEMBERS = "members" RECEIPTS = "receipts" UNCLAIMED_MEMBERSHIPS = "unclaimed_memberships" + MEMBERSHIPS = "memberships" TRACKING_LINKS = "tracking_links" PROMO_CODES = "promo_codes" RESOLUTIONS = "resolutions" diff --git a/lib/whop_sdk/types/file.rb b/lib/whop_sdk/types/file.rb index c8e91b18..d1533379 100644 --- a/lib/whop_sdk/types/file.rb +++ b/lib/whop_sdk/types/file.rb @@ -2,17 +2,30 @@ module Whop_sdk module Types - # A file that has been uploaded or is pending upload. class File < Internal::Types::Model field :content_type, -> { String }, optional: false, nullable: true + field :created_at, -> { String }, optional: false, nullable: false + field :filename, -> { String }, optional: false, nullable: true field :id, -> { String }, optional: false, nullable: false - field :size, -> { String }, optional: false, nullable: true + field :multipart_chunk_size, -> { Integer }, optional: true, nullable: false + + field :multipart_upload_id, -> { String }, optional: true, nullable: false + + field :multipart_upload_urls, -> { Internal::Types::Array[Whop_sdk::Types::FileMultipartURL] }, optional: true, nullable: false + + field :object, -> { String }, optional: false, nullable: false + + field :size, -> { Integer }, optional: false, nullable: true + + field :upload_headers, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + + field :upload_status, -> { Whop_sdk::Types::FileUploadStatus }, optional: false, nullable: false - field :upload_status, -> { Whop_sdk::Types::UploadStatuses }, optional: false, nullable: false + field :upload_url, -> { String }, optional: true, nullable: false field :url, -> { String }, optional: false, nullable: true diff --git a/lib/whop_sdk/types/file_multipart_url.rb b/lib/whop_sdk/types/file_multipart_url.rb new file mode 100644 index 00000000..20182bc1 --- /dev/null +++ b/lib/whop_sdk/types/file_multipart_url.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class FileMultipartURL < Internal::Types::Model + field :part_number, -> { Integer }, optional: false, nullable: false + + field :url, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/file_upload_status.rb b/lib/whop_sdk/types/file_upload_status.rb new file mode 100644 index 00000000..d778211c --- /dev/null +++ b/lib/whop_sdk/types/file_upload_status.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module FileUploadStatus + extend Whop_sdk::Internal::Types::Enum + + PENDING = "pending" + PROCESSING = "processing" + READY = "ready" + FAILED = "failed" + end + end +end diff --git a/lib/whop_sdk/types/forum_experience.rb b/lib/whop_sdk/types/forum_experience.rb index 1b19d596..7c98c985 100644 --- a/lib/whop_sdk/types/forum_experience.rb +++ b/lib/whop_sdk/types/forum_experience.rb @@ -6,6 +6,8 @@ module Types class ForumExperience < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :is_public, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/whop_sdk/types/forum_list_item_experience.rb b/lib/whop_sdk/types/forum_list_item_experience.rb index 399584e7..8cc658ba 100644 --- a/lib/whop_sdk/types/forum_list_item_experience.rb +++ b/lib/whop_sdk/types/forum_list_item_experience.rb @@ -6,6 +6,8 @@ module Types class ForumListItemExperience < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :is_public, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/whop_sdk/types/ledger_activity.rb b/lib/whop_sdk/types/ledger_activity.rb index 7b84144a..dc7aeb3a 100644 --- a/lib/whop_sdk/types/ledger_activity.rb +++ b/lib/whop_sdk/types/ledger_activity.rb @@ -21,6 +21,8 @@ class LedgerActivity < Internal::Types::Model field :object, -> { Whop_sdk::Types::LedgerActivityObject }, optional: false, nullable: false + field :payment, -> { Whop_sdk::Types::LedgerActivityPayment }, optional: true, nullable: false + field :posted_at, -> { String }, optional: false, nullable: false field :resource, -> { Whop_sdk::Types::LedgerActivityResource }, optional: false, nullable: true diff --git a/lib/whop_sdk/types/ledger_activity_line_type.rb b/lib/whop_sdk/types/ledger_activity_line_type.rb index 9879c946..ff953f72 100644 --- a/lib/whop_sdk/types/ledger_activity_line_type.rb +++ b/lib/whop_sdk/types/ledger_activity_line_type.rb @@ -18,6 +18,8 @@ module LedgerActivityLineType AIRDROP_REVERSAL = "airdrop_reversal" APPLICATION_FEE = "application_fee" APPLICATION_FEE_PAYOUT = "application_fee_payout" + BALANCE_RESERVATION = "balance_reservation" + BALANCE_RESERVATION_REVERSAL = "balance_reservation_reversal" BANK_TRANSFER = "bank_transfer" BILLING_PERCENTAGE_FEE = "billing_percentage_fee" BUYER_FEE = "buyer_fee" diff --git a/lib/whop_sdk/types/ledger_activity_payment.rb b/lib/whop_sdk/types/ledger_activity_payment.rb new file mode 100644 index 00000000..842444e0 --- /dev/null +++ b/lib/whop_sdk/types/ledger_activity_payment.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class LedgerActivityPayment < Internal::Types::Model + field :amount, -> { Whop_sdk::Types::Money }, optional: false, nullable: true + + field :card_brand, -> { String }, optional: false, nullable: true + + field :card_last4, -> { String }, optional: false, nullable: true + + field :created_at, -> { String }, optional: false, nullable: false + + field :id, -> { String }, optional: false, nullable: false + + field :object, -> { Whop_sdk::Types::LedgerActivityPaymentObject }, optional: false, nullable: false + + field :payment_method_type, -> { String }, optional: false, nullable: true + + field :payment_processor, -> { String }, optional: false, nullable: true + end + end +end diff --git a/lib/whop_sdk/types/ledger_activity_payment_object.rb b/lib/whop_sdk/types/ledger_activity_payment_object.rb new file mode 100644 index 00000000..8443029a --- /dev/null +++ b/lib/whop_sdk/types/ledger_activity_payment_object.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module LedgerActivityPaymentObject + extend Whop_sdk::Internal::Types::Enum + + PAYMENT = "payment" + end + end +end diff --git a/lib/whop_sdk/types/ledger_activity_source.rb b/lib/whop_sdk/types/ledger_activity_source.rb index e2f33275..5917ec6c 100644 --- a/lib/whop_sdk/types/ledger_activity_source.rb +++ b/lib/whop_sdk/types/ledger_activity_source.rb @@ -6,6 +6,8 @@ module Types class LedgerActivitySource < Internal::Types::Model field :amount_float, -> { Integer }, optional: true, nullable: false + field :card_brand, -> { String }, optional: true, nullable: false + field :chain, -> { String }, optional: true, nullable: false field :claim_url, -> { String }, optional: true, nullable: false @@ -24,6 +26,12 @@ class LedgerActivitySource < Internal::Types::Model field :payer_name, -> { String }, optional: true, nullable: false + field :payment_amount, -> { Whop_sdk::Types::Money }, optional: true, nullable: false + + field :payment_method_type, -> { String }, optional: true, nullable: false + + field :payment_processor, -> { String }, optional: true, nullable: false + field :payout_destination, -> { Whop_sdk::Types::LedgerActivitySourcePayoutDestination }, optional: true, nullable: false field :payout_token_nickname, -> { String }, optional: true, nullable: false diff --git a/lib/whop_sdk/types/product.rb b/lib/whop_sdk/types/product.rb index 772cfa12..507434ec 100644 --- a/lib/whop_sdk/types/product.rb +++ b/lib/whop_sdk/types/product.rb @@ -13,6 +13,8 @@ class Product < Internal::Types::Model field :custom_statement_descriptor, -> { String }, optional: false, nullable: true + field :default_plan, -> { Whop_sdk::Types::ProductPublicPlan }, optional: false, nullable: true + field :description, -> { String }, optional: false, nullable: true field :external_identifier, -> { String }, optional: false, nullable: true diff --git a/lib/whop_sdk/types/product_list_item.rb b/lib/whop_sdk/types/product_list_item.rb index bf8cc976..05c53fd2 100644 --- a/lib/whop_sdk/types/product_list_item.rb +++ b/lib/whop_sdk/types/product_list_item.rb @@ -3,8 +3,14 @@ module Whop_sdk module Types class ProductListItem < Internal::Types::Model + field :account, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: true + field :created_at, -> { String }, optional: false, nullable: false + field :default_plan, -> { Whop_sdk::Types::ProductPublicPlan }, optional: false, nullable: true + + field :description, -> { String }, optional: false, nullable: true + field :external_identifier, -> { String }, optional: false, nullable: true field :gallery_images, -> { Internal::Types::Array[Whop_sdk::Types::ProductGalleryImage] }, optional: false, nullable: false diff --git a/lib/whop_sdk/types/product_public_plan.rb b/lib/whop_sdk/types/product_public_plan.rb new file mode 100644 index 00000000..e65fdc55 --- /dev/null +++ b/lib/whop_sdk/types/product_public_plan.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + class ProductPublicPlan < Internal::Types::Model + field :billing_period, -> { Integer }, optional: false, nullable: true + + field :expiration_days, -> { Integer }, optional: false, nullable: true + + field :id, -> { String }, optional: false, nullable: false + + field :initial_price, -> { Whop_sdk::Types::Money }, optional: false, nullable: false + + field :plan_type, -> { Whop_sdk::Types::ProductPublicPlanPlanType }, optional: false, nullable: false + + field :renewal_price, -> { Whop_sdk::Types::Money }, optional: false, nullable: false + + field :title, -> { String }, optional: false, nullable: true + + field :unlimited_stock, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :visibility, -> { Whop_sdk::Types::ProductPublicPlanVisibility }, optional: false, nullable: false + end + end +end diff --git a/lib/whop_sdk/types/product_public_plan_plan_type.rb b/lib/whop_sdk/types/product_public_plan_plan_type.rb new file mode 100644 index 00000000..29929dbe --- /dev/null +++ b/lib/whop_sdk/types/product_public_plan_plan_type.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module ProductPublicPlanPlanType + extend Whop_sdk::Internal::Types::Enum + + RENEWAL = "renewal" + ONE_TIME = "one_time" + end + end +end diff --git a/lib/whop_sdk/types/product_public_plan_visibility.rb b/lib/whop_sdk/types/product_public_plan_visibility.rb new file mode 100644 index 00000000..2385d154 --- /dev/null +++ b/lib/whop_sdk/types/product_public_plan_visibility.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Whop_sdk + module Types + module ProductPublicPlanVisibility + extend Whop_sdk::Internal::Types::Enum + + VISIBLE = "visible" + HIDDEN = "hidden" + ARCHIVED = "archived" + QUICK_LINK = "quick_link" + end + end +end diff --git a/lib/whop_sdk/types/transfer.rb b/lib/whop_sdk/types/transfer.rb deleted file mode 100644 index d357f32e..00000000 --- a/lib/whop_sdk/types/transfer.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -module Whop_sdk - module Types - class Transfer < Internal::Types::Model - field :origin, -> { Whop_sdk::Types::TransferOrigin }, optional: true, nullable: false - - field :destination, -> { Whop_sdk::Types::TransferDestination }, optional: true, nullable: false - end - end -end diff --git a/lib/whop_sdk/types/transfer_destination.rb b/lib/whop_sdk/types/transfer_destination.rb deleted file mode 100644 index 1ab1c221..00000000 --- a/lib/whop_sdk/types/transfer_destination.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -module Whop_sdk - module Types - class TransferDestination < Internal::Types::Model - extend Whop_sdk::Internal::Types::Union - - discriminant :typename - - member -> { Whop_sdk::Types::TransferDestinationUser }, key: "USER" - - member -> { Whop_sdk::Types::TransferDestinationCompany }, key: "COMPANY" - end - end -end diff --git a/lib/whop_sdk/types/transfer_destination_company.rb b/lib/whop_sdk/types/transfer_destination_company.rb deleted file mode 100644 index d92d02f5..00000000 --- a/lib/whop_sdk/types/transfer_destination_company.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Whop_sdk - module Types - # A company on Whop. - class TransferDestinationCompany < Internal::Types::Model - field :id, -> { String }, optional: false, nullable: false - - field :route, -> { String }, optional: false, nullable: false - - field :title, -> { String }, optional: false, nullable: false - end - end -end diff --git a/lib/whop_sdk/types/transfer_destination_user.rb b/lib/whop_sdk/types/transfer_destination_user.rb deleted file mode 100644 index fb7f601e..00000000 --- a/lib/whop_sdk/types/transfer_destination_user.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Whop_sdk - module Types - # A user account on Whop. - class TransferDestinationUser < Internal::Types::Model - field :id, -> { String }, optional: false, nullable: false - - field :name, -> { String }, optional: false, nullable: true - - field :username, -> { String }, optional: false, nullable: false - end - end -end diff --git a/lib/whop_sdk/types/transfer_origin.rb b/lib/whop_sdk/types/transfer_origin.rb deleted file mode 100644 index cac6ae94..00000000 --- a/lib/whop_sdk/types/transfer_origin.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -module Whop_sdk - module Types - class TransferOrigin < Internal::Types::Model - extend Whop_sdk::Internal::Types::Union - - discriminant :typename - - member -> { Whop_sdk::Types::TransferOriginUser }, key: "USER" - - member -> { Whop_sdk::Types::TransferOriginCompany }, key: "COMPANY" - end - end -end diff --git a/lib/whop_sdk/types/transfer_origin_user.rb b/lib/whop_sdk/types/transfer_origin_user.rb deleted file mode 100644 index 51cf120c..00000000 --- a/lib/whop_sdk/types/transfer_origin_user.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Whop_sdk - module Types - # A user account on Whop. - class TransferOriginUser < Internal::Types::Model - field :id, -> { String }, optional: false, nullable: false - - field :name, -> { String }, optional: false, nullable: true - - field :username, -> { String }, optional: false, nullable: false - end - end -end diff --git a/reference.md b/reference.md index 63159671..645b8c2d 100644 --- a/reference.md +++ b/reference.md @@ -2743,6 +2743,14 @@ client.ad_groups.search_targeting_options(platform: "meta")
+**special_ad_categories:** `Whop_sdk::AdGroups::Types::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:** `Whop_sdk::AdGroups::RequestOptions`
@@ -6303,6 +6311,14 @@ client.apps.list
+**recommended:** `Internal::Types::Boolean` — 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:** `String` — A search string matched against app names.
@@ -10353,6 +10369,173 @@ client.checkout_configurations.delete(id: "id")
+ +
+ + +## Checkout Sessions +
client.checkout_sessions.create(request) -> Whop_sdk::Types::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 + +
+
+ +
+
+ +```ruby +client.checkout_sessions.create +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**affiliate_code:** `String` — The affiliate this checkout is attributed to. Write-once — set it here or never. + +
+
+ +
+
+ +**attribution:** `Internal::Types::Hash[String, Object]` — 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:** `String` — 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:** `Internal::Types::Array[Whop_sdk::CheckoutSessions::Types::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:** `String` — 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:** `Internal::Types::Hash[String, String]` — Free-form string-to-string map, at most 40 keys. Whop never interprets it. + +
+
+ +
+
+ +**mode:** `Whop_sdk::CheckoutSessions::Types::CreateCheckoutSessionsRequestMode` — Defaults to the checkout configuration's mode, then `payment`. `setup` sessions are not yet available and are refused. + +
+
+ +
+
+ +**origin:** `String` — 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:** `String` — The product route a vanity `link` belongs to — the `pageRoute` in the seller's shared URL. + +
+
+ +
+
+ +**password:** `String` — 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:** `String` — A promo code to apply to the quote. + +
+
+ +
+
+ +**return_url:** `String` — Where the buyer lands after an off-site payment step. Absolute https URL without credentials. + +
+
+ +
+
+ +**top_up_membership:** `String` — 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:** `Internal::Types::Hash[String, String]` — First-party tracking-link candidates keyed by account ID. Ignored outside Whop's hosted checkout; an explicit `attribution.tracking_link_id` wins. + +
+
+ +
+
+ +**request_options:** `Whop_sdk::CheckoutSessions::RequestOptions` + +
+
+
+
+ +
@@ -14180,7 +14363,7 @@ client.disputes.update_evidence_dispute(id: "dspt_xxxxxxxxxxxxx")
-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.
@@ -16851,7 +17034,7 @@ client.exports.create(resource: "ad_campaigns")
-**filters:** `Internal::Types::Hash[String, Object]` — 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:** `Internal::Types::Hash[String, Object]` — 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.
@@ -17225,7 +17408,7 @@ client.fee_markups.delete(id: "id") ## Files -
client.files.create(request) -> Whop_sdk::Files::Types::CreateFilesResponse +
client.files.create(request) -> Whop_sdk::Types::File
@@ -17237,7 +17420,7 @@ client.fee_markups.delete(id: "id")
-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.
@@ -17252,7 +17435,7 @@ Create a new file record and receive a presigned URL for uploading content to S3
```ruby -client.files.create(filename: "filename") +client.files.create(filename: "terms.pdf") ```
@@ -17267,7 +17450,23 @@ client.files.create(filename: "filename")
-**filename:** `String` — The name of the file including its extension (e.g., "photo.png" or "document.pdf"). +**byte_size:** `Integer` — 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). + +
+
+ +
+
+ +**filename:** `String` — The name of the file including its extension, e.g. `terms.pdf`. + +
+
+ +
+
+ +**multipart:** `Internal::Types::Boolean` — Upload the file in 5MB parts. Required for files larger than 5GB; useful above ~100MB. The file must be larger than 5MB.
@@ -17275,7 +17474,7 @@ client.files.create(filename: "filename")
-**visibility:** `Whop_sdk::Types::FileVisibility` — Controls whether the file is publicly accessible via CDN or requires authentication. Defaults to private. +**visibility:** `Whop_sdk::Files::Types::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`.
@@ -17307,7 +17506,7 @@ client.files.create(filename: "filename")
-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.
@@ -17322,7 +17521,7 @@ Retrieves the details of an existing file.
```ruby -client.files.retrieve(id: "file_xxxxxxxxxxxxx") +client.files.retrieve(id: "id") ```
@@ -17337,7 +17536,92 @@ client.files.retrieve(id: "file_xxxxxxxxxxxxx")
-**id:** `String` — The unique identifier of the file to retrieve. +**id:** `String` — The unique identifier of the file, prefixed `file_`. + +
+
+ +
+
+ +**request_options:** `Whop_sdk::Files::RequestOptions` + +
+
+ + + + + + +
+ +
client.files.complete(id:, request) -> Whop_sdk::Types::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 + +
+
+ +
+
+ +```ruby +client.files.complete( + id: "id", + multipart_parts: [{ + etag: "etag-1", + part_number: 1 + }], + multipart_upload_id: "upload-id" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The unique identifier of the file, prefixed `file_`. + +
+
+ +
+
+ +**multipart_parts:** `Internal::Types::Array[Whop_sdk::Files::Types::CompleteFilesRequestMultipartPartsItem]` — Every uploaded part, in order. + +
+
+ +
+
+ +**multipart_upload_id:** `String` — The ID of the multipart upload, returned by Create File.
@@ -19218,7 +19502,7 @@ client.invoices.update(id: "inv_xxxxxxxxxxxxxx")
-**line_items:** `Internal::Types::Array[Whop_sdk::Invoices::Types::UpdateInvoicesRequestLineItemsItem]` — Line items that break down the invoice total. +**line_items:** `Internal::Types::Array[Whop_sdk::Invoices::Types::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.
@@ -24966,7 +25250,7 @@ client.permissions.list(resource_id: "resource_id")
-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.
@@ -24982,7 +25266,6 @@ Returns a paginated list of plans belonging to an account, with optional filteri ```ruby client.plans.list( - account_id: "account_id", release_methods: ["buy_now"], visibilities: ["visible"], plan_types: ["renewal"], @@ -25002,7 +25285,7 @@ client.plans.list(
-**account_id:** `String` — The unique identifier of the account to list plans for. +**account_id:** `String` — The unique identifier of the account to list plans for. Required unless `product_ids` is provided for a public product-plan read.
@@ -25050,7 +25333,7 @@ client.plans.list(
-**product_ids:** `String` — Filter to only plans belonging to these product identifiers. +**product_ids:** `String` — 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.
@@ -25871,7 +26154,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.
@@ -25887,7 +26170,6 @@ Returns a paginated list of products belonging to an account. ```ruby client.products.list( - account_id: "account_id", visibilities: ["visible"], access_pass_types: ["regular"] ) @@ -25905,7 +26187,7 @@ client.products.list(
-**account_id:** `String` — The unique identifier of the account to list products for. +**account_id:** `String` — The unique identifier of the account to list products for. Omit to search the public marketplace.
@@ -25913,7 +26195,47 @@ client.products.list(
-**visibilities:** `String` — Filter to only products matching these visibility states. +**query:** `String` — Ranked search against product title and headline. Omit to browse by recency. + +
+
+ +
+
+ +**marketplace_category_route:** `String` — Only return marketplace products assigned to this category route, such as `trading`. + +
+
+ +
+
+ +**plan_types:** `Whop_sdk::Products::Types::ListProductsRequestPlanTypesItem` — Filter to products with a buyable plan of these billing models, such as `one_time` or `renewal`. + +
+
+ +
+
+ +**price_minimum:** `Integer` — Only return products whose advertised buyable plan has a displayed price of at least this amount. Recurring plans use renewal price. + +
+
+ +
+
+ +**price_maximum:** `Integer` — Only return products whose advertised buyable plan has a displayed price of at most this amount. Recurring plans use renewal price. + +
+
+ +
+
+ +**visibilities:** `String` — Filter to only products matching these visibility states. Ignored on the public marketplace list, which only returns visible products.
@@ -25945,7 +26267,7 @@ client.products.list(
-**order:** `String` — The field to sort results by. Defaults to created_at. +**order:** `String` — 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`.
@@ -25985,6 +26307,22 @@ client.products.list(
+**created_after:** `String` — Only return products created after this ISO 8601 timestamp. + +
+
+ +
+
+ +**created_before:** `String` — Only return products created before this ISO 8601 timestamp. + +
+
+ +
+
+ **request_options:** `Whop_sdk::Products::RequestOptions`
@@ -26215,7 +26553,7 @@ client.products.create(title: "Interior Deep Clean")
-Retrieves the details of an existing product. This endpoint is publicly accessible. +Retrieves a product. Public — no credentials.
From ecaf6f84d2496ab21e1a93237091929d92e49211 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:58:14 +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 4cf01c7f..9094734b 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -6,5 +6,11 @@ generations: timestamp: 2026-08-25T01:58:11.784Z cli_version: unknown generator_versions: {} -current_generation: 69f1d3729468eecb5637baa85e2b6303f1b80c0d + - commit_sha: f41bb31550b9965a4b2a1631b94888c3ab205e32 + tree_hash: 307ce3fb6d5698e59f5b2bf8e7e0149a5e445d8d + timestamp: 2026-08-25T01:58:12.494Z + cli_version: unknown + generator_versions: + fernapi/fern-ruby-sdk: 1.23.2 +current_generation: f41bb31550b9965a4b2a1631b94888c3ab205e32 patches: []