Class: PostImportOpenapiResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostImportOpenapiResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
23518 23519 23520 23521 23522 23523 |
# File 'lib/schemas.rb', line 23518 def self.from_dynamic!(d) d = Types::Hash[d] new( collections: d["collections"]&.map { |x| PostImportOpenapiResponseCollectionsItem.from_dynamic!(x) }, ) end |
.from_json!(json) ⇒ Object
23525 23526 23527 |
# File 'lib/schemas.rb', line 23525 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
23529 23530 23531 23532 23533 |
# File 'lib/schemas.rb', line 23529 def to_dynamic { "collections" => collections&.map { |x| x.to_dynamic }, } end |
#to_json(options = nil) ⇒ Object
23535 23536 23537 |
# File 'lib/schemas.rb', line 23535 def to_json( = nil) JSON.generate(to_dynamic, ) end |