Class: PostCollectionsCollectionIDRequestsResponse500

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



21313
21314
21315
21316
21317
21318
21319
21320
# File 'lib/schemas.rb', line 21313

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

.from_json!(json) ⇒ Object



21322
21323
21324
# File 'lib/schemas.rb', line 21322

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

Instance Method Details

#to_dynamicObject



21326
21327
21328
21329
21330
21331
21332
# File 'lib/schemas.rb', line 21326

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

#to_json(options = nil) ⇒ Object



21334
21335
21336
# File 'lib/schemas.rb', line 21334

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