Class: GetApisResponse401
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetApisResponse401
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
6755 6756 6757 6758 6759 6760 |
# File 'lib/schemas.rb', line 6755 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? GetApisResponse401Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
6762 6763 6764 |
# File 'lib/schemas.rb', line 6762 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
6766 6767 6768 6769 6770 |
# File 'lib/schemas.rb', line 6766 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
6772 6773 6774 |
# File 'lib/schemas.rb', line 6772 def to_json( = nil) JSON.generate(to_dynamic, ) end |