Class: PutApisAPIIDResponse404

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



28459
28460
28461
28462
28463
28464
28465
28466
# File 'lib/schemas.rb', line 28459

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

.from_json!(json) ⇒ Object



28468
28469
28470
# File 'lib/schemas.rb', line 28468

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

Instance Method Details

#to_dynamicObject



28472
28473
28474
28475
28476
28477
28478
# File 'lib/schemas.rb', line 28472

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

#to_json(options = nil) ⇒ Object



28480
28481
28482
# File 'lib/schemas.rb', line 28480

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