Class: WorkOS::DataIntegration

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

Constant Summary collapse

HASH_ATTRS =
{
  object: :object,
  id: :id,
  slug: :slug,
  integration_type: :integration_type,
  description: :description,
  enabled: :enabled,
  state: :state,
  scopes: :scopes,
  redirect_uri: :redirect_uri,
  credentials: :credentials,
  custom_provider: :custom_provider,
  created_at: :created_at,
  updated_at: :updated_at
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DataIntegration

Returns a new instance of DataIntegration.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/workos/pipes/data_integration.rb', line 38

def initialize(json)
  hash = self.class.normalize(json)
  @object = hash[:object]
  @id = hash[:id]
  @slug = hash[:slug]
  @integration_type = hash[:integration_type]
  @description = hash[:description]
  @enabled = hash[:enabled]
  @state = hash[:state]
  @scopes = hash[:scopes] || []
  @redirect_uri = hash[:redirect_uri]
  @credentials = hash[:credentials] ? WorkOS::DataIntegrationCredential.new(hash[:credentials]) : nil
  @custom_provider = hash[:custom_provider] ? WorkOS::DataIntegrationCustomProvider.new(hash[:custom_provider]) : nil
  @created_at = hash[:created_at]
  @updated_at = hash[:updated_at]
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def created_at
  @created_at
end

#credentialsObject

Returns the value of attribute credentials.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def credentials
  @credentials
end

#custom_providerObject

Returns the value of attribute custom_provider.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def custom_provider
  @custom_provider
end

#descriptionObject

Returns the value of attribute description.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def description
  @description
end

#enabledObject

Returns the value of attribute enabled.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def enabled
  @enabled
end

#idObject

Returns the value of attribute id.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def id
  @id
end

#integration_typeObject

Returns the value of attribute integration_type.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def integration_type
  @integration_type
end

#objectObject

Returns the value of attribute object.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def object
  @object
end

#redirect_uriObject

Returns the value of attribute redirect_uri.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def redirect_uri
  @redirect_uri
end

#scopesObject

Returns the value of attribute scopes.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def scopes
  @scopes
end

#slugObject

Returns the value of attribute slug.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def slug
  @slug
end

#stateObject

Returns the value of attribute state.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def state
  @state
end

#updated_atObject

Returns the value of attribute updated_at.



23
24
25
# File 'lib/workos/pipes/data_integration.rb', line 23

def updated_at
  @updated_at
end