Class: Privy::Models::Wallets::BalanceGetParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/privy/models/wallets/balance_get_params.rb,
sig/privy/models/wallets/balance_get_params.rbs

Overview

See Also:

  • Privy::Resources::Wallets::Balance#get

Defined Under Namespace

Modules: Asset, Chain, IncludeCurrency, Token

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(wallet_id:, token: nil, asset: nil, chain: nil, include_archived: nil, include_currency: nil, request_options: {}) ⇒ Object

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

Parameters:



# File 'lib/privy/models/wallets/balance_get_params.rb', line 53

Instance Attribute Details

#assetSymbol, ...

Named asset(s) to query (e.g. eth, usdc). Use together with chain to scope the query. Cannot be used with token.



31
# File 'lib/privy/models/wallets/balance_get_params.rb', line 31

optional :asset, union: -> { Privy::Wallets::BalanceGetParams::Asset }

#chainSymbol, ...

Chain(s) to query named assets on (e.g. base, ethereum). Use together with asset. Cannot be used with token.



38
# File 'lib/privy/models/wallets/balance_get_params.rb', line 38

optional :chain, union: -> { Privy::Wallets::BalanceGetParams::Chain }

#include_archivedBoolean?

Include archived wallets in lookup. Defaults to false.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


44
# File 'lib/privy/models/wallets/balance_get_params.rb', line 44

optional :include_archived, Privy::Internal::Type::Boolean

#include_currencySymbol, ...

If set, balances are converted to the specified fiat currency. Not supported when token is provided.



51
# File 'lib/privy/models/wallets/balance_get_params.rb', line 51

optional :include_currency, enum: -> { Privy::Wallets::BalanceGetParams::IncludeCurrency }

#tokenString, ...

The token contract address(es) to query in format "chain:address" (e.g., "base:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" or "solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"). Cannot be used together with asset/chain or with include_currency.

Returns:

  • (String, Array<String>, nil)


24
# File 'lib/privy/models/wallets/balance_get_params.rb', line 24

optional :token, union: -> { Privy::Wallets::BalanceGetParams::Token }

#wallet_idString

ID of the wallet.

Parameters:

  • value (String)

Returns:

  • (String)


15
# File 'lib/privy/models/wallets/balance_get_params.rb', line 15

required :wallet_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


59
# File 'sig/privy/models/wallets/balance_get_params.rbs', line 59

def to_hash: -> {