Class: WhopSDK::Models::Account

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/account.rb,
sig/whop_sdk/models/account.rbs

Overview

See Also:

  • WhopSDK::Resources::Accounts#create

Defined Under Namespace

Classes: Balance, Capabilities, RecommendedAction, RequiredAction, Wallet

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(balance:, breakdown:, icon_url:, name:, price_usd:, symbol:, value_usd:) ⇒ Object

Some parameter documentations has been truncated, see Balance for more details.

Account holdings, each with USD value. Empty when total_usd is null.

Parameters:

  • balance (String)

    Total amount held in native units, as a decimal string.

  • breakdown (Object)

    Balance split into available, pending, and reserve amounts, as native-unit decim

  • icon_url (String, nil)

    Holding icon URL.

  • name (String)

    The holding's display name

  • price_usd (Float, nil)

    USD price per unit, or null when no exchange rate is available.

  • symbol (String)

    Holding display symbol, such as USDT, cbBTC, or EUR.

  • value_usd (String, nil)

    Holding USD value, or null when no exchange rate is available.



# File 'lib/whop_sdk/models/account.rb', line 417

Instance Attribute Details

#balancesArray<WhopSDK::Models::Account::Balance>

Parameters:

  • value (::Array[WhopSDK::Account::Balance])

Returns:



16
# File 'lib/whop_sdk/models/account.rb', line 16

required :balances, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Account::Balance] }

Account banner image URL.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


22
# File 'lib/whop_sdk/models/account.rb', line 22

required :banner_image_url, String, nil?: true

#business_addressObject?

Account business address used to calculate tax, with line1, line2, city, state, postal_code, and country. null when no address is set.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


29
# File 'lib/whop_sdk/models/account.rb', line 29

required :business_address, WhopSDK::Internal::Type::Unknown, nil?: true

#business_typeString?

High-level business category for the account.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


35
# File 'lib/whop_sdk/models/account.rb', line 35

required :business_type, String, nil?: true

#capabilitiesWhopSDK::Models::Account::Capabilities?

Payment rails enabled for this account, each active, inactive, or pending (onboarding or review in progress). Computed only on retrieve and me for callers with company:balance:read scope; null otherwise.

Parameters:

  • value (WhopSDK::Account::Capabilities, nil)

Returns:



43
# File 'lib/whop_sdk/models/account.rb', line 43

required :capabilities, -> { WhopSDK::Account::Capabilities }, nil?: true

#countryString?

Country where the account is located.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


49
# File 'lib/whop_sdk/models/account.rb', line 49

required :country, String, nil?: true

#created_atString

When the account was created, as an ISO 8601 timestamp.

Parameters:

  • value (String)

Returns:

  • (String)


55
# File 'lib/whop_sdk/models/account.rb', line 55

required :created_at, String

#descriptionString?

Account promotional description.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


61
# File 'lib/whop_sdk/models/account.rb', line 61

required :description, String, nil?: true

#emailString?

Account owner email address.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


67
# File 'lib/whop_sdk/models/account.rb', line 67

required :email, String, nil?: true

#home_preferencesArray<String>

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


72
# File 'lib/whop_sdk/models/account.rb', line 72

required :home_preferences, WhopSDK::Internal::Type::ArrayOf[String]

#idString

Account ID, prefixed biz_.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/whop_sdk/models/account.rb', line 11

required :id, String

#industry_groupString?

Account industry group.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


78
# File 'lib/whop_sdk/models/account.rb', line 78

required :industry_group, String, nil?: true

#industry_typeString?

Specific industry vertical for the account.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


84
# File 'lib/whop_sdk/models/account.rb', line 84

required :industry_type, String, nil?: true

#invoice_prefixString?

Prefix used for account invoices.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


90
# File 'lib/whop_sdk/models/account.rb', line 90

required :invoice_prefix, String, nil?: true

#logo_urlString?

Account logo image URL.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


96
# File 'lib/whop_sdk/models/account.rb', line 96

required :logo_url, String, nil?: true

#metadataObject

Arbitrary key/value metadata supplied at account creation.

Parameters:

  • value (top)

Returns:

  • (Object)


102
# File 'lib/whop_sdk/models/account.rb', line 102

required :metadata, WhopSDK::Internal::Type::Unknown

#onboarding_typeString?

Type of onboarding the account has completed.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


108
# File 'lib/whop_sdk/models/account.rb', line 108

required :onboarding_type, String, nil?: true

#opengraph_image_urlString?

Account Open Graph image URL.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


114
# File 'lib/whop_sdk/models/account.rb', line 114

required :opengraph_image_url, String, nil?: true

#opengraph_image_variantString?

Account Open Graph image variant.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


120
# File 'lib/whop_sdk/models/account.rb', line 120

required :opengraph_image_variant, String, nil?: true

#other_business_descriptionString?

Business type details when business_type is other.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


126
# File 'lib/whop_sdk/models/account.rb', line 126

required :other_business_description, String, nil?: true

#other_industry_descriptionString?

Industry details when industry_type is other.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


132
# File 'lib/whop_sdk/models/account.rb', line 132

required :other_industry_description, String, nil?: true

#parent_account_idString?

Parent account ID for connected accounts.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


138
# File 'lib/whop_sdk/models/account.rb', line 138

required :parent_account_id, String, nil?: true

#product_tax_codeObject?

Tax classification code applied by default to the account's products, with id, name, and product_type. null when no default is set.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


