Constructors

Properties

Methods

Constructors

Properties

args: {
    baseUri?: string;
    executeRequest: executeRequest;
    pathArgs: {
        projectKey: string;
    };
}

Type declaration

  • Optional baseUri?: string
  • executeRequest: executeRequest
  • pathArgs: {
        projectKey: string;
    }
    • projectKey: string

Methods

  • This endpoint can be used to simulate which Product Discounts would be applied if a specified Product Variant had a specified Price. Given Product and Product Variant IDs and a Price, this endpoint will return the ProductDiscount that would have been applied to that Price.

    If a Product Discount could not be found that could be applied to the Price of a Product Variant, a [NoMatchingProductDiscountFound](ctp:api:type:NoMatchingProductDiscountFoundError) error is returned.
    

    Parameters

    • methodArgs: {
          body: ProductDiscountMatchQuery;
          headers?: {
              [key: string]: string | string[];
          };
      }
      • body: ProductDiscountMatchQuery
      • Optional headers?: {
            [key: string]: string | string[];
        }
        • [key: string]: string | string[]

    Returns ApiRequest<ProductDiscount>