Class: DeleteApisAPIIDResponse500

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



215
216
217
218
219
220
221
222
# File 'lib/schemas.rb', line 215

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

.from_json!(json) ⇒ Object



224
225
226
# File 'lib/schemas.rb', line 224

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

Instance Method Details

#to_dynamicObject



228
229
230
231
232
233
234
# File 'lib/schemas.rb', line 228

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

#to_json(options = nil) ⇒ Object



236
237
238
# File 'lib/schemas.rb', line 236

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