Class: WorkOS::EmailChangeConfirmation

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/user_management/email_change_confirmation.rb

Constant Summary collapse

HASH_ATTRS =
{
  object: :object,
  user: :user
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ EmailChangeConfirmation

Returns a new instance of EmailChangeConfirmation.



16
17
18
19
20
# File 'lib/workos/user_management/email_change_confirmation.rb', line 16

def initialize(json)
  hash = self.class.normalize(json)
  @object = hash[:object]
  @user = hash[:user] ? WorkOS::EmailChangeConfirmationUser.new(hash[:user]) : nil
end

Instance Attribute Details

#objectObject

Returns the value of attribute object.



12
13
14
# File 'lib/workos/user_management/email_change_confirmation.rb', line 12

def object
  @object
end

#userObject

Returns the value of attribute user.



12
13
14
# File 'lib/workos/user_management/email_change_confirmation.rb', line 12

def user
  @user
end