Class: GetCollectionsResponse401
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetCollectionsResponse401
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
9111 9112 9113 9114 9115 9116 |
# File 'lib/schemas.rb', line 9111 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? GetCollectionsResponse401Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
9118 9119 9120 |
# File 'lib/schemas.rb', line 9118 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
9122 9123 9124 9125 9126 |
# File 'lib/schemas.rb', line 9122 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
9128 9129 9130 |
# File 'lib/schemas.rb', line 9128 def to_json( = nil) JSON.generate(to_dynamic, ) end |