Skip to content
Merged
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 .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"standardwebhooks": ">= 1.0"
}
},
"originGitCommit": "ef7837ec6b6220e91a7a7f1363fb43b70081fcce",
"originGitCommit": "85258f80b28d6d2a30a4ecbf49a7fb238b79738c",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "2.4.0",
Expand Down
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lib/whop_sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,6 @@
require_relative "whop_sdk/partners/types/leaderboard_partners_response_nearby_item_user"
require_relative "whop_sdk/partners/types/leaderboard_partners_response_nearby_item"
require_relative "whop_sdk/partners/types/leaderboard_partners_response"
require_relative "whop_sdk/partners/types/referred_users_partners_request_user_id"
require_relative "whop_sdk/partners/types/referred_users_partners_request_order"
require_relative "whop_sdk/partners/types/referred_users_partners_request_direction"
require_relative "whop_sdk/partners/types/referred_users_partners_response_data_item_user_profile_picture"
Expand Down
5 changes: 2 additions & 3 deletions lib/whop_sdk/access_tokens/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ def initialize(client:, base_url: nil, environment: nil)
@environment = environment
end

# Create a short-lived access token for authenticating API requests. When using API key authentication, provide
# account_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and
# mobile embedded components.
# Creates a short-lived access token for Whop's web and mobile embedded components. With API key authentication,
# pass `account_id` or `user_id`; with OAuth, the token is issued for the OAuth user.
#
# @param request_options [Hash]
# @param params [Whop_sdk::AccessTokens::Types::CreateAccessTokensRequest]
Expand Down
4 changes: 2 additions & 2 deletions lib/whop_sdk/account_links/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def initialize(client:, base_url: nil, environment: nil)
@environment = environment
end

# Generate a URL that directs a sub-merchant to their account portal, such as the hosted payouts dashboard or the
# KYC onboarding flow.
# Generates a URL that sends a sub-merchant to a hosted Whop page, such as the payouts dashboard or the KYC
# onboarding flow. Requires an API key.
#
# @param request_options [Hash]
# @param params [Whop_sdk::AccountLinks::Types::CreateAccountLinksRequest]
Expand Down
24 changes: 8 additions & 16 deletions lib/whop_sdk/accounts/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def initialize(client:, base_url: nil, environment: nil)
end

# Lists accounts visible to the credential. User tokens return the user's business accounts; Account API keys
# return the requesting account and its connected accounts. Pass `parent_account_id` to return only that parent
# account's connected accounts. Includes each account's `cards` application summary when the caller has
# `company:balance:read` access to that account.
# return the requesting account and its connected accounts.
#
# @param request_options [Hash]
# @param params [Hash]
Expand Down Expand Up @@ -170,9 +168,7 @@ def me(request_options: {}, **params)
end
end

# Retrieves a single account by ID or public route when it is visible to the credential, including its crypto
# wallet. The reserved id `me` retrieves the account associated with the current Account API key; user tokens have
# no single account, so they must address one by ID or route.
# Retrieves an account visible to the credential by ID or public route, including its crypto wallet.
#
# @param request_options [Hash]
# @param params [Hash]
Expand Down Expand Up @@ -256,8 +252,6 @@ def delete(request_options: {}, **params)
end

# Updates an account. User tokens can update business accounts; Account API keys can update connected accounts.
# The reserved id `me` — accepted on Retrieve Account — resolves to the requesting account, which an Account API
# key cannot edit, so updates must name the connected account by its `biz_` id.
#
# @param request_options [Hash]
# @param params [Whop_sdk::Accounts::Types::UpdateAccountsRequest]
Expand Down Expand Up @@ -299,10 +293,8 @@ def update(request_options: {}, **params)
end
end

# Starts an LLC or C-Corp formation for a business account. Defaults to an LLC; set `entity_type` to `c_corp` to
# form a C-Corp, which additionally requires `share_structure` and officer `roles` on every founder. On
# submission, the application is validated and the response returns a hosted checkout URL. Once paid, the filing
# is submitted. Track progress through the account's
# Starts an LLC or C-Corp formation for a business account. The application is validated and the response returns
# a hosted checkout URL; once paid, the filing is submitted. Track progress through the account's
# [`company_formation`](/api-reference/beta/accounts/retrieve-account) field on Retrieve Account.
#
# @param request_options [Hash]
Expand Down Expand Up @@ -390,10 +382,10 @@ def form_company(request_options: {}, **params)
end

# Queues one background retry of the account's failed ads payments across its campaigns, using the account's
# configured ads payment methods. A queued response does not mean payment succeeded. Read campaign delivery_status
# and issues for the outcome. Successful settlement clears the payment block without changing configured active or
# paused status; legacy payment_failed status becomes paused. Another request while the account retry is queued or
# running returns an error asking you to wait.
# configured ads payment methods. A queued response does not mean payment succeeded; read each campaign's
# `delivery_status` and `issues` for the outcome. Successful settlement clears the payment block without changing
# a configured `active` or `paused` status; a legacy `payment_failed` status becomes `paused`. Returns an error
# when the account has no failed ads payments, or while a previous retry for the account is queued or running.
#
# @param request_options [Hash]
# @param params [Hash]
Expand Down
11 changes: 5 additions & 6 deletions lib/whop_sdk/accounts/fees/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def initialize(client:, base_url: nil, environment: nil)
@environment = environment
end

