Class: GetCollectionsCollectionIDResponseCollection

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



8005
8006
8007
8008
8009
8010
# File 'lib/schemas.rb', line 8005

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

.from_json!(json) ⇒ Object



8012
8013
8014
# File 'lib/schemas.rb', line 8012

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

Instance Method Details

#to_dynamicObject



8016
8017
8018
8019
8020
# File 'lib/schemas.rb', line 8016

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

#to_json(options = nil) ⇒ Object



8022
8023
8024
# File 'lib/schemas.rb', line 8022

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