• Update product-variant handler

    Parameters

    • productVariantService: ProductVariantDataService

      injected service use to handle the catalog related operations

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

      request context [headers, body, params, query].

      • params.productId is required
      • params.variantId is required

    Returns Promise<adapter.AdapterHandlerResponse>

    204 Status No Content

    Description

    This handler is used to update a product-variant by applying the following steps in sequence:

    1. Get the productId and variantId from params

    2. Update the product-variant (productVariantService.updateProductVariant)

    3. Return 204

    Throws

    Error

    • productId or variantId is missing from path

    Throws

    404 NBError Not Found

    • Product-variant ${productId}-${variantId} not found

    Throws

    500 NBError Internal Server Error

    • Error happen when update product-variant ${productId}-${variantId} from database

Generated using TypeDoc