Class: GetApisResponse500

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



6862
6863
6864
6865
6866
6867
6868
6869
# File 'lib/schemas.rb', line 6862

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    detail:                    d["detail"],
    title:                     d["title"],
    get_apis_response500_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



6871
6872
6873
# File 'lib/schemas.rb', line 6871

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

Instance Method Details

#to_dynamicObject



6875
6876
6877
6878
6879
6880
6881
# File 'lib/schemas.rb', line 6875

def to_dynamic
  {
    "detail" => detail,
    "title"  => title,
    "type"   => get_apis_response500_type,
  }
end

#to_json(options = nil) ⇒ Object



6883
6884
6885
# File 'lib/schemas.rb', line 6883

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