Class: WorkOS::VersionListResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::VersionListResponse
- Defined in:
- lib/workos/vault/version_list_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ data: :data, list_metadata: :list_metadata }.freeze
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#list_metadata ⇒ Object
Returns the value of attribute list_metadata.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ VersionListResponse
constructor
A new instance of VersionListResponse.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ VersionListResponse
Returns a new instance of VersionListResponse.
16 17 18 19 20 |
# File 'lib/workos/vault/version_list_response.rb', line 16 def initialize(json) hash = self.class.normalize(json) @data = (hash[:data] || []).map { |item| item ? WorkOS::ObjectVersion.new(item) : nil } @list_metadata = hash[:list_metadata] ? WorkOS::ListMetadata.new(hash[:list_metadata]) : nil end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
12 13 14 |
# File 'lib/workos/vault/version_list_response.rb', line 12 def data @data end |
#list_metadata ⇒ Object
Returns the value of attribute list_metadata.
12 13 14 |
# File 'lib/workos/vault/version_list_response.rb', line 12 def @list_metadata end |