Skip to content

katana_public_api_client.api.price_list.create_price_list

katana_public_api_client.api.price_list.create_price_list

Classes

Functions

asyncio(*, client, body) async

Create a price list

Creates a new price list.

Parameters:

  • body (CreatePriceListRequest) –

    Request payload for creating a new price list with market- specific pricing configurations and time-based validity Example: {'name': 'Premium Customer Pricing', 'currency': 'USD', 'is_default': False, 'markup_percentage': 25.0, 'start_date': '2024-01-01T00:00:00Z', 'end_date': '2024-12-31T23:59:59Z'}.

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/price_list/create_price_list.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    body: CreatePriceListRequest,
) -> DetailedErrorResponse | ErrorResponse | PriceList | None:
    """Create a price list

     Creates a new price list.

    Args:
        body (CreatePriceListRequest): Request payload for creating a new price list with market-
            specific pricing configurations and time-based validity Example: {'name': 'Premium
            Customer Pricing', 'currency': 'USD', 'is_default': False, 'markup_percentage': 25.0,
            'start_date': '2024-01-01T00:00:00Z', 'end_date': '2024-12-31T23:59:59Z'}.

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

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

asyncio_detailed(*, client, body) async

Create a price list

Creates a new price list.

Parameters:

  • body (CreatePriceListRequest) –

    Request payload for creating a new price list with market- specific pricing configurations and time-based validity Example: {'name': 'Premium Customer Pricing', 'currency': 'USD', 'is_default': False, 'markup_percentage': 25.0, 'start_date': '2024-01-01T00:00:00Z', 'end_date': '2024-12-31T23:59:59Z'}.

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/price_list/create_price_list.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: CreatePriceListRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | PriceList]:
    """Create a price list

     Creates a new price list.

    Args:
        body (CreatePriceListRequest): Request payload for creating a new price list with market-
            specific pricing configurations and time-based validity Example: {'name': 'Premium
            Customer Pricing', 'currency': 'USD', 'is_default': False, 'markup_percentage': 25.0,
            'start_date': '2024-01-01T00:00:00Z', 'end_date': '2024-12-31T23:59:59Z'}.

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

    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 price list

Creates a new price list.

Parameters:

  • body (CreatePriceListRequest) –

    Request payload for creating a new price list with market- specific pricing configurations and time-based validity Example: {'name': 'Premium Customer Pricing', 'currency': 'USD', 'is_default': False, 'markup_percentage': 25.0, 'start_date': '2024-01-01T00:00:00Z', 'end_date': '2024-12-31T23:59:59Z'}.

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/price_list/create_price_list.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    body: CreatePriceListRequest,
) -> DetailedErrorResponse | ErrorResponse | PriceList | None:
    """Create a price list

     Creates a new price list.

    Args:
        body (CreatePriceListRequest): Request payload for creating a new price list with market-
            specific pricing configurations and time-based validity Example: {'name': 'Premium
            Customer Pricing', 'currency': 'USD', 'is_default': False, 'markup_percentage': 25.0,
            'start_date': '2024-01-01T00:00:00Z', 'end_date': '2024-12-31T23:59:59Z'}.

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

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

sync_detailed(*, client, body)

Create a price list

Creates a new price list.

Parameters:

  • body (CreatePriceListRequest) –

    Request payload for creating a new price list with market- specific pricing configurations and time-based validity Example: {'name': 'Premium Customer Pricing', 'currency': 'USD', 'is_default': False, 'markup_percentage': 25.0, 'start_date': '2024-01-01T00:00:00Z', 'end_date': '2024-12-31T23:59:59Z'}.

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/price_list/create_price_list.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: CreatePriceListRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | PriceList]:
    """Create a price list

     Creates a new price list.

    Args:
        body (CreatePriceListRequest): Request payload for creating a new price list with market-
            specific pricing configurations and time-based validity Example: {'name': 'Premium
            Customer Pricing', 'currency': 'USD', 'is_default': False, 'markup_percentage': 25.0,
            'start_date': '2024-01-01T00:00:00Z', 'end_date': '2024-12-31T23:59:59Z'}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)