Class: PutCollectionsCollectionIDResponse500

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



30947
30948
30949
30950
30951
30952
# File 'lib/schemas.rb', line 30947

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

.from_json!(json) ⇒ Object



30954
30955
30956
# File 'lib/schemas.rb', line 30954

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

Instance Method Details

#to_dynamicObject



30958
30959
30960
30961
30962
# File 'lib/schemas.rb', line 30958

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

#to_json(options = nil) ⇒ Object



30964
30965
30966
# File 'lib/schemas.rb', line 30964

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