Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 226
configured_endpoints: 230
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
whop_sdk (0.0.39)
whop_sdk (0.0.40)
cgi
connection_pool
standardwebhooks
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ It is generated with [Stainless](https://www.stainless.com/).

Use the Whop MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40whop%2Fmcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB3aG9wL21jcCJdLCJlbnYiOnsiV0hPUF9BUElfS0VZIjoiTXkgQVBJIEtleSIsIldIT1BfV0VCSE9PS19TRUNSRVQiOiJNeSBXZWJob29rIEtleSIsIldIT1BfQVBQX0lEIjoiYXBwX3h4eHh4eHh4eHh4eHh4In19)
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40whop%2Fmcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40whop%2Fmcp%22%5D%2C%22env%22%3A%7B%22WHOP_API_KEY%22%3A%22My%20API%20Key%22%2C%22WHOP_WEBHOOK_SECRET%22%3A%22My%20Webhook%20Key%22%2C%22WHOP_APP_ID%22%3A%22app_xxxxxxxxxxxxxx%22%7D%7D)
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40whop%2Fmcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB3aG9wL21jcCJdLCJlbnYiOnsiV0hPUF9BUElfS0VZIjoiTXkgQVBJIEtleSIsIldIT1BfV0VCSE9PS19TRU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9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40whop%2Fmcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40whop%2Fmcp%22%5D%2C%22env%22%3A%7B%22WHOP_API_KEY%22%3A%22My%20API%20Key%22%2C%22WHOP_WEBHOOK_SECRET%22%3A%22My%20Webhook%20Key%22%2C%22WHOP_APP_ID%22%3A%22app_xxxxxxxxxxxxxx%22%2C%22WHOP_API_VERSION%22%3A%222026-06-08%22%7D%7D)

> Note: You may need to set environment variables in your MCP client.

Expand Down
9 changes: 8 additions & 1 deletion lib/whop_sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@
require_relative "whop_sdk/models/file_retrieve_params"
require_relative "whop_sdk/models/file_retrieve_response"
require_relative "whop_sdk/models/file_visibility"
require_relative "whop_sdk/models/financial_activity_list_params"
require_relative "whop_sdk/models/financial_activity_list_response"
require_relative "whop_sdk/models/forum"
require_relative "whop_sdk/models/forum_list_params"
require_relative "whop_sdk/models/forum_list_response"
Expand Down Expand Up @@ -511,8 +513,12 @@
require_relative "whop_sdk/models/support_channel_list_params"
require_relative "whop_sdk/models/support_channel_list_response"
require_relative "whop_sdk/models/support_channel_retrieve_params"
require_relative "whop_sdk/models/swap_create_params"
require_relative "whop_sdk/models/swap_create_quote_params"
require_relative "whop_sdk/models/swap_create_quote_response"
require_relative "whop_sdk/models/swap_create_response"
require_relative "whop_sdk/models/swap_retrieve_params"
require_relative "whop_sdk/models/swap_retrieve_response"
require_relative "whop_sdk/models/tax_identifier_type"
require_relative "whop_sdk/models/tax_type"
require_relative "whop_sdk/models/topup_create_params"
Expand All @@ -528,8 +534,8 @@
require_relative "whop_sdk/models/user_check_access_params"
require_relative "whop_sdk/models/user_check_access_response"
require_relative "whop_sdk/models/user_list_params"
require_relative "whop_sdk/models/user_list_response"
require_relative "whop_sdk/models/user_retrieve_params"
require_relative "whop_sdk/models/user_update_me_params"
require_relative "whop_sdk/models/user_update_params"
require_relative "whop_sdk/models/verification_error_code"
require_relative "whop_sdk/models/verification_list_params"
Expand Down Expand Up @@ -605,6 +611,7 @@
require_relative "whop_sdk/resources/experiences"
require_relative "whop_sdk/resources/fee_markups"
require_relative "whop_sdk/resources/files"
require_relative "whop_sdk/resources/financial_activity"
require_relative "whop_sdk/resources/forum_posts"
require_relative "whop_sdk/resources/forums"
require_relative "whop_sdk/resources/invoices"
Expand Down
18 changes: 15 additions & 3 deletions lib/whop_sdk/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ class Client < WhopSDK::Internal::Transport::BaseClient
# @return [String, nil]
attr_reader :app_id

