Class: WorkOS::UpdateUser

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/user_management/update_user.rb

Constant Summary collapse

HASH_ATTRS =
{
  email: :email,
  first_name: :first_name,
  last_name: :last_name,
  email_verified: :email_verified,
  metadata: :metadata,
  external_id: :external_id,
  locale: :locale,
  password: :password,
  password_hash: :password_hash,
  password_hash_type: :password_hash_type
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ UpdateUser

Returns a new instance of UpdateUser.



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/workos/user_management/update_user.rb', line 32

def initialize(json)
  hash = self.class.normalize(json)
  @email = hash[:email]
  @first_name = hash[:first_name]
  @last_name = hash[:last_name]
  @email_verified = hash[:email_verified]
  @metadata = hash[:metadata] || {}
  @external_id = hash[:external_id]
  @locale = hash[:locale]
  @password = hash[:password]
  @password_hash = hash[:password_hash]
  @password_hash_type = hash[:password_hash_type]
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



20
21
22
# File 'lib/workos/user_management/update_user.rb', line 20

def email
  @email
end

#email_verifiedObject

Returns the value of attribute email_verified.



20
21
22
# File 'lib/workos/user_management/update_user.rb', line 20

def email_verified
  @email_verified
end

#external_idObject

Returns the value of attribute external_id.



20
21
22
# File 'lib/workos/user_management/update_user.rb', line 20

def external_id
  @external_id
end

#first_nameObject

Returns the value of attribute first_name.



20
21
22
# File 'lib/workos/user_management/update_user.rb', line 20

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name.



20
21
22
# File 'lib/workos/user_management/update_user.rb', line 20

def last_name
  @last_name
end

#localeObject

Returns the value of attribute locale.



20
21
22
# File 'lib/workos/user_management/update_user.rb', line 20

def locale
  @locale
end

#metadataObject

Returns the value of attribute metadata.



20
21
22
# File 'lib/workos/user_management/update_user.rb', line 20

def 
  @metadata
end

#passwordObject

Returns the value of attribute password.



20
21
22
# File 'lib/workos/user_management/update_user.rb', line 20

def password
  @password
end

#password_hashObject

Returns the value of attribute password_hash.



20
21
22
# File 'lib/workos/user_management/update_user.rb', line 20

def password_hash
  @password_hash
end

#password_hash_typeObject

Returns the value of attribute password_hash_type.



20
21
22
# File 'lib/workos/user_management/update_user.rb', line 20

def password_hash_type
  @password_hash_type
end