Class: Privy::Models::BalanceAsset

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/privy/models/balance_asset.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(amount:, price:, symbol:) ⇒ Object

Some parameter documentations has been truncated, see Privy::Models::BalanceAsset for more details.

A single asset entry in a balance, representing holdings across all supported chains.

Parameters:

  • amount (String)

    The amount of the asset held, denominated in the unit of the asset itself, with

  • price (Privy::Models::CurrencyAmount)

    A monetary value with its currency denomination.

  • symbol (String)

    The symbol of the asset (e.g. USDC, ETH).



# File 'lib/privy/models/balance_asset.rb', line 25

Instance Attribute Details

#amountString

The amount of the asset held, denominated in the unit of the asset itself, with 1 decimal of precision.

Returns:

  • (String)


11
# File 'lib/privy/models/balance_asset.rb', line 11

required :amount, String

#pricePrivy::Models::CurrencyAmount

A monetary value with its currency denomination.



17
# File 'lib/privy/models/balance_asset.rb', line 17

required :price, -> { Privy::CurrencyAmount }

#symbolString

The symbol of the asset (e.g. USDC, ETH).

Returns:

  • (String)


23
# File 'lib/privy/models/balance_asset.rb', line 23

required :symbol, String