Class: DeleteCollectionsCollectionIDResponsesResponseIDResponse404

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



1857
1858
1859
1860
1861
1862
# File 'lib/schemas.rb', line 1857

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

.from_json!(json) ⇒ Object



1864
1865
1866
# File 'lib/schemas.rb', line 1864

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

Instance Method Details

#to_dynamicObject



1868
1869
1870
1871
1872
# File 'lib/schemas.rb', line 1868

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

#to_json(options = nil) ⇒ Object



1874
1875
1876
# File 'lib/schemas.rb', line 1874

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