Class: WorkOS::CreateDataKeyResponse

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/vault/create_data_key_response.rb

Constant Summary collapse

HASH_ATTRS =
{
  context: :context,
  data_key: :data_key,
  encrypted_keys: :encrypted_keys,
  id: :id
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ CreateDataKeyResponse

Returns a new instance of CreateDataKeyResponse.



20
21
22
23
24
25
26
# File 'lib/workos/vault/create_data_key_response.rb', line 20

def initialize(json)
  hash = self.class.normalize(json)
  @context = hash[:context] || {}
  @data_key = hash[:data_key]
  @encrypted_keys = hash[:encrypted_keys]
  @id = hash[:id]
end

Instance Attribute Details

#contextObject

Returns the value of attribute context.



14
15
16
# File 'lib/workos/vault/create_data_key_response.rb', line 14

def context
  @context
end

#data_keyObject

Returns the value of attribute data_key.



14
15
16
# File 'lib/workos/vault/create_data_key_response.rb', line 14

def data_key
  @data_key
end

#encrypted_keysObject

Returns the value of attribute encrypted_keys.



14
15
16
# File 'lib/workos/vault/create_data_key_response.rb', line 14

def encrypted_keys
  @encrypted_keys
end

#idObject

Returns the value of attribute id.



14
15
16
# File 'lib/workos/vault/create_data_key_response.rb', line 14

def id
  @id
end