Class: GetMeResponse401
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetMeResponse401
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
10394 10395 10396 10397 10398 10399 |
# File 'lib/schemas.rb', line 10394 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? GetMeResponse401Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
10401 10402 10403 |
# File 'lib/schemas.rb', line 10401 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
10405 10406 10407 10408 10409 |
# File 'lib/schemas.rb', line 10405 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
10411 10412 10413 |
# File 'lib/schemas.rb', line 10411 def to_json( = nil) JSON.generate(to_dynamic, ) end |