Class: Supabase::Auth::Types::User
- Inherits:
-
Struct
- Object
- Struct
- Supabase::Auth::Types::User
- Defined in:
- lib/supabase/auth/types.rb
Instance Attribute Summary collapse
-
#action_link ⇒ Object
Returns the value of attribute action_link.
-
#app_metadata ⇒ Object
Returns the value of attribute app_metadata.
-
#aud ⇒ Object
Returns the value of attribute aud.
-
#banned_until ⇒ Object
Returns the value of attribute banned_until.
-
#confirmation_sent_at ⇒ Object
Returns the value of attribute confirmation_sent_at.
-
#confirmed_at ⇒ Object
Returns the value of attribute confirmed_at.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#deleted_at ⇒ Object
Returns the value of attribute deleted_at.
-
#email ⇒ Object
Returns the value of attribute email.
-
#email_change_sent_at ⇒ Object
Returns the value of attribute email_change_sent_at.
-
#email_confirmed_at ⇒ Object
Returns the value of attribute email_confirmed_at.
-
#factors ⇒ Object
Returns the value of attribute factors.
-
#id ⇒ Object
Returns the value of attribute id.
-
#identities ⇒ Object
Returns the value of attribute identities.
-
#invited_at ⇒ Object
Returns the value of attribute invited_at.
-
#is_anonymous ⇒ Object
Returns the value of attribute is_anonymous.
-
#is_sso_user ⇒ Object
Returns the value of attribute is_sso_user.
-
#last_sign_in_at ⇒ Object
Returns the value of attribute last_sign_in_at.
-
#new_email ⇒ Object
Returns the value of attribute new_email.
-
#new_phone ⇒ Object
Returns the value of attribute new_phone.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#phone_confirmed_at ⇒ Object
Returns the value of attribute phone_confirmed_at.
-
#recovery_sent_at ⇒ Object
Returns the value of attribute recovery_sent_at.
-
#role ⇒ Object
Returns the value of attribute role.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#user_metadata ⇒ Object
Returns the value of attribute user_metadata.
Class Method Summary collapse
Instance Attribute Details
#action_link ⇒ Object
Returns the value of attribute action_link
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def action_link @action_link end |
#app_metadata ⇒ Object
Returns the value of attribute app_metadata
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def @app_metadata end |
#aud ⇒ Object
Returns the value of attribute aud
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def aud @aud end |
#banned_until ⇒ Object
Returns the value of attribute banned_until
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def banned_until @banned_until end |
#confirmation_sent_at ⇒ Object
Returns the value of attribute confirmation_sent_at
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def confirmation_sent_at @confirmation_sent_at end |
#confirmed_at ⇒ Object
Returns the value of attribute confirmed_at
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def confirmed_at @confirmed_at end |
#created_at ⇒ Object
Returns the value of attribute created_at
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def created_at @created_at end |
#deleted_at ⇒ Object
Returns the value of attribute deleted_at
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def deleted_at @deleted_at end |
#email ⇒ Object
Returns the value of attribute email
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def email @email end |
#email_change_sent_at ⇒ Object
Returns the value of attribute email_change_sent_at
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def email_change_sent_at @email_change_sent_at end |
#email_confirmed_at ⇒ Object
Returns the value of attribute email_confirmed_at
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def email_confirmed_at @email_confirmed_at end |
#factors ⇒ Object
Returns the value of attribute factors
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def factors @factors end |
#id ⇒ Object
Returns the value of attribute id
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def id @id end |
#identities ⇒ Object
Returns the value of attribute identities
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def identities @identities end |
#invited_at ⇒ Object
Returns the value of attribute invited_at
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def invited_at @invited_at end |
#is_anonymous ⇒ Object
Returns the value of attribute is_anonymous
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def is_anonymous @is_anonymous end |
#is_sso_user ⇒ Object
Returns the value of attribute is_sso_user
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def is_sso_user @is_sso_user end |
#last_sign_in_at ⇒ Object
Returns the value of attribute last_sign_in_at
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def last_sign_in_at @last_sign_in_at end |
#new_email ⇒ Object
Returns the value of attribute new_email
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def new_email @new_email end |
#new_phone ⇒ Object
Returns the value of attribute new_phone
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def new_phone @new_phone end |
#phone ⇒ Object
Returns the value of attribute phone
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def phone @phone end |
#phone_confirmed_at ⇒ Object
Returns the value of attribute phone_confirmed_at
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def phone_confirmed_at @phone_confirmed_at end |
#recovery_sent_at ⇒ Object
Returns the value of attribute recovery_sent_at
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def recovery_sent_at @recovery_sent_at end |
#role ⇒ Object
Returns the value of attribute role
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def role @role end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def updated_at @updated_at end |
#user_metadata ⇒ Object
Returns the value of attribute user_metadata
84 85 86 |
# File 'lib/supabase/auth/types.rb', line 84 def @user_metadata end |
Class Method Details
.from_hash(hash) ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/supabase/auth/types.rb', line 113 def self.from_hash(hash) return nil if hash.nil? identities = (hash["identities"] || hash[:identities])&.map { |i| Identity.from_hash(i) } factors = (hash["factors"] || hash[:factors])&.map { |f| Factor.from_hash(f) } new( id: hash["id"] || hash[:id], aud: hash["aud"] || hash[:aud], role: hash["role"] || hash[:role], email: hash["email"] || hash[:email], email_confirmed_at: Types.(hash["email_confirmed_at"] || hash[:email_confirmed_at]), phone: hash["phone"] || hash[:phone], phone_confirmed_at: Types.(hash["phone_confirmed_at"] || hash[:phone_confirmed_at]), confirmed_at: Types.(hash["confirmed_at"] || hash[:confirmed_at]), last_sign_in_at: Types.(hash["last_sign_in_at"] || hash[:last_sign_in_at]), app_metadata: hash["app_metadata"] || hash[:app_metadata] || {}, user_metadata: hash["user_metadata"] || hash[:user_metadata] || {}, identities: identities, factors: factors, created_at: Types.(hash["created_at"] || hash[:created_at]), updated_at: Types.(hash["updated_at"] || hash[:updated_at]), new_email: hash["new_email"] || hash[:new_email], new_phone: hash["new_phone"] || hash[:new_phone], invited_at: Types.(hash["invited_at"] || hash[:invited_at]), is_anonymous: hash.key?("is_anonymous") ? hash["is_anonymous"] : (hash.key?(:is_anonymous) ? hash[:is_anonymous] : false), is_sso_user: hash.key?("is_sso_user") ? hash["is_sso_user"] : (hash.key?(:is_sso_user) ? hash[:is_sso_user] : false), deleted_at: hash["deleted_at"] || hash[:deleted_at], banned_until: hash["banned_until"] || hash[:banned_until], confirmation_sent_at: Types.(hash["confirmation_sent_at"] || hash[:confirmation_sent_at]), recovery_sent_at: Types.(hash["recovery_sent_at"] || hash[:recovery_sent_at]), email_change_sent_at: Types.(hash["email_change_sent_at"] || hash[:email_change_sent_at]), action_link: hash["action_link"] || hash[:action_link] ) end |