Class: GetMocksMockIDServerResponsesServerResponseIDResponse404
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetMocksMockIDServerResponsesServerResponseIDResponse404
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
11899 11900 11901 11902 11903 11904 |
# File 'lib/schemas.rb', line 11899 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? GetMocksMockIDServerResponsesServerResponseIDResponse404Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
11906 11907 11908 |
# File 'lib/schemas.rb', line 11906 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
11910 11911 11912 11913 11914 |
# File 'lib/schemas.rb', line 11910 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
11916 11917 11918 |
# File 'lib/schemas.rb', line 11916 def to_json( = nil) JSON.generate(to_dynamic, ) end |