Class: PostCollectionsResponse400
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostCollectionsResponse400
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
22518 22519 22520 22521 22522 22523 |
# File 'lib/schemas.rb', line 22518 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? PostCollectionsResponse400Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
22525 22526 22527 |
# File 'lib/schemas.rb', line 22525 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
22529 22530 22531 22532 22533 |
# File 'lib/schemas.rb', line 22529 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
22535 22536 22537 |
# File 'lib/schemas.rb', line 22535 def to_json( = nil) JSON.generate(to_dynamic, ) end |