Class: DeleteMocksMockIDUnpublishResponse429
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- DeleteMocksMockIDUnpublishResponse429
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
3109 3110 3111 3112 3113 3114 3115 |
# File 'lib/schemas.rb', line 3109 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"], message: d["message"], ) end |
.from_json!(json) ⇒ Object
3117 3118 3119 |
# File 'lib/schemas.rb', line 3117 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
3121 3122 3123 3124 3125 3126 |
# File 'lib/schemas.rb', line 3121 def to_dynamic { "error" => error, "message" => , } end |
#to_json(options = nil) ⇒ Object
3128 3129 3130 |
# File 'lib/schemas.rb', line 3128 def to_json( = nil) JSON.generate(to_dynamic, ) end |