Class: KeycloakAdmin::OrganizationRepresentation

Inherits:
Representation show all
Defined in:
lib/keycloak-admin/representation/organization_representation.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Representation

#as_json, from_json, #to_json

Methods included from CamelJson

#camelize

Instance Attribute Details

#aliasObject

Returns the value of attribute alias.



3
4
5
# File 'lib/keycloak-admin/representation/organization_representation.rb', line 3

def alias
  @alias
end

#attributesObject

Returns the value of attribute attributes.



3
4
5
# File 'lib/keycloak-admin/representation/organization_representation.rb', line 3

def attributes
  @attributes
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/keycloak-admin/representation/organization_representation.rb', line 3

def description
  @description
end

#domainsObject

Returns the value of attribute domains.



3
4
5
# File 'lib/keycloak-admin/representation/organization_representation.rb', line 3

def domains
  @domains
end

#enabledObject

Returns the value of attribute enabled.



3
4
5
# File 'lib/keycloak-admin/representation/organization_representation.rb', line 3

def enabled
  @enabled
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/keycloak-admin/representation/organization_representation.rb', line 3

def id
  @id
end

#identity_providersObject

Returns the value of attribute identity_providers.



3
4
5
# File 'lib/keycloak-admin/representation/organization_representation.rb', line 3

def identity_providers
  @identity_providers
end

#membersObject

Returns the value of attribute members.



3
4
5
# File 'lib/keycloak-admin/representation/organization_representation.rb', line 3

def members
  @members
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/keycloak-admin/representation/organization_representation.rb', line 3

def name
  @name
end

#redirect_urlObject

Returns the value of attribute redirect_url.



3
4
5
# File 'lib/keycloak-admin/representation/organization_representation.rb', line 3

def redirect_url
  @redirect_url
end

Class Method Details

.from_hash(hash) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/keycloak-admin/representation/organization_representation.rb', line 15

def self.from_hash(hash)
  role                    = new
  role.id                 = hash["id"]
  role.name               = hash["name"]
  role.alias              = hash["alias"]
  role.enabled            = hash["enabled"]
  role.description        = hash["description"]
  role.redirect_url       = hash["redirectUrl"]
  role.attributes         = hash["attributes"] || {}
  role.domains            = hash["domains"].nil? ? [] : hash["domains"].map { |domain| KeycloakAdmin::OrganizationDomainRepresentation.from_hash(domain) }
  role.members            = hash["members"].nil? ? [] : hash["members"].map { |member| KeycloakAdmin::MemberRepresentation.from_hash(member) }
  role.identity_providers = hash["identityProviders"].nil? ? [] : hash["identityProviders"].map { |provider| KeycloakAdmin::IdentityProviderRepresentation.from_hash(provider) }
  role
end