Class: PostMonitorsResponse401
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostMonitorsResponse401
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
25766 25767 25768 25769 25770 25771 |
# File 'lib/schemas.rb', line 25766 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? PostMonitorsResponse401Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
25773 25774 25775 |
# File 'lib/schemas.rb', line 25773 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
25777 25778 25779 25780 25781 |
# File 'lib/schemas.rb', line 25777 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
25783 25784 25785 |
# File 'lib/schemas.rb', line 25783 def to_json( = nil) JSON.generate(to_dynamic, ) end |