Class: PostCollectionsMergeResponse401
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostCollectionsMergeResponse401
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
22211 22212 22213 22214 22215 22216 |
# File 'lib/schemas.rb', line 22211 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? PostCollectionsMergeResponse401Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
22218 22219 22220 |
# File 'lib/schemas.rb', line 22218 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
22222 22223 22224 22225 22226 |
# File 'lib/schemas.rb', line 22222 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
22228 22229 22230 |
# File 'lib/schemas.rb', line 22228 def to_json( = nil) JSON.generate(to_dynamic, ) end |