Class: PutWorkspacesWorkspaceIDTagsBodyTagsItem

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



35225
35226
35227
35228
35229
35230
# File 'lib/schemas.rb', line 35225

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

.from_json!(json) ⇒ Object



35232
35233
35234
# File 'lib/schemas.rb', line 35232

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

Instance Method Details

#to_dynamicObject



35236
35237
35238
35239
35240
# File 'lib/schemas.rb', line 35236

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

#to_json(options = nil) ⇒ Object



35242
35243
35244
# File 'lib/schemas.rb', line 35242

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