Class: PostCollectionsMergeResponse404
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostCollectionsMergeResponse404
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
22305 22306 22307 22308 22309 22310 |
# File 'lib/schemas.rb', line 22305 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? PostCollectionsMergeResponse404Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
22312 22313 22314 |
# File 'lib/schemas.rb', line 22312 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
22316 22317 22318 22319 22320 |
# File 'lib/schemas.rb', line 22316 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
22322 22323 22324 |
# File 'lib/schemas.rb', line 22322 def to_json( = nil) JSON.generate(to_dynamic, ) end |