Salta al contenuto principale
Docs
›
offer.where

offer.where

Offer

Offre le voci del catalogo che soddisfano le tue condizioni.

Firma

offer.where(where: ContentWhere, opts?: { maxItems?: number; flag?: { by: string; map: Record<string, string> } }): ContentOffer

Parametri

NomeTipoObbligatorioDescrizione
whereContentWhereObbligatorioLe condizioni sui campi che una voce deve soddisfare.
opts{ maxItems?: number; flag?: { by: string; map: Record<string, string> } }OpzionaleImpostazioni extra, come maxItems per il massimo di voci offerte.

Restituisce

ContentOffer L'offerta, da passare a list.add o list.addRow.

Esempio

list.add(self, "pack", trinket, offer.where({ weight: { lte: 3 } }));