Class: GetApisAPIIDCollectionsCollectionIDResponse404

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



4533
4534
4535
4536
4537
4538
4539
4540
# File 'lib/schemas.rb', line 4533

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

.from_json!(json) ⇒ Object



4542
4543
4544
# File 'lib/schemas.rb', line 4542

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

Instance Method Details

#to_dynamicObject



4546
4547
4548
4549
4550
4551
4552
# File 'lib/schemas.rb', line 4546

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

#to_json(options = nil) ⇒ Object



4554
4555
4556
# File 'lib/schemas.rb', line 4554

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