Class: PostApisAPIIDCollectionsResponse404

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



19371
19372
19373
19374
19375
19376
19377
19378
# File 'lib/schemas.rb', line 19371

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

.from_json!(json) ⇒ Object



19380
19381
19382
# File 'lib/schemas.rb', line 19380

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

Instance Method Details

#to_dynamicObject



19384
19385
19386
19387
19388
19389
19390
# File 'lib/schemas.rb', line 19384

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

#to_json(options = nil) ⇒ Object



19392
19393
19394
# File 'lib/schemas.rb', line 19392

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