plexus.dashboard.api.models.account module

Account Model - Python representation of the GraphQL Account type.

Provides lookup methods to find accounts by: - ID (direct lookup) - Key (using secondary index) - Name (using filter)

class plexus.dashboard.api.models.account.Account(id: str, name: str, key: str, description: str | None = None, settings: Dict | None = None, client: _BaseAPIClient | None = None)

Bases: BaseModel

Account model for interacting with the API.

__init__(id: str, name: str, key: str, description: str | None = None, settings: Dict | None = None, client: _BaseAPIClient | None = None)
description: str | None = None
classmethod fields() str

Return the GraphQL fields to query for this model

classmethod from_dict(data: Dict[str, Any], client: _BaseAPIClient) Account

Create an Account instance from a dictionary.

classmethod get_by_id(id: str, client: _BaseAPIClient) Account

Get an account by its ID.

classmethod get_by_key(key: str, client: _BaseAPIClient) Account | None

Get an account by its key.

Args:

key: The account key to look up client: The API client instance

Returns:

Account: The found account or None

key: str
classmethod list_by_key(client: _BaseAPIClient, key: str) Account | None

Get an account by its key.

Args:

client: The API client instance key: The account key to look up

Returns:

Account: The found account or None

name: str
settings: Dict | None = None
update(**kwargs) Account

Update the account.