Class: PatchCollectionsCollectionIDResponse500

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



18369
18370
18371
18372
18373
18374
# File 'lib/schemas.rb', line 18369

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

.from_json!(json) ⇒ Object



18376
18377
18378
# File 'lib/schemas.rb', line 18376

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

Instance Method Details

#to_dynamicObject



18380
18381
18382
18383
18384
# File 'lib/schemas.rb', line 18380

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

#to_json(options = nil) ⇒ Object



18386
18387
18388
# File 'lib/schemas.rb', line 18386

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