Sha256: c94c66c363539eed5dfd67e9d488b64541317710d6330c609c1dbbb505b6e09c
Contents?: true
Size: 949 Bytes
Versions: 44
Compression:
Stored size: 949 Bytes
Contents
module Scimitar # Provides info about a resource type. Instances of this class are used to provide info through the /ResourceTypes endpoint of a SCIM service provider. class ResourceType include ActiveModel::Model attr_accessor :meta, :endpoint, :schema, :schemas, :id, :name, :schemaExtensions def initialize(attributes = {}) default_attributes = { meta: Meta.new( 'resourceType': 'ResourceType' ), schemas: ['urn:ietf:params:scim:schemas:core:2.0:ResourceType'] } super(default_attributes.merge(attributes)) end def as_json(options = {}) without_extensions = super(except: 'schemaExtensions') if schemaExtensions.present? extensions = schemaExtensions.map{|extension| {"schema" => extension, "required" => false}} without_extensions.merge('schemaExtensions' => extensions) else without_extensions end end end end
Version data entries
44 entries across 44 versions & 2 rubygems