Skip to content

katana_public_api_client.api.price_list.update_price_list

katana_public_api_client.api.price_list.update_price_list

Classes

Functions

asyncio(id, *, client, body) async

Update a price list

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

Parameters:

  • id (int) –
  • body (UpdatePriceListRequest) –

    Request payload for updating an existing price list Example: {'name': 'Premium Customer Pricing - Updated', 'markup_percentage': 30.0, 'end_date': '2025-12-31T23:59:59Z'}.

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/price_list/update_price_list.py
async def asyncio(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdatePriceListRequest,
) -> DetailedErrorResponse | ErrorResponse | PriceList | None:
    """Update a price list

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

    Args:
        id (int):
        body (UpdatePriceListRequest): Request payload for updating an existing price list
            Example: {'name': 'Premium Customer Pricing - Updated', 'markup_percentage': 30.0,
            'end_date': '2025-12-31T23:59:59Z'}.

    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, PriceList]
    """

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

asyncio_detailed(id, *, client, body) async

Update a price list

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

Parameters:

  • id (int) –
  • body (UpdatePriceListRequest) –

    Request payload for updating an existing price list Example: {'name': 'Premium Customer Pricing - Updated', 'markup_percentage': 30.0, 'end_date': '2025-12-31T23:59:59Z'}.

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/price_list/update_price_list.py
async def asyncio_detailed(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdatePriceListRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | PriceList]:
    """Update a price list

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

    Args:
        id (int):
        body (UpdatePriceListRequest): Request payload for updating an existing price list
            Example: {'name': 'Premium Customer Pricing - Updated', 'markup_percentage': 30.0,
            'end_date': '2025-12-31T23:59:59Z'}.

    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, PriceList]]
    """

    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 price list

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

Parameters:

  • id (int) –
  • body (UpdatePriceListRequest) –

    Request payload for updating an existing price list Example: {'name': 'Premium Customer Pricing - Updated', 'markup_percentage': 30.0, 'end_date': '2025-12-31T23:59:59Z'}.

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/price_list/update_price_list.py
def sync(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdatePriceListRequest,
) -> DetailedErrorResponse | ErrorResponse | PriceList | None:
    """Update a price list

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

    Args:
        id (int):
        body (UpdatePriceListRequest): Request payload for updating an existing price list
            Example: {'name': 'Premium Customer Pricing - Updated', 'markup_percentage': 30.0,
            'end_date': '2025-12-31T23:59:59Z'}.

    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, PriceList]
    """

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

sync_detailed(id, *, client, body)

Update a price list

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

Parameters:

  • id (int) –
  • body (UpdatePriceListRequest) –

    Request payload for updating an existing price list Example: {'name': 'Premium Customer Pricing - Updated', 'markup_percentage': 30.0, 'end_date': '2025-12-31T23:59:59Z'}.

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/price_list/update_price_list.py
def sync_detailed(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdatePriceListRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | PriceList]:
    """Update a price list

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

    Args:
        id (int):
        body (UpdatePriceListRequest): Request payload for updating an existing price list
            Example: {'name': 'Premium Customer Pricing - Updated', 'markup_percentage': 30.0,
            'end_date': '2025-12-31T23:59:59Z'}.

    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, PriceList]]
    """

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

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

    return _build_response(client=client, response=response)