Class: GetApisAPIIDCollectionsCollectionIDResponse500

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



4570
4571
4572
4573
4574
4575
4576
4577
# File 'lib/schemas.rb', line 4570

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

.from_json!(json) ⇒ Object



4579
4580
4581
# File 'lib/schemas.rb', line 4579

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

Instance Method Details

#to_dynamicObject



4583
4584
4585
4586
4587
4588
4589
# File 'lib/schemas.rb', line 4583

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

#to_json(options = nil) ⇒ Object



4591
4592
4593
# File 'lib/schemas.rb', line 4591

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