Class: GetApisAPIIDVersionsVersionIDResponseVersionCollectionsItem

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



6333
6334
6335
6336
6337
6338
6339
# File 'lib/schemas.rb', line 6333

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    id:                                                                         d["id"],
    get_apis_api_id_versions_version_id_response_version_collections_item_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



6341
6342
6343
# File 'lib/schemas.rb', line 6341

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

Instance Method Details

#to_dynamicObject



6345
6346
6347
6348
6349
6350
# File 'lib/schemas.rb', line 6345

def to_dynamic
  {
    "id"   => id,
    "type" => get_apis_api_id_versions_version_id_response_version_collections_item_type,
  }
end

#to_json(options = nil) ⇒ Object



6352
6353
6354
# File 'lib/schemas.rb', line 6352

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