Class: Privy::Models::User

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/privy/models/user.rb

Overview

Direct Known Subclasses

OAuthLinkResponseBody

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:, created_at:, has_accepted_terms:, is_guest:, linked_accounts:, mfa_methods:, custom_metadata: nil) ⇒ Object

A Privy user object.

Parameters:



# File 'lib/privy/models/user.rb', line 46

Instance Attribute Details

#created_atFloat

Unix timestamp of when the user was created in seconds.

Returns:

  • (Float)


16
# File 'lib/privy/models/user.rb', line 16

required :created_at, Float

#custom_metadataHash{Symbol=>String, Float, Boolean}?

Custom metadata associated with the user.

Returns:

  • (Hash{Symbol=>String, Float, Boolean}, nil)


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

optional :custom_metadata, -> { Privy::Internal::Type::HashOf[union: Privy::CustomMetadataItem] }

#has_accepted_termsBoolean

Indicates if the user has accepted the terms of service.

Returns:

  • (Boolean)


22
# File 'lib/privy/models/user.rb', line 22

required :has_accepted_terms, Privy::Internal::Type::Boolean

#idString

Returns:

  • (String)


10
# File 'lib/privy/models/user.rb', line 10

required :id, String

#is_guestBoolean

Indicates if the user is a guest account user.

Returns:

  • (Boolean)


28
# File 'lib/privy/models/user.rb', line 28

required :is_guest, Privy::Internal::Type::Boolean

#linked_accountsArray<Privy::Models::LinkedAccountEmail, Privy::Models::LinkedAccountPhone, Privy::Models::LinkedAccountEthereum, Privy::Models::LinkedAccountSolana, Privy::Models::LinkedAccountSmartWallet, Privy::Models::LinkedAccountEthereumEmbeddedWallet, Privy::Models::LinkedAccountSolanaEmbeddedWallet, Privy::Models::LinkedAccountBitcoinSegwitEmbeddedWallet, Privy::Models::LinkedAccountBitcoinTaprootEmbeddedWallet, Privy::Models::LinkedAccountCurveSigningEmbeddedWallet, Privy::Models::LinkedAccountGoogleOAuth, Privy::Models::LinkedAccountTwitterOAuth, Privy::Models::LinkedAccountDiscordOAuth, Privy::Models::LinkedAccountGitHubOAuth, Privy::Models::LinkedAccountSpotifyOAuth, Privy::Models::LinkedAccountInstagramOAuth, Privy::Models::LinkedAccountTiktokOAuth, Privy::Models::LinkedAccountLineOAuth, Privy::Models::LinkedAccountTwitchOAuth, Privy::Models::LinkedAccountLinkedInOAuth, Privy::Models::LinkedAccountAppleOAuth, Privy::Models::LinkedAccountCustomOAuth, Privy::Models::LinkedAccountCustomJwt, Privy::Models::LinkedAccountFarcaster, Privy::Models::LinkedAccountPasskey, Privy::Models::LinkedAccountTelegram, Privy::Models::LinkedAccountCrossApp, Privy::Models::LinkedAccountAuthorizationKey>



33
# File 'lib/privy/models/user.rb', line 33

required :linked_accounts, -> { Privy::Internal::Type::ArrayOf[union: Privy::LinkedAccount] }

#mfa_methodsArray<Privy::Models::SMSMfaMethod, Privy::Models::TotpMfaMethod, Privy::Models::PasskeyMfaMethod>



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

required :mfa_methods, -> { Privy::Internal::Type::ArrayOf[union: Privy::LinkedMfaMethod] }