Class: DeleteCollectionsCollectionIDFoldersFolderIDResponseData

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



698
699
700
701
702
703
704
# File 'lib/schemas.rb', line 698

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

.from_json!(json) ⇒ Object



706
707
708
# File 'lib/schemas.rb', line 706

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

Instance Method Details

#to_dynamicObject



710
711
712
713
714
715
# File 'lib/schemas.rb', line 710

def to_dynamic
  {
    "id"    => id,
    "owner" => owner,
  }
end

#to_json(options = nil) ⇒ Object



717
718
719
# File 'lib/schemas.rb', line 717

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