Class: PutCollectionsCollectionIDTagsBodyTagsItem

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



31468
31469
31470
31471
31472
31473
# File 'lib/schemas.rb', line 31468

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

.from_json!(json) ⇒ Object



31475
31476
31477
# File 'lib/schemas.rb', line 31475

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

Instance Method Details

#to_dynamicObject



31479
31480
31481
31482
31483
# File 'lib/schemas.rb', line 31479

def to_dynamic
  {
    "slug" => slug,
  }
end

#to_json(options = nil) ⇒ Object



31485
31486
31487
# File 'lib/schemas.rb', line 31485

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