Class: PutCollectionsCollectionIDTagsBody

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



31495
31496
31497
31498
31499
31500
# File 'lib/schemas.rb', line 31495

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

.from_json!(json) ⇒ Object



31502
31503
31504
# File 'lib/schemas.rb', line 31502

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

Instance Method Details

#to_dynamicObject



31506
31507
31508
31509
31510
# File 'lib/schemas.rb', line 31506

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

#to_json(options = nil) ⇒ Object



31512
31513
31514
# File 'lib/schemas.rb', line 31512

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