Class: Infisical::Models::SecretTag

Inherits:
Struct
  • Object
show all
Defined in:
lib/infisical/models/secret.rb

Overview

A tag attached to a secret.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#colorString?

Returns display color of the tag.

Returns:

  • (String, nil)

    display color of the tag



29
30
31
32
33
34
# File 'lib/infisical/models/secret.rb', line 29

SecretTag = Struct.new(:id, :slug, :name, :color, keyword_init: true) do
  # @api private
  def self.from_api(data)
    new(id: data["id"], slug: data["slug"], name: data["name"], color: data["color"])
  end
end

#idString

Returns unique id of the tag.

Returns:

  • (String)

    unique id of the tag



29
30
31
32
33
34
# File 'lib/infisical/models/secret.rb', line 29

SecretTag = Struct.new(:id, :slug, :name, :color, keyword_init: true) do
  # @api private
  def self.from_api(data)
    new(id: data["id"], slug: data["slug"], name: data["name"], color: data["color"])
  end
end

#nameString

Returns display name of the tag.

Returns:

  • (String)

    display name of the tag



29
30
31
32
33
34
# File 'lib/infisical/models/secret.rb', line 29

SecretTag = Struct.new(:id, :slug, :name, :color, keyword_init: true) do
  # @api private
  def self.from_api(data)
    new(id: data["id"], slug: data["slug"], name: data["name"], color: data["color"])
  end
end

#slugString

Returns URL-safe identifier of the tag.

Returns:

  • (String)

    URL-safe identifier of the tag



29
30
31
32
33
34
# File 'lib/infisical/models/secret.rb', line 29

SecretTag = Struct.new(:id, :slug, :name, :color, keyword_init: true) do
  # @api private
  def self.from_api(data)
    new(id: data["id"], slug: data["slug"], name: data["name"], color: data["color"])
  end
end

Class Method Details

.from_api(data) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



31
32
33
# File 'lib/infisical/models/secret.rb', line 31

def self.from_api(data)
  new(id: data["id"], slug: data["slug"], name: data["name"], color: data["color"])
end