Class: GetApisAPIIDVersionsResponse500

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



6299
6300
6301
6302
6303
6304
6305
6306
# File 'lib/schemas.rb', line 6299

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

.from_json!(json) ⇒ Object



6308
6309
6310
# File 'lib/schemas.rb', line 6308

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

Instance Method Details

#to_dynamicObject



6312
6313
6314
6315
6316
6317
6318
# File 'lib/schemas.rb', line 6312

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

#to_json(options = nil) ⇒ Object



6320
6321
6322
# File 'lib/schemas.rb', line 6320

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