Skip to content

katana_public_api_client.api.stock_transfer.create_stock_transfer

katana_public_api_client.api.stock_transfer.create_stock_transfer

Classes

Functions

asyncio(*, client, body) async

Create a stock transfer

Creates a new stock transfer.

Parameters:

  • body (CreateStockTransferBody) –

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/stock_transfer/create_stock_transfer.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    body: CreateStockTransferBody,
) -> DetailedErrorResponse | ErrorResponse | StockTransfer | None:
    """Create a stock transfer

     Creates a new stock transfer.

    Args:
        body (CreateStockTransferBody):

    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, StockTransfer]
    """

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

asyncio_detailed(*, client, body) async

Create a stock transfer

Creates a new stock transfer.

Parameters:

  • body (CreateStockTransferBody) –

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/stock_transfer/create_stock_transfer.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: CreateStockTransferBody,
) -> Response[DetailedErrorResponse | ErrorResponse | StockTransfer]:
    """Create a stock transfer

     Creates a new stock transfer.

    Args:
        body (CreateStockTransferBody):

    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, StockTransfer]]
    """

    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 stock transfer

Creates a new stock transfer.

Parameters:

  • body (CreateStockTransferBody) –

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/stock_transfer/create_stock_transfer.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    body: CreateStockTransferBody,
) -> DetailedErrorResponse | ErrorResponse | StockTransfer | None:
    """Create a stock transfer

     Creates a new stock transfer.

    Args:
        body (CreateStockTransferBody):

    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, StockTransfer]
    """

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

sync_detailed(*, client, body)

Create a stock transfer

Creates a new stock transfer.

Parameters:

  • body (CreateStockTransferBody) –

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/stock_transfer/create_stock_transfer.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: CreateStockTransferBody,
) -> Response[DetailedErrorResponse | ErrorResponse | StockTransfer]:
    """Create a stock transfer

     Creates a new stock transfer.

    Args:
        body (CreateStockTransferBody):

    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, StockTransfer]]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)