Class: GetApisAPIIDVersionsVersionIDResponseVersion
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetApisAPIIDVersionsVersionIDResponseVersion
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 |
# File 'lib/schemas.rb', line 6409 def self.from_dynamic!(d) d = Types::Hash[d] new( collections: d["collections"]&.map { |x| GetApisAPIIDVersionsVersionIDResponseVersionCollectionsItem.from_dynamic!(x) }, created_at: d["createdAt"], id: d["id"], get_apis_api_id_versions_version_id_response_version_name: d["name"], release_notes: d["releaseNotes"], schemas: d["schemas"]&.map { |x| GetApisAPIIDVersionsVersionIDResponseVersionSchemasItem.from_dynamic!(x) }, updated_at: d["updatedAt"], ) end |
.from_json!(json) ⇒ Object
6422 6423 6424 |
# File 'lib/schemas.rb', line 6422 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 |
# File 'lib/schemas.rb', line 6426 def to_dynamic { "collections" => collections&.map { |x| x.to_dynamic }, "createdAt" => created_at, "id" => id, "name" => get_apis_api_id_versions_version_id_response_version_name, "releaseNotes" => release_notes, "schemas" => schemas&.map { |x| x.to_dynamic }, "updatedAt" => updated_at, } end |
#to_json(options = nil) ⇒ Object
6438 6439 6440 |
# File 'lib/schemas.rb', line 6438 def to_json( = nil) JSON.generate(to_dynamic, ) end |