Class: PostMocksMockIDPublishResponse400
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostMocksMockIDPublishResponse400
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
23930 23931 23932 23933 23934 23935 |
# File 'lib/schemas.rb', line 23930 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? PostMocksMockIDPublishResponse400Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
23937 23938 23939 |
# File 'lib/schemas.rb', line 23937 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
23941 23942 23943 23944 23945 |
# File 'lib/schemas.rb', line 23941 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
23947 23948 23949 |
# File 'lib/schemas.rb', line 23947 def to_json( = nil) JSON.generate(to_dynamic, ) end |