Class: PostCollectionsCollectionIDResponsesResponse400ErrorDetails
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostCollectionsCollectionIDResponsesResponse400ErrorDetails
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
21475 21476 21477 21478 21479 21480 21481 21482 |
# File 'lib/schemas.rb', line 21475 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
21484 21485 21486 |
# File 'lib/schemas.rb', line 21484 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
21488 21489 21490 21491 21492 21493 21494 |
# File 'lib/schemas.rb', line 21488 def to_dynamic { "model" => model, "model_id" => model_id, "owner" => owner, } end |
#to_json(options = nil) ⇒ Object
21496 21497 21498 |
# File 'lib/schemas.rb', line 21496 def to_json( = nil) JSON.generate(to_dynamic, ) end |