Class: PostApisResponse403
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostApisResponse403
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
20338 20339 20340 20341 20342 20343 20344 20345 |
# File 'lib/schemas.rb', line 20338 def self.from_dynamic!(d) d = Types::Hash[d] new( detail: d["detail"], title: d["title"], post_apis_response403_type: d["type"], ) end |
.from_json!(json) ⇒ Object
20347 20348 20349 |
# File 'lib/schemas.rb', line 20347 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
20351 20352 20353 20354 20355 20356 20357 |
# File 'lib/schemas.rb', line 20351 def to_dynamic { "detail" => detail, "title" => title, "type" => post_apis_response403_type, } end |
#to_json(options = nil) ⇒ Object
20359 20360 20361 |
# File 'lib/schemas.rb', line 20359 def to_json( = nil) JSON.generate(to_dynamic, ) end |