Class: PostMocksResponse400Error
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostMocksResponse400Error
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
24785 24786 24787 24788 24789 24790 24791 24792 |
# File 'lib/schemas.rb', line 24785 def self.from_dynamic!(d) d = Types::Hash[d] new( details: d["details"] ? PostMocksResponse400ErrorDetails.from_dynamic!(d["details"]) : nil, message: d["message"], post_mocks_response400_error_name: d["name"], ) end |
.from_json!(json) ⇒ Object
24794 24795 24796 |
# File 'lib/schemas.rb', line 24794 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
24798 24799 24800 24801 24802 24803 24804 |
# File 'lib/schemas.rb', line 24798 def to_dynamic { "details" => details&.to_dynamic, "message" => , "name" => post_mocks_response400_error_name, } end |
#to_json(options = nil) ⇒ Object
24806 24807 24808 |
# File 'lib/schemas.rb', line 24806 def to_json( = nil) JSON.generate(to_dynamic, ) end |