Transactional Client
Note
This Class is not meant to be instantiated directly, but rather accessed through the transactional
Property on an
instance of Client. For more details, see the Guide.
add_items_to_list
add_items_to_list(list_id: int, items: list[dict[str, str | dict]]) -> InsertionResult
Adds items to a List.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
list_id
|
int
|
The ID of the List. |
required |
items
|
list[dict[str, str | dict]]
|
The items to add to the List. |
required |
Returns:
Type | Description |
---|---|
InsertionResult
|
The result of the insertion. |
delete_list_items
delete_list_items(list_id: int, items: list[dict[str, str | int]]) -> None
Deletes items from a List.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
list_id
|
int
|
The ID of the List. |
required |
items
|
list[dict[str, str | int]]
|
The items to delete from the List. Must be a dict with either |
required |
get_list_items
get_list_items(list_id: int) -> list[ListItem]
Gets all the items in a List.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
list_id
|
int
|
The ID of the List. |
required |
Returns:
Type | Description |
---|---|
list[ListItem]
|
The List of Items. |
get_list_metadata
get_list_metadata(list_id: int) -> ListMetadata
Gets the metadata for a List.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
list_id
|
int
|
The ID of the List. |
required |
Returns:
Type | Description |
---|---|
ListMetadata
|
The Metadata for the List. |
get_model_status
get_model_status() -> ModelStatus
Gets the current status of the Model.
Returns:
Type | Description |
---|---|
ModelStatus
|
The current status of the Mode. |
list_line_items
list_line_items(only_module_id: int | None = None) -> list[LineItem]
Lists all the Line Items in the Model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
only_module_id
|
int | None
|
If provided, only Line Items from this Module will be returned. |
None
|
Returns:
Type | Description |
---|---|
list[LineItem]
|
The List of Line Items. |
list_lists
list_lists() -> list[List]
list_modules
list_modules() -> list[Module]
reset_list_index
reset_list_index(list_id: int) -> None
Resets the index of a List. The List must be empty to do so.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
list_id
|
int
|
The ID of the List. |
required |