Class: PutCollectionsCollectionIDFoldersFolderIDResponse404ErrorDetails

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



29932
29933
29934
29935
29936
29937
29938
29939
# File 'lib/schemas.rb', line 29932

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



29941
29942
29943
# File 'lib/schemas.rb', line 29941

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

Instance Method Details

#to_dynamicObject



29945
29946
29947
29948
29949
29950
29951
# File 'lib/schemas.rb', line 29945

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

#to_json(options = nil) ⇒ Object



29953
29954
29955
# File 'lib/schemas.rb', line 29953

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