Class: WorkOS::CreateDataIntegration

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/pipes/create_data_integration.rb

Constant Summary collapse

HASH_ATTRS =
{
  provider: :provider,
  description: :description,
  enabled: :enabled,
  scopes: :scopes,
  credentials: :credentials,
  custom_provider: :custom_provider
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CreateDataIntegration

Returns a new instance of CreateDataIntegration.



24
25
26
27
28
29
30
31
32
# File 'lib/workos/pipes/create_data_integration.rb', line 24

def initialize(json)
  hash = self.class.normalize(json)
  @provider = hash[:provider]
  @description = hash[:description]
  @enabled = hash[:enabled]
  @scopes = hash[:scopes] || []
  @credentials = hash[:credentials] ? WorkOS::DataIntegrationCredentialsDto.new(hash[:credentials]) : nil
  @custom_provider = hash[:custom_provider] ? WorkOS::CustomProviderDefinition.new(hash[:custom_provider]) : nil
end

Instance Attribute Details

#credentialsObject

Returns the value of attribute credentials.



16
17
18
# File 'lib/workos/pipes/create_data_integration.rb', line 16

def credentials
  @credentials
end

#custom_providerObject

Returns the value of attribute custom_provider.



16
17
18
# File 'lib/workos/pipes/create_data_integration.rb', line 16

def custom_provider
  @custom_provider
end

#descriptionObject

Returns the value of attribute description.



16
17
18
# File 'lib/workos/pipes/create_data_integration.rb', line 16

def description
  @description
end

#enabledObject

Returns the value of attribute enabled.



16
17
18
# File 'lib/workos/pipes/create_data_integration.rb', line 16

def enabled
  @enabled
end

#providerObject

Returns the value of attribute provider.



16
17
18
# File 'lib/workos/pipes/create_data_integration.rb', line 16

def provider
  @provider
end

#scopesObject

Returns the value of attribute scopes.



16
17
18
# File 'lib/workos/pipes/create_data_integration.rb', line 16

def scopes
  @scopes
end