Class: PutApisAPIIDSchemasSchemaIDFilesFilePathBodyRoot

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



28564
28565
28566
28567
28568
28569
# File 'lib/schemas.rb', line 28564

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

.from_json!(json) ⇒ Object



28571
28572
28573
# File 'lib/schemas.rb', line 28571

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

Instance Method Details

#to_dynamicObject



28575
28576
28577
28578
28579
# File 'lib/schemas.rb', line 28575

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

#to_json(options = nil) ⇒ Object



28581
28582
28583
# File 'lib/schemas.rb', line 28581

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