Skip to content

statuspro_public_api_client.api.orders.add_order_comment

statuspro_public_api_client.api.orders.add_order_comment

Classes

Functions

asyncio(order, *, client, body) async

Add a comment to the order

Limited to 60 requests per minute.

Parameters:

  • order (int) –
  • body (AddOrderCommentRequest) –

Raises:

  • UnexpectedStatus

    If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

  • TimeoutException

    If the request takes longer than Client.timeout.

Returns:

  • ErrorResponse | MessageResponse | ValidationErrorResponse | None

    ErrorResponse | MessageResponse | ValidationErrorResponse

Source code in statuspro_public_api_client/api/orders/add_order_comment.py
async def asyncio(
    order: int,
    *,
    client: AuthenticatedClient | Client,
    body: AddOrderCommentRequest,
) -> ErrorResponse | MessageResponse | ValidationErrorResponse | None:
    """Add a comment to the order

     Limited to 60 requests per minute.

    Args:
        order (int):
        body (AddOrderCommentRequest):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.


    Returns:
        ErrorResponse | MessageResponse | ValidationErrorResponse
    """

    return (
        await asyncio_detailed(
            order=order,
            client=client,
            body=body,
        )
    ).parsed

asyncio_detailed(order, *, client, body) async

Add a comment to the order

Limited to 60 requests per minute.

Parameters:

  • order (int) –
  • body (AddOrderCommentRequest) –

Raises:

  • UnexpectedStatus

    If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

  • TimeoutException

    If the request takes longer than Client.timeout.

Returns:

  • Response[ErrorResponse | MessageResponse | ValidationErrorResponse]

    Response[ErrorResponse | MessageResponse | ValidationErrorResponse]

Source code in statuspro_public_api_client/api/orders/add_order_comment.py
async def asyncio_detailed(
    order: int,
    *,
    client: AuthenticatedClient | Client,
    body: AddOrderCommentRequest,
) -> Response[ErrorResponse | MessageResponse | ValidationErrorResponse]:
    """Add a comment to the order

     Limited to 60 requests per minute.

    Args:
        order (int):
        body (AddOrderCommentRequest):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.


    Returns:
        Response[ErrorResponse | MessageResponse | ValidationErrorResponse]
    """

    kwargs = _get_kwargs(
        order=order,
        body=body,
    )

    response = await client.get_async_httpx_client().request(**kwargs)

    return _build_response(client=client, response=response)

sync(order, *, client, body)

Add a comment to the order

Limited to 60 requests per minute.

Parameters:

  • order (int) –
  • body (AddOrderCommentRequest) –

Raises:

  • UnexpectedStatus

    If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

  • TimeoutException

    If the request takes longer than Client.timeout.

Returns:

  • ErrorResponse | MessageResponse | ValidationErrorResponse | None

    ErrorResponse | MessageResponse | ValidationErrorResponse

Source code in statuspro_public_api_client/api/orders/add_order_comment.py
def sync(
    order: int,
    *,
    client: AuthenticatedClient | Client,
    body: AddOrderCommentRequest,
) -> ErrorResponse | MessageResponse | ValidationErrorResponse | None:
    """Add a comment to the order

     Limited to 60 requests per minute.

    Args:
        order (int):
        body (AddOrderCommentRequest):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.


    Returns:
        ErrorResponse | MessageResponse | ValidationErrorResponse
    """

    return sync_detailed(
        order=order,
        client=client,
        body=body,
    ).parsed

sync_detailed(order, *, client, body)

Add a comment to the order

Limited to 60 requests per minute.

Parameters:

  • order (int) –
  • body (AddOrderCommentRequest) –

Raises:

  • UnexpectedStatus

    If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

  • TimeoutException

    If the request takes longer than Client.timeout.

Returns:

  • Response[ErrorResponse | MessageResponse | ValidationErrorResponse]

    Response[ErrorResponse | MessageResponse | ValidationErrorResponse]

Source code in statuspro_public_api_client/api/orders/add_order_comment.py
def sync_detailed(
    order: int,
    *,
    client: AuthenticatedClient | Client,
    body: AddOrderCommentRequest,
) -> Response[ErrorResponse | MessageResponse | ValidationErrorResponse]:
    """Add a comment to the order

     Limited to 60 requests per minute.

    Args:
        order (int):
        body (AddOrderCommentRequest):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.


    Returns:
        Response[ErrorResponse | MessageResponse | ValidationErrorResponse]
    """

    kwargs = _get_kwargs(
        order=order,
        body=body,
    )

    response = client.get_httpx_client().request(
        **kwargs,
    )

    return _build_response(client=client, response=response)