Class: PutCollectionsCollectionIDFoldersFolderIDResponse401

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



29899
29900
29901
29902
29903
29904
# File 'lib/schemas.rb', line 29899

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

.from_json!(json) ⇒ Object



29906
29907
29908
# File 'lib/schemas.rb', line 29906

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

Instance Method Details

#to_dynamicObject



29910
29911
29912
29913
29914
# File 'lib/schemas.rb', line 29910

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

#to_json(options = nil) ⇒ Object



29916
29917
29918
# File 'lib/schemas.rb', line 29916

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