queryLoyaltyCheckoutDiscounts( )


Creates a query to retrieve a list of checkout discounts.

The queryLoyaltyCheckoutDiscount() function builds a query to retrieve a list of checkout discounts and returns a LoyaltyCheckoutDiscountQueryBuilder object.

The returned object contains the query definition, which is typically used to run the query using the find() function.

You can refine the query by chaining LoyaltyCheckoutDiscountQueryBuilder functions onto the query. LoyaltyCheckoutDiscountQueryBuilder functions enable you to sort, filter, and control the results queryLoyaltyCheckoutDiscount() returns.

queryLoyaltyCheckoutDiscount() runs with these LoyaltyCheckoutDiscountQueryBuilder defaults, which you can override:

  • limit(50)
  • descending("_createdDate")

The functions that are chained to queryLoyaltyCheckoutDiscount() are applied in the order they're called. For example, if you apply ascending('status') and then descending('checkoutId'), the results are sorted first by the status, and then, if there are multiple results with the same status, the items are sorted by checkout ID.

PROPERTYSUPPORTED FILTERS & SORTING
checkoutIdeq(),ne(),exists(),in(),hasSome(),startsWith(),ascending(),descending()
statuseq(),ne(),exists(),in(),hasSome(),ascending(),descending()
Method Declaration
Copy
Request
This method does not take any parameters
Did this help?