Class: WhopSDK::Models::Account::Balance

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

Instance Attribute 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(id:, balances:, banner_image_url:, business_address:, business_type:, capabilities:, 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:, product_tax_code:, recommended_actions:, require_2fa:, required_actions:, route:, send_customer_emails:, show_joined_whops:, show_reviews_dtc:, show_user_directory:, social_links:, status:, store_page_config:, target_audience:, tax_identifiers:, tax_remitted_by:, title:, total_earned_usd:, total_usd:, use_logo_as_opengraph_image_fallback:, verification:, wallet:) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::Account for more details.

Parameters:

  • id (String)

    Account ID, prefixed biz_.

  • balances (Array<WhopSDK::Models::Account::Balance>)
  • banner_image_url (String, nil)

    Account banner image URL.

  • business_address (Object, nil)

    Account business address used to calculate tax, with line1, line2, city, `

  • business_type (String, nil)

    High-level business category for the account.

  • capabilities (WhopSDK::Models::Account::Capabilities, nil)

    Payment rails enabled for this account, each active, inactive, or pending

  • country (String, nil)

    Country where the account is located.

  • created_at (String)

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

  • description (String, nil)

    Account promotional description.

  • email (String, nil)

    Account owner email address.

  • home_preferences (Array<String>)
  • industry_group (String, nil)

    Account industry group.

  • industry_type (String, nil)

    Specific industry vertical for the account.

  • invoice_prefix (String, nil)

    Prefix used for account invoices.

  • logo_url (String, nil)

    Account logo image URL.

  • metadata (Object)

    Arbitrary key/value metadata supplied at account creation.

  • onboarding_type (String, nil)

    Type of onboarding the account has completed.

  • opengraph_image_url (String, nil)

    Account Open Graph image URL.

  • opengraph_image_variant (String, nil)

    Account Open Graph image variant.

  • other_business_description (String, nil)

    Business type details when business_type is other.

  • other_industry_description (String, nil)

    Industry details when industry_type is other.

  • parent_account_id (String, nil)

    Parent account ID for connected accounts.

  • product_tax_code (Object, nil)

    Tax classification code applied by default to the account's products, with id,

  • recommended_actions (Array<WhopSDK::Models::Account::RecommendedAction>, nil)

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

  • require_2fa (Boolean)

    Whether authorized users must enable two-factor authentication.

  • required_actions (Array<WhopSDK::Models::Account::RequiredAction>, nil)
  • route (String)

    Account public route identifier.

  • send_customer_emails (Boolean)

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

  • show_joined_whops (Boolean)

    Whether the account appears in joined whops on other accounts.

  • show_reviews_dtc (Boolean)

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

  • show_user_directory (Boolean)

    Whether the account shows users in the user directory.

  • social_links (Array<WhopSDK::Models::AccountSocialLink>)
  • status (String, nil)

    Whether the account can operate on Whop: active or suspended. Computed only

  • store_page_config (Object)

    Account store page display configuration.

  • target_audience (String, nil)

    Target audience for this account.

  • tax_identifiers (Array<Object>)

    Account tax/VAT registrations, each with id, tax_id_type, and tax_id_value

  • tax_remitted_by (String, nil)

    Who calculates and remits tax for the account: whop (Whop calculates and remit

  • title (String)

    Account display name.

  • total_earned_usd (Float, nil)

    Account lifetime sales, normalized to USD. Computed only on retrieve and me

  • total_usd (String, nil)

    Total USD value across balances with known exchange rates. Computed only on sing

  • use_logo_as_opengraph_image_fallback (Boolean)

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

  • verification (Object)

    Account identity verification status for the individual (KYC) and business (

  • wallet (WhopSDK::Models::Account::Wallet, nil)

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



372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# File 'lib/whop_sdk/models/account.rb', line 372

class Balance < WhopSDK::Internal::Type::BaseModel
  # @!attribute balance
  #   Total amount held in native units, as a decimal string.
  #
  #   @return [String]
  required :balance, String

  # @!attribute breakdown
  #   Balance split into available, pending, and reserve amounts, as native-unit
  #   decimal strings. On-chain crypto is entirely available; good_funds and fiat cash
  #   can have pending or reserve portions.
  #
  #   @return [Object]
  required :breakdown, WhopSDK::Internal::Type::Unknown

  # @!attribute icon_url
  #   Holding icon URL.
  #
  #   @return [String, nil]
  required :icon_url, String, nil?: true

  # @!attribute name
  #   The holding's display name
  #
  #   @return [String]
  required :name, String

  # @!attribute price_usd
  #   USD price per unit, or `null` when no exchange rate is available.
  #
  #   @return [Float, nil]
  required :price_usd, Float, nil?: true

  # @!attribute symbol
  #   Holding display symbol, such as `USDT`, `cbBTC`, or `EUR`.
  #
  #   @return [String]
  required :symbol, String

  # @!attribute value_usd
  #   Holding USD value, or `null` when no exchange rate is available.
  #
  #   @return [String, nil]
  required :value_usd, String, nil?: true

  # @!method initialize(balance:, breakdown:, icon_url:, name:, price_usd:, symbol:, value_usd:)
  #   Some parameter documentations has been truncated, see
  #   {WhopSDK::Models::Account::Balance} for more details.
  #
  #   Account holdings, each with USD value. Empty when `total_usd` is `null`.
  #
  #   @param balance [String] Total amount held in native units, as a decimal string.
  #
  #   @param breakdown [Object] Balance split into available, pending, and reserve amounts, as native-unit decim
  #
  #   @param icon_url [String, nil] Holding icon URL.
  #
  #   @param name [String] The holding's display name
  #
  #   @param price_usd [Float, nil] USD price per unit, or `null` when no exchange rate is available.
  #
  #   @param symbol [String] Holding display symbol, such as `USDT`, `cbBTC`, or `EUR`.
  #
  #   @param value_usd [String, nil] Holding USD value, or `null` when no exchange rate is available.
end

Instance Attribute Details

#balanceString

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

Parameters:

  • value (String)

Returns:

  • (String)


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

required :balance, String

#breakdownObject

Balance split into available, pending, and reserve amounts, as native-unit decimal strings. On-chain crypto is entirely available; good_funds and fiat cash can have pending or reserve portions.

Parameters:

  • value (top)

Returns:

  • (Object)


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

required :breakdown, WhopSDK::Internal::Type::Unknown

#icon_urlString?

Holding icon URL.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :icon_url, String, nil?: true

#nameString

The holding's display name

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#price_usdFloat?

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

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :price_usd, Float, nil?: true

#symbolString

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

Parameters:

  • value (String)

Returns:

  • (String)


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

required :symbol, String

#value_usdString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :value_usd, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {