Class: GetApisAPIIDCollectionsCollectionIDResponse403

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



4496
4497
4498
4499
4500
4501
4502
4503
# File 'lib/schemas.rb', line 4496

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

.from_json!(json) ⇒ Object



4505
4506
4507
# File 'lib/schemas.rb', line 4505

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

Instance Method Details

#to_dynamicObject



4509
4510
4511
4512
4513
4514
4515
# File 'lib/schemas.rb', line 4509

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

#to_json(options = nil) ⇒ Object



4517
4518
4519
# File 'lib/schemas.rb', line 4517

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