Class: DeleteApisAPIIDResponse404

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



141
142
143
144
145
146
147
148
# File 'lib/schemas.rb', line 141

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

.from_json!(json) ⇒ Object



150
151
152
# File 'lib/schemas.rb', line 150

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

Instance Method Details

#to_dynamicObject



154
155
156
157
158
159
160
# File 'lib/schemas.rb', line 154

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

#to_json(options = nil) ⇒ Object



162
163
164
# File 'lib/schemas.rb', line 162

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