Class: Supabase::Auth::Types::UserIdentity

Inherits:
Struct
  • Object
show all
Defined in:
lib/supabase/auth/types.rb

Overview

User Identity (includes identity_id)

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



398
399
400
# File 'lib/supabase/auth/types.rb', line 398

def created_at
  @created_at
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



398
399
400
# File 'lib/supabase/auth/types.rb', line 398

def id
  @id
end

#identity_dataObject

Returns the value of attribute identity_data

Returns:

  • (Object)

    the current value of identity_data



398
399
400
# File 'lib/supabase/auth/types.rb', line 398

def identity_data
  @identity_data
end

#identity_idObject

Returns the value of attribute identity_id

Returns:

  • (Object)

    the current value of identity_id



398
399
400
# File 'lib/supabase/auth/types.rb', line 398

def identity_id
  @identity_id
end

#last_sign_in_atObject

Returns the value of attribute last_sign_in_at

Returns:

  • (Object)

    the current value of last_sign_in_at



398
399
400
# File 'lib/supabase/auth/types.rb', line 398

def 
  @last_sign_in_at
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



398
399
400
# File 'lib/supabase/auth/types.rb', line 398

def provider
  @provider
end

#updated_atObject

Returns the value of attribute updated_at

Returns:

  • (Object)

    the current value of updated_at



398
399
400
# File 'lib/supabase/auth/types.rb', line 398

def updated_at
  @updated_at
end

#user_idObject

Returns the value of attribute user_id

Returns:

  • (Object)

    the current value of user_id



398
399
400
# File 'lib/supabase/auth/types.rb', line 398

def user_id
  @user_id
end

Class Method Details

.from_hash(hash) ⇒ Object



409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/supabase/auth/types.rb', line 409

def self.from_hash(hash)
  return nil if hash.nil?

  new(
    id: hash["id"] || hash[:id],
    identity_id: hash["identity_id"] || hash[:identity_id],
    user_id: hash["user_id"] || hash[:user_id],
    identity_data: hash["identity_data"] || hash[:identity_data] || {},
    provider: hash["provider"] || hash[:provider],
    created_at: Types.parse_timestamp(hash["created_at"] || hash[:created_at]),
    last_sign_in_at: Types.parse_timestamp(hash["last_sign_in_at"] || hash[:last_sign_in_at]),
    updated_at: Types.parse_timestamp(hash["updated_at"] || hash[:updated_at])
  )
end