# Retrieves the account's fees: a singleton document keyed by fee, with any markups its platform adds. Connected
# accounts see their effective rates, with covered payouts shown as zero; pricing provenance and comparisons are
# null without parent-account access. `adjustable` on each fee says what the caller may change.
# Retrieves the account's fees as a single document keyed by fee, with any markups its platform adds. Connected
# accounts see the rates in effect for them. `adjustable` on each fee says what you may change with Update
# Account Fees.
#
# @param request_options [Hash]
# @param params [Hash]
Expand Down Expand Up @@ -54,9 +54,8 @@ def retrieve(request_options: {}, **params)
end
end

# Updates the account's fees. The response shows effective rates and hides pricing provenance and comparisons
# without parent-account access. Each key present in the body is replaced; omitted keys are left untouched. Only
# fees the document reports as `adjustable` can be changed.
# Updates the account's fees. Each key present in the body is replaced; omitted keys are left untouched. Only
# fees that Retrieve Account Fees reports as `adjustable` can be changed.
#
# @param request_options [Hash]
# @param params [Whop_sdk::Accounts::Fees::Types::UpdateFeesRequest]
Expand Down
42 changes: 18 additions & 24 deletions lib/whop_sdk/accounts/financing_applications/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ def initialize(client:, base_url: nil, environment: nil)
@environment = environment
end

# Lists payment-financing applications for the account in the URL. Account credentials can access their own
# account and direct sub-accounts, excluding deeper descendants. User credentials require the read permission on
# each account. Filters only narrow this visibility.
# Lists payment-financing applications for an account. Account credentials can list their own account and its
# direct connected accounts, but not deeper descendants; user credentials need read access to the account.
#
# @param request_options [Hash]
# @param params [Hash]
Expand Down Expand Up @@ -83,11 +82,11 @@ def list(request_options: {}, **params)
end
end

# Creates an application for merchant payment-financing approval. Requires an existing ledger account. Returns
# an existing application collecting information or awaiting review; applications awaiting review take
# precedence. Restricted industries cannot apply. Closed applications allow reapplication. This does not submit
# the application for review. Supports Idempotency-Key replay; open applications are also reused across
# different keys.
# Starts an application for payment-financing approval, or returns the account's open one: an application in
# `awaiting_review` takes precedence over one in `requires_collection`, and the open application is reused
# across different `Idempotency-Key` values. Creating an application does not submit it for review. The account
# must have a Whop balance set up, and accounts in restricted industries cannot apply. Once an application
# closes, the account can apply again.
#
# @param request_options [Hash]
# @param params [Whop_sdk::Accounts::FinancingApplications::Types::CreateFinancingApplicationsRequest]
Expand Down Expand Up @@ -129,9 +128,8 @@ def create(request_options: {}, **params)
end
end

# Retrieves a payment-financing application's review state, requirements, saved answers, documents, current
# terms, and public review feedback. Requires read access to its owning account. Internal review notes and risk
# metrics are not exposed.
# Retrieves a payment-financing application with its review state, requirements, saved answers, documents,
# current terms, and review feedback. Requires read access to the account that owns it.
#
# @param request_options [Hash]
# @param params [Hash]
Expand Down Expand Up @@ -172,12 +170,9 @@ def retrieve(request_options: {}, **params)
end
end

# Saves merchant answers while the application requires_collection. The entire batch is atomic. Omitted
# requirements and answer fields are unchanged; empty arrays clear values or documents, and null money clears a
# price. Only merchant requirement IDs returned by this application are accepted. Upload documents through the
# Files API first: new files must belong to the caller, be ready and private, and satisfy the requirement's
# formats and 20 MB limit. file_ids replaces the requirement's attachments. This does not submit the
# application.
# Saves merchant answers to an application in `requires_collection`. The batch is atomic: if any answer is
# rejected, none are saved. Omitted requirements and answer fields are left unchanged. Saving answers does not
# submit the application; call Submit Financing Application when it is complete.
#
# @param request_options [Hash]
# @param params [Whop_sdk::Accounts::FinancingApplications::Types::UpdateFinancingApplicationsRequest]
Expand Down Expand Up @@ -226,13 +221,12 @@ def update(request_options: {}, **params)
end
end

