Class: GetScimV2ResourceTypesResponseItemSchemaExtensionsItem

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



14903
14904
14905
14906
14907
14908
14909
# File 'lib/schemas.rb', line 14903

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    required: d["required"],
    schema:   d["schema"],
  )
end

.from_json!(json) ⇒ Object



14911
14912
14913
# File 'lib/schemas.rb', line 14911

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



14915
14916
14917
14918
14919
14920
# File 'lib/schemas.rb', line 14915

def to_dynamic
  {
    "required" => required,
    "schema"   => schema,
  }
end

#to_json(options = nil) ⇒ Object



14922
14923
14924
# File 'lib/schemas.rb', line 14922

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end