Class: GetMocksMockIDServerResponsesServerResponseIDResponse500
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetMocksMockIDServerResponsesServerResponseIDResponse500
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
11988 11989 11990 11991 11992 11993 |
# File 'lib/schemas.rb', line 11988 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? GetMocksMockIDServerResponsesServerResponseIDResponse500Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
11995 11996 11997 |
# File 'lib/schemas.rb', line 11995 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
11999 12000 12001 12002 12003 |
# File 'lib/schemas.rb', line 11999 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
12005 12006 12007 |
# File 'lib/schemas.rb', line 12005 def to_json( = nil) JSON.generate(to_dynamic, ) end |