Class: PutCollectionsCollectionIDResponsesResponseIDResponse404

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



31404
31405
31406
31407
31408
31409
# File 'lib/schemas.rb', line 31404

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

.from_json!(json) ⇒ Object



31411
31412
31413
# File 'lib/schemas.rb', line 31411

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

Instance Method Details

#to_dynamicObject



31415
31416
31417
31418
31419
# File 'lib/schemas.rb', line 31415

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

#to_json(options = nil) ⇒ Object



31421
31422
31423
# File 'lib/schemas.rb', line 31421

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