Class: WorkOS::DataIntegrationConfigurationResponse

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/pipes_provider/data_integration_configuration_response.rb

Constant Summary collapse

HASH_ATTRS =
{
  object: :object,
  id: :id,
  organization_id: :organization_id,
  slug: :slug,
  name: :name,
  enabled: :enabled,
  scopes: :scopes,
  created_at: :created_at,
  updated_at: :updated_at,
  credentials: :credentials
}.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) ⇒ DataIntegrationConfigurationResponse

Returns a new instance of DataIntegrationConfigurationResponse.



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/workos/pipes_provider/data_integration_configuration_response.rb', line 32

def initialize(json)
  hash = self.class.normalize(json)
  @object = hash[:object]
  @id = hash[:id]
  @organization_id = hash[:organization_id]
  @slug = hash[:slug]
  @name = hash[:name]
  @enabled = hash[:enabled]
  @scopes = hash[:scopes] || []
  @created_at = hash[:created_at]
  @updated_at = hash[:updated_at]
  @credentials = hash[:credentials] ? WorkOS::DataIntegrationCredentials.new(hash[:credentials]) : nil
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



20
21
22
# File 'lib/workos/pipes_provider/data_integration_configuration_response.rb', line 20

def created_at
  @created_at
end

#credentialsObject

Returns the value of attribute credentials.



20
21
22
# File 'lib/workos/pipes_provider/data_integration_configuration_response.rb', line 20

def credentials
  @credentials
end

#enabledObject

Returns the value of attribute enabled.



20
21
22
# File 'lib/workos/pipes_provider/data_integration_configuration_response.rb', line 20

def enabled
  @enabled
end

#idObject

Returns the value of attribute id.



20
21
22
# File 'lib/workos/pipes_provider/data_integration_configuration_response.rb', line 20

def id
  @id
end

#nameObject

Returns the value of attribute name.



20
21
22
# File 'lib/workos/pipes_provider/data_integration_configuration_response.rb', line 20

def name
  @name
end

#objectObject

Returns the value of attribute object.



20
21
22
# File 'lib/workos/pipes_provider/data_integration_configuration_response.rb', line 20

def object
  @object
end

#organization_idObject

Returns the value of attribute organization_id.



20
21
22
# File 'lib/workos/pipes_provider/data_integration_configuration_response.rb', line 20

def organization_id
  @organization_id
end

#scopesObject

Returns the value of attribute scopes.



20
21
22
# File 'lib/workos/pipes_provider/data_integration_configuration_response.rb', line 20

def scopes
  @scopes
end

#slugObject

Returns the value of attribute slug.



20
21
22
# File 'lib/workos/pipes_provider/data_integration_configuration_response.rb', line 20

def slug
  @slug
end

#updated_atObject

Returns the value of attribute updated_at.



20
21
22
# File 'lib/workos/pipes_provider/data_integration_configuration_response.rb', line 20

def updated_at
  @updated_at
end