Class: GetApisAPIIDCollectionsCollectionIDResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetApisAPIIDCollectionsCollectionIDResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
4377 4378 4379 4380 4381 4382 4383 |
# File 'lib/schemas.rb', line 4377 def self.from_dynamic!(d) d = Types::Hash[d] new( info: d["info"] ? GetApisAPIIDCollectionsCollectionIDResponseInfo.from_dynamic!(d["info"]) : nil, item: d["item"]&.map { |x| GetApisAPIIDCollectionsCollectionIDResponseItemItem.from_dynamic!(x) }, ) end |
.from_json!(json) ⇒ Object
4385 4386 4387 |
# File 'lib/schemas.rb', line 4385 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
4389 4390 4391 4392 4393 4394 |
# File 'lib/schemas.rb', line 4389 def to_dynamic { "info" => info&.to_dynamic, "item" => item&.map { |x| x.to_dynamic }, } end |
#to_json(options = nil) ⇒ Object
4396 4397 4398 |
# File 'lib/schemas.rb', line 4396 def to_json( = nil) JSON.generate(to_dynamic, ) end |