Class: Cadenya::Resources::WorkspaceAdmin::Profiles
- Inherits:
-
Object
- Object
- Cadenya::Resources::WorkspaceAdmin::Profiles
- Defined in:
- lib/cadenya/resources/workspace_admin/profiles.rb
Overview
Administer workspaces across the account: create and archive workspaces and manage their membership. These operations are account-scoped and require the admin role (a token whose profile holds the WorkOS admin role); they live under /v1/account/workspaces rather than the workspace-scoped /v1/workspaces tree so an admin can manage any workspace in the account, including ones they are not themselves a member of.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Profiles
constructor
private
A new instance of Profiles.
-
#list(cursor: nil, limit: nil, query: nil, request_options: {}) ⇒ Cadenya::Internal::CursorPagination<Cadenya::Models::Profile>
Some parameter documentations has been truncated, see Models::WorkspaceAdmin::ProfileListParams for more details.
Constructor Details
#initialize(client:) ⇒ Profiles
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.
Returns a new instance of Profiles.
48 49 50 |
# File 'lib/cadenya/resources/workspace_admin/profiles.rb', line 48 def initialize(client:) @client = client end |
Instance Method Details
#list(cursor: nil, limit: nil, query: nil, request_options: {}) ⇒ Cadenya::Internal::CursorPagination<Cadenya::Models::Profile>
Some parameter documentations has been truncated, see Models::WorkspaceAdmin::ProfileListParams for more details.
Searches the account’s profiles for a member picker, with free-form name/email search and an optional type filter. Account-scoped; admin only.
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/cadenya/resources/workspace_admin/profiles.rb', line 32 def list(params = {}) parsed, = Cadenya::WorkspaceAdmin::ProfileListParams.dump_request(params) query = Cadenya::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "v1/account/profiles", query: query, page: Cadenya::Internal::CursorPagination, model: Cadenya::Profile, options: ) end |