Class: PostCollectionsForkCollectionIDResponse401
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostCollectionsForkCollectionIDResponse401
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
21867 21868 21869 21870 21871 21872 |
# File 'lib/schemas.rb', line 21867 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? PostCollectionsForkCollectionIDResponse401Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
21874 21875 21876 |
# File 'lib/schemas.rb', line 21874 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
21878 21879 21880 21881 21882 |
# File 'lib/schemas.rb', line 21878 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
21884 21885 21886 |
# File 'lib/schemas.rb', line 21884 def to_json( = nil) JSON.generate(to_dynamic, ) end |