• Are product variant ids in bulk update endpoint exist validator

    Parameters

    • productVariantService: ProductVariantDataService

      catalog service

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

    Returns Promise<number>

    200 Status Ok

    Description

    This validator is used to check if the product variant is exist by applying the following steps in sequence:

    1. Get the variantId from the context

    2. Check if the variantId is null

    3. Check if the product variant is exist

    Throws

    400 NBError Wrong parameter

    • variantId is missing in variantIdFieldInfo.type, variantIdFieldInfo.name

    Throws

    404 NBError Not found

    • product variant not found: variantId

Generated using TypeDoc