Skip to content

katana_public_api_client.api.batch.update_batch_stock

katana_public_api_client.api.batch.update_batch_stock

Classes

Functions

asyncio(batch_id, *, client, body) async

Update batch details

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

Parameters:

  • batch_id (int) –
  • body (BatchStockUpdate) –

    Request payload for updating batch properties and tracking information Example: {'batch_number': 'BAT-2024-001-UPDATED', 'expiration_date': '2025-12-31T23:59:59.000Z', 'batch_barcode': '0317-V2'}.

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/batch/update_batch_stock.py
async def asyncio(
    batch_id: int,
    *,
    client: AuthenticatedClient | Client,
    body: BatchStockUpdate,
) -> BatchResponse | DetailedErrorResponse | ErrorResponse | None:
    """Update batch details

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

    Args:
        batch_id (int):
        body (BatchStockUpdate): Request payload for updating batch properties and tracking
            information Example: {'batch_number': 'BAT-2024-001-UPDATED', 'expiration_date':
            '2025-12-31T23:59:59.000Z', 'batch_barcode': '0317-V2'}.

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

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

asyncio_detailed(batch_id, *, client, body) async

Update batch details

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

Parameters:

  • batch_id (int) –
  • body (BatchStockUpdate) –

    Request payload for updating batch properties and tracking information Example: {'batch_number': 'BAT-2024-001-UPDATED', 'expiration_date': '2025-12-31T23:59:59.000Z', 'batch_barcode': '0317-V2'}.

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/batch/update_batch_stock.py
async def asyncio_detailed(
    batch_id: int,
    *,
    client: AuthenticatedClient | Client,
    body: BatchStockUpdate,
) -> Response[BatchResponse | DetailedErrorResponse | ErrorResponse]:
    """Update batch details

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

    Args:
        batch_id (int):
        body (BatchStockUpdate): Request payload for updating batch properties and tracking
            information Example: {'batch_number': 'BAT-2024-001-UPDATED', 'expiration_date':
            '2025-12-31T23:59:59.000Z', 'batch_barcode': '0317-V2'}.

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

    kwargs = _get_kwargs(
        batch_id=batch_id,
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(batch_id, *, client, body)

Update batch details

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

Parameters:

  • batch_id (int) –
  • body (BatchStockUpdate) –

    Request payload for updating batch properties and tracking information Example: {'batch_number': 'BAT-2024-001-UPDATED', 'expiration_date': '2025-12-31T23:59:59.000Z', 'batch_barcode': '0317-V2'}.

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/batch/update_batch_stock.py
def sync(
    batch_id: int,
    *,
    client: AuthenticatedClient | Client,
    body: BatchStockUpdate,
) -> BatchResponse | DetailedErrorResponse | ErrorResponse | None:
    """Update batch details

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

    Args:
        batch_id (int):
        body (BatchStockUpdate): Request payload for updating batch properties and tracking
            information Example: {'batch_number': 'BAT-2024-001-UPDATED', 'expiration_date':
            '2025-12-31T23:59:59.000Z', 'batch_barcode': '0317-V2'}.

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

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

sync_detailed(batch_id, *, client, body)

Update batch details

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

Parameters:

  • batch_id (int) –
  • body (BatchStockUpdate) –

    Request payload for updating batch properties and tracking information Example: {'batch_number': 'BAT-2024-001-UPDATED', 'expiration_date': '2025-12-31T23:59:59.000Z', 'batch_barcode': '0317-V2'}.

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/batch/update_batch_stock.py
def sync_detailed(
    batch_id: int,
    *,
    client: AuthenticatedClient | Client,
    body: BatchStockUpdate,
) -> Response[BatchResponse | DetailedErrorResponse | ErrorResponse]:
    """Update batch details

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

    Args:
        batch_id (int):
        body (BatchStockUpdate): Request payload for updating batch properties and tracking
            information Example: {'batch_number': 'BAT-2024-001-UPDATED', 'expiration_date':
            '2025-12-31T23:59:59.000Z', 'batch_barcode': '0317-V2'}.

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

    kwargs = _get_kwargs(
        batch_id=batch_id,
        body=body,
    )

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

    return _build_response(client=client, response=response)