Class: DeleteApisAPIIDResponse422

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



178
179
180
181
182
183
184
185
# File 'lib/schemas.rb', line 178

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

.from_json!(json) ⇒ Object



187
188
189
# File 'lib/schemas.rb', line 187

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

Instance Method Details

#to_dynamicObject



191
192
193
194
195
196
197
# File 'lib/schemas.rb', line 191

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

#to_json(options = nil) ⇒ Object



199
200
201
# File 'lib/schemas.rb', line 199

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