Skip to content

katana_public_api_client.api.purchase_order.update_purchase_order

katana_public_api_client.api.purchase_order.update_purchase_order

Classes

Functions

asyncio(id, *, client, body) async

Update a purchase order

Updates the specified purchase order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters:

  • id (int) –
  • body (UpdatePurchaseOrderRequest) –

    Request payload for updating an existing purchase order's details, status, and line items Example: {'order_no': 'PO-2024-0156-REVISED', 'expected_arrival_date': '2024-02-20T00:00:00Z', 'status': 'PARTIALLY_RECEIVED', 'additional_info': 'Delivery delayed due to weather - updated schedule'}.

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:

Source code in katana_public_api_client/api/purchase_order/update_purchase_order.py
async def asyncio(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdatePurchaseOrderRequest,
) -> (
    DetailedErrorResponse
    | ErrorResponse
    | Union["OutsourcedPurchaseOrder", "RegularPurchaseOrder"]
    | None
):
    """Update a purchase order

     Updates the specified purchase order by setting the values of the parameters passed.
        Any parameters not provided will be left unchanged.

    Args:
        id (int):
        body (UpdatePurchaseOrderRequest): Request payload for updating an existing purchase
            order's details, status, and line items Example: {'order_no': 'PO-2024-0156-REVISED',
            'expected_arrival_date': '2024-02-20T00:00:00Z', 'status': 'PARTIALLY_RECEIVED',
            'additional_info': 'Delivery delayed due to weather - updated schedule'}.

    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:
        Union[DetailedErrorResponse, ErrorResponse, Union['OutsourcedPurchaseOrder', 'RegularPurchaseOrder']]
    """

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

asyncio_detailed(id, *, client, body) async

Update a purchase order

Updates the specified purchase order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters:

  • id (int) –
  • body (UpdatePurchaseOrderRequest) –

    Request payload for updating an existing purchase order's details, status, and line items Example: {'order_no': 'PO-2024-0156-REVISED', 'expected_arrival_date': '2024-02-20T00:00:00Z', 'status': 'PARTIALLY_RECEIVED', 'additional_info': 'Delivery delayed due to weather - updated schedule'}.

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:

Source code in katana_public_api_client/api/purchase_order/update_purchase_order.py
async def asyncio_detailed(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdatePurchaseOrderRequest,
) -> Response[
    DetailedErrorResponse
    | ErrorResponse
    | Union["OutsourcedPurchaseOrder", "RegularPurchaseOrder"]
]:
    """Update a purchase order

     Updates the specified purchase order by setting the values of the parameters passed.
        Any parameters not provided will be left unchanged.

    Args:
        id (int):
        body (UpdatePurchaseOrderRequest): Request payload for updating an existing purchase
            order's details, status, and line items Example: {'order_no': 'PO-2024-0156-REVISED',
            'expected_arrival_date': '2024-02-20T00:00:00Z', 'status': 'PARTIALLY_RECEIVED',
            'additional_info': 'Delivery delayed due to weather - updated schedule'}.

    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[Union[DetailedErrorResponse, ErrorResponse, Union['OutsourcedPurchaseOrder', 'RegularPurchaseOrder']]]
    """

    kwargs = _get_kwargs(
        id=id,
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(id, *, client, body)

Update a purchase order

Updates the specified purchase order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters:

  • id (int) –
  • body (UpdatePurchaseOrderRequest) –

    Request payload for updating an existing purchase order's details, status, and line items Example: {'order_no': 'PO-2024-0156-REVISED', 'expected_arrival_date': '2024-02-20T00:00:00Z', 'status': 'PARTIALLY_RECEIVED', 'additional_info': 'Delivery delayed due to weather - updated schedule'}.

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:

Source code in katana_public_api_client/api/purchase_order/update_purchase_order.py
def sync(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdatePurchaseOrderRequest,
) -> (
    DetailedErrorResponse
    | ErrorResponse
    | Union["OutsourcedPurchaseOrder", "RegularPurchaseOrder"]
    | None
):
    """Update a purchase order

     Updates the specified purchase order by setting the values of the parameters passed.
        Any parameters not provided will be left unchanged.

    Args:
        id (int):
        body (UpdatePurchaseOrderRequest): Request payload for updating an existing purchase
            order's details, status, and line items Example: {'order_no': 'PO-2024-0156-REVISED',
            'expected_arrival_date': '2024-02-20T00:00:00Z', 'status': 'PARTIALLY_RECEIVED',
            'additional_info': 'Delivery delayed due to weather - updated schedule'}.

    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:
        Union[DetailedErrorResponse, ErrorResponse, Union['OutsourcedPurchaseOrder', 'RegularPurchaseOrder']]
    """

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

sync_detailed(id, *, client, body)

Update a purchase order

Updates the specified purchase order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters:

  • id (int) –
  • body (UpdatePurchaseOrderRequest) –

    Request payload for updating an existing purchase order's details, status, and line items Example: {'order_no': 'PO-2024-0156-REVISED', 'expected_arrival_date': '2024-02-20T00:00:00Z', 'status': 'PARTIALLY_RECEIVED', 'additional_info': 'Delivery delayed due to weather - updated schedule'}.

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:

Source code in katana_public_api_client/api/purchase_order/update_purchase_order.py
def sync_detailed(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdatePurchaseOrderRequest,
) -> Response[
    DetailedErrorResponse
    | ErrorResponse
    | Union["OutsourcedPurchaseOrder", "RegularPurchaseOrder"]
]:
    """Update a purchase order

     Updates the specified purchase order by setting the values of the parameters passed.
        Any parameters not provided will be left unchanged.

    Args:
        id (int):
        body (UpdatePurchaseOrderRequest): Request payload for updating an existing purchase
            order's details, status, and line items Example: {'order_no': 'PO-2024-0156-REVISED',
            'expected_arrival_date': '2024-02-20T00:00:00Z', 'status': 'PARTIALLY_RECEIVED',
            'additional_info': 'Delivery delayed due to weather - updated schedule'}.

    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[Union[DetailedErrorResponse, ErrorResponse, Union['OutsourcedPurchaseOrder', 'RegularPurchaseOrder']]]
    """

    kwargs = _get_kwargs(
        id=id,
        body=body,
    )

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

    return _build_response(client=client, response=response)