Skip to content

katana_public_api_client.api.batch.get_batch_stock

katana_public_api_client.api.batch.get_batch_stock

Classes

Functions

asyncio(*, client, batch_id=UNSET, batch_number=UNSET, location_id=UNSET, variant_id=UNSET, batch_barcode=UNSET, batch_created_at_min=UNSET, batch_created_at_max=UNSET, include_empty=UNSET, limit=50, page=1) async

List current batch stock

Returns a list for current batch stock. The inventory is returned in sorted order, based on location_id ASC, variant_id ASC, and batch_id DESC.

Parameters:

  • batch_id (Union[Unset, int], default: UNSET ) –
  • batch_number (Union[Unset, str], default: UNSET ) –
  • location_id (Union[Unset, int], default: UNSET ) –
  • variant_id (Union[Unset, int], default: UNSET ) –
  • batch_barcode (Union[Unset, str], default: UNSET ) –
  • batch_created_at_min (Union[Unset, str], default: UNSET ) –
  • batch_created_at_max (Union[Unset, str], default: UNSET ) –
  • include_empty (Union[Unset, bool], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

  • page (Union[Unset, int], default: 1 ) –

    Default: 1.

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/get_batch_stock.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    batch_id: Unset | int = UNSET,
    batch_number: Unset | str = UNSET,
    location_id: Unset | int = UNSET,
    variant_id: Unset | int = UNSET,
    batch_barcode: Unset | str = UNSET,
    batch_created_at_min: Unset | str = UNSET,
    batch_created_at_max: Unset | str = UNSET,
    include_empty: Unset | bool = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
) -> BatchStockListResponse | ErrorResponse | None:
    """List current batch stock

     Returns a list for current batch stock. The inventory is returned in sorted order, based on
    location_id ASC,
    variant_id ASC, and batch_id DESC.

    Args:
        batch_id (Union[Unset, int]):
        batch_number (Union[Unset, str]):
        location_id (Union[Unset, int]):
        variant_id (Union[Unset, int]):
        batch_barcode (Union[Unset, str]):
        batch_created_at_min (Union[Unset, str]):
        batch_created_at_max (Union[Unset, str]):
        include_empty (Union[Unset, bool]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  Default: 1.


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

    return (
        await asyncio_detailed(
            client=client,
            batch_id=batch_id,
            batch_number=batch_number,
            location_id=location_id,
            variant_id=variant_id,
            batch_barcode=batch_barcode,
            batch_created_at_min=batch_created_at_min,
            batch_created_at_max=batch_created_at_max,
            include_empty=include_empty,
            limit=limit,
            page=page,
        )
    ).parsed

asyncio_detailed(*, client, batch_id=UNSET, batch_number=UNSET, location_id=UNSET, variant_id=UNSET, batch_barcode=UNSET, batch_created_at_min=UNSET, batch_created_at_max=UNSET, include_empty=UNSET, limit=50, page=1) async

List current batch stock

Returns a list for current batch stock. The inventory is returned in sorted order, based on location_id ASC, variant_id ASC, and batch_id DESC.

Parameters:

  • batch_id (Union[Unset, int], default: UNSET ) –
  • batch_number (Union[Unset, str], default: UNSET ) –
  • location_id (Union[Unset, int], default: UNSET ) –
  • variant_id (Union[Unset, int], default: UNSET ) –
  • batch_barcode (Union[Unset, str], default: UNSET ) –
  • batch_created_at_min (Union[Unset, str], default: UNSET ) –
  • batch_created_at_max (Union[Unset, str], default: UNSET ) –
  • include_empty (Union[Unset, bool], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

  • page (Union[Unset, int], default: 1 ) –

    Default: 1.

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/get_batch_stock.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    batch_id: Unset | int = UNSET,
    batch_number: Unset | str = UNSET,
    location_id: Unset | int = UNSET,
    variant_id: Unset | int = UNSET,
    batch_barcode: Unset | str = UNSET,
    batch_created_at_min: Unset | str = UNSET,
    batch_created_at_max: Unset | str = UNSET,
    include_empty: Unset | bool = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
) -> Response[BatchStockListResponse | ErrorResponse]:
    """List current batch stock

     Returns a list for current batch stock. The inventory is returned in sorted order, based on
    location_id ASC,
    variant_id ASC, and batch_id DESC.

    Args:
        batch_id (Union[Unset, int]):
        batch_number (Union[Unset, str]):
        location_id (Union[Unset, int]):
        variant_id (Union[Unset, int]):
        batch_barcode (Union[Unset, str]):
        batch_created_at_min (Union[Unset, str]):
        batch_created_at_max (Union[Unset, str]):
        include_empty (Union[Unset, bool]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  Default: 1.


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

    kwargs = _get_kwargs(
        batch_id=batch_id,
        batch_number=batch_number,
        location_id=location_id,
        variant_id=variant_id,
        batch_barcode=batch_barcode,
        batch_created_at_min=batch_created_at_min,
        batch_created_at_max=batch_created_at_max,
        include_empty=include_empty,
        limit=limit,
        page=page,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, batch_id=UNSET, batch_number=UNSET, location_id=UNSET, variant_id=UNSET, batch_barcode=UNSET, batch_created_at_min=UNSET, batch_created_at_max=UNSET, include_empty=UNSET, limit=50, page=1)

List current batch stock

Returns a list for current batch stock. The inventory is returned in sorted order, based on location_id ASC, variant_id ASC, and batch_id DESC.

Parameters:

  • batch_id (Union[Unset, int], default: UNSET ) –
  • batch_number (Union[Unset, str], default: UNSET ) –
  • location_id (Union[Unset, int], default: UNSET ) –
  • variant_id (Union[Unset, int], default: UNSET ) –
  • batch_barcode (Union[Unset, str], default: UNSET ) –
  • batch_created_at_min (Union[Unset, str], default: UNSET ) –
  • batch_created_at_max (Union[Unset, str], default: UNSET ) –
  • include_empty (Union[Unset, bool], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

  • page (Union[Unset, int], default: 1 ) –

    Default: 1.

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/get_batch_stock.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    batch_id: Unset | int = UNSET,
    batch_number: Unset | str = UNSET,
    location_id: Unset | int = UNSET,
    variant_id: Unset | int = UNSET,
    batch_barcode: Unset | str = UNSET,
    batch_created_at_min: Unset | str = UNSET,
    batch_created_at_max: Unset | str = UNSET,
    include_empty: Unset | bool = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
) -> BatchStockListResponse | ErrorResponse | None:
    """List current batch stock

     Returns a list for current batch stock. The inventory is returned in sorted order, based on
    location_id ASC,
    variant_id ASC, and batch_id DESC.

    Args:
        batch_id (Union[Unset, int]):
        batch_number (Union[Unset, str]):
        location_id (Union[Unset, int]):
        variant_id (Union[Unset, int]):
        batch_barcode (Union[Unset, str]):
        batch_created_at_min (Union[Unset, str]):
        batch_created_at_max (Union[Unset, str]):
        include_empty (Union[Unset, bool]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  Default: 1.


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

    return sync_detailed(
        client=client,
        batch_id=batch_id,
        batch_number=batch_number,
        location_id=location_id,
        variant_id=variant_id,
        batch_barcode=batch_barcode,
        batch_created_at_min=batch_created_at_min,
        batch_created_at_max=batch_created_at_max,
        include_empty=include_empty,
        limit=limit,
        page=page,
    ).parsed

sync_detailed(*, client, batch_id=UNSET, batch_number=UNSET, location_id=UNSET, variant_id=UNSET, batch_barcode=UNSET, batch_created_at_min=UNSET, batch_created_at_max=UNSET, include_empty=UNSET, limit=50, page=1)

List current batch stock

Returns a list for current batch stock. The inventory is returned in sorted order, based on location_id ASC, variant_id ASC, and batch_id DESC.

Parameters:

  • batch_id (Union[Unset, int], default: UNSET ) –
  • batch_number (Union[Unset, str], default: UNSET ) –
  • location_id (Union[Unset, int], default: UNSET ) –
  • variant_id (Union[Unset, int], default: UNSET ) –
  • batch_barcode (Union[Unset, str], default: UNSET ) –
  • batch_created_at_min (Union[Unset, str], default: UNSET ) –
  • batch_created_at_max (Union[Unset, str], default: UNSET ) –
  • include_empty (Union[Unset, bool], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

  • page (Union[Unset, int], default: 1 ) –

    Default: 1.

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/get_batch_stock.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    batch_id: Unset | int = UNSET,
    batch_number: Unset | str = UNSET,
    location_id: Unset | int = UNSET,
    variant_id: Unset | int = UNSET,
    batch_barcode: Unset | str = UNSET,
    batch_created_at_min: Unset | str = UNSET,
    batch_created_at_max: Unset | str = UNSET,
    include_empty: Unset | bool = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
) -> Response[BatchStockListResponse | ErrorResponse]:
    """List current batch stock

     Returns a list for current batch stock. The inventory is returned in sorted order, based on
    location_id ASC,
    variant_id ASC, and batch_id DESC.

    Args:
        batch_id (Union[Unset, int]):
        batch_number (Union[Unset, str]):
        location_id (Union[Unset, int]):
        variant_id (Union[Unset, int]):
        batch_barcode (Union[Unset, str]):
        batch_created_at_min (Union[Unset, str]):
        batch_created_at_max (Union[Unset, str]):
        include_empty (Union[Unset, bool]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  Default: 1.


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

    kwargs = _get_kwargs(
        batch_id=batch_id,
        batch_number=batch_number,
        location_id=location_id,
        variant_id=variant_id,
        batch_barcode=batch_barcode,
        batch_created_at_min=batch_created_at_min,
        batch_created_at_max=batch_created_at_max,
        include_empty=include_empty,
        limit=limit,
        page=page,
    )

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

    return _build_response(client=client, response=response)