Class: WorkOS::ObjectVersion

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

Constant Summary collapse

HASH_ATTRS =
{
  created_at: :created_at,
  current_version: :current_version,
  etag: :etag,
  id: :id,
  size: :size
}.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) ⇒ ObjectVersion

Returns a new instance of ObjectVersion.



22
23
24
25
26
27
28
29
# File 'lib/workos/vault/object_version.rb', line 22

def initialize(json)
  hash = self.class.normalize(json)
  @created_at = hash[:created_at]
  @current_version = hash[:current_version]
  @etag = hash[:etag]
  @id = hash[:id]
  @size = hash[:size]
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



15
16
17
# File 'lib/workos/vault/object_version.rb', line 15

def created_at
  @created_at
end

#current_versionObject

Returns the value of attribute current_version.



15
16
17
# File 'lib/workos/vault/object_version.rb', line 15

def current_version
  @current_version
end

#etagObject

Returns the value of attribute etag.



15
16
17
# File 'lib/workos/vault/object_version.rb', line 15

def etag
  @etag
end

#idObject

Returns the value of attribute id.



15
16
17
# File 'lib/workos/vault/object_version.rb', line 15

def id
  @id
end

#sizeObject

Returns the value of attribute size.



15
16
17
# File 'lib/workos/vault/object_version.rb', line 15

def size
  @size
end