Class: WhopSDK::Models::LedgerAccountFundsAvailableWebhookEvent::Data::Balance

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/ledger_account_funds_available_webhook_event.rb,
sig/whop_sdk/models/ledger_account_funds_available_webhook_event.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:, 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:



136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/whop_sdk/models/ledger_account_funds_available_webhook_event.rb', line 136

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.

Parameters:

  • value (Float)

Returns:

  • (Float)


141
# File 'lib/whop_sdk/models/ledger_account_funds_available_webhook_event.rb', line 141

required :balance, Float

#currencySymbol, WhopSDK::Models::Currency

The currency of the balance.

Parameters:

  • value (WhopSDK::Models::currency)

Returns:



147
# File 'lib/whop_sdk/models/ledger_account_funds_available_webhook_event.rb', line 147

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

#pending_balanceFloat

The amount of the balance that is pending.

Parameters:

  • value (Float)

Returns:

  • (Float)


153
# File 'lib/whop_sdk/models/ledger_account_funds_available_webhook_event.rb', line 153

required :pending_balance, Float

#reserve_balanceFloat

The amount of the balance that is reserved.

Parameters:

  • value (Float)

Returns:

  • (Float)


159
# File 'lib/whop_sdk/models/ledger_account_funds_available_webhook_event.rb', line 159

required :reserve_balance, Float

Instance Method Details

#to_hash{

Returns:

  • ({)


119
# File 'sig/whop_sdk/models/ledger_account_funds_available_webhook_event.rbs', line 119

def to_hash: -> {