Class: PostCollectionsForkCollectionIDResponse404
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostCollectionsForkCollectionIDResponse404
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
21961 21962 21963 21964 21965 21966 |
# File 'lib/schemas.rb', line 21961 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? PostCollectionsForkCollectionIDResponse404Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
21968 21969 21970 |
# File 'lib/schemas.rb', line 21968 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
21972 21973 21974 21975 21976 |
# File 'lib/schemas.rb', line 21972 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
21978 21979 21980 |
# File 'lib/schemas.rb', line 21978 def to_json( = nil) JSON.generate(to_dynamic, ) end |