class StytchB2B::SSO::External

def create_connection(

This method supports an optional +StytchB2B::SSO::External::CreateConnectionRequestOptions+ object which will modify the headers sent in the HTTP request.
== Method Options:

The type of this field is nilable +Connection+ (+object+).
The `External Connection` object affected by this API call. See the [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object) for complete response field details.
connection::
The type of this field is +Integer+.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:

The type of this field is nilable list of +SAMLGroupImplicitRoleAssignment+.
(no documentation yet)
group_implicit_role_assignments::
The type of this field is nilable list of +SAMLConnectionImplicitRoleAssignment+.
(no documentation yet)
connection_implicit_role_assignments::
The type of this field is nilable +String+.
A human-readable display name for the connection.
display_name::
The type of this field is +String+.
Globally unique UUID that identifies a specific SSO connection configured for a different Organization in your Project.
external_connection_id::
The type of this field is +String+.
Globally unique UUID that identifies a different Organization within your Project.
external_organization_id::
The type of this field is +String+.
Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
organization_id::
== Parameters:

Create a new External SSO Connection.
def create_connection(
  organization_id:,
  external_organization_id:,
  external_connection_id:,
  display_name: nil,
  connection_implicit_role_assignments: nil,
  group_implicit_role_assignments: nil,
  method_options: nil
)
  headers = {}
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
  request = {
    external_organization_id: external_organization_id,
    external_connection_id: external_connection_id
  }
  request[:display_name] = display_name unless display_name.nil?
  request[:connection_implicit_role_assignments] = connection_implicit_role_assignments unless connection_implicit_role_assignments.nil?
  request[:group_implicit_role_assignments] = group_implicit_role_assignments unless group_implicit_role_assignments.nil?
  post_request("/v1/b2b/sso/external/#{organization_id}", request, headers)
end

def initialize(connection)

def initialize(connection)
  @connection = connection
end

def update_connection(

This method supports an optional +StytchB2B::SSO::External::UpdateConnectionRequestOptions+ object which will modify the headers sent in the HTTP request.
== Method Options:

The type of this field is nilable +Connection+ (+object+).
The `External Connection` object affected by this API call. See the [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object) for complete response field details.
connection::
The type of this field is +Integer+.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:

The type of this field is nilable list of +GroupImplicitRoleAssignment+.
for External connections if the underlying SSO connection is an OIDC connection.
`attribute_mapping`. Make sure that the SAML connection IdP is configured to correctly send the group information. Implicit role assignments are not supported
[RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. Before adding any group implicit role assignments to an external connection, you must add a "groups" key to the underlying SAML connection's
belongs to the specified group, they will be granted the associated Role. See the
that grant specific role assignments. For each group-Role pair, if a Member logs in with this external connection and
Defines the names of the groups
external_group_implicit_role_assignments::
The type of this field is nilable list of +ConnectionImplicitRoleAssignment+.
All Members who log in with this External connection will implicitly receive the specified Roles. See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. Implicit role assignments are not supported for External connections if the underlying SSO connection is an OIDC connection.
external_connection_implicit_role_assignments::
The type of this field is nilable +String+.
A human-readable display name for the connection.
display_name::
The type of this field is +String+.
Globally unique UUID that identifies a specific External SSO Connection.
connection_id::
The type of this field is +String+.
Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
organization_id::
== Parameters:

Updates an existing External SSO connection.
def update_connection(
  organization_id:,
  connection_id:,
  display_name: nil,
  external_connection_implicit_role_assignments: nil,
  external_group_implicit_role_assignments: nil,
  method_options: nil
)
  headers = {}
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
  request = {}
  request[:display_name] = display_name unless display_name.nil?
  request[:external_connection_implicit_role_assignments] = external_connection_implicit_role_assignments unless external_connection_implicit_role_assignments.nil?
  request[:external_group_implicit_role_assignments] = external_group_implicit_role_assignments unless external_group_implicit_role_assignments.nil?
  put_request("/v1/b2b/sso/external/#{organization_id}/connections/#{connection_id}", request, headers)
end