Class: GetMocksMockIDServerResponsesServerResponseIDResponse429
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetMocksMockIDServerResponsesServerResponseIDResponse429
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
11929 11930 11931 11932 11933 11934 11935 |
# File 'lib/schemas.rb', line 11929 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"], message: d["message"], ) end |
.from_json!(json) ⇒ Object
11937 11938 11939 |
# File 'lib/schemas.rb', line 11937 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
11941 11942 11943 11944 11945 11946 |
# File 'lib/schemas.rb', line 11941 def to_dynamic { "error" => error, "message" => , } end |
#to_json(options = nil) ⇒ Object
11948 11949 11950 |
# File 'lib/schemas.rb', line 11948 def to_json( = nil) JSON.generate(to_dynamic, ) end |