Skip to content

katana_public_api_client.api.stocktake_row.create_stocktake_row

katana_public_api_client.api.stocktake_row.create_stocktake_row

Classes

Functions

asyncio(*, client, body) async

Create a stocktake row

Creates a new stocktake row for counting specific variants.

Parameters:

  • body (CreateStocktakeRowRequest) –

    Request payload for creating a new stocktake row for counting specific variants Example: {'stocktake_id': 4001, 'variant_id': 3001, 'system_quantity': 150.0, 'actual_quantity': 147.0, 'notes': 'Minor count difference noted'}.

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/stocktake_row/create_stocktake_row.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    body: CreateStocktakeRowRequest,
) -> DetailedErrorResponse | ErrorResponse | list["StocktakeRow"] | None:
    """Create a stocktake row

     Creates a new stocktake row for counting specific variants.

    Args:
        body (CreateStocktakeRowRequest): Request payload for creating a new stocktake row for
            counting specific variants Example: {'stocktake_id': 4001, 'variant_id': 3001,
            'system_quantity': 150.0, 'actual_quantity': 147.0, 'notes': 'Minor count difference
            noted'}.

    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, list['StocktakeRow']]
    """

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

asyncio_detailed(*, client, body) async

Create a stocktake row

Creates a new stocktake row for counting specific variants.

Parameters:

  • body (CreateStocktakeRowRequest) –

    Request payload for creating a new stocktake row for counting specific variants Example: {'stocktake_id': 4001, 'variant_id': 3001, 'system_quantity': 150.0, 'actual_quantity': 147.0, 'notes': 'Minor count difference noted'}.

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/stocktake_row/create_stocktake_row.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: CreateStocktakeRowRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | list["StocktakeRow"]]:
    """Create a stocktake row

     Creates a new stocktake row for counting specific variants.

    Args:
        body (CreateStocktakeRowRequest): Request payload for creating a new stocktake row for
            counting specific variants Example: {'stocktake_id': 4001, 'variant_id': 3001,
            'system_quantity': 150.0, 'actual_quantity': 147.0, 'notes': 'Minor count difference
            noted'}.

    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, list['StocktakeRow']]]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, body)

Create a stocktake row

Creates a new stocktake row for counting specific variants.

Parameters:

  • body (CreateStocktakeRowRequest) –

    Request payload for creating a new stocktake row for counting specific variants Example: {'stocktake_id': 4001, 'variant_id': 3001, 'system_quantity': 150.0, 'actual_quantity': 147.0, 'notes': 'Minor count difference noted'}.

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/stocktake_row/create_stocktake_row.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    body: CreateStocktakeRowRequest,
) -> DetailedErrorResponse | ErrorResponse | list["StocktakeRow"] | None:
    """Create a stocktake row

     Creates a new stocktake row for counting specific variants.

    Args:
        body (CreateStocktakeRowRequest): Request payload for creating a new stocktake row for
            counting specific variants Example: {'stocktake_id': 4001, 'variant_id': 3001,
            'system_quantity': 150.0, 'actual_quantity': 147.0, 'notes': 'Minor count difference
            noted'}.

    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, list['StocktakeRow']]
    """

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

sync_detailed(*, client, body)

Create a stocktake row

Creates a new stocktake row for counting specific variants.

Parameters:

  • body (CreateStocktakeRowRequest) –

    Request payload for creating a new stocktake row for counting specific variants Example: {'stocktake_id': 4001, 'variant_id': 3001, 'system_quantity': 150.0, 'actual_quantity': 147.0, 'notes': 'Minor count difference noted'}.

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/stocktake_row/create_stocktake_row.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: CreateStocktakeRowRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | list["StocktakeRow"]]:
    """Create a stocktake row

     Creates a new stocktake row for counting specific variants.

    Args:
        body (CreateStocktakeRowRequest): Request payload for creating a new stocktake row for
            counting specific variants Example: {'stocktake_id': 4001, 'variant_id': 3001,
            'system_quantity': 150.0, 'actual_quantity': 147.0, 'notes': 'Minor count difference
            noted'}.

    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, list['StocktakeRow']]]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)