Class: WorkOS::CreateConnection

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/sso/create_connection.rb

Constant Summary collapse

HASH_ATTRS =
{
  organization_id: :organization_id,
  name: :name,
  external_id: :external_id,
  connection_type: :connection_type,
  attribute_maps: :attribute_maps,
  saml_options: :saml_options,
  oidc_options: :oidc_options
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CreateConnection

Returns a new instance of CreateConnection.



26
27
28
29
30
31
32
33
34
35
# File 'lib/workos/sso/create_connection.rb', line 26

def initialize(json)
  hash = self.class.normalize(json)
  @organization_id = hash[:organization_id]
  @name = hash[:name]
  @external_id = hash[:external_id]
  @connection_type = hash[:connection_type]
  @attribute_maps = hash[:attribute_maps] ? WorkOS::CreateConnectionAttributeMaps.new(hash[:attribute_maps]) : nil
  @saml_options = hash[:saml_options] ? WorkOS::CreateConnectionSAMLOptions.new(hash[:saml_options]) : nil
  @oidc_options = hash[:oidc_options] ? WorkOS::CreateConnectionOIDCOptions.new(hash[:oidc_options]) : nil
end

Instance Attribute Details

#attribute_mapsObject

Returns the value of attribute attribute_maps.



17
18
19
# File 'lib/workos/sso/create_connection.rb', line 17

def attribute_maps
  @attribute_maps
end

#connection_typeObject

Returns the value of attribute connection_type.



17
18
19
# File 'lib/workos/sso/create_connection.rb', line 17

def connection_type
  @connection_type
end

#external_idObject

Returns the value of attribute external_id.



17
18
19
# File 'lib/workos/sso/create_connection.rb', line 17

def external_id
  @external_id
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/workos/sso/create_connection.rb', line 17

def name
  @name
end

#oidc_optionsObject

Returns the value of attribute oidc_options.



17
18
19
# File 'lib/workos/sso/create_connection.rb', line 17

def oidc_options
  @oidc_options
end

#organization_idObject

Returns the value of attribute organization_id.



17
18
19
# File 'lib/workos/sso/create_connection.rb', line 17

def organization_id
  @organization_id
end

#saml_optionsObject

Returns the value of attribute saml_options.



17
18
19
# File 'lib/workos/sso/create_connection.rb', line 17

def saml_options
  @saml_options
end