Class: WorkOS::DataIntegrationsListResponse

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/pipes/data_integrations_list_response.rb

Constant Summary collapse

HASH_ATTRS =
{
  object: :object,
  data: :data
}.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) ⇒ DataIntegrationsListResponse

Returns a new instance of DataIntegrationsListResponse.



16
17
18
19
20
# File 'lib/workos/pipes/data_integrations_list_response.rb', line 16

def initialize(json)
  hash = self.class.normalize(json)
  @object = hash[:object]
  @data = (hash[:data] || []).map { |item| item ? WorkOS::DataIntegrationsListResponseData.new(item) : nil }
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



12
13
14
# File 'lib/workos/pipes/data_integrations_list_response.rb', line 12

def data
  @data
end

#objectObject

Returns the value of attribute object.



12
13
14
# File 'lib/workos/pipes/data_integrations_list_response.rb', line 12

def object
  @object
end