Class: PutApisAPIIDVersionsVersionIDResponse404

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



29372
29373
29374
29375
29376
29377
29378
29379
# File 'lib/schemas.rb', line 29372

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

.from_json!(json) ⇒ Object



29381
29382
29383
# File 'lib/schemas.rb', line 29381

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

Instance Method Details

#to_dynamicObject



29385
29386
29387
29388
29389
29390
29391
# File 'lib/schemas.rb', line 29385

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

#to_json(options = nil) ⇒ Object



29393
29394
29395
# File 'lib/schemas.rb', line 29393

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