Class: PostMocksMockIDPublishResponse500
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostMocksMockIDPublishResponse500
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
24138 24139 24140 24141 24142 24143 |
# File 'lib/schemas.rb', line 24138 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? PostMocksMockIDPublishResponse500Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
24145 24146 24147 |
# File 'lib/schemas.rb', line 24145 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
24149 24150 24151 24152 24153 |
# File 'lib/schemas.rb', line 24149 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
24155 24156 24157 |
# File 'lib/schemas.rb', line 24155 def to_json( = nil) JSON.generate(to_dynamic, ) end |