abacusai.user

Classes

OrganizationGroup

An Organization Group. Defines the permissions available to the users who are members of the group.

AbstractApiClass

User

An Abacus.AI User

Module Contents

class abacusai.user.OrganizationGroup(client, organizationGroupId=None, permissions=None, groupName=None, defaultGroup=None, admin=None, createdAt=None)

Bases: abacusai.return_class.AbstractApiClass

An Organization Group. Defines the permissions available to the users who are members of the group.

Parameters:
  • client (ApiClient) – An authenticated API Client instance

  • organizationGroupId (str) – The unique identifier of the Organization Group.

  • permissions (list of enum string) – The list of permissions (VIEW, MODIFY, ADMIN, BILLING, API_KEY, INVITE_USER) the group has.

  • groupName (str) – The name of the Organization Group.

  • defaultGroup (bool) – If true, all new users will be added to this group automatically.

  • admin (bool) – If true, this group contains all permissions available to the organization and cannot be modified or deleted.

  • createdAt (str) – When the Organization Group was created.

__repr__()

Return repr(self).

to_dict()

Get a dict representation of the parameters in this class

Returns:

The dict value representation of the class parameters

Return type:

dict

refresh()

Calls describe and refreshes the current object’s fields

Returns:

The current object

Return type:

OrganizationGroup

describe()

Returns the specific organization group passed in by the user.

Parameters:

organization_group_id (str) – The unique identifier of the organization group to be described.

Returns:

Information about a specific organization group.

Return type:

OrganizationGroup

add_permission(permission)

Adds a permission to the specified Organization Group.

Parameters:

permission (str) – Permission to add to the Organization Group.

remove_permission(permission)

Removes a permission from the specified Organization Group.

Parameters:

permission (str) – The permission to remove from the Organization Group.

delete()

Deletes the specified Organization Group

Parameters:

organization_group_id (str) – Unique string identifier of the organization group.

add_user_to(email)

Adds a user to the specified Organization Group.

Parameters:

email (str) – Email of the user to be added to the group.

remove_user_from(email)

Removes a user from an Organization Group.

Parameters:

email (str) – Email of the user to remove.

set_default()

Sets the default Organization Group to which all new users joining an organization are automatically added.

Parameters:

organization_group_id (str) – Unique string identifier of the Organization Group.

class abacusai.user.AbstractApiClass(client, id)
__eq__(other)

Return self==value.

_get_attribute_as_dict(attribute)
class abacusai.user.User(client, name=None, email=None, createdAt=None, status=None, organizationGroups={})

Bases: abacusai.return_class.AbstractApiClass

An Abacus.AI User

Parameters:
  • client (ApiClient) – An authenticated API Client instance

  • name (str) – The User’s name.

  • email (str) – The User’s primary email address.

  • createdAt (str) – The date and time when the user joined Abacus.AI.

  • status (str) – ACTIVE when the user has accepted an invite to join the organization, else INVITED.

  • organizationGroups (OrganizationGroup) – List of Organization Groups this user belongs to.

__repr__()

Return repr(self).

to_dict()

Get a dict representation of the parameters in this class

Returns:

The dict value representation of the class parameters

Return type:

dict