# Pins the API version (an ISO date). Defaults to the latest version the SDK was
# generated against.
# @return [String, nil]
attr_reader :version

# Static public key (PEM or JWK JSON) used by {#verify_user_token} to
# verify user tokens. When set, the SDK skips remote JWKS fetching.
# Prefer {#user_token_jwks_url} (or the default) so key rotation is
Expand Down Expand Up @@ -65,7 +70,6 @@ class Client < WhopSDK::Internal::Transport::BaseClient
# @return [WhopSDK::Resources::Webhooks]
attr_reader :webhooks

# Plans
# @return [WhopSDK::Resources::Plans]
attr_reader :plans

Expand Down Expand Up @@ -113,7 +117,6 @@ class Client < WhopSDK::Internal::Transport::BaseClient
# @return [WhopSDK::Resources::ChatChannels]
attr_reader :chat_channels

# Users
# @return [WhopSDK::Resources::Users]
attr_reader :users

Expand Down Expand Up @@ -195,6 +198,9 @@ class Client < WhopSDK::Internal::Transport::BaseClient
# @return [WhopSDK::Resources::Wallets]
attr_reader :wallets

# @return [WhopSDK::Resources::FinancialActivity]
attr_reader :financial_activity

# @return [WhopSDK::Resources::Swaps]
attr_reader :swaps

