Class: PutCollectionsCollectionIDTagsResponse

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



31549
31550
31551
31552
31553
31554
# File 'lib/schemas.rb', line 31549

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    tags: d["tags"]&.map { |x| PutCollectionsCollectionIDTagsResponseTagsItem.from_dynamic!(x) },
  )
end

.from_json!(json) ⇒ Object



31556
31557
31558
# File 'lib/schemas.rb', line 31556

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

Instance Method Details

#to_dynamicObject



31560
31561
31562
31563
31564
# File 'lib/schemas.rb', line 31560

def to_dynamic
  {
    "tags" => tags&.map { |x| x.to_dynamic },
  }
end

#to_json(options = nil) ⇒ Object



31566
31567
31568
# File 'lib/schemas.rb', line 31566

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