Class: PutCollectionsCollectionIDBodyCollection
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PutCollectionsCollectionIDBodyCollection
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
29522 29523 29524 29525 29526 29527 29528 |
# File 'lib/schemas.rb', line 29522 def self.from_dynamic!(d) d = Types::Hash[d] new( info: PutCollectionsCollectionIDBodyCollectionInfo.from_dynamic!(d.fetch("info")), item: d.fetch("item").map { |x| PutCollectionsCollectionIDBodyCollectionItemItem.from_dynamic!(x) }, ) end |
.from_json!(json) ⇒ Object
29530 29531 29532 |
# File 'lib/schemas.rb', line 29530 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
29534 29535 29536 29537 29538 29539 |
# File 'lib/schemas.rb', line 29534 def to_dynamic { "info" => info.to_dynamic, "item" => item.map { |x| x.to_dynamic }, } end |
#to_json(options = nil) ⇒ Object
29541 29542 29543 |
# File 'lib/schemas.rb', line 29541 def to_json( = nil) JSON.generate(to_dynamic, ) end |