Class: PostCollectionsResponse401
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostCollectionsResponse401
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
22575 22576 22577 22578 22579 22580 |
# File 'lib/schemas.rb', line 22575 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? PostCollectionsResponse401Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
22582 22583 22584 |
# File 'lib/schemas.rb', line 22582 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
22586 22587 22588 22589 22590 |
# File 'lib/schemas.rb', line 22586 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
22592 22593 22594 |
# File 'lib/schemas.rb', line 22592 def to_json( = nil) JSON.generate(to_dynamic, ) end |