Class: PostImportOpenapiResponse500

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



23753
23754
23755
23756
23757
23758
# File 'lib/schemas.rb', line 23753

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

.from_json!(json) ⇒ Object



23760
23761
23762
# File 'lib/schemas.rb', line 23760

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

Instance Method Details

#to_dynamicObject



23764
23765
23766
23767
23768
# File 'lib/schemas.rb', line 23764

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

#to_json(options = nil) ⇒ Object



23770
23771
23772
# File 'lib/schemas.rb', line 23770

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