Class: PostNetworkPrivateResponse500
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostNetworkPrivateResponse500
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
26172 26173 26174 26175 26176 26177 |
# File 'lib/schemas.rb', line 26172 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? PostNetworkPrivateResponse500Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
26179 26180 26181 |
# File 'lib/schemas.rb', line 26179 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
26183 26184 26185 26186 26187 |
# File 'lib/schemas.rb', line 26183 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
26189 26190 26191 |
# File 'lib/schemas.rb', line 26189 def to_json( = nil) JSON.generate(to_dynamic, ) end |