Class: StytchB2B::SCIM::Connection

Inherits:
Object
  • Object
show all
Includes:
Stytch::RequestHelper
Defined in:
lib/stytch/b2b_scim.rb

Defined Under Namespace

Classes: CreateRequestOptions, DeleteRequestOptions, GetRequestOptions, RotateCancelRequestOptions, RotateCompleteRequestOptions, RotateStartRequestOptions, UpdateRequestOptions

Instance Method Summary collapse

Methods included from Stytch::RequestHelper

#delete_request, #get_request, #post_request, #put_request, #request_with_query_params

Constructor Details

#initialize(connection) ⇒ Connection

Returns a new instance of Connection.



158
159
160
# File 'lib/stytch/b2b_scim.rb', line 158

def initialize(connection)
  @connection = connection
end

Instance Method Details

#create(organization_id:, display_name: nil, identity_provider: nil, method_options: nil) ⇒ Object

Create a new SCIM Connection. /%}

Parameters:

organization_id

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. The type of this field is String.

display_name

A human-readable display name for the connection. The type of this field is nilable String.

identity_provider

(no documentation yet) The type of this field is nilable CreateRequestIdentityProvider (string enum).

Returns:

An object with the following fields:

request_id

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. The type of this field is String.

status_code

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. The type of this field is Integer.

connection

The ‘SCIM Connection` object affected by this API call. See the [SCIM Connection Object](stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. The type of this field is nilable SCIMConnectionWithToken (object).

Method Options:

This method supports an optional StytchB2B::SCIM::Connection::CreateRequestOptions object which will modify the headers sent in the HTTP request.



382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/stytch/b2b_scim.rb', line 382

def create(
  organization_id:,
  display_name: nil,
  identity_provider: 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[:identity_provider] = identity_provider unless identity_provider.nil?

  post_request("/v1/b2b/scim/#{organization_id}/connection", request, headers)
end

#delete(organization_id:, connection_id:, method_options: nil) ⇒ Object

Deletes a SCIM Connection. /%}

Parameters:

organization_id

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. The type of this field is String.

connection_id

The ID of the SCIM connection. The type of this field is String.

Returns:

An object with the following fields:

request_id

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. The type of this field is String.

connection_id

The ‘connection_id` that was deleted as part of the delete request. The type of this field is String.

status_code

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. The type of this field is Integer.

Method Options:

This method supports an optional StytchB2B::SCIM::Connection::DeleteRequestOptions object which will modify the headers sent in the HTTP request.



237
238
239
240
241
242
243
244
245
# File 'lib/stytch/b2b_scim.rb', line 237

def delete(
  organization_id:,
  connection_id:,
  method_options: nil
)
  headers = {}
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
  delete_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}", headers)
end

#get(organization_id:, method_options: nil) ⇒ Object

Get SCIM Connections. /%}

Parameters:

organization_id

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. The type of this field is String.

Returns:

An object with the following fields:

request_id

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. The type of this field is String.

status_code

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. The type of this field is Integer.

connection

(no documentation yet) The type of this field is nilable SCIMConnection (object).

Method Options:

This method supports an optional StytchB2B::SCIM::Connection::GetRequestOptions object which will modify the headers sent in the HTTP request.



418
419
420
421
422
423
424
425
426
427
# File 'lib/stytch/b2b_scim.rb', line 418

def get(
  organization_id:,
  method_options: nil
)
  headers = {}
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
  query_params = {}
  request = request_with_query_params("/v1/b2b/scim/#{organization_id}/connection", query_params)
  get_request(request, headers)
end

#rotate_cancel(organization_id:, connection_id:, method_options: nil) ⇒ Object

Cancel a SCIM token rotation. This will cancel the current token rotation process, keeping the original token active. /%}

Parameters:

organization_id

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. The type of this field is String.

connection_id

The ID of the SCIM connection. The type of this field is String.

Returns:

An object with the following fields:

request_id

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. The type of this field is String.

status_code

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. The type of this field is Integer.

connection

