Class: PostCollectionsResponse429
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostCollectionsResponse429
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
22605 22606 22607 22608 22609 22610 22611 |
# File 'lib/schemas.rb', line 22605 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"], message: d["message"], ) end |
.from_json!(json) ⇒ Object
22613 22614 22615 |
# File 'lib/schemas.rb', line 22613 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
22617 22618 22619 22620 22621 22622 |
# File 'lib/schemas.rb', line 22617 def to_dynamic { "error" => error, "message" => , } end |
#to_json(options = nil) ⇒ Object
22624 22625 22626 |
# File 'lib/schemas.rb', line 22624 def to_json( = nil) JSON.generate(to_dynamic, ) end |