Class: GetMeResponse429
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetMeResponse429
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
10424 10425 10426 10427 10428 10429 10430 |
# File 'lib/schemas.rb', line 10424 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"], message: d["message"], ) end |
.from_json!(json) ⇒ Object
10432 10433 10434 |
# File 'lib/schemas.rb', line 10432 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
10436 10437 10438 10439 10440 10441 |
# File 'lib/schemas.rb', line 10436 def to_dynamic { "error" => error, "message" => , } end |
#to_json(options = nil) ⇒ Object
10443 10444 10445 |
# File 'lib/schemas.rb', line 10443 def to_json( = nil) JSON.generate(to_dynamic, ) end |