InfusionsoftClient
Attributes
TRIGGER_OPERATIONS
module-attribute
TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'OnNewTask': {'operation_id': 'OnNewTask', 'path': '/{connectionId}/trigger/crm/rest/v1/tasks/search', 'method': 'get', 'required_parameters': [], 'callback_payload_type': 'OnNewTaskResponse'}, 'OnNewOrder': {'operation_id': 'OnNewOrder', 'path': '/{connectionId}/trigger/crm/rest/v1/orders', 'method': 'get', 'required_parameters': [], 'callback_payload_type': 'ListOrdersResponse'}}
Classes
TaskResponse
dataclass
TaskResponse(*, id: Optional[int] = None, title: Optional[str] = None, description: Optional[str] = None, type_: Optional[str] = None, priority: Optional[int] = None, completed: Optional[bool] = None, url: Optional[str] = None, due_date: Optional[str] = None)
Response for Create a task
Attributes
id
class-attribute
instance-attribute
An integer that uniquely identifies this task.
title
class-attribute
instance-attribute
The actual task name (Do this thing).
description
class-attribute
instance-attribute
A description of the task defined by the user.
type_
class-attribute
instance-attribute
A string representing the type of Task as defined by the user from a list of types editable in the Infusionsoft application.
priority
class-attribute
instance-attribute
The priority of the task.
completed
class-attribute
instance-attribute
A boolean indicating the completed status of the task.
url
class-attribute
instance-attribute
The link to the task.
ListTasksResponse
dataclass
CreateTaskRequest
dataclass
CreateTaskRequest(title: str, *, description: Optional[str] = None, type_: Optional[str] = None, priority: Optional[int] = None, due_date: Optional[str] = None)
Definition: CreateTask_Request
Attributes
description
class-attribute
instance-attribute
A description of the task title.
type_
class-attribute
instance-attribute
Type of the task.
priority
class-attribute
instance-attribute
Priority of the task (1, 2, 3, etc.)
InfusionsoftClient
InfusionsoftClient(connection_runtime_url: str, credential: AsyncTokenCredential | AzureKeyCredential, *, max_retry_attempts: int = 3, timeout: float = 30.0, use_exponential_backoff: bool = True, initial_retry_delay_seconds: float = 0.5, maximum_retry_delay_seconds: float = 120.0, retry_jitter_factor: float = 0.1, retry_unsafe_http_methods: bool = False, transport: Optional[AsyncHttpTransport] = None, **kwargs: Any)
Bases: ConnectorClientBase
Typed client for infusionsoft connector.
Initialize a InfusionsoftClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_runtime_url
|
str
|
The connection runtime URL from Azure Portal. |
required |
credential
|
AsyncTokenCredential | AzureKeyCredential
|
Caller-owned Azure Core credential. |
required |
max_retry_attempts
|
int
|
The maximum number of request attempts. |
3
|
timeout
|
float
|
The network timeout in seconds for each request. The value configures Azure Core retry and transport deadlines. Nonpositive values disable SDK and transport deadlines. |
30.0
|
use_exponential_backoff
|
bool
|
Whether retries use exponential backoff. |
True
|
initial_retry_delay_seconds
|
float
|
The initial retry delay in seconds. |
0.5
|
maximum_retry_delay_seconds
|
float
|
The maximum retry delay in seconds. |
120.0
|
retry_jitter_factor
|
float
|
The jitter fraction applied to retry delays. |
0.1
|
retry_unsafe_http_methods
|
bool
|
Whether unsafe HTTP methods may be retried. |
False
|
transport
|
Optional[AsyncHttpTransport]
|
Optional Azure Core async HTTP transport closed by the client through its asynchronous lifecycle. |
None
|
**kwargs
|
Any
|
Optional Azure Core pipeline policy settings. |
{}
|
Methods:
create_task
async
create_task(input: CreateTaskRequest | Mapping[str, Any], *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Create a task
Create a new task.
Swagger operation ID: CreateTask.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreateTaskRequest | Mapping[str, Any]
|
The request body. Mapping keys use serialized Swagger wire names. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
update_task
async
update_task(input: CreateTaskRequest | Mapping[str, Any], id: int, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Update a task
Update an existing task.
Swagger operation ID: UpdateTask.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreateTaskRequest | Mapping[str, Any]
|
The request body. Mapping keys use serialized Swagger wire names. |
required |
id
|
int
|
Id of the task. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
list_tasks
list_tasks(*, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> AsyncItemPaged[dict[str, Any]]
List tasks
Retrieve a page of tasks ordered by due date.
Returns a single-page Azure Core async collection.
Swagger operation ID: ListTasks.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
AsyncItemPaged[dict[str, Any]]
|
AsyncItemPaged[dict[str, Any]]: An Azure Core pager over connector
results. Consume it with |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |