Class: GetApisAPIIDCollectionsCollectionIDResponse400

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



4412
4413
4414
4415
4416
4417
4418
4419
# File 'lib/schemas.rb', line 4412

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

.from_json!(json) ⇒ Object



4421
4422
4423
# File 'lib/schemas.rb', line 4421

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

Instance Method Details

#to_dynamicObject



4425
4426
4427
4428
4429
4430
4431
# File 'lib/schemas.rb', line 4425

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

#to_json(options = nil) ⇒ Object



4433
4434
4435
# File 'lib/schemas.rb', line 4433

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