Class: Seam::Clients::UserIdentitiesUnmanaged

Inherits:
Object
  • Object
show all
Defined in:
lib/seam/routes/user_identities_unmanaged.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:, defaults:) ⇒ UserIdentitiesUnmanaged

Returns a new instance of UserIdentitiesUnmanaged.



6
7
8
9
# File 'lib/seam/routes/user_identities_unmanaged.rb', line 6

def initialize(client:, defaults:)
  @client = client
  @defaults = defaults
end

Instance Method Details

#get(user_identity_id:) ⇒ Seam::Resources::UnmanagedUserIdentity

Returns a specified unmanaged user identity (where is_managed = false).

Parameters:

  • user_identity_id

    ID of the unmanaged user identity that you want to get.

Returns:



14
15
16
17
18
# File 'lib/seam/routes/user_identities_unmanaged.rb', line 14

def get(user_identity_id:)
  res = @client.post("/user_identities/unmanaged/get", {user_identity_id: user_identity_id}.compact)

  Seam::Resources::UnmanagedUserIdentity.load_from_response(res.body["user_identity"])
end

#list(created_before: nil, limit: nil, page_cursor: nil, search: nil) ⇒ Seam::Resources::UnmanagedUserIdentity

Returns a list of all unmanaged user identities (where is_managed = false).

Parameters:

  • created_before (defaults to: nil)

    Timestamp by which to limit returned unmanaged user identities. Returns user identities created before this timestamp.

  • limit (defaults to: nil)

    Maximum number of records to return per page.

  • page_cursor (defaults to: nil)

    Identifies the specific page of results to return, obtained from the previous page's next_page_cursor.

  • search (defaults to: nil)

    String for which to search. Filters returned unmanaged user identities to include all records that satisfy a partial match using full_name, phone_number, email_address, user_identity_id or acs_system_id.

Returns:



26
27
28
29
30
# File 'lib/seam/routes/user_identities_unmanaged.rb', line 26

def list(created_before: nil, limit: nil, page_cursor: nil, search: nil)
  res = @client.post("/user_identities/unmanaged/list", {created_before: created_before, limit: limit, page_cursor: page_cursor, search: search}.compact)

  Seam::Resources::UnmanagedUserIdentity.load_from_response(res.body["user_identities"])
end

#update(is_managed:, user_identity_id:, user_identity_key: nil) ⇒ nil

Updates an unmanaged user identity to make it managed.

This endpoint can only be used to convert unmanaged user identities to managed ones by setting is_managed to true. It cannot be used to convert managed user identities back to unmanaged.

Parameters:

  • is_managed

    Must be set to true to convert the unmanaged user identity to managed.

  • user_identity_id

    ID of the unmanaged user identity that you want to update.

  • user_identity_key (defaults to: nil)

    Unique key for the user identity. If not provided, the existing key will be preserved.

Returns:

  • (nil)

    OK



39
40
41
42
43
# File 'lib/seam/routes/user_identities_unmanaged.rb', line 39

def update(is_managed:, user_identity_id:, user_identity_key: nil)
  @client.post("/user_identities/unmanaged/update", {is_managed: is_managed, user_identity_id: user_identity_id, user_identity_key: user_identity_key}.compact)

  nil
end