Class: WorkOS::ClaimViewResponse

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/agents/claim_view_response.rb

Constant Summary collapse

HASH_ATTRS =
{
  id: :id,
  status: :status,
  user_code: :user_code,
  organizations: :organizations
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ClaimViewResponse

Returns a new instance of ClaimViewResponse.



20
21
22
23
24
25
26
# File 'lib/workos/agents/claim_view_response.rb', line 20

def initialize(json)
  hash = self.class.normalize(json)
  @id = hash[:id]
  @status = hash[:status]
  @user_code = hash[:user_code]
  @organizations = (hash[:organizations] || []).map { |item| item ? WorkOS::ClaimViewResponseOrganization.new(item) : nil }
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



14
15
16
# File 'lib/workos/agents/claim_view_response.rb', line 14

def id
  @id
end

#organizationsObject

Returns the value of attribute organizations.



14
15
16
# File 'lib/workos/agents/claim_view_response.rb', line 14

def organizations
  @organizations
end

#statusObject

Returns the value of attribute status.



14
15
16
# File 'lib/workos/agents/claim_view_response.rb', line 14

def status
  @status
end

#user_codeObject

Returns the value of attribute user_code.



14
15
16
# File 'lib/workos/agents/claim_view_response.rb', line 14

def user_code
  @user_code
end