Skip to content

katana_public_api_client.api.demand_forecast.get_demand_forecasts

katana_public_api_client.api.demand_forecast.get_demand_forecasts

Classes

Functions

asyncio(*, client, variant_id, location_id) async

List planned demand forecast for variant in location

Returns planned forecasted demand for a variant in given location.

Parameters:

  • variant_id (int) –
  • location_id (int) –

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/demand_forecast/get_demand_forecasts.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    variant_id: int,
    location_id: int,
) -> DemandForecastResponse | ErrorResponse | None:
    """List planned demand forecast for variant in location

     Returns planned forecasted demand for a variant in given location.

    Args:
        variant_id (int):
        location_id (int):

    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:
        DemandForecastResponse | ErrorResponse
    """

    return (
        await asyncio_detailed(
            client=client,
            variant_id=variant_id,
            location_id=location_id,
        )
    ).parsed

asyncio_detailed(*, client, variant_id, location_id) async

List planned demand forecast for variant in location

Returns planned forecasted demand for a variant in given location.

Parameters:

  • variant_id (int) –
  • location_id (int) –

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/demand_forecast/get_demand_forecasts.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    variant_id: int,
    location_id: int,
) -> Response[DemandForecastResponse | ErrorResponse]:
    """List planned demand forecast for variant in location

     Returns planned forecasted demand for a variant in given location.

    Args:
        variant_id (int):
        location_id (int):

    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[DemandForecastResponse | ErrorResponse]
    """

    kwargs = _get_kwargs(
        variant_id=variant_id,
        location_id=location_id,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, variant_id, location_id)

List planned demand forecast for variant in location

Returns planned forecasted demand for a variant in given location.

Parameters:

  • variant_id (int) –
  • location_id (int) –

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/demand_forecast/get_demand_forecasts.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    variant_id: int,
    location_id: int,
) -> DemandForecastResponse | ErrorResponse | None:
    """List planned demand forecast for variant in location

     Returns planned forecasted demand for a variant in given location.

    Args:
        variant_id (int):
        location_id (int):

    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:
        DemandForecastResponse | ErrorResponse
    """

    return sync_detailed(
        client=client,
        variant_id=variant_id,
        location_id=location_id,
    ).parsed

sync_detailed(*, client, variant_id, location_id)

List planned demand forecast for variant in location

Returns planned forecasted demand for a variant in given location.

Parameters:

  • variant_id (int) –
  • location_id (int) –

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/demand_forecast/get_demand_forecasts.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    variant_id: int,
    location_id: int,
) -> Response[DemandForecastResponse | ErrorResponse]:
    """List planned demand forecast for variant in location

     Returns planned forecasted demand for a variant in given location.

    Args:
        variant_id (int):
        location_id (int):

    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[DemandForecastResponse | ErrorResponse]
    """

    kwargs = _get_kwargs(
        variant_id=variant_id,
        location_id=location_id,
    )

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

    return _build_response(client=client, response=response)