Expand Down Expand Up @@ -309,6 +315,9 @@ class Client < WhopSDK::Internal::Transport::BaseClient
# @param app_id [String, nil] When using the SDK in app mode pass this parameter to allow verifying user
# tokens Defaults to `ENV["WHOP_APP_ID"]`
#
# @param version [String, nil] Pins the API version (an ISO date). Defaults to the latest version the SDK was
# generated against. Defaults to `ENV["WHOP_API_VERSION"]`
#
# @param user_token_public_key [String, nil] Static public key (PEM or JWK JSON) used to verify
# user tokens. When set, {#verify_user_token} skips remote JWKS fetching.
# Defaults to `ENV["WHOP_USER_TOKEN_PUBLIC_KEY"]`
Expand All @@ -330,6 +339,7 @@ def initialize(
api_key: ENV["WHOP_API_KEY"],
webhook_key: ENV["WHOP_WEBHOOK_SECRET"],
app_id: ENV["WHOP_APP_ID"],
version: ENV.fetch("WHOP_API_VERSION", "2026-06-08"),
user_token_public_key: ENV["WHOP_USER_TOKEN_PUBLIC_KEY"],
user_token_jwks_url: ENV["WHOP_USER_TOKEN_JWKS_URL"],
base_url: ENV["WHOP_BASE_URL"],
Expand All @@ -345,7 +355,8 @@ def initialize(
end

headers = {
"x-whop-app-id" => (@app_id = app_id&.to_s)
"x-whop-app-id" => (@app_id = app_id&.to_s),
"api-version-date" => (@version = version.to_s)
}
custom_headers_env = ENV["WHOP_CUSTOM_HEADERS"]
unless custom_headers_env.nil?
Expand Down Expand Up @@ -412,6 +423,7 @@ def initialize(
@account_links = WhopSDK::Resources::AccountLinks.new(client: self)
@accounts = WhopSDK::Resources::Accounts.new(client: self)
@wallets = WhopSDK::Resources::Wallets.new(client: self)
@financial_activity = WhopSDK::Resources::FinancialActivity.new(client: self)
@swaps = WhopSDK::Resources::Swaps.new(client: self)
@deposits = WhopSDK::Resources::Deposits.new(client: self)
@setup_intents = WhopSDK::Resources::SetupIntents.new(client: self)
Expand Down
8 changes: 8 additions & 0 deletions lib/whop_sdk/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ module WhopSDK

FileVisibility = WhopSDK::Models::FileVisibility

FinancialActivityListParams = WhopSDK::Models::FinancialActivityListParams

Forum = WhopSDK::Models::Forum

ForumListParams = WhopSDK::Models::ForumListParams
Expand Down Expand Up @@ -745,8 +747,12 @@ module WhopSDK

SupportChannelRetrieveParams = WhopSDK::Models::SupportChannelRetrieveParams

SwapCreateParams = WhopSDK::Models::SwapCreateParams

SwapCreateQuoteParams = WhopSDK::Models::SwapCreateQuoteParams

SwapRetrieveParams = WhopSDK::Models::SwapRetrieveParams

TaxIdentifierType = WhopSDK::Models::TaxIdentifierType

TaxType = WhopSDK::Models::TaxType
Expand All @@ -773,6 +779,8 @@ module WhopSDK

UserRetrieveParams = WhopSDK::Models::UserRetrieveParams

UserUpdateMeParams = WhopSDK::Models::UserUpdateMeParams

UserUpdateParams = WhopSDK::Models::UserUpdateParams

VerificationErrorCode = WhopSDK::Models::VerificationErrorCode
Expand Down
117 changes: 116 additions & 1 deletion lib/whop_sdk/models/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ class Account < WhopSDK::Internal::Type::BaseModel
# @return [String, nil]
required :business_type, String, nil?: true

# @!attribute country
# The country the account is located in
#
# @return [String, nil]
required :country, String, nil?: true

# @!attribute created_at
# When the account was created, as an ISO 8601 timestamp
#
Expand All @@ -40,6 +46,11 @@ class Account < WhopSDK::Internal::Type::BaseModel
# @return [String, nil]
required :email, String, nil?: true

# @!attribute home_preferences
#
# @return [Array<String>]
required :home_preferences, WhopSDK::Internal::Type::ArrayOf[String]

# @!attribute industry_group
# The industry group the account belongs to
#
Expand All @@ -52,6 +63,12 @@ class Account < WhopSDK::Internal::Type::BaseModel
# @return [String, nil]
required :industry_type, String, nil?: true

# @!attribute invoice_prefix
# The prefix used for account invoices
#
# @return [String, nil]
required :invoice_prefix, String, nil?: true

# @!attribute logo_url
# The URL of the account logo image
#
Expand All @@ -64,12 +81,49 @@ class Account < WhopSDK::Internal::Type::BaseModel
# @return [Object]
required :metadata, WhopSDK::Internal::Type::Unknown

# @!attribute onboarding_type
# The type of onboarding the account has completed
#
# @return [String, nil]
required :onboarding_type, String, nil?: true

# @!attribute opengraph_image_url
# The URL of the account Open Graph image
#
# @return [String, nil]
required :opengraph_image_url, String, nil?: true

# @!attribute opengraph_image_variant
# The account Open Graph image variant
#
# @return [String, nil]
required :opengraph_image_variant, String, nil?: true

# @!attribute other_business_description
# The description of the business type when business_type is other
#
# @return [String, nil]
required :other_business_description, String, nil?: true

# @!attribute other_industry_description
# The description of the industry type when industry_type is other
#
# @return [String, nil]
required :other_industry_description, String, nil?: true

# @!attribute parent_account_id
# The parent account ID for connected accounts
#
# @return [String, nil]
required :parent_account_id, String, nil?: true

# @!attribute require_2fa
# Whether the account requires authorized users to have two-factor authentication
# enabled
#
# @return [Boolean]
required :require_2fa, WhopSDK::Internal::Type::Boolean

# @!attribute route
# The account's public route identifier
#
Expand All @@ -82,11 +136,35 @@ class Account < WhopSDK::Internal::Type::BaseModel
# @return [Boolean]
required :send_customer_emails, WhopSDK::Internal::Type::Boolean

# @!attribute show_joined_whops
# Whether the account appears in joined whops on other accounts
#
# @return [Boolean]
required :show_joined_whops, WhopSDK::Internal::Type::Boolean

# @!attribute show_reviews_dtc
# Whether reviews are displayed on direct-to-consumer product pages
#
# @return [Boolean]
required :show_reviews_dtc, WhopSDK::Internal::Type::Boolean

# @!attribute show_user_directory
# Whether the account shows users in the user directory
#
# @return [Boolean]
required :show_user_directory, WhopSDK::Internal::Type::Boolean

# @!attribute social_links
#
# @return [Array<WhopSDK::Models::AccountSocialLink>]
required :social_links, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AccountSocialLink] }

# @!attribute store_page_config
# Store page display configuration for the account
#
# @return [Object]
required :store_page_config, WhopSDK::Internal::Type::Unknown

# @!attribute target_audience
# The target audience for this account
#
Expand All @@ -99,45 +177,82 @@ class Account < WhopSDK::Internal::Type::BaseModel
# @return [String]
required :title, String

# @!attribute use_logo_as_opengraph_image_fallback
# Whether the account uses its logo as the fallback Open Graph image
#
# @return [Boolean]
required :use_logo_as_opengraph_image_fallback, WhopSDK::Internal::Type::Boolean

# @!attribute wallet
# The account's primary crypto wallet, or null if none has been provisioned
#
# @return [WhopSDK::Models::AccountWallet, nil]
required :wallet, -> { WhopSDK::AccountWallet }, nil?: true

# @!method initialize(id:, banner_image_url:, business_type:, created_at:, description:, email:, industry_group:, industry_type:, logo_url:, metadata:, parent_account_id:, route:, send_customer_emails:, social_links:, target_audience:, title:, wallet:)
# @!method initialize(id:, banner_image_url:, business_type:, country:, created_at:, description:, email:, home_preferences:, industry_group:, industry_type:, invoice_prefix:, logo_url:, metadata:, onboarding_type:, opengraph_image_url:, opengraph_image_variant:, other_business_description:, other_industry_description:, parent_account_id:, require_2fa:, route:, send_customer_emails:, show_joined_whops:, show_reviews_dtc:, show_user_directory:, social_links:, store_page_config:, target_audience:, title:, use_logo_as_opengraph_image_fallback:, wallet:)
# Some parameter documentations has been truncated, see {WhopSDK::Models::Account}
# for more details.
#
# @param id [String] The ID of the account, which will look like biz\_******\*******
#
# @param banner_image_url [String, nil] The URL of the account banner image
#
# @param business_type [String, nil] The high-level business category for the account
#
# @param country [String, nil] The country the account is located in
#
# @param created_at [String] When the account was created, as an ISO 8601 timestamp
#
# @param description [String, nil] A promotional description for the account
#
# @param email [String, nil] The email address of the account owner
#
# @param home_preferences [Array<String>]
#
# @param industry_group [String, nil] The industry group the account belongs to
#
# @param industry_type [String, nil] The specific industry vertical the account operates in
#
# @param invoice_prefix [String, nil] The prefix used for account invoices
#
# @param logo_url [String, nil] The URL of the account logo image
#
# @param metadata [Object] Arbitrary key/value metadata supplied when the account was created
#
# @param onboarding_type [String, nil] The type of onboarding the account has completed
#
# @param opengraph_image_url [String, nil] The URL of the account Open Graph image
#
# @param opengraph_image_variant [String, nil] The account Open Graph image variant
#
# @param other_business_description [String, nil] The description of the business type when business_type is other
#
# @param other_industry_description [String, nil] The description of the industry type when industry_type is other
#
# @param parent_account_id [String, nil] The parent account ID for connected accounts
#
# @param require_2fa [Boolean] Whether the account requires authorized users to have two-factor authentication
#
# @param route [String] The account's public route identifier
#
# @param send_customer_emails [Boolean] Whether Whop sends transactional emails to customers on behalf of this account
#
# @param show_joined_whops [Boolean] Whether the account appears in joined whops on other accounts
#
# @param show_reviews_dtc [Boolean] Whether reviews are displayed on direct-to-consumer product pages
#
# @param show_user_directory [Boolean] Whether the account shows users in the user directory
#
# @param social_links [Array<WhopSDK::Models::AccountSocialLink>]
#
# @param store_page_config [Object] Store page display configuration for the account
#
# @param target_audience [String, nil] The target audience for this account
#
# @param title [String] The display name of the account
#
# @param use_logo_as_opengraph_image_fallback [Boolean] Whether the account uses its logo as the fallback Open Graph image
#
# @param wallet [WhopSDK::Models::AccountWallet, nil] The account's primary crypto wallet, or null if none has been provisioned
end
end
Expand Down
Loading