Class: WorkOS::CreateUser

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/user_management/create_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,
  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) ⇒ CreateUser

Returns a new instance of CreateUser.



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/workos/user_management/create_user.rb', line 30

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]
  @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.



19
20
21
# File 'lib/workos/user_management/create_user.rb', line 19

def email
  @email
end

#email_verifiedObject

Returns the value of attribute email_verified.



19
20
21
# File 'lib/workos/user_management/create_user.rb', line 19

def email_verified
  @email_verified
end

#external_idObject

Returns the value of attribute external_id.



19
20
21
# File 'lib/workos/user_management/create_user.rb', line 19

def external_id
  @external_id
end

#first_nameObject

Returns the value of attribute first_name.



19
20
21
# File 'lib/workos/user_management/create_user.rb', line 19

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name.



19
20
21
# File 'lib/workos/user_management/create_user.rb', line 19

def last_name
  @last_name
end

#metadataObject

Returns the value of attribute metadata.



19
20
21
# File 'lib/workos/user_management/create_user.rb', line 19

def 
  @metadata
end

#passwordObject

Returns the value of attribute password.



19
20
21
# File 'lib/workos/user_management/create_user.rb', line 19

def password
  @password
end

#password_hashObject

Returns the value of attribute password_hash.



19
20
21
# File 'lib/workos/user_management/create_user.rb', line 19

def password_hash
  @password_hash
end

#password_hash_typeObject

Returns the value of attribute password_hash_type.



19
20
21
# File 'lib/workos/user_management/create_user.rb', line 19

def password_hash_type
  @password_hash_type
end