Class: Supabase::Auth::Types::AuthOtpResponse
- Inherits:
-
Struct
- Object
- Struct
- Supabase::Auth::Types::AuthOtpResponse
- Defined in:
- lib/supabase/auth/types.rb
Instance Attribute Summary collapse
-
#message_id ⇒ Object
Returns the value of attribute message_id.
-
#session ⇒ Object
Returns the value of attribute session.
-
#user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
Instance Attribute Details
#message_id ⇒ Object
Returns the value of attribute message_id
253 254 255 |
# File 'lib/supabase/auth/types.rb', line 253 def @message_id end |
#session ⇒ Object
Returns the value of attribute session
253 254 255 |
# File 'lib/supabase/auth/types.rb', line 253 def session @session end |
#user ⇒ Object
Returns the value of attribute user
253 254 255 |
# File 'lib/supabase/auth/types.rb', line 253 def user @user end |
Class Method Details
.from_hash(hash) ⇒ Object
259 260 261 262 263 264 265 266 267 |
# File 'lib/supabase/auth/types.rb', line 259 def self.from_hash(hash) return nil if hash.nil? new( message_id: hash["message_id"] || hash[:message_id], user: hash.key?("user") || hash.key?(:user) ? User.from_hash(hash["user"] || hash[:user]) : nil, session: hash.key?("session") || hash.key?(:session) ? Session.from_hash(hash["session"] || hash[:session]) : nil ) end |