Class: PostApisResponse401
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostApisResponse401
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
20297 20298 20299 20300 20301 20302 20303 20304 20305 20306 |
# File 'lib/schemas.rb', line 20297 def self.from_dynamic!(d) d = Types::Hash[d] new( detail: d["detail"], instance: d["instance"], status: d["status"], title: d["title"], post_apis_response401_type: d["type"], ) end |
.from_json!(json) ⇒ Object
20308 20309 20310 |
# File 'lib/schemas.rb', line 20308 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
20312 20313 20314 20315 20316 20317 20318 20319 20320 |
# File 'lib/schemas.rb', line 20312 def to_dynamic { "detail" => detail, "instance" => instance, "status" => status, "title" => title, "type" => post_apis_response401_type, } end |
#to_json(options = nil) ⇒ Object
20322 20323 20324 |
# File 'lib/schemas.rb', line 20322 def to_json( = nil) JSON.generate(to_dynamic, ) end |