Class: DeleteCollectionsCollectionIDFoldersFolderIDResponse401

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



841
842
843
844
845
846
# File 'lib/schemas.rb', line 841

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

.from_json!(json) ⇒ Object



848
849
850
# File 'lib/schemas.rb', line 848

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

Instance Method Details

#to_dynamicObject



852
853
854
855
856
# File 'lib/schemas.rb', line 852

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

#to_json(options = nil) ⇒ Object



858
859
860
# File 'lib/schemas.rb', line 858

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