Class: PutCollectionsCollectionIDResponse

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



30588
30589
30590
30591
30592
30593
# File 'lib/schemas.rb', line 30588

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    collection: d["collection"] ? PutCollectionsCollectionIDResponseCollection.from_dynamic!(d["collection"]) : nil,
  )
end

.from_json!(json) ⇒ Object



30595
30596
30597
# File 'lib/schemas.rb', line 30595

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

Instance Method Details

#to_dynamicObject



30599
30600
30601
30602
30603
# File 'lib/schemas.rb', line 30599

def to_dynamic
  {
    "collection" => collection&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



30605
30606
30607
# File 'lib/schemas.rb', line 30605

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