Class: PostMonitorsMonitorIDRunResponseRunStatsRequests
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostMonitorsMonitorIDRunResponseRunStatsRequests
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
25342 25343 25344 25345 25346 25347 25348 |
# File 'lib/schemas.rb', line 25342 def self.from_dynamic!(d) d = Types::Hash[d] new( failed: d["failed"], total: d["total"], ) end |
.from_json!(json) ⇒ Object
25350 25351 25352 |
# File 'lib/schemas.rb', line 25350 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
25354 25355 25356 25357 25358 25359 |
# File 'lib/schemas.rb', line 25354 def to_dynamic { "failed" => failed, "total" => total, } end |
#to_json(options = nil) ⇒ Object
25361 25362 25363 |
# File 'lib/schemas.rb', line 25361 def to_json( = nil) JSON.generate(to_dynamic, ) end |