Class: DeleteCollectionsCollectionIDResponse500Error

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



1558
1559
1560
1561
1562
1563
1564
# File 'lib/schemas.rb', line 1558

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

.from_json!(json) ⇒ Object



1566
1567
1568
# File 'lib/schemas.rb', line 1566

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

Instance Method Details

#to_dynamicObject



1570
1571
1572
1573
1574
1575
# File 'lib/schemas.rb', line 1570

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

#to_json(options = nil) ⇒ Object



1577
1578
1579
# File 'lib/schemas.rb', line 1577

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