Class: GetApisAPIIDSchemasSchemaIDResponse403

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



5417
5418
5419
5420
5421
5422
5423
5424
# File 'lib/schemas.rb', line 5417

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

.from_json!(json) ⇒ Object



5426
5427
5428
# File 'lib/schemas.rb', line 5426

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

Instance Method Details

#to_dynamicObject



5430
5431
5432
5433
5434
5435
5436
# File 'lib/schemas.rb', line 5430

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

#to_json(options = nil) ⇒ Object



5438
5439
5440
# File 'lib/schemas.rb', line 5438

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