Class: PutCollectionsCollectionIDResponsesResponseIDResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PutCollectionsCollectionIDResponsesResponseIDResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
31103 31104 31105 31106 31107 31108 31109 31110 |
# File 'lib/schemas.rb', line 31103 def self.from_dynamic!(d) d = Types::Hash[d] new( data: d["data"] ? PutCollectionsCollectionIDResponsesResponseIDResponseData.from_dynamic!(d["data"]) : nil, put_collections_collection_id_responses_response_id_response_meta: d["meta"], model_id: d["model_id"], ) end |
.from_json!(json) ⇒ Object
31112 31113 31114 |
# File 'lib/schemas.rb', line 31112 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
31116 31117 31118 31119 31120 31121 31122 |
# File 'lib/schemas.rb', line 31116 def to_dynamic { "data" => data&.to_dynamic, "meta" => , "model_id" => model_id, } end |
#to_json(options = nil) ⇒ Object
31124 31125 31126 |
# File 'lib/schemas.rb', line 31124 def to_json( = nil) JSON.generate(to_dynamic, ) end |