Class: PutApisAPIIDResponse403

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



28422
28423
28424
28425
28426
28427
28428
28429
# File 'lib/schemas.rb', line 28422

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

.from_json!(json) ⇒ Object



28431
28432
28433
# File 'lib/schemas.rb', line 28431

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

Instance Method Details

#to_dynamicObject



28435
28436
28437
28438
28439
28440
28441
# File 'lib/schemas.rb', line 28435

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

#to_json(options = nil) ⇒ Object



28443
28444
28445
# File 'lib/schemas.rb', line 28443

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