This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
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.
PROPERTY | SUPPORTED FILTERS & SORTING |
---|---|
checkoutId | eq() ,ne() ,exists() ,in() ,hasSome() ,startsWith() ,ascending() ,descending() |
status | eq() ,ne() ,exists() ,in() ,hasSome() ,ascending() ,descending() |