Class: WorkOS::Vault::DataKeyPair

Inherits:
Data
  • Object
show all
Defined in:
lib/workos/vault.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context

Returns:

  • (Object)

    the current value of context



34
35
36
# File 'lib/workos/vault.rb', line 34

def context
  @context
end

#data_keyObject (readonly)

Returns the value of attribute data_key

Returns:

  • (Object)

    the current value of data_key



34
35
36
# File 'lib/workos/vault.rb', line 34

def data_key
  @data_key
end

#encrypted_keysObject (readonly)

Returns the value of attribute encrypted_keys

Returns:

  • (Object)

    the current value of encrypted_keys



34
35
36
# File 'lib/workos/vault.rb', line 34

def encrypted_keys
  @encrypted_keys
end

Class Method Details

.from_response(hash) ⇒ Object



35
36
37
38
39
40
41
# File 'lib/workos/vault.rb', line 35

def self.from_response(hash)
  new(
    context: hash["context"],
    data_key: DataKey.new(id: hash["id"], key: hash["data_key"]),
    encrypted_keys: hash["encrypted_keys"]
  )
end