Class: PostCollectionsMergeResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostCollectionsMergeResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
22154 22155 22156 22157 22158 22159 |
# File 'lib/schemas.rb', line 22154 def self.from_dynamic!(d) d = Types::Hash[d] new( collection: d["collection"] ? PostCollectionsMergeResponseCollection.from_dynamic!(d["collection"]) : nil, ) end |
.from_json!(json) ⇒ Object
22161 22162 22163 |
# File 'lib/schemas.rb', line 22161 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
22165 22166 22167 22168 22169 |
# File 'lib/schemas.rb', line 22165 def to_dynamic { "collection" => collection&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
22171 22172 22173 |
# File 'lib/schemas.rb', line 22171 def to_json( = nil) JSON.generate(to_dynamic, ) end |