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,
  auth_methods: :auth_methods,
  config: :config,
  credentials: :credentials,
  api_key: :api_key,
  custom_provider: :custom_provider
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CreateDataIntegration

Returns a new instance of CreateDataIntegration.



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/workos/pipes/create_data_integration.rb', line 30

def initialize(json)
  hash = self.class.normalize(json)
  @provider = hash[:provider]
  @description = hash[:description]
  @enabled = hash[:enabled]
  @scopes = hash[:scopes] || []
  @auth_methods = hash[:auth_methods] || []
  @config = hash[:config] || {}
  @credentials = hash[:credentials] ? WorkOS::DataIntegrationCredentialsInput.new(hash[:credentials]) : nil
  @api_key = hash[:api_key] ? WorkOS::ApiKeyInstallation.new(hash[:api_key]) : nil
  @custom_provider = hash[:custom_provider] ? WorkOS::CustomProviderDefinition.new(hash[:custom_provider]) : nil
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



19
20
21
# File 'lib/workos/pipes/create_data_integration.rb', line 19

def api_key
  @api_key
end

#auth_methodsObject

Returns the value of attribute auth_methods.



19
20
21
# File 'lib/workos/pipes/create_data_integration.rb', line 19

def auth_methods
  @auth_methods
end

#configObject

Returns the value of attribute config.



19
20
21
# File 'lib/workos/pipes/create_data_integration.rb', line 19

def config
  @config
end

#credentialsObject

Returns the value of attribute credentials.



19
20
21
# File 'lib/workos/pipes/create_data_integration.rb', line 19

def credentials
  @credentials
end

#custom_providerObject

Returns the value of attribute custom_provider.



19
20
21
# File 'lib/workos/pipes/create_data_integration.rb', line 19

def custom_provider
  @custom_provider
end

#descriptionObject

Returns the value of attribute description.



19
20
21
# File 'lib/workos/pipes/create_data_integration.rb', line 19

def description
  @description
end

#enabledObject

Returns the value of attribute enabled.



19
20
21
# File 'lib/workos/pipes/create_data_integration.rb', line 19

def enabled
  @enabled
end

#providerObject

Returns the value of attribute provider.



19
20
21
# File 'lib/workos/pipes/create_data_integration.rb', line 19

def provider
  @provider
end

#scopesObject

Returns the value of attribute scopes.



19
20
21
# File 'lib/workos/pipes/create_data_integration.rb', line 19

def scopes
  @scopes
end