Class: WorkOS::DataIntegration
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::DataIntegration
- 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
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#credentials ⇒ Object
Returns the value of attribute credentials.
-
#custom_provider ⇒ Object
Returns the value of attribute custom_provider.
-
#description ⇒ Object
Returns the value of attribute description.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#id ⇒ Object
Returns the value of attribute id.
-
#integration_type ⇒ Object
Returns the value of attribute integration_type.
-
#object ⇒ Object
Returns the value of attribute object.
-
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
-
#slug ⇒ Object
Returns the value of attribute slug.
-
#state ⇒ Object
Returns the value of attribute state.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(json) ⇒ DataIntegration
constructor
A new instance of DataIntegration.
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_at ⇒ Object
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 |
#credentials ⇒ Object
Returns the value of attribute credentials.
23 24 25 |
# File 'lib/workos/pipes/data_integration.rb', line 23 def credentials @credentials end |
#custom_provider ⇒ Object
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 |
#description ⇒ Object
Returns the value of attribute description.
23 24 25 |
# File 'lib/workos/pipes/data_integration.rb', line 23 def description @description end |
#enabled ⇒ Object
Returns the value of attribute enabled.
23 24 25 |
# File 'lib/workos/pipes/data_integration.rb', line 23 def enabled @enabled end |
#id ⇒ Object
Returns the value of attribute id.
23 24 25 |
# File 'lib/workos/pipes/data_integration.rb', line 23 def id @id end |
#integration_type ⇒ Object
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 |
#object ⇒ Object
Returns the value of attribute object.
23 24 25 |
# File 'lib/workos/pipes/data_integration.rb', line 23 def object @object end |
#redirect_uri ⇒ Object
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 |
#scopes ⇒ Object
Returns the value of attribute scopes.
23 24 25 |
# File 'lib/workos/pipes/data_integration.rb', line 23 def scopes @scopes end |
#slug ⇒ Object
Returns the value of attribute slug.
23 24 25 |
# File 'lib/workos/pipes/data_integration.rb', line 23 def slug @slug end |
#state ⇒ Object
Returns the value of attribute state.
23 24 25 |
# File 'lib/workos/pipes/data_integration.rb', line 23 def state @state end |
#updated_at ⇒ Object
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 |