Class: GetMonitorsResponse429
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetMonitorsResponse429
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
13154 13155 13156 13157 13158 13159 13160 |
# File 'lib/schemas.rb', line 13154 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"], message: d["message"], ) end |
.from_json!(json) ⇒ Object
13162 13163 13164 |
# File 'lib/schemas.rb', line 13162 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
13166 13167 13168 13169 13170 13171 |
# File 'lib/schemas.rb', line 13166 def to_dynamic { "error" => error, "message" => , } end |
#to_json(options = nil) ⇒ Object
13173 13174 13175 |
# File 'lib/schemas.rb', line 13173 def to_json( = nil) JSON.generate(to_dynamic, ) end |