Class: DeleteApisAPIIDSchemasSchemaIDFilesFilePathResponse403

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



336
337
338
339
340
341
342
343
# File 'lib/schemas.rb', line 336

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

.from_json!(json) ⇒ Object



345
346
347
# File 'lib/schemas.rb', line 345

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

Instance Method Details

#to_dynamicObject



349
350
351
352
353
354
355
# File 'lib/schemas.rb', line 349

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

#to_json(options = nil) ⇒ Object



357
358
359
# File 'lib/schemas.rb', line 357

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