• Create many product variants 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].

    Returns Promise<adapter.AdapterHandlerResponse>

    201 Status Created

    • data: created product variants

    Description

    This handler is used to create many product variants by applying the following steps in sequence:

    1. Get the product variants from body

    2. Create the product variants (productVariantService.createManyProductVariants)

    3. Get the created product variants (productVariantService.getProductVariants)

    4. Return the created product variants

    Throws

    500 NBError Internal Server Error

    • Error happen when create product variants from database

Generated using TypeDoc