Skip to content

katana_public_api_client.api.demand_forecast.clear_demand_forecast

katana_public_api_client.api.demand_forecast.clear_demand_forecast

Classes

Functions

asyncio(*, client, body) async

Clear planned demand forecast to variant

Clears planned demand forecast for a variant in location for the specified periods.

Parameters:

  • body (ClearDemandForecastRequest) –

    Request payload for clearing planned demand forecast periods for a variant in a location Example: {'variant_id': 1, 'location_id': 1, 'periods': [{'period_start': '2024-01-01T00:00:00.000Z', 'period_end': '2024-01-06T23:59:59.999Z'}]}.

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/clear_demand_forecast.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    body: ClearDemandForecastRequest,
) -> Any | DetailedErrorResponse | ErrorResponse | None:
    """Clear planned demand forecast to variant

     Clears planned demand forecast for a variant in location for the specified periods.

    Args:
        body (ClearDemandForecastRequest): Request payload for clearing planned demand forecast
            periods for a variant in a location Example: {'variant_id': 1, 'location_id': 1,
            'periods': [{'period_start': '2024-01-01T00:00:00.000Z', 'period_end':
            '2024-01-06T23:59:59.999Z'}]}.

    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:
        Any | DetailedErrorResponse | ErrorResponse
    """

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

asyncio_detailed(*, client, body) async

Clear planned demand forecast to variant

Clears planned demand forecast for a variant in location for the specified periods.

Parameters:

  • body (ClearDemandForecastRequest) –

    Request payload for clearing planned demand forecast periods for a variant in a location Example: {'variant_id': 1, 'location_id': 1, 'periods': [{'period_start': '2024-01-01T00:00:00.000Z', 'period_end': '2024-01-06T23:59:59.999Z'}]}.

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/clear_demand_forecast.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: ClearDemandForecastRequest,
) -> Response[Any | DetailedErrorResponse | ErrorResponse]:
    """Clear planned demand forecast to variant

     Clears planned demand forecast for a variant in location for the specified periods.

    Args:
        body (ClearDemandForecastRequest): Request payload for clearing planned demand forecast
            periods for a variant in a location Example: {'variant_id': 1, 'location_id': 1,
            'periods': [{'period_start': '2024-01-01T00:00:00.000Z', 'period_end':
            '2024-01-06T23:59:59.999Z'}]}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, body)

Clear planned demand forecast to variant

Clears planned demand forecast for a variant in location for the specified periods.

Parameters:

  • body (ClearDemandForecastRequest) –

    Request payload for clearing planned demand forecast periods for a variant in a location Example: {'variant_id': 1, 'location_id': 1, 'periods': [{'period_start': '2024-01-01T00:00:00.000Z', 'period_end': '2024-01-06T23:59:59.999Z'}]}.

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/clear_demand_forecast.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    body: ClearDemandForecastRequest,
) -> Any | DetailedErrorResponse | ErrorResponse | None:
    """Clear planned demand forecast to variant

     Clears planned demand forecast for a variant in location for the specified periods.

    Args:
        body (ClearDemandForecastRequest): Request payload for clearing planned demand forecast
            periods for a variant in a location Example: {'variant_id': 1, 'location_id': 1,
            'periods': [{'period_start': '2024-01-01T00:00:00.000Z', 'period_end':
            '2024-01-06T23:59:59.999Z'}]}.

    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:
        Any | DetailedErrorResponse | ErrorResponse
    """

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

sync_detailed(*, client, body)

Clear planned demand forecast to variant

Clears planned demand forecast for a variant in location for the specified periods.

Parameters:

  • body (ClearDemandForecastRequest) –

    Request payload for clearing planned demand forecast periods for a variant in a location Example: {'variant_id': 1, 'location_id': 1, 'periods': [{'period_start': '2024-01-01T00:00:00.000Z', 'period_end': '2024-01-06T23:59:59.999Z'}]}.

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/clear_demand_forecast.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: ClearDemandForecastRequest,
) -> Response[Any | DetailedErrorResponse | ErrorResponse]:
    """Clear planned demand forecast to variant

     Clears planned demand forecast for a variant in location for the specified periods.

    Args:
        body (ClearDemandForecastRequest): Request payload for clearing planned demand forecast
            periods for a variant in a location Example: {'variant_id': 1, 'location_id': 1,
            'periods': [{'period_start': '2024-01-01T00:00:00.000Z', 'period_end':
            '2024-01-06T23:59:59.999Z'}]}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)