Class: PutApisAPIIDResponse500

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



28533
28534
28535
28536
28537
28538
28539
28540
# File 'lib/schemas.rb', line 28533

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    detail:                           d["detail"],
    title:                            d["title"],
    put_apis_api_id_response500_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



28542
28543
28544
# File 'lib/schemas.rb', line 28542

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

Instance Method Details

#to_dynamicObject



28546
28547
28548
28549
28550
28551
28552
# File 'lib/schemas.rb', line 28546

def to_dynamic
  {
    "detail" => detail,
    "title"  => title,
    "type"   => put_apis_api_id_response500_type,
  }
end

#to_json(options = nil) ⇒ Object



28554
28555
28556
# File 'lib/schemas.rb', line 28554

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