Class: PatchCollectionsCollectionIDResponse500Error

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



18342
18343
18344
18345
18346
18347
18348
# File 'lib/schemas.rb', line 18342

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    message:                                                d["message"],
    patch_collections_collection_id_response500_error_name: d["name"],
  )
end

.from_json!(json) ⇒ Object



18350
18351
18352
# File 'lib/schemas.rb', line 18350

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

Instance Method Details

#to_dynamicObject



18354
18355
18356
18357
18358
18359
# File 'lib/schemas.rb', line 18354

def to_dynamic
  {
    "message" => message,
    "name"    => patch_collections_collection_id_response500_error_name,
  }
end

#to_json(options = nil) ⇒ Object



18361
18362
18363
# File 'lib/schemas.rb', line 18361

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