Class: PutCollectionsCollectionIDFoldersFolderIDResponse400

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



29800
29801
29802
29803
29804
29805
# File 'lib/schemas.rb', line 29800

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    error: d["error"] ? PutCollectionsCollectionIDFoldersFolderIDResponse400Error.from_dynamic!(d["error"]) : nil,
  )
end

.from_json!(json) ⇒ Object



29807
29808
29809
# File 'lib/schemas.rb', line 29807

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



29811
29812
29813
29814
29815
# File 'lib/schemas.rb', line 29811

def to_dynamic
  {
    "error" => error&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



29817
29818
29819
# File 'lib/schemas.rb', line 29817

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end