Class: PutCollectionsCollectionIDResponse404ErrorDetails

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



30794
30795
30796
30797
30798
30799
30800
# File 'lib/schemas.rb', line 30794

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

.from_json!(json) ⇒ Object



30802
30803
30804
# File 'lib/schemas.rb', line 30802

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

Instance Method Details

#to_dynamicObject



30806
30807
30808
30809
30810
30811
# File 'lib/schemas.rb', line 30806

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

#to_json(options = nil) ⇒ Object



30813
30814
30815
# File 'lib/schemas.rb', line 30813

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