# Submits a complete application for financing review. Present the application's terms.content, policies, and
# disclosure to the merchant and collect affirmative acceptance before calling this endpoint. Pass the
# terms.version that was presented; stale versions are rejected. The server records acceptance, submitting
# actor, and submission time before entering awaiting_review. Only requires_collection applications may submit,
# including after a reviewer requests more information. Resubmissions require acceptance again. Use
# Idempotency-Key for retries; submitting an application already in review without replay returns an error.
# Approval does not itself enable financing payment methods.
# Submits a complete application for financing review, recording the merchant's acceptance, who submitted, and
# when, then moving it to `awaiting_review`. Before calling, present the application's `terms.content`,
# policies, and disclosure to the merchant and collect affirmative acceptance; every resubmission needs
# acceptance again. Only an application in `requires_collection` can be submitted, including after a reviewer
# requests more information. Retry with the same `Idempotency-Key`: submitting an application already in review
# without a replay returns an error. Approval does not by itself enable financing payment methods.
#
# @param request_options [Hash]
# @param params [Whop_sdk::Accounts::FinancingApplications::Types::SubmitFinancingApplicationsRequest]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Whop_sdk
module Accounts
module FinancingApplications
module Types
# Price answer, such as `max_product_price`. `null` clears the price.
class UpdateFinancingApplicationsRequestAnswersItemMoney < Internal::Types::Model
field :amount, -> { String }, optional: false, nullable: false

Expand Down
8 changes: 4 additions & 4 deletions lib/whop_sdk/ad_campaigns/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def list(request_options: {}, **params)
end
end

# Creates an ad campaign for an account.
# Creates an ad campaign in `draft` status for an account. Nothing runs until you launch it by setting `status` to
# `active` with `PATCH /ad_campaigns/:id`.
#
# @param request_options [Hash]
# @param params [Whop_sdk::AdCampaigns::Types::CreateAdCampaignsRequest]
Expand Down Expand Up @@ -219,9 +220,8 @@ def delete(request_options: {}, **params)
end
end

# Updates an ad campaign's editable fields (title, budget, schedule, bid strategy, special ad categories, and,
# before launch, budget type and budget optimization), and launches a draft campaign by setting status to active.
# Objective and desired cost per result are fixed at creation and cannot be changed.
# Updates an ad campaign's settings, or launches a draft campaign by setting `status` to `active`. The objective
# and desired cost per result are fixed at creation and cannot be changed.
#
# @param request_options [Hash]
# @param params [Whop_sdk::AdCampaigns::Types::UpdateAdCampaignsRequest]
Expand Down
20 changes: 11 additions & 9 deletions lib/whop_sdk/ad_conversion_value_rules/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def initialize(client:, base_url: nil, environment: nil)
@environment = environment
end

# List saved rules the caller can read. Filter by business with account_id.
# Lists the conversion value rules you can read.
#
# @param request_options [Hash]
# @param params [Hash]
Expand Down Expand Up @@ -81,7 +81,7 @@ def list(request_options: {}, **params)
end
end

# Create one rule covering every selected target and event combination. Active rules cannot overlap for the same
# Creates one rule covering every selected target and event combination. Active rules cannot overlap for the same
# platform and event. Customer prices and Whop revenue stay unchanged.
#
# @param request_options [Hash]
Expand Down Expand Up @@ -129,6 +129,8 @@ def create(request_options: {}, **params)
end
end

# Retrieves a conversion value rule with its targets, events, and value adjustment.
#
# @param request_options [Hash]
# @param params [Hash]
# @option request_options [String] :base_url
Expand Down Expand Up @@ -164,7 +166,7 @@ def retrieve(request_options: {}, **params)
end
end

# Soft-delete a rule and deactivate all its coverage. Preserve its stored settings.
# Deletes a rule and deactivates all its coverage. The rule's stored settings are preserved.
#
# @param request_options [Hash]
# @param params [Hash]
Expand Down Expand Up @@ -201,8 +203,8 @@ def delete(request_options: {}, **params)
end
end

# Edit a rule without changing its status. Supplied targets or events replace that selection in full. Omitted
# fields stay unchanged. All changes succeed or fail together.
# Edits a rule without changing its status. Supplied `targets` or `events` replace that selection in full, and
# omitted fields stay unchanged. All changes succeed or fail together.
#
# @param request_options [Hash]
# @param params [Whop_sdk::AdConversionValueRules::Types::UpdateAdConversionValueRulesRequest]
Expand Down Expand Up @@ -244,7 +246,7 @@ def update(request_options: {}, **params)
end
end

# Pause the rule across all selected targets and events.
# Pauses the rule across all selected targets and events.
#
# @param request_options [Hash]
# @param params [Hash]
Expand Down Expand Up @@ -281,9 +283,9 @@ def pause(request_options: {}, **params)
end
end

# Resume the rule and automatically replace overlapping selections in the same transaction. Other selections keep
# their values, and broader rules remain as defaults. Rules with no remaining selections are paused. Resuming an
# already-active rule makes no changes.
# Resumes the rule and automatically replaces overlapping selections in the same transaction. Other selections
# keep their values, and broader rules remain as defaults. Rules with no remaining selections are paused. Resuming
# an already-active rule makes no changes.
#
# @param request_options [Hash]
# @param params [Hash]
Expand Down
Loading
Loading