Class: PutApisAPIIDTagsResponseTagsItem

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



28972
28973
28974
28975
28976
28977
# File 'lib/schemas.rb', line 28972

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

.from_json!(json) ⇒ Object



28979
28980
28981
# File 'lib/schemas.rb', line 28979

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

Instance Method Details

#to_dynamicObject



28983
28984
28985
28986
28987
# File 'lib/schemas.rb', line 28983

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

#to_json(options = nil) ⇒ Object



28989
28990
28991
# File 'lib/schemas.rb', line 28989

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