Class: GetMocksMockIDResponse404
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetMocksMockIDResponse404
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
11369 11370 11371 11372 11373 11374 |
# File 'lib/schemas.rb', line 11369 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? GetMocksMockIDResponse404Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
11376 11377 11378 |
# File 'lib/schemas.rb', line 11376 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
11380 11381 11382 11383 11384 |
# File 'lib/schemas.rb', line 11380 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
11386 11387 11388 |
# File 'lib/schemas.rb', line 11386 def to_json( = nil) JSON.generate(to_dynamic, ) end |