Class: CreateAPISchemaFilesItemRoot

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



35994
35995
35996
35997
35998
35999
# File 'lib/schemas.rb', line 35994

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

.from_json!(json) ⇒ Object



36001
36002
36003
# File 'lib/schemas.rb', line 36001

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

Instance Method Details

#to_dynamicObject



36005
36006
36007
36008
36009
# File 'lib/schemas.rb', line 36005

def to_dynamic
  {
    "enabled" => enabled,
  }
end

#to_json(options = nil) ⇒ Object



36011
36012
36013
# File 'lib/schemas.rb', line 36011

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