Skip to content

katana_public_api_client.api.services.update_service

katana_public_api_client.api.services.update_service

Classes

Functions

asyncio(id, *, client, body) async

Update Service

Update an existing Service. (See: Update Service)

Parameters:

  • id (int) –
  • body (UpdateServiceRequest) –

    Request payload for updating an existing service's properties and specifications Example: {'name': 'Updated Assembly Service', 'uom': 'hours', 'category_name': 'Professional Services', 'is_sellable': True, 'is_archived': False, 'sales_price': 85.0, 'default_cost': 55.0, 'sku': 'ASSM-001-UPD', 'additional_info': 'Updated professional product assembly service', 'custom_field_collection_id': 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/services/update_service.py
async def asyncio(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdateServiceRequest,
) -> DetailedErrorResponse | ErrorResponse | Service | None:
    """Update Service

     Update an existing Service. (See: [Update
    Service](https://developer.katanamrp.com/reference/updateservice))

    Args:
        id (int):
        body (UpdateServiceRequest): Request payload for updating an existing service's properties
            and specifications Example: {'name': 'Updated Assembly Service', 'uom': 'hours',
            'category_name': 'Professional Services', 'is_sellable': True, 'is_archived': False,
            'sales_price': 85.0, 'default_cost': 55.0, 'sku': 'ASSM-001-UPD', 'additional_info':
            'Updated professional product assembly service', 'custom_field_collection_id': 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[DetailedErrorResponse, ErrorResponse, Service]
    """

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

asyncio_detailed(id, *, client, body) async

Update Service

Update an existing Service. (See: Update Service)

Parameters:

  • id (int) –
  • body (UpdateServiceRequest) –

    Request payload for updating an existing service's properties and specifications Example: {'name': 'Updated Assembly Service', 'uom': 'hours', 'category_name': 'Professional Services', 'is_sellable': True, 'is_archived': False, 'sales_price': 85.0, 'default_cost': 55.0, 'sku': 'ASSM-001-UPD', 'additional_info': 'Updated professional product assembly service', 'custom_field_collection_id': 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/services/update_service.py
async def asyncio_detailed(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdateServiceRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | Service]:
    """Update Service

     Update an existing Service. (See: [Update
    Service](https://developer.katanamrp.com/reference/updateservice))

    Args:
        id (int):
        body (UpdateServiceRequest): Request payload for updating an existing service's properties
            and specifications Example: {'name': 'Updated Assembly Service', 'uom': 'hours',
            'category_name': 'Professional Services', 'is_sellable': True, 'is_archived': False,
            'sales_price': 85.0, 'default_cost': 55.0, 'sku': 'ASSM-001-UPD', 'additional_info':
            'Updated professional product assembly service', 'custom_field_collection_id': 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[DetailedErrorResponse, ErrorResponse, Service]]
    """

    kwargs = _get_kwargs(
        id=id,
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(id, *, client, body)

Update Service

Update an existing Service. (See: Update Service)

Parameters:

  • id (int) –
  • body (UpdateServiceRequest) –

    Request payload for updating an existing service's properties and specifications Example: {'name': 'Updated Assembly Service', 'uom': 'hours', 'category_name': 'Professional Services', 'is_sellable': True, 'is_archived': False, 'sales_price': 85.0, 'default_cost': 55.0, 'sku': 'ASSM-001-UPD', 'additional_info': 'Updated professional product assembly service', 'custom_field_collection_id': 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/services/update_service.py
def sync(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdateServiceRequest,
) -> DetailedErrorResponse | ErrorResponse | Service | None:
    """Update Service

     Update an existing Service. (See: [Update
    Service](https://developer.katanamrp.com/reference/updateservice))

    Args:
        id (int):
        body (UpdateServiceRequest): Request payload for updating an existing service's properties
            and specifications Example: {'name': 'Updated Assembly Service', 'uom': 'hours',
            'category_name': 'Professional Services', 'is_sellable': True, 'is_archived': False,
            'sales_price': 85.0, 'default_cost': 55.0, 'sku': 'ASSM-001-UPD', 'additional_info':
            'Updated professional product assembly service', 'custom_field_collection_id': 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[DetailedErrorResponse, ErrorResponse, Service]
    """

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

sync_detailed(id, *, client, body)

Update Service

Update an existing Service. (See: Update Service)

Parameters:

  • id (int) –
  • body (UpdateServiceRequest) –

    Request payload for updating an existing service's properties and specifications Example: {'name': 'Updated Assembly Service', 'uom': 'hours', 'category_name': 'Professional Services', 'is_sellable': True, 'is_archived': False, 'sales_price': 85.0, 'default_cost': 55.0, 'sku': 'ASSM-001-UPD', 'additional_info': 'Updated professional product assembly service', 'custom_field_collection_id': 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/services/update_service.py
def sync_detailed(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdateServiceRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | Service]:
    """Update Service

     Update an existing Service. (See: [Update
    Service](https://developer.katanamrp.com/reference/updateservice))

    Args:
        id (int):
        body (UpdateServiceRequest): Request payload for updating an existing service's properties
            and specifications Example: {'name': 'Updated Assembly Service', 'uom': 'hours',
            'category_name': 'Professional Services', 'is_sellable': True, 'is_archived': False,
            'sales_price': 85.0, 'default_cost': 55.0, 'sku': 'ASSM-001-UPD', 'additional_info':
            'Updated professional product assembly service', 'custom_field_collection_id': 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[DetailedErrorResponse, ErrorResponse, Service]]
    """

    kwargs = _get_kwargs(
        id=id,
        body=body,
    )

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

    return _build_response(client=client, response=response)