Class: PostMonitorsResponse429
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostMonitorsResponse429
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
25853 25854 25855 25856 25857 25858 25859 |
# File 'lib/schemas.rb', line 25853 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"], message: d["message"], ) end |
.from_json!(json) ⇒ Object
25861 25862 25863 |
# File 'lib/schemas.rb', line 25861 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
25865 25866 25867 25868 25869 25870 |
# File 'lib/schemas.rb', line 25865 def to_dynamic { "error" => error, "message" => , } end |
#to_json(options = nil) ⇒ Object
25872 25873 25874 |
# File 'lib/schemas.rb', line 25872 def to_json( = nil) JSON.generate(to_dynamic, ) end |