Class: GetCollectionsCollectionIDTagsResponseTagsItem

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



8599
8600
8601
8602
8603
8604
# File 'lib/schemas.rb', line 8599

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

.from_json!(json) ⇒ Object



8606
8607
8608
# File 'lib/schemas.rb', line 8606

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

Instance Method Details

#to_dynamicObject



8610
8611
8612
8613
8614
# File 'lib/schemas.rb', line 8610

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

#to_json(options = nil) ⇒ Object



8616
8617
8618
# File 'lib/schemas.rb', line 8616

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