Class: Scimitar::Schema::Group

Inherits:
Base
  • Object
show all
Defined in:
app/models/scimitar/schema/group.rb

Overview

Represents the schema for the Group resource See also Scimitar::Resources::Group

Instance Attribute Summary

Attributes inherited from Base

#description, #id, #meta, #name, #scim_attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#as_json, cloned_scim_attributes, find_attribute, valid?

Constructor Details

#initialize(options = {}) ⇒ Group

Returns a new instance of Group.



7
8
9
10
11
12
# File 'app/models/scimitar/schema/group.rb', line 7

def initialize(options = {})
  super(name: 'Group',
        id: self.class.id,
        description: 'Represents a Group',
        scim_attributes: self.class.scim_attributes)
end

Class Method Details

.idObject



14
15
16
# File 'app/models/scimitar/schema/group.rb', line 14

def self.id
  'urn:ietf:params:scim:schemas:core:2.0:Group'
end

.scim_attributesObject



18
19
20
21
22
23
# File 'app/models/scimitar/schema/group.rb', line 18

def self.scim_attributes
  [
    Attribute.new(name: 'displayName', type: 'string', required: true),
    Attribute.new(name: 'members', multiValued: true, complexType: Scimitar::ComplexTypes::ReferenceMember, mutability: 'readWrite')
  ]
end