Class: WorkOS::EmailChangeConfirmation

Inherits:
Types::BaseModel 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

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) ⇒ 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