Class: WorkOS::ClaimViewResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::ClaimViewResponse
- 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
-
#id ⇒ Object
Returns the value of attribute id.
-
#organizations ⇒ Object
Returns the value of attribute organizations.
-
#status ⇒ Object
Returns the value of attribute status.
-
#user_code ⇒ Object
Returns the value of attribute user_code.
Instance Method Summary collapse
-
#initialize(json) ⇒ ClaimViewResponse
constructor
A new instance of ClaimViewResponse.
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
#id ⇒ Object
Returns the value of attribute id.
14 15 16 |
# File 'lib/workos/agents/claim_view_response.rb', line 14 def id @id end |
#organizations ⇒ Object
Returns the value of attribute organizations.
14 15 16 |
# File 'lib/workos/agents/claim_view_response.rb', line 14 def organizations @organizations end |
#status ⇒ Object
Returns the value of attribute status.
14 15 16 |
# File 'lib/workos/agents/claim_view_response.rb', line 14 def status @status end |
#user_code ⇒ Object
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 |