Class: DeleteCollectionsCollectionIDRequestsRequestIDResponse500

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



1282
1283
1284
1285
1286
1287
1288
1289
# File 'lib/schemas.rb', line 1282

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

.from_json!(json) ⇒ Object



1291
1292
1293
# File 'lib/schemas.rb', line 1291

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

Instance Method Details

#to_dynamicObject



1295
1296
1297
1298
1299
1300
1301
# File 'lib/schemas.rb', line 1295

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

#to_json(options = nil) ⇒ Object



1303
1304
1305
# File 'lib/schemas.rb', line 1303

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