Class: PutApisAPIIDTagsBodyTagsItem

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



28918
28919
28920
28921
28922
28923
# File 'lib/schemas.rb', line 28918

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

.from_json!(json) ⇒ Object



28925
28926
28927
# File 'lib/schemas.rb', line 28925

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

Instance Method Details

#to_dynamicObject



28929
28930
28931
28932
28933
# File 'lib/schemas.rb', line 28929

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

#to_json(options = nil) ⇒ Object



28935
28936
28937
# File 'lib/schemas.rb', line 28935

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