Class: PutApisAPIIDVersionsVersionIDResponse500

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



29409
29410
29411
29412
29413
29414
29415
29416
# File 'lib/schemas.rb', line 29409

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

.from_json!(json) ⇒ Object



29418
29419
29420
# File 'lib/schemas.rb', line 29418

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

Instance Method Details

#to_dynamicObject



29422
29423
29424
29425
29426
29427
29428
# File 'lib/schemas.rb', line 29422

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

#to_json(options = nil) ⇒ Object



29430
29431
29432
# File 'lib/schemas.rb', line 29430

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