Class: GetCollectionsCollectionIDResponse500

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



8236
8237
8238
8239
8240
8241
# File 'lib/schemas.rb', line 8236

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

.from_json!(json) ⇒ Object



8243
8244
8245
# File 'lib/schemas.rb', line 8243

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

Instance Method Details

#to_dynamicObject



8247
8248
8249
8250
8251
# File 'lib/schemas.rb', line 8247

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

#to_json(options = nil) ⇒ Object



8253
8254
8255
# File 'lib/schemas.rb', line 8253

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