Class: GetCollectionsCollectionIDResponsesResponseIDResponse404ErrorDetails
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetCollectionsCollectionIDResponsesResponseIDResponse404ErrorDetails
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
8469 8470 8471 8472 8473 8474 8475 8476 |
# File 'lib/schemas.rb', line 8469 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
8478 8479 8480 |
# File 'lib/schemas.rb', line 8478 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
8482 8483 8484 8485 8486 8487 8488 |
# File 'lib/schemas.rb', line 8482 def to_dynamic { "model" => model, "model_id" => model_id, "owner" => owner, } end |
#to_json(options = nil) ⇒ Object
8490 8491 8492 |
# File 'lib/schemas.rb', line 8490 def to_json( = nil) JSON.generate(to_dynamic, ) end |