Class: DeleteCollectionsCollectionIDResponsesResponseIDResponseData

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



1615
1616
1617
1618
1619
1620
1621
# File 'lib/schemas.rb', line 1615

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

.from_json!(json) ⇒ Object



1623
1624
1625
# File 'lib/schemas.rb', line 1623

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

Instance Method Details

#to_dynamicObject



1627
1628
1629
1630
1631
1632
# File 'lib/schemas.rb', line 1627

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

#to_json(options = nil) ⇒ Object



1634
1635
1636
# File 'lib/schemas.rb', line 1634

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