145
# File 'lib/whop_sdk/models/account.rb', line 145

required :product_tax_code, WhopSDK::Internal::Type::Unknown, nil?: true
Deprecated.

DEPRECATED: Use the GET /accounts/{account_id}/recommend_actions endpoint instead.

Parameters:

  • value (::Array[WhopSDK::Account::RecommendedAction], nil)

Returns:



154
155
156
# File 'lib/whop_sdk/models/account.rb', line 154

required :recommended_actions,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Account::RecommendedAction] },
nil?: true

#require_2faBoolean

Whether authorized users must enable two-factor authentication.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


162
# File 'lib/whop_sdk/models/account.rb', line 162

required :require_2fa, WhopSDK::Internal::Type::Boolean

#required_actionsArray<WhopSDK::Models::Account::RequiredAction>?

Parameters:

  • value (::Array[WhopSDK::Account::RequiredAction], nil)

Returns:



167
168
169
# File 'lib/whop_sdk/models/account.rb', line 167

required :required_actions,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Account::RequiredAction] },
nil?: true

#routeString

Account public route identifier.

Parameters:

  • value (String)

Returns:

  • (String)


175
# File 'lib/whop_sdk/models/account.rb', line 175

required :route, String

#send_customer_emailsBoolean

Whether Whop sends transactional emails to customers on behalf of this account.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


181
# File 'lib/whop_sdk/models/account.rb', line 181

required :send_customer_emails, WhopSDK::Internal::Type::Boolean

#show_joined_whopsBoolean

Whether the account appears in joined whops on other accounts.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


187
# File 'lib/whop_sdk/models/account.rb', line 187

required :show_joined_whops, WhopSDK::Internal::Type::Boolean

#show_reviews_dtcBoolean

Whether reviews are displayed on direct-to-consumer product pages.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


193
# File 'lib/whop_sdk/models/account.rb', line 193

required :show_reviews_dtc, WhopSDK::Internal::Type::Boolean

#show_user_directoryBoolean

Whether the account shows users in the user directory.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


199
# File 'lib/whop_sdk/models/account.rb', line 199

required :show_user_directory, WhopSDK::Internal::Type::Boolean

Parameters:

Returns:



204
# File 'lib/whop_sdk/models/account.rb', line 204

required :social_links, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AccountSocialLink] }

#statusString?

Whether the account can operate on Whop: active or suspended. Computed only on retrieve and me; null otherwise.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


211
# File 'lib/whop_sdk/models/account.rb', line 211

required :status, String, nil?: true

#store_page_configObject

Account store page display configuration.

Parameters:

  • value (top)

Returns:

  • (Object)


217
# File 'lib/whop_sdk/models/account.rb', line 217

required :store_page_config, WhopSDK::Internal::Type::Unknown

#target_audienceString?

Target audience for this account.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


223
# File 'lib/whop_sdk/models/account.rb', line 223

required :target_audience, String, nil?: true

#tax_identifiersArray<Object>

Account tax/VAT registrations, each with id, tax_id_type, and tax_id_value. Empty when none are set.

Parameters:

  • value (::Array[top])

Returns:

  • (Array<Object>)


230
# File 'lib/whop_sdk/models/account.rb', line 230

required :tax_identifiers, WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::Unknown]

#tax_remitted_byString?

Who calculates and remits tax for the account: whop (Whop calculates and remits), self (Whop calculates; the account collects and remits), or none (neither; the account is responsible). null until the account enrolls in the Whop tax service.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


239
# File 'lib/whop_sdk/models/account.rb', line 239

required :tax_remitted_by, String, nil?: true

#titleString

Account display name.

Parameters:

  • value (String)

Returns:

  • (String)


245
# File 'lib/whop_sdk/models/account.rb', line 245

required :title, String

#total_earned_usdFloat?

Account lifetime sales, normalized to USD. Computed only on retrieve and me for callers with stats:read scope; null otherwise.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


252
# File 'lib/whop_sdk/models/account.rb', line 252

required :total_earned_usd, Float, nil?: true

#total_usdString?

Total USD value across balances with known exchange rates. Computed only on single-account reads (retrieve and me); null on list responses, writes, missing balance-read permission, or unavailable balance source.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


260
# File 'lib/whop_sdk/models/account.rb', line 260

required :total_usd, String, nil?: true

#use_logo_as_opengraph_image_fallbackBoolean

Whether the account uses its logo as the fallback Open Graph image.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


266
# File 'lib/whop_sdk/models/account.rb', line 266

required :use_logo_as_opengraph_image_fallback, WhopSDK::Internal::Type::Boolean

#verificationObject

Account identity verification status for the individual (KYC) and business (KYB) profiles. Each is null until created, otherwise a status of not_started, pending, approved, or rejected.

Parameters:

  • value (top)

Returns:

  • (Object)


274
# File 'lib/whop_sdk/models/account.rb', line 274

required :verification, WhopSDK::Internal::Type::Unknown

#walletWhopSDK::Models::Account::Wallet?

Account primary crypto wallet, or null if none has been provisioned.

Parameters:

  • value (WhopSDK::Account::Wallet, nil)

Returns:



280
# File 'lib/whop_sdk/models/account.rb', line 280

required :wallet, -> { WhopSDK::Account::Wallet }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/account.rb', line 683

Instance Method Details

#to_hash{

Returns:

  • ({)


183
# File 'sig/whop_sdk/models/account.rbs', line 183

def to_hash: -> {