Class: WhopSDK::Models::LedgerAccountRetrieveResponse::Balance

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/ledger_account_retrieve_response.rb

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:, ledger_type:, owner:, payments_approval_status:, payout_account_details:, transfer_fee:, treasury_balance:) ⇒ Object

A ledger account represents a financial account on Whop that can hold many balances.

Parameters:



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/whop_sdk/models/ledger_account_retrieve_response.rb', line 82

class Balance < WhopSDK::Internal::Type::BaseModel
  # @!attribute balance
  #   The amount of the balance.
  #
  #   @return [Float]
  required :balance, Float

  # @!attribute currency
  #   The currency of the balance.
  #
  #   @return [Symbol, WhopSDK::Models::Currency]
  required :currency, enum: -> { WhopSDK::Currency }

  # @!attribute pending_balance
  #   The amount of the balance that is pending.
  #
  #   @return [Float]
  required :pending_balance, Float

  # @!attribute reserve_balance
  #   The amount of the balance that is reserved.
  #
  #   @return [Float]
  required :reserve_balance, Float

  # @!method initialize(balance:, currency:, pending_balance:, reserve_balance:)
  #   A cached balance for a LedgerAccount in respect to a currency.
  #
  #   @param balance [Float] The amount of the balance.
  #
  #   @param currency [Symbol, WhopSDK::Models::Currency] The currency of the balance.
  #
  #   @param pending_balance [Float] The amount of the balance that is pending.
  #
  #   @param reserve_balance [Float] The amount of the balance that is reserved.
end

Instance Attribute Details

#balanceFloat

The amount of the balance.

Returns:

  • (Float)


87
# File 'lib/whop_sdk/models/ledger_account_retrieve_response.rb', line 87

required :balance, Float

#currencySymbol, WhopSDK::Models::Currency

The currency of the balance.

Returns:



93
# File 'lib/whop_sdk/models/ledger_account_retrieve_response.rb', line 93

required :currency, enum: -> { WhopSDK::Currency }

#pending_balanceFloat

The amount of the balance that is pending.

Returns:

  • (Float)


99
# File 'lib/whop_sdk/models/ledger_account_retrieve_response.rb', line 99

required :pending_balance, Float

#reserve_balanceFloat

The amount of the balance that is reserved.

Returns:

  • (Float)


105
# File 'lib/whop_sdk/models/ledger_account_retrieve_response.rb', line 105

required :reserve_balance, Float