Class: PutCollectionsCollectionIDResponsesResponseIDResponse404ErrorDetails
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PutCollectionsCollectionIDResponsesResponseIDResponse404ErrorDetails
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
31338 31339 31340 31341 31342 31343 31344 31345 |
# File 'lib/schemas.rb', line 31338 def self.from_dynamic!(d) d = Types::Hash[d] new( model: d["model"], model_id: d["model_id"], owner: d["owner"], ) end |
.from_json!(json) ⇒ Object
31347 31348 31349 |
# File 'lib/schemas.rb', line 31347 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
31351 31352 31353 31354 31355 31356 31357 |
# File 'lib/schemas.rb', line 31351 def to_dynamic { "model" => model, "model_id" => model_id, "owner" => owner, } end |
#to_json(options = nil) ⇒ Object
31359 31360 31361 |
# File 'lib/schemas.rb', line 31359 def to_json( = nil) JSON.generate(to_dynamic, ) end |