The ‘SCIM Connection` object affected by this API call. See the [SCIM Connection Object](stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. The type of this field is nilable SCIMConnection (object).

Method Options:

This method supports an optional StytchB2B::SCIM::Connection::RotateCancelRequestOptions object which will modify the headers sent in the HTTP request.



343
344
345
346
347
348
349
350
351
352
353
# File 'lib/stytch/b2b_scim.rb', line 343

def rotate_cancel(
  organization_id:,
  connection_id:,
  method_options: nil
)
  headers = {}
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
  request = {}

  post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/cancel", request, headers)
end

#rotate_complete(organization_id:, connection_id:, method_options: nil) ⇒ Object

Completes a SCIM token rotation. This will complete the current token rotation process and update the active token to be the new token supplied in the [start SCIM token rotation](stytch.com/docs/b2b/api/scim-rotate-token-start) response. /%}

Parameters:

organization_id

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. The type of this field is String.

connection_id

The ID of the SCIM connection. The type of this field is String.

Returns:

An object with the following fields:

request_id

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. The type of this field is String.

status_code

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. The type of this field is Integer.

connection

The ‘SCIM Connection` object affected by this API call. See the [SCIM Connection Object](stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. The type of this field is nilable SCIMConnection (object).

Method Options:

This method supports an optional StytchB2B::SCIM::Connection::RotateCompleteRequestOptions object which will modify the headers sent in the HTTP request.



307
308
309
310
311
312
313
314
315
316
317
# File 'lib/stytch/b2b_scim.rb', line 307

def rotate_complete(
  organization_id:,
  connection_id:,
  method_options: nil
)
  headers = {}
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
  request = {}

  post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/complete", request, headers)
end

#rotate_start(organization_id:, connection_id:, method_options: nil) ⇒ Object

Start a SCIM token rotation. /%}

Parameters:

organization_id

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. The type of this field is String.

connection_id

The ID of the SCIM connection. The type of this field is String.

Returns:

An object with the following fields:

request_id

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. The type of this field is String.

status_code

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. The type of this field is Integer.

connection

The ‘SCIM Connection` object affected by this API call. See the [SCIM Connection Object](stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. The type of this field is nilable SCIMConnectionWithNextToken (object).

Method Options:

This method supports an optional StytchB2B::SCIM::Connection::RotateStartRequestOptions object which will modify the headers sent in the HTTP request.



271
272
273
274
275
276
277
278
279
280
281
# File 'lib/stytch/b2b_scim.rb', line 271

def rotate_start(
  organization_id:,
  connection_id:,
  method_options: nil
)
  headers = {}
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
  request = {}

  post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/start", request, headers)
end

#update(organization_id:, connection_id:, display_name: nil, identity_provider: nil, scim_group_implicit_role_assignments: nil, method_options: nil) ⇒ Object

Update a SCIM Connection. /%}

Parameters:

organization_id

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. The type of this field is String.

connection_id

The ID of the SCIM connection. The type of this field is String.

display_name

A human-readable display name for the connection. The type of this field is nilable String.

identity_provider

(no documentation yet) The type of this field is nilable UpdateRequestIdentityProvider (string enum).

scim_group_implicit_role_assignments

(no documentation yet) The type of this field is nilable list of SCIMGroupImplicitRoleAssignments.

Returns:

An object with the following fields:

request_id

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. The type of this field is String.

status_code

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. The type of this field is Integer.

connection

The ‘SAML Connection` object affected by this API call. See the [SAML Connection Object](stytch.com/docs/b2b/api/saml-connection-object) for complete response field details. The type of this field is nilable SCIMConnection (object).

Method Options:

This method supports an optional StytchB2B::SCIM::Connection::UpdateRequestOptions object which will modify the headers sent in the HTTP request.



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/stytch/b2b_scim.rb', line 195

def update(
  organization_id:,
  connection_id:,
  display_name: nil,
  identity_provider: nil,
  scim_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[:identity_provider] = identity_provider unless identity_provider.nil?
  request[:scim_group_implicit_role_assignments] = scim_group_implicit_role_assignments unless scim_group_implicit_role_assignments.nil?

  put_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}", request, headers)
end