Class: PutCollectionsCollectionIDFoldersFolderIDResponse401ErrorDetails

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



29833
29834
29835
29836
29837
29838
29839
29840
# File 'lib/schemas.rb', line 29833

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    model:    d["model"],
    model_id: d["model_id"],
    owner:    d["owner"],
  )
end

.from_json!(json) ⇒ Object



29842
29843
29844
# File 'lib/schemas.rb', line 29842

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

Instance Method Details

#to_dynamicObject



29846
29847
29848
29849
29850
29851
29852
# File 'lib/schemas.rb', line 29846

def to_dynamic
  {
    "model"    => model,
    "model_id" => model_id,
    "owner"    => owner,
  }
end

#to_json(options = nil) ⇒ Object



29854
29855
29856
# File 'lib/schemas.rb', line 29854

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