Class: GetMocksMockIDResponse401
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetMocksMockIDResponse401
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
11307 11308 11309 11310 11311 11312 |
# File 'lib/schemas.rb', line 11307 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? GetMocksMockIDResponse401Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
11314 11315 11316 |
# File 'lib/schemas.rb', line 11314 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
11318 11319 11320 11321 11322 |
# File 'lib/schemas.rb', line 11318 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
11324 11325 11326 |
# File 'lib/schemas.rb', line 11324 def to_json( = nil) JSON.generate(to_dynamic, ) end |