Class: Privy::Models::Wallets::BalanceGetResponse::Balance
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Privy::Models::Wallets::BalanceGetResponse::Balance
- Defined in:
- lib/privy/models/wallets/balance_get_response.rb
Defined Under Namespace
Instance Attribute Summary collapse
- #asset ⇒ Symbol, ...
- #chain ⇒ Symbol, Privy::Models::Wallets::BalanceGetResponse::Balance::Chain
- #display_values ⇒ Hash{Symbol=>String}
- #raw_value ⇒ String
- #raw_value_decimals ⇒ Float
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(asset:, chain:, display_values:, raw_value:, raw_value_decimals:) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 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 118 |
# File 'lib/privy/models/wallets/balance_get_response.rb', line 17 class Balance < Privy::Internal::Type::BaseModel # @!attribute asset # # @return [Symbol, String, Privy::Models::Wallets::BalanceGetResponse::Balance::Asset] required :asset, union: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset } # @!attribute chain # # @return [Symbol, Privy::Models::Wallets::BalanceGetResponse::Balance::Chain] required :chain, enum: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Chain } # @!attribute display_values # # @return [Hash{Symbol=>String}] required :display_values, Privy::Internal::Type::HashOf[String] # @!attribute raw_value # # @return [String] required :raw_value, String # @!attribute raw_value_decimals # # @return [Float] required :raw_value_decimals, Float # @!method initialize(asset:, chain:, display_values:, raw_value:, raw_value_decimals:) # @param asset [Symbol, String, Privy::Models::Wallets::BalanceGetResponse::Balance::Asset] # @param chain [Symbol, Privy::Models::Wallets::BalanceGetResponse::Balance::Chain] # @param display_values [Hash{Symbol=>String}] # @param raw_value [String] # @param raw_value_decimals [Float] # @see Privy::Models::Wallets::BalanceGetResponse::Balance#asset module Asset extend Privy::Internal::Type::Union variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::USDC } variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::USDC_E } variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::ETH } variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::POL } variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::USDT } variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::EURC } variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::USDB } variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::SOL } variant String # @!method self.variants # @return [Array(Symbol, String)] define_sorbet_constant!(:Variants) do T.type_alias { T.any(Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::TaggedSymbol, String) } end # @!group USDC = :usdc USDC_E = :"usdc.e" ETH = :eth POL = :pol USDT = :usdt EURC = :eurc USDB = :usdb SOL = :sol # @!endgroup end # @see Privy::Models::Wallets::BalanceGetResponse::Balance#chain module Chain extend Privy::Internal::Type::Enum ETHEREUM = :ethereum ARBITRUM = :arbitrum BASE = :base TEMPO = :tempo LINEA = :linea OPTIMISM = :optimism POLYGON = :polygon SOLANA = :solana ZKSYNC_ERA = :zksync_era SEPOLIA = :sepolia ARBITRUM_SEPOLIA = :arbitrum_sepolia BASE_SEPOLIA = :base_sepolia LINEA_TESTNET = :linea_testnet OPTIMISM_SEPOLIA = :optimism_sepolia POLYGON_AMOY = :polygon_amoy SOLANA_DEVNET = :solana_devnet SOLANA_TESTNET = :solana_testnet # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#asset ⇒ Symbol, ...
21 |
# File 'lib/privy/models/wallets/balance_get_response.rb', line 21 required :asset, union: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset } |
#chain ⇒ Symbol, Privy::Models::Wallets::BalanceGetResponse::Balance::Chain
26 |
# File 'lib/privy/models/wallets/balance_get_response.rb', line 26 required :chain, enum: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Chain } |
#display_values ⇒ Hash{Symbol=>String}
31 |
# File 'lib/privy/models/wallets/balance_get_response.rb', line 31 required :display_values, Privy::Internal::Type::HashOf[String] |
#raw_value ⇒ String
36 |
# File 'lib/privy/models/wallets/balance_get_response.rb', line 36 required :raw_value, String |
#raw_value_decimals ⇒ Float
41 |
# File 'lib/privy/models/wallets/balance_get_response.rb', line 41 required :raw_value_decimals, Float |