Class: GetApisAPIIDTagsResponseTagsItem

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



5559
5560
5561
5562
5563
5564
# File 'lib/schemas.rb', line 5559

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

.from_json!(json) ⇒ Object



5566
5567
5568
# File 'lib/schemas.rb', line 5566

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

Instance Method Details

#to_dynamicObject



5570
5571
5572
5573
5574
# File 'lib/schemas.rb', line 5570

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

#to_json(options = nil) ⇒ Object



5576
5577
5578
# File 'lib/schemas.rb', line 5576

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