Class: DeleteCollectionsCollectionIDResponse500

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



1585
1586
1587
1588
1589
1590
# File 'lib/schemas.rb', line 1585

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    error: d["error"] ? DeleteCollectionsCollectionIDResponse500Error.from_dynamic!(d["error"]) : nil,
  )
end

.from_json!(json) ⇒ Object



1592
1593
1594
# File 'lib/schemas.rb', line 1592

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

Instance Method Details

#to_dynamicObject



1596
1597
1598
1599
1600
# File 'lib/schemas.rb', line 1596

def to_dynamic
  {
    "error" => error&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



1602
1603
1604
# File 'lib/schemas.rb', line 1602

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