Class: Attio::Resources::Users Private

Inherits:
Base
  • Object
show all
Defined in:
lib/attio/resources/users.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

API resource for managing workspace users

Users are people who have access to your Attio workspace.

Examples:

Listing all users

client.users.list

Since:

  • 1.0.0

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from Attio::Resources::Base

Instance Method Details

#get(id:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



16
17
18
19
# File 'lib/attio/resources/users.rb', line 16

def get(id:)
  validate_id!(id)
  request(:get, "users/#{id}")
end

#list(**params) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



12
13
14
# File 'lib/attio/resources/users.rb', line 12

def list(**params)
  request(:get, "users", params)
end

#validate_id!(id) ⇒ Object (private)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Raises:

  • (ArgumentError)

Since:

  • 1.0.0



21
22
23
# File 'lib/attio/resources/users.rb', line 21

private def validate_id!(id)
  raise ArgumentError, "User ID is required" if id.nil? || id.to_s.strip.empty?
end