Class: WorkOS::OrganizationSelectionRequiredErrorBodyWithOrganizations

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/organizations/organization_selection_required_error_body_with_organizations.rb

Constant Summary collapse

HASH_ATTRS =
{
  code: :code,
  message: :message,
  organizations: :organizations
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OrganizationSelectionRequiredErrorBodyWithOrganizations

Returns a new instance of OrganizationSelectionRequiredErrorBodyWithOrganizations.



18
19
20
21
22
23
# File 'lib/workos/organizations/organization_selection_required_error_body_with_organizations.rb', line 18

def initialize(json)
  hash = self.class.normalize(json)
  @code = hash[:code]
  @message = hash[:message]
  @organizations = (hash[:organizations] || []).map { |item| item ? WorkOS::OrganizationSelectionRequiredErrorBodyWithOrganization.new(item) : nil }
end

Instance Attribute Details

#code ⇒ Object

Returns the value of attribute code.



13
14
15
# File 'lib/workos/organizations/organization_selection_required_error_body_with_organizations.rb', line 13

def code
  @code
end

#message ⇒ Object

Returns the value of attribute message.



13
14
15
# File 'lib/workos/organizations/organization_selection_required_error_body_with_organizations.rb', line 13

def message
  @message
end

#organizations ⇒ Object

Returns the value of attribute organizations.



13
14
15
# File 'lib/workos/organizations/organization_selection_required_error_body_with_organizations.rb', line 13

def organizations
  